bit2bit
Change the bit-type of pixel data
bit2bit allows the user to change the bit-type of a cube to 8, 16, or 32-bit.
Since the pixel type will typically be modified with this procedure, if a non-32 bit output is selected some binning will be done to accomodate the output data's new bit type. To minimize over or underbinning, the user can choose values MINPER and MAXPER or MIN and MAX to clip the original data set. MINPER and MAXPER denote minimum and maximum percentages on the cumulative histogram of the incoming cube data that you wish to be represented in the output cube. MIN and MAX represent the minimum and maximum pixel values you wish to have represented in the output cube. All pixels under MIN or MINPER get set to LRS in the output cube while all pixels over MAX or MAXPER get mapped to HRS.
Why would one wish to clip data off a perfectly good cube? The example below illustrates why:
Below is an incoming image shown in a histogram:

If we were to convert this image to 8-bit directly, 50 % of the bins would be occupied by only 2.5% of the data (DN's in the range 12500-15000) as shown below:

To minimize over or under binning in the output image, the user can chose to only accept data within the range bounded by MINPER and MAXPER on the cumulative histogram. In the example above, if the user set MINPER=0 and MAXPER=97.5, the 8-bit range (including base and multiplier) would include DN's in the range 10,000 to 12,500. A DN above 12500 would be set as the special pixel HRS.
Any data that gets scaled out of range gets converted to the special pixels LRS (if the DN is below the value corresponding to the minimum percentile specified by MINPER) or HRS (if the DN is above the value corresponding to the maximum percentile specified by MAXPER).
Categories
Related Objects and Documents
Applications
History
Philip Martinez | 2010-06-10 | Original version |
Jacob Cain | 2022-11-22 | Changed TO type to cube. Fixes #4780. |