The AVIRIS data sometimes is provided uncropped. This creates edge regions with values of "-50". Shown is AVIRIS Moffett Field image Layer 1 (400nm) and a zoom of the top-right corner. The dark blue on the edges is non-imaged ground.
To expedite processing a mask can be employed. For compression a bit mask is applicable. The challenge is to create a bit mask for this image and some other test cases.
Input: m ( 2-D uint16 array with zero and non-zero values )
Output: bmv (uint8 bit map vector with 0s at a==0 and 1s for a>0 locations)
Note: Input arrays may not be modulo 8. Append 0s as needed.
This bit mask saves 5% of total image size, yet is itself highly wasteful for compression since only the edges are impacted. A follow-up challenge will be to find the maximum-area non-zero inscribed rectangle.
MATLAB and Simulink resources for Arduino, LEGO, and Raspberry PiLearn more
Opportunities for recent engineering grads.Apply Today
New to MATLAB?Learn MATLAB today!
Play games and win prizes!Learn more