16-Bit RGB JPEG2000 Images Display Corrupt if Auto-Contrast Off
mprenter
Global Mapper UserTrusted User
Hi, I've encountered a bug in GlobalMapper 12. If you load an RGB 16-bit JPEG2000 image, by default it will calculate Auto-Contrast statistics and display the image with the contrast "enhanced." But then, if you go into the Control Center, select Options, and under Color/Contrast Adjustment, you select "No Contrast Adjustment", then the image will display corrupted. Just colored static.
Is this part of the MANY problems with the JPEG2000 library that we're waiting for a fix for?
Thanks,
Mark
Is this part of the MANY problems with the JPEG2000 library that we're waiting for a fix for?
Thanks,
Mark
Comments
-
Mark,
That's not a bug, that is what you will see for just about any 16-bit per color channel image if you turn off contrast adjustment, which is how you convert the base 16-bit per color channel space to an 8-bit per color channel space for display. Without any contrast adjustment done you just get the lower 8 bits of each 16-bit values which will likely look like static.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Hi Mike, thanks for the reply, but actually I think this IS a bug. Turning off contrast adjustment works fine for 16-bit TIFF images. It's only 16-bit JPEG2000 images that go corrupt.
Mark -
Mark,
There is a difference in how 16-bit TIFF and JPEG2000 images display non-adjusted images. TIFF files were using the upper 8-bits of each 16-bit value and JPEG2000 the lower 8-bits, which is why you see the difference. Neither method will work in all cases in you really should almost never display 16-bit images without contrast adjustment as you are likely losing a lot of information, but you will typically get a better display by using the upper 8-bits like TIFF display does, so I changed JPEG2000 display to do the same.
I have placed a new build at http://www.globalmapper.com/global_mapper12.zip with the change for you to try. Simply download that file and extract the contents into your existing v12.xx installation folder to give it a try. If you are using the 64-bit v12 version there is a new build at http://www.globalmapper.com/global_mapper12_64bit.zip .
I would still recommend not disabling contrast adjustment for 16-bit image display though as you will only get something decent if your 16-bit imagery spans most of the valid 16-bit range and isn't constricted to just a portion of that range.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Wow, Mike, thanks for the quick reply and rebuild!! I'll give it a shot. But I really have to disagree about the auto-contrast adjustment. When we load a series of image tiles that cover, say a city, the tiles are originally "seamless", meaning you cannot see where one tile ends and the next one starts. An auto-contrast adjustment usually performs a stretch on each image individually, so the tiles end up not being seamless anymore and the tiles end up looking like a big patchwork quilt. Not very attractive.
Our 16-bit images always span the full 16-bits so we would love it if there was a global option to disable the auto-contrast.
Thanks,
Mark -
Mark,
For 16-bit data like yours it would be ok to view without any kind of contrast stretch. There is a new option in the new build to default contrast adjustment to a 'Linear Min-Max Stretch', which should work the same as no contrast adjustment if the data spans the full 16-bit range. This option is in the Advanced section of the General tab of the Configuration dialog. You can try checking that and see if you get the results that you want.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Hi, with the new build, GlobalMapper now displays JPEG2000 images correctly if you set the display option to no contrast stretch. However, you mentioned that the "Linear Min-Max Stretch" should work the same as no contrast adjustment, but when I select Linear Min-Max Stretch, I still see a small change in contrast. Would it be possible to get a global "no contrast adjustment" option?
Thanks,
Mark -
Mark,
I'll go ahead and add an option do disable auto-contrast adjustment entirely and point you at a new build when ready.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Mark,
I have completed adding the new option to the Advanced section of the General tab of the Configuration dialog. I have placed a new build at http://www.globalmapper.com/global_mapper12.zip with the change for you to try. Simply download that file and extract the contents into your existing v12.xx installation folder to give it a try. If you are using the 64-bit v12 version there is a new build at http://www.globalmapper.com/global_mapper12_64bit.zip .
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com
Categories
- 12.7K All Categories
- 5.6K Features Discussion
- 342 Downloading Imagery
- 1.3K Elevation Data
- 380 Georeferencing Imagery Discussion
- 628 GM Script Language
- 53 User Scripts
- 113 GPS Features
- 414 Projection Questions
- 819 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 177 Announcement and News
- 908 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 562 Other Discussion
- 129 GIS Data Sources
- 27 Global Mapper Showcase
- 233 How I use Global Mapper
- 107 Global Mapper Forum Website