Proximal Hyperspectral data calibration using white and dark reference images.

26 views (last 30 days)
I am using a proximal Hyperspectral (HSI) sensor called Specim FX10 with spectral range of 400-780 nm. These HSI images need to be calibrated with white and dark reference images before further analysis. These reference images are collected everytime with individual data image.
The following is the screenshot of the data collection folder:
The formula used to calibrate the image is:
The way the camera collects the dark reference is by simply closing the shutter and for white reference it captures a small block of teflon. The scanning area (height) for both reference images are very small compared to the data image and that is the problem I think I am having. When I try to do any analysis using these values the array size don't match.('100x1024x448' VS '1100x1024x448') [height x width x bands]
Difference between the value size of dark, white and raw data:
This is the code I am running to get the above values:
I am new to MATLAB and learning how to complete my analysis. Can anyone point out what I am missing or how should I approch this problem? Any additional resources for proximal HSI data analysis would be really helpful. Thanks!
  1 Comment
Billy Ram
Billy Ram on 30 Nov 2021
Edited: Billy Ram on 30 Nov 2021
Just to reiterate on the problem I want to solve. See the formula for calibrating the image for reference. I have three, 3D arrays. They are white reference image of size (100x1024x448), dark reference image of size (100x1024x448) and image data of size (1100x1024x448). I want to use these arrays to get the calibrated image denoted by R in the formula above.

Sign in to comment.

Answers (1)

Image Analyst
Image Analyst on 30 Nov 2021
I don't think you want W and D to be images. You need them to be scalars so the image size doesn't matter. For each wavelength you just need to get the W and D values, like by taking the mean of the whole image assuming the teflon takes up the whole field of view. So knowing that, you will know the spectral responsivity of your camera/lens system. And therefore the size of the reference image doesn't matter. Though I don't know why the white and dark images would have a different size than the actual test images. And I don't know what "100x1024x448" means. Which is rows, which is columns, and which is wavelengths (or number of images)?
The only reason that the W and D should be images instead of scalars is in situations where the spectral reflectance varies over the image. But that should not be the case if you have a uniform, homogenous block of teflon filling the field of view.
  4 Comments
Billy Ram
Billy Ram on 1 Dec 2021
The images have DataType: "uint16". I don't get your point about converting them to double. It already shows in the workspace window as 'double'. I am currently clueless about how to get the calibrated images with the information and data I have (I am very new to MATLAB).
Image Analyst
Image Analyst on 1 Dec 2021
If they're already double, then fine. I'm just saying that if you try to subtract uint8 numbers, they will clip to 0 and won't give you the correct difference if that difference would be negative. Observe:
v1 = uint8(9);
v2 = uint8(150);
result = v1-v2
result = uint8 0
% Now for double
v1 = 9;
v2 = 150;
result = v1-v2
result = -141

Sign in to comment.

Products


Release

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!