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.
Example:
- m=[ 10 0 20; 15 12 0; 0 8 2] becomes mb=[1 0 1;1 1 0;0 1 1].
- The idx series is mb(:)=[1 1 0 0 1 1 1 0 1]' .
- This is 9 long so need to append 7 zeros.
- Converting the binary to uint8 values yields bmv=[206 128].
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.
Solution Stats
Problem Comments
3 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers17
Suggested Problems
-
30013 Solvers
-
1344 Solvers
-
49 Solvers
-
Set the array elements whose value is 13 to 0
1435 Solvers
-
52 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!
link to the data does not seem to be working in the testsuite
The link is not working, could you, please, fix it?
The link has been commented out from the test suite.