Global Mapper v25.0

16-Bit RGB JPEG2000 Images Display Corrupt if Auto-Contrast Off

mprenter
mprenter Global Mapper UserTrusted User
edited December 2010 in Bug Report
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

Comments

  • global_mapper
    global_mapper Administrator
    edited December 2010
    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
  • mprenter
    mprenter Global Mapper User Trusted User
    edited December 2010
    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
  • global_mapper
    global_mapper Administrator
    edited December 2010
    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
  • mprenter
    mprenter Global Mapper User Trusted User
    edited December 2010
    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
  • global_mapper
    global_mapper Administrator
    edited December 2010
    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
  • mprenter
    mprenter Global Mapper User Trusted User
    edited December 2010
    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
  • global_mapper
    global_mapper Administrator
    edited December 2010
    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
  • global_mapper
    global_mapper Administrator
    edited December 2010
    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