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 compression the unused mask can be created with an interior excluded rectangle of no Zeros and maximum pixels. The challenge is to quickly and accurately determine the maximum non-zero inscribed rectangle for this image and some other test cases.
Input: m ( 2-D array with zero and non-zero values )
Output: [idxtlc rmnr rmnc]
Score: Time ( msec ) Based upon time to process the 1924x753 AVIRIS image.
(If time-out occurs I suggest downloading the mat file using the test suite code and then optimize with profiler.)
Passing: Minimum number of pixels in rectangle
For the AVIRIS image the zero edge bit mask encoding can be reduced 89% using an inscribed rectangle.
Note: Additional test cases may be invoked if hard coded solution achieves best score.
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