Preserve colormap when performing an Extract By Mask

6422
10
Jump to solution
04-03-2012 06:07 AM
stephencrook
New Contributor II
Hi all!  I am having a problem preserving a colormap once I extract by mask to get a subset of raster data.  I made a mosaic of three images, then converted it to a single raster (future analysis looked difficult if I had kept it as a mosaic file).  Then I used extract by mask to take a large portion of the marine parts of the mosaic.  I guess because of some of the statistics involved it didn't want to keep all of the water a nice dark blue color as it was when the land areas were also part of the raster.

I found this tutorial for version 9.x, but it isn't relevant to 10.  Does anyone know how to do what is outlined in the following tutorial in ArcGIS 10?

http://support.esri.com/en/knowledgebase/techarticles/detail/31936

Thanks
0 Kudos
1 Solution

Accepted Solutions
stephencrook
New Contributor II
I haven't really solved the problem, but I found a work-around that is sufficient for my purposes... though I'm not sure if it's technically the best way to do things.

Under properties/symbology, highlight the "show" RGB Composite.  In the "stretch box" keep type as standard deviations.  Then, experiment with different numbers of standard deviations.  For my study area, using 20 standard deviations (rather than the default of 2) made my clipped image look about the same as the parent.

View solution in original post

10 Replies
GayathriAlallasundaram
New Contributor III
Hi,

After extracting by mask add the image to ArcMap, then change the symbology to unique values then save this as a layer file and then import the layer file again.

Please see this video for workflow,

http://screencast.com/t/QKdcWcsQ8L

-Gayu
0 Kudos
stephencrook
New Contributor II
Thank you for the prompt response!  However, I have no option of using "unique values."  The only options in layer/symbology are "stretch" and "RGB_composite"... so this isn't helping much.

I have a landsat image, and when I crop out a small subset of the image the colors are totally different.  It's a question of matching the colors of the new clipped landsat image against the original-full extent landsat image.  It's not simply restoring the colors to the same image.  Any advice?

Thanks again for the reply.
0 Kudos
PrasantaBhattarai
Esri Contributor
I have a landsat image, and when I crop out a small subset of the image the colors are totally different.  It's a question of matching the colors of the new clipped landsat image against the original-full extent landsat image.  It's not simply restoring the colors to the same image.  Any advice?

Thanks again for the reply.

If your clipped image looks different in color than the original imagery after clipping, it might just be the stretch type being used for the raster. If the statistics of an image is calculated (for example, when clipping), by default ArcMap displays it with a stretch of standard deviation. For the clipped raster, from symbology, change the stretch type to "None" and see if the image looks like the original image. Here's a blog "Is your raster so bright you have to wear shades?" which discusses about this issue. I hope this helps!!
0 Kudos
stephencrook
New Contributor II
If your clipped image looks different in color than the original imagery after clipping, it might just be the stretch type being used for the raster. If the statistics of an image is calculated (for example, when clipping), by default ArcMap displays it with a stretch of standard deviation. For the clipped raster, from symbology, change the stretch type to "None" and see if the image looks like the original image. Here's a blog "Is your raster so bright you have to wear shades?" which discusses about this issue. I hope this helps!!


Thanks for the help, I thought that might solve it.  Unfortunately, that just turned the whole area (ocean surface) black 😕
0 Kudos
stephencrook
New Contributor II
I haven't really solved the problem, but I found a work-around that is sufficient for my purposes... though I'm not sure if it's technically the best way to do things.

Under properties/symbology, highlight the "show" RGB Composite.  In the "stretch box" keep type as standard deviations.  Then, experiment with different numbers of standard deviations.  For my study area, using 20 standard deviations (rather than the default of 2) made my clipped image look about the same as the parent.
MarkHotz
Occasional Contributor II

Stephen:  I realise it has been over 4 years since this post, but this certainly solved my issue.  I was so worried because the image on which I had been working (for over 8 hours) had resulted in a stretched version.  I was thinking that I may have to restart my entire mosaic.  Thankfully, this saved me hours of work :-).

TanyaHaddad
New Contributor III

Archives for the win!

JohnSchweisinger
Occasional Contributor

Save as a Layer File may help?

0 Kudos
MarkStanley
New Contributor

Ok, I found a fix for this. The stretch is adjusting the histograms for the RGB data, but it is relying on an incomplete data set compared to the composite image you made with the Landsat data. What you need to do in the symbology is make sure your RGB bands are correct for the Landsat source, then under the 'statistics' tab choose "custom" from the statistics drop down. Now you can enter the min and max for each channel, if you set these min and max values to match the unclipped composite image you made, the colorization should match. I had the same issue and this solved it. 

0 Kudos