Why is my hypercube only showing black?
2 views (last 30 days)
Show older comments
edit: For some reason, the Data Cube in the unseccessful hypercubes are blank. I have no idea why or any idea of how to fix them.
I am trying to use the hypercube() function to look at my hypercube on MATLAB, but for some reason it's not working for a few of them. I have a .bil and .hdr file, and was successfully able to create an hcube value, but when I try to display the image, it's completely black.
I had a previous successful attempt with a different hypercube, and the only differences I can see between the two is that the DataCube for the successful hypercube is labeled as 'single', while the unsuccessful hypercubes are labeled as 'uint16'. Could this be the reaosn why they're not working?
Here's an example of what I see (hcube is successful, hcube2 is not):
hcube =
hypercube with properties:
DataCube: [2250x1032x150 single]
Wavelength: [150x1 double]
Metadata: [1x1 struct]
hcube2 =
hypercube with properties:
DataCube: [49x45x300 uint16]
Wavelength: [300x1 double]
Metadata: [1x1 struct]
0 Comments
Answers (1)
Manasa Singam
on 22 May 2024
Hi Keegan,
Usually, there won't be any issues with class type when we are visualizing the data. I am feeling here the issue is not because of class type, but the data limits.
Can you let me know what are the data limits (minimum value and maximum value) of the band or data you want to display and how you are visualizing, i mean which function you are using to visualize the data, is it imshow?
if you are using imshow, then use the syntax:
imshow(data,[ ])
See Also
Categories
Find more on Hyperspectral Image Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!