Problem 898. AVIRIS Hyperspectral Bit Mask
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
Alfonso Nieto-Castanon
on 21 Jan 2013
link to the data does not seem to be working in the testsuite
Rafael S.T. Vieira
on 30 Oct 2020
The link is not working, could you, please, fix it?
Dyuman Joshi
on 7 Sep 2021
The link has been commented out from the test suite.
Solution Comments
Show commentsProblem Recent Solvers17
Suggested Problems
-
293 Solvers
-
Arrange Vector in descending order
11277 Solvers
-
331 Solvers
-
Return elements unique to either input
770 Solvers
-
Create a random vector of integers with given sum
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!