Image Extension for Server 10.1 not rendering image correctly at cache scales

725
1
07-20-2013 07:27 AM
lars1
by
New Contributor II
I have an NTF raster mosaic served via image extension for server. If I do not use tiles from a cache it looks as it should. However, if I create a cache then the color of the images goes wrong in certain areas of the image and at certain scales, ie when zoomed into an area where clouds are present or other significant variation in pixel value occurs. A sample of these bad results from the javascript api is in this picture:
[ATTACH=CONFIG]26082[/ATTACH]

This problem occurs when viewed in Flex viewer, ArcMap, and ArcCatalog preview window as well, and occurs no matter how many scales I build the cache at (I tried 3, 4, 8, 15, and 20 scale levels, maybe a couple others). Is there a way to improve cache generation so areas of significant pixel value variation do not cause this problem?

Thanks!
Tags (2)
0 Kudos
1 Reply
PeterBecker
Esri Regular Contributor
The issue you are seeing is related to stretches being applied to the imagery. When using an image service the server generates the view for each screen. Typically when using an image service of higher bit depth imagery, dynamic range adjustment (DRA) is turned on. This results in the server adjusting the stretch of the image dependent on the content. Areas with very dark content get lightened and visa versa. When using caching such DRA does not work well. If turned on when the cache is generated each �??super tile�?? will be generated with the appropriate stretch for that tile. This will result in borders between tiles becoming apparent as well as stretches changing from scale to scale. This is what you are seeing here. To overcome this it is necessary to turn off the DRA on the mosaic dataset prior to caching. It is necessary to fix the stretch e.g. using a min/max stretch + gamma with predefined values.
Simplest is to apply a fixed stretch to each image dependent on it statistics. IE compute stats for each raster item and then apply a statistic stretch eg 0.5 percent clip. This can through be problematic when there are scenes with clouds or snow. A work around is to first mask out the clouds then compute the stretch and remove the masks.
A better way to resolve this is to applying a standardized stretch that is not affected by local content, such as apparent reflectance with the atmospheric correction functions that are applied with Atmospheric Correction functions. (These have been improved at 10.2). It is then possible to provide a stretch that can be applied on all the images to make them look good. Still contrast can be lost when working on imagery with very large changed in brightness.
Additionally the use of color correction can also be used to apply a stretch that changes gradually. IE first try and get the colors or the scenes to have generally good color and then apply color correction before caching.  This will enable the contrast in both predominantly light and dark areas to be maintained.
0 Kudos