Showing results for 
Search instead for 
Do you mean 

How to create a common LUT for multiple 16-bit images.

by Technical Evangelist on ‎07-05-2017 12:37 PM (1,201 Views)


How to create a common LUT for multiple 16-bit images.


This procedure will help overcome contrast differences between two halves of a 16-bit image with contrast stretches.

It will show how to apply a common LUT to the two image halves. This will be particularly helpful for users of newer sensor multi-segment images, which require a common LUT for all images. Such data is 11-bit data treated as 16-bit data in ERDAS IMAGINE.


Why is this procedure necessary?


Basically, 16-bit (or 11-bit treated as 16-bit) data cannot be displayed on a 256 grey-level color gun. So ERDAS IMAGINE generally bins the data for you into 256 bins. Where the bins occur depends upon the distribution of the input image. Even if you Direct Bin the data (as many bins as max - min), the binning occurs between the minimum and maximum data values for that image. Consequently two 16-bit images generally don't have the same binning structure and therefore it's difficult to copy breakpoints from one to another (because the breakpoint in one might not exist in the histogram of the other).


The steps to follow:


You can do this using either Direct or Linear binning when computing the statistics - it's your choice. However, just remember to consistently use the same technique throughout these instructions depending on which technique you want to use. This example uses Direct Binning because it is the most appropriate method when creating LUTs for 16-bit data.


Use the Image Metadata tool to calculate statistics for each image using your chosen binning technique (Direct Binning in this example). You may want to include zeros in the calculation. This will make the next steps easier because you won't have to find out the highest Min value (it'll be 0 in both probably), but does waste bins, so it's better to exclude zeros. In this example zero values were ignored.




Display both images in the same 2D View. Let's call them Image1 and Image2. 


Open the Data Scaling tool. Multispectral or Panchromatic tab > Enhancement group > Adjust Radiometry menu > Data Scaling


To be able to apply a LUT from one image onto another image you need to have the same ranges (and binning) set for each image. So you need to know what range you need to set. Unfortunately you can't specify a range bigger than the min - max range for an image, so you have to use a common smaller range. Therefore, the first step is to note the data ranges for each image. In the Data Scaling tool make a note for Image1 what the Min and Max values are for the red band and repeat for the green and blue bands (you only need to do this once if looking at a grey scale image). Note that if you included zeros in the stats calculation the Min may always be 0.


Select Image2 and bring up the Data Scaling tool then repeat the process from step 4.




Now you need to know what is the highest Min and what is the lowest Max for each band, because you need a range which is common to both images. Make a note of what the ranges are for each band.




Using the Data Scaling tool you still have up for Image2, type in the new Min and Max values for each band. Click the Save icon on the Viewer (new stats will be calculated based on the new data range)


Select the Image1 and  bring up the Data Scale tool and enter the same ranges. Click OK for Image1.


Now the two images have a common statistical range. Their contrast should match in the viewer, although this may not be the final contrast stretch. Bring up whatever LUT tool you want to use (e.g. using the Break Point Editor) and create a LUT for Image2 which you like.


In the Breakpoint editor for Image2, use the right mouse button in the Red histogram area to get the Options list and pick Copy LUT for the Red LUT.


Select the Image1 also bring up the Breakpoint Editor for Image1 - use the right mouse button in the Red histogram area to get the Options list and pick Paste LUT


Repeat for the Green and Blue histograms. Click 'Apply All' in both Breakpoint Editors to apply the changes. These will be saved to the Lookup Table (image header).


Save the images again so that the common LUT is used next time you open these images in an IMAGINE viewer again.


by Technical Evangelist
‎09-28-2017 07:26 AM - edited ‎11-28-2017 06:30 AM