4.7 Calibration and visualization
4.7.2 Calibration
Data containing the reectance standard that is to be used in the future with other objects present in the eld of view were not available, and much work was therefore not put into the development of the calibration stage. Still, some general notes will be discussed.
The scene common in the present images is a leg lying on top of a pillow. At the start of the image is there a paper strip to correct for light source variation and a circular reectance standard to convert radiance data into reectance data.
The light source variation cannot be corrected using a sheet of paper. The paper will diusively reect dierent intensities at the dierent wavelengths due to the presence of chromophores in the paper, as is shown in gure 4.80. This is not good enough. The band having the best signal to noise ratio was chosen as the band to correctify the image against, and this resulted in non-ttable spectra. No images only containing the paper strip as the light variation detection were therefore corrected for the variation of the light source across the eld of view. This is likely one major source of error. Only the image in 4.45a was corrected against the variation of the light source as it had the calibration slab across the entire eld of view present.
Figure 4.79: Visualization in GPU-DM 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 1.05 0 200 400 600 800 1000 1200 1400 1600 Normalized in tensit y Pixel Band 1 Band 20 Band 40 Band 60 Band 80 Band 100 Band 120 Band 140 Band 160
Figure 4.80: The light source variation across the eld of view for dierent bands, as obtained from the paper strip.
Figure 4.81: Reectance standard extraction using simple thresholding. Band 20 is rst thresholded based on some arbitrary value, eroded by a square structure element of size 10 and nally dilated by the same structuring element. The image is successfully segmented.
Some preliminary results were found regarding the detection of the calibration slab using simple thresh- olding operations. Even if the paper sheet will not be a correct reectance standard will it still have the same intensity characteristics as the reectance standard to be used. Thresholding line by line was found to be too unstable, and the stage will have to wait for a certain amount of lines before attempting detection to achieve good and stable results.
If only one band is segmented based on thresholding may the paper strip be segmented from the rest, as is seen in gure 4.81. This method was not very stable, and for these cases was the circular disc in the lower left corner desired, as this was a true reectance standard.
In gure 4.82 are the uncalibrated spectra present in the scene shown. Based on this may optimal bands be chosen for thresholding, as the dierent materials to be removed from the scene will have dierent responses at dierent bands. Skin exhibits, as is known due to the high absorption of blood and melanin at the lower wavelengths, a lower image intensity than the rest of the materials at the rst bands. The intensity is low also for the other bands due to the low signal to noise ratio due to the Gaussian light source, but still higher than the intensity for skin. In gure 4.83 is the rst band in the hyperspectral image shown. The tissue is darker than the rest of the image. In the same gure is the image histogram shown, and in gure 4.84 the image histogram after the image has been smoothed using a Gaussian lter. Using the minima present in the image histogram can the image be thresholded to yield each of the binary images shown in gure 4.85. This is not 100 percent successful in segmenting the dierent, desired parts of the image, and other bands must be used.
Looking back at gure 4.82, all of the curves exhibit similar behavior due to light source contamination, especially for wavelength bands higher than band 80. The materials are mainly dierentiated based on the rst 80 bands. The pillow and the stripe are dicult to separate as they display the same behavior, and the pillow has a lower intensity only due to being partially in shadow. The disc also displays similar behavior, but has a lower intensity that is guaranteed to be lower than the rest because of its specication of reecting only a fraction of 0.4 of the incoming light. The material surrounding the calibration slab has, however, a pinkish color which is easy to see the eects of in the spectrum. Skin is also characteristic up till the 80th band.
The important thing is to segment the middle parts of the stripe from the outlying pillow parts. Thus, band 50, where the dierence seemingly is the largest, can be used to segment pillow from stripe. Band
0 1000 2000 3000 4000 5000 6000 7000 8000 9000 0 20 40 60 80 100 120 140 160 Image in tensit y (a.u.) Band Stripe Disc Skin Pillow Container
Figure 4.82: Uncalibrated spectra of dierent materials present in the calibration scene. These are plucked from one individual pixel present in each of the materials.
0 10000 20000 30000 40000 50000 0 0.2 0.4 0.6 0.8 1 Pixels Intensity value
0 10000 20000 30000 40000 50000 0 0.2 0.4 0.6 0.8 1 Pixels Intensity value
Figure 4.84: Image histogram after smoothing using a Gaussian lter of size 10. Arrows indicate the positions for later segmentation in gure 4.85.
(a) Image thresholded
based on band 0 (b) Band 30 thresh-olded after multiplica- tion by binary image from band 0.
(c) Band 50 thresh- olded after multiplica- tion by binary image from band 30.
(d) Band 60 thresh- olded after multiplica- tion by binary image from band 0.
Figure 4.86: The reectance standard routine used in the nal version.
30 can be used to segment the disc-surrounding material from the stripe as it has a low image intensity here due to the pinkish color, and band 60 can be used to enhance its contrast to skin and pillow alike. While this does not neccessarily yield a good segmentation of the calibration disc, it will yield its edges, which can be used in a Hough circle transform and segmented using some basic region growing technique. The result is shown in gure 4.86. In CalibrationStage was the disc detected by ood lling areas and dilating and eroding away the remaining, small structures.
The main obstacle for thresholding operations is the pillow, as it has a similar spectral behavior as a high intensity reectance standard. The thresholding operations are therefore not enough for much else than what this calibration stage has been used for so far, namely the calibration of single hyperspectral images before saving to disc and MNF-denoising. These techniques cannot be used in the future, real- time setup, but then the calibration slab will also be square and easier to detect using i.e. the Hough transform [33]. The OpenCV documentation shows through examples that this may be made easy [65]. There are still some general problems present either way.
Dynamicity. The method waits for a certain amount of lines before attempting to extract the calibration slab. If the calibration slab always is placed in approximately the same area, this poses no problems, but variations can.
Memory. The whole image up till the limit must be saved for possible calibration standard extrac- tion.
Time. The number of lines becomes large in order to account for the possible variation of the slab placement. The integration space and time taken to properly integrate the calibration slabs becomes huge and processing of subsequent lines is delayed.
Information. The whole segment of the image in which the calibration slab might have been is discarded, and information is lost, if no delay in processing is desired.
These procedures can be done every 100 lines and quit when the calibration slab surely has been detected if the square detection may be done fast. An objective measure of when the reectance standard has been detected will not be easier to develop, however.
Some methods have been proposed for real-time detection of the calibration objects in the scene. In the future, a square reectance standard which follows the contour of the leg will be used instead of a circular reectance standard together with paper. This makes the above methods obsolete, and the methods were therefore not tested much in detail or enhanced. The methods were only developed to the extent that it would make analysis for this master thesis slightly easier than manually hard coding the pixel coordinates of the reectance standards.
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 400 500 600 700 800 900 1000 Reectance Wavelength (nm) Whole image Subset of image
Figure 4.87: The spectra from the same pixel as obtained when using the entire image and a subset of the image containing only skin in the forward and inverse MNF transform. An estimate of the noise was obtained using the same subset of the image in both cases.