Problem 908. AVIRIS Inscribed Rectangle Bit Mask - Speed Test
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]
- idxtlc : array index of top left corner
- rmnr : numer of rows of the non-zero rectangle mask
- rmnc : number of columns of the non-zero rectangle mask
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
Example:
- m=[ 1 1 0 1 1......idxtlc = 3 ( index of TLC row 3, col 1)
- ........1 0 1 1 1......rmnr = 3 ( rectangle mask number rows )
- ........1 1 1 1 1......rmnc = 5 ( rectangle mask number columns )
- ........1 1 1 1 1......Maximum rectangle pixels of 15
- ........1 1 1 1 1 ]
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.
Solution Stats
Problem Comments
-
1 Comment
Error using load
Unable to read MAT-file /users/mss.system.D0SaeN/aviris_moffett_L001.mat. Not a binary MAT-file. Try load -ASCII to
Solution Comments
Show commentsProblem Recent Solvers4
Suggested Problems
-
340 Solvers
-
Project Euler: Problem 1, Multiples of 3 and 5
3309 Solvers
-
Project Euler: Problem 16, Sums of Digits of Powers of Two
139 Solvers
-
54 Solvers
-
512 Solvers
More from this Author308
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!