Calculating auto-contrast statistics

maxsquiresmaxsquires Global Mapper UserPosts: 10
edited July 2008 in Raster Data
I was wondering if there is a way to specify not to calculate the auto-contrast statistics.

I am running into a problem with how dark the rasters appear after batch reprojecting them.

I am converting from wgs84 geographic to mercator. The I specified no compression but when i look at the cell values for th output raster they have changed from 255,255,255 to 127,127,126.

What can I do to maintain the RGB values?

Thanks.

Max

Comments

  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited July 2008
    Max,

    What format of file are you converting from and what bit depth do the original files have? In general auto-contrast adjustement is only automatically enabled for files which have more than 8 bits per color channel as they need to have some kind of adjustment performed to get them in to the 8 bit per color channel format that Global Mapper can view and export. In most other cases contrast adjustment should only be done automatically if you check the box on the batch conversion dialog to perform automatic contrast adjustment.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • maxsquiresmaxsquires Global Mapper User Posts: 10
    edited July 2008
    The original rasters are 16 bit TIFF.
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited July 2008
    If the originals are 16-bit per color channel files then some kind of auto-contrast has to be done in order to reduce the 16-bit color space to 8-bits for display/export. Otherwise the 16-bit values are just truncated to 8-bit values which is very rarely what you want. If you just load one of the 16-bit files into Global Mapper and then go to the Color/Contrast Adjust tab of the Configuration dialog and disable contrast adjustment is the display then what you want? If so, that would mean that truncating the files would work for you in which case I may need to add a way to forcefully disable automatic contrast adjustment for you.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • maxsquiresmaxsquires Global Mapper User Posts: 10
    edited July 2008
    This is what the image looks like before reprojecting it
    16054659
    This is what it looks like after
    16054661

    right click the icon and go to properties then open the http site in a browser.

    It doesn't look like the pictures are showing up, but one is much darker than the other. When I go to calculate statistics on the new raster, i am unable to do so in such a way that gives me a similarly colored raster.
    If I converted to a single band image, would my color loss be reduced?
    I don't want to truncate the pixel values, but I do want to maintain the color depth.
    Should I convert the image to 8 bit before trying to reproject it?
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited July 2008
    Max,

    Is it possible for you to send me the original 16-bit TIFF file so that I can see what is happening? You can send it to support@globalmapper.com.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited July 2008
    Max,

    Thanks for the sample file. It was a very strange file in that it had 3 16-bit color channels but all of the color values were in the 8-bit range. There really was no reason for it to have 16 bits per color channel.

    In any case, I have gone ahead and added an option to the batch converter to allow you to disable the automatic enabling of contrast adjustment, which allows you to get the results that you need for this file. I have placed a new build at http://www.globalmapper.com/global_mapper9.zip with the change for you to try. Simply download that file and extract the contents into your existing v9.xx installation folder to give it a try.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • maxsquiresmaxsquires Global Mapper User Posts: 10
    edited July 2008
    Wow. Thanks a lot for the quick responses. I can't believe that you could change the program that fast.

    You don't gEt that kind of Service from other gis pRovIders.

    ;)
Sign In or Register to comment.