TITLE: Hyperspectral core-logger image acquisition
AUTHORS: Kevin Jacq, Jeanne Auboiron, Kévin Humbert, Ruth Martinez-Lamas, Antonin Van Exem, Maxime Debret

[DESCRIPTION]
<div class = "text-blocks"><div class = "text-block">The following protocol describes how to acquire hyperspectral images with Specim's Single Core Scanner (SCS) with two hyperspectral cameras (VNIR, SWIR). It was developed thanks to the expertise of many people within the M2C laboratory, as well as the Specim manual and a Butz publication.</div><div class = "text-block">This protocol also highlights important properties (exposure time and pixel overlap) on which it is necessary to take time to obtain the most informative hyperspectral image with an optimal signal-to-noise ratio. </div><br/><div class = "text-block">Butz, C., Grosjean, M., Fischer, D., Wunderle, S., Tylmann, W., Rein, B., 2015. Hyperspectral imaging spectroscopy: a promising method for the biogeochemical analysis of lake sediments. J. Appl. Remote Sens. 9, 1–20. https://doi.org/10.1117/1.JRS.9.096031</div></div>

[STEPS]
?. [General description of the acquisition bench]
?. [General description of the acquisition bench]
?. [General description of the acquisition bench]
?. [Core logger set-up]
Check that the emergency stop buttons placed along the core logger are unlocked. To do this, press and turn at the same time to unlock the buttons.
?. [Core logger set-up]
Pull the "main power" locker on the block at the base of the computer (1).
?. [Core logger set-up]
Turn on the computer: O/I "power" button at the top left of the computer (2).
?. [Core logger set-up]
Check which camera is on the acquisition support. Depending on the problem related to the sample, the choice of the camera is important. Switch on the corresponding camera (3):For the VNIR camera: Turn on the small grey "VNIR power supply" unit located on the top of the computer.For the SWIR camera: Pull the "main power" and "HSI POWER" lockers on the central unit of the computer.
?. [Core logger set-up]
Turn on the illumination unit at the base of the camera support, check that the position of the lamp is on "VNIR" or "SWIR" depending on the camera used.
?. [Core logger set-up]
Turn on the air conditioning to maintain a constant temperature in the room, as the temperature affects the signal.
?. [Core logger set-up]
Close the blinds on the room windows to keep the room dark. The lights should be turned off before acquiring the sample.
?. [Core logger set-up]
Take the white reference and place it (the smoothest part towards the camera) on its location on the calibration table.
The white reference is very delicate. Handle it by touching only the slices and dust its surface once placed in the calibration table with the brush.
?. [Core logger set-up]
Remove the shutter from the camera.
Hold the lens with one hand and point the shutter with the other hand do not touch the lens !
?. [Sediment core preparation]
The surface of the core should be as smooth as possible, because the depth of field of the cameras is small, in the order of a few millimetres. And any variations in the surface have an impact on the signal. Biofilms may also be present on the surface of the sample, which will partially mask the sediment signal. Similarly, oxidation of the sample surface may mask underlying sedimentary structures. Therefore, it is important to take the time to "clean" (shave the surface with a spatula or knife).
It is very important to keep the core out of the freezer as little time as possible. It should be based on a maximum time of 1 hour and a minimum of 15 minutes. Beyond 1 hour, the sample may crack. Below 15 minutes, the sample may be too humid, which will induce important absorptions with the SWIR camera, and reflection for the VNIR camera. These times vary from one sample to another depending on the properties of the sedimentary matrix.
In areas with shells or sand, "cleaning" can very easily leave marks on the surface. To avoid this, it is recommended to "clean" these shell areas with very little pressure and then smooth the surface with your finger by wearing a latex glove slightly moistened (the smoothest part on the sediment). Very light finger pressure should be applied to the sediment. If the sediment is very clayey and very wet, avoid using the finger with the glove but use only the spatula with very little pressure.
It is also important to remove elements that are not part of the sediment (mould, small pieces of plastic...).
?. [Adjustment of the height of the calibration table and the rulers]
Place a core on the sample tray. Place the TOP of the core towards the camera, butting against the calibration plate.
When acquiring multiple cores, it is important to keep the same acquisition parameters and heights (samples, light and camera) to be able to compare data with each other. Tip: calibrate the calibration table and ruler heights on the sample that has the greatest height, so it will just have to compensate the difference for the others.
?. [Adjustment of the height of the calibration table and the rulers]
Adjust the height of the calibration table with the worm screw located at the back under the calibration table. The height must correspond to the height of the sample (not necessarily the height of the container).
?. [Adjustment of the height of the calibration table and the rulers]
Adjust the ruler against the core and to the height of the calibration table by turning the adjustment screw. The purpose of this point is to position the ruler as horizontally as possible using a spirit level which will allow later to adjust the horizontality of the sample.
?. [Sediment core preparation]
Once cleaned, place the core on the sample tray. Place the TOP of the core towards the camera, butting against the calibration plate.Using the ruler, adjust the horizontality and height of the sample by placing objects (pieces of cardboard, polystyrene) between the tray and the sample.
?. [Illumination unit adjustment]
To check the correct height, place a white paper under the illumination unit at the calibration table height and check that the two light beams overlap.if the two beams do not overlap, adjust the height of the illumination unit with the orange handle.
The illumination unit must be held with one hand when handling the orange handle. The illumination unit may be hot!
?. [Adjusting the camera height]
To help you choose this height, open the spreadsheet Parameters.xlsx. Only the grey boxes need to be filled in, the others are calculated automatically. Define the working distance (1) value for your problem, which will allow to calculate the spatial resolution and the working height to have the same angle of view with the other camera. The other calculated parameters (acquisition time and data size) will be refined with the definition of the other acquisition parameters.
The camera height adjustment has an influence on the resolution, but also on the depth of field (range of "sharpness" of the image). Therefore, depending on the sample and the interests of the study, a compromise will have to be made when adjusting the camera height.
We usually work at a height of 18 cm or 20 cm for VNIR and SWIR cameras. The height is measured between the underside of the camera and the calibration table.  ABCDE1VNIRVNIRSWIRSWIR2Focal length14 cm35 cm14 cm35 cm3Pixel size50 µm120 µm150 µm370 µm4Volume of data8 Go3 Go2,5 Go0,8 Go
The Parameters.xlsx includes formulas for the calculation of several acquisiton parameters thanks to a design of experiment. It is therefore specific to the SCS with these sensors and lens, and should be done for another device. The experimental design used focuses on the effects of working distance, frame rate and scanning speed. A quadratic relationship was found between the FR/v ratio and the working distance. Thus, thanks to the equation that defines the overlap, it is possible to define the frame rate and the speed as a function of the working distance and the exposure time.To build this experimental design, we vary the working distance, the frame rate or speed is fixed, and the other is determined by the optimizer based on the calculation of the radius of a round object (cf 22.2).
?. [Connecting the camera to the computer]
Open the LUMO software to control the core logger.
?. [Connecting the camera to the computer]
In the "Setup" tab at the top right, select Sensor 1 and connect the camera "VNIR PFD with NI" or "SWIR3 with NI", then connect "Motor 1" as well.
In the tab " Sensor 1 " in " Capture folder ", you can choose the folder where the different acquisition files will be saved. Check that the disk where the data will be saved has enough space available.
?. [Adjusting the focus and determining the acquisition parameters]
Adjusting the focus is an important step and one on which it is necessary to take time to achieve the optimal setting to obtain sharp images.
?. [Adjusting the focus and determining the acquisition parameters]
Click on the "Adjust" tab at the top right to see the interface:
?. [Adjusting the focus and determining the acquisition parameters]
To do this, place the sample tray on the focus grid. In the "Adjust" tab, you must define its position in the "Sensor 1" - "Focus grid" box, it is at 150 (if this is not the case, change it, click on Go, wait for the sample tray to be placed, and validate with set). And set the exposure time (top left) to 13 ms for the VNIR camera and 3 ms for the SWIR camera. At this point, the spatial profil show in the software interface:
?. [Adjusting the focus and determining the acquisition parameters]
Rotate the lens (below the camera) so that the ripples on the profile in "spatial view" look likes slots as much as possible. To do this, you can use the dark grey grid in the graph to find your way around. It is also possible to zoom, with a right click, in autoscale uncheck autoscale x, then in option choose a range in the center allowing to see some variations.
?. [Adjusting the focus and determining the acquisition parameters]
An optimization can be made in the "Adjust" tab, then "Focusing", press Run. This tool will help you find the optimal focus setting. Then, turn the lens to scan different focus settings (slots (optimal) or sinusoids (non-optimal) in "spatial view "). Finally, rotate the lens until you reach a value close to 100%. If the percentage remains at 0%, redo manually and keep this adjustment.
?. [Adjusting the focus and determining the acquisition parameters]
Data correction:In order to view images with colors close to what is observed, it is necessary to calibrate them with black (automatic shutter closing) and white (with the white reference positioned on the calibration table). To do this, go to the "Adjust" tab, then to "Image correction" :Dark substraction": Select Shutter and press Run DarkWhite reference": Select Scanner, press Run White
This correction may not have the desired effect. There may also be a difference between viewing in "Adjust" and "Capture".
?. [Adjusting the focus and determining the acquisition parameters]
Acquisition parameters:In the "Adjust" tab, in the top left square, you will find the main parameters to be adjusted to perform the acquisition. Shutter: Which must always be with an orange square (Opened)Trigger mode: Who should mark: "Internal".Spectral binning: Binning allows to cumulate intensities of neighbouring wavelengths. In the case of a binning of 2, we combine 2 neighboring wavelengths. This also allows to reduce the number of wavelengths and thus the size of the output data file, but this can hide important spectral information. (Usually set to 8 for the VNIR camera and 1 for the SWIR camera, VNIR binning of 1 should be used if organic pigment are present in the sample).Spatial binning: Here too, binning allows you to average the intensities of neighbouring pixels. In the case of a binning of 2, we combine 2 neighboring pixels. This also allows to reduce the number of pixels and thus reduce the resolution and size of the output data file. (Usually set to 1 for both cameras).  ABCDE1VNIRVNIRSWIRSWIR2Spectral Binning81213Spatial Binning11114Volume of data7,5 Go60 Go1 Go2 GoFill in these chosen values in the acquisition software, validate with Apply.Note the chosen binning in the spreadsheet (2) so that the calculated parameters are correct.
ABCDE1VNIRVNIRSWIRSWIR2Spectral Binning81213Spatial Binning11114Volume of data7,5 Go60 Go1 Go2 Go
?. [Adjusting the focus and determining the acquisition parameters]
Spectral quality (exposure time):Exposure time: Adjusts the recorded light intensity that affects the signal-to-noise ratio. If the time is too long, there is a risk of signal saturation, and if the time is too long, the signal may be masked by noise. VNIR: minimum: 0.1 ms, maximum: 100 msSWIR: minimum: 0.1 ms, maximum: 20 msDefine the exposure time with the white reference. To do this, go to its level in the tab "Adjust", "Sensor 1", "White" (at the bottom right), it is usually defined between 90 (start) and 100 (end). Click on Go for one of the two positions of the white, wait for the sample tray to move.Adjust the Exposure time (top left) to find out when the signal is saturated (plateau at maximum values) and choose a value corresponding to 75% of it. (Usually set to 13 ms for the VNIR camera and 3.5 ms for the SWIR camera).Define the exposure time with the white reference. To do this, go to its level in the tab "Adjust", "Sensor 1", "White" (at the bottom right), it is usually defined between 90 (start) and 100 (end). Click on Go for one of the two positions of the white, wait for the sample tray to move.Fill in this chosen value in the acquisition software, validate with Apply.Note the chosen exposure time in the spreadsheet (3) so that the calculated parameters are correct.
?. [Adjusting the focus and determining the acquisition parameters]
Spatial quality (overlap):Overlap is the amount of a pixel that is found in the next pixel. In the perfect case, it would be 0%. In the case of our images this is not the case, so we try to approach it with some of the acquisition parameters that will constrain the value of the overlap. The Excel spreadsheet (Parameters.xlsx) has been created to estimate the frame rate and scan speed values from the previous acquisition parameters (working distance, binning, exposure time). The frame rate and scan speed can be estimated either from the overlap or from the analysis time.Frame rate (Hz): Represents the number of acquisitions per second. (maximum: 150 fps VNIR, 450 fps SWIR)Scan speed (m/s): Speed of the traveling bench (minimum: 0.50 mm/s)The overlap is usually set to 2% (4) for both cameras if the frame rate and scan speed range allow it, otherwise the overlap value is set higher.Fill them in in the acquisition software (top left for the frame rate, top right and manual for the scan speed), validate with Apply.  Optimization of the values or manual selection of the frame rate and scan speed:Place the sample tray at the dark level with " Sensor 1 " - " Dark start " then Go.Place a round coin on the indicator plastic. In "Sensor 1 positions", check that the "Target start" is at 180 and the "Target stop" at 220 (if not, change it, click Go, wait for the measuring bench to be placed, and validate with set).In "Adjust", "Scanning speed Calculation", select Aspect ratio, then Run. The software will then offer you speed or frame rate values close to those previously estimated. Select the speed change. Then select Manual to see the new speed.
?. [Acquisition of hyperspectral images]
In "Sensor 1 positions", define "Target start" and the "Target stop" corresponding to positions on the sample tray that cover the entire length of the core to be passed. Also be sure to click "Set" each time you change these numbers. (Start at 180, end less than 2,000)
?. [Acquisition of hyperspectral images]
Turn off the lights in the room.
?. [Acquisition of hyperspectral images]
Check that the illumination unit is turned on according to the camera used ("VNIR" or "SWIR"). Check one last time that the acquisition parameters are correct and validate them with Apply.
?. [Acquisition of hyperspectral images]
Make a final correction to the image. To do this, go to the "Adjust" tab and then to "Image Correction" :Dark substraction ": Select Shutter and press Run DarkWhite reference": Select Scanner, press Run White
?. [Acquisition of hyperspectral images]
Write the name of the core on a piece of paper and place it on the indicating plastic between the core and the focus grid in order to have a mark of the name of the core on the acquired image.
?. [Acquisition of hyperspectral images]
In the " Capture " tab, give the name of the sample (dataset name) and put some comments if necessary. Launch the capture, by clicking on " Record ".
It is not advisable to place heavy objects on the table so as not to alter the horizontality of the sample tray.
?. [Data standardization]
Open the software: ENVI classic+IDL.
Normalize the image using Dark and White acquisitions to remove instrumental noise and obtain calibrated reflectance.
?. [Data standardization]
Click on "Specim," "Scan Normalization".  Return to the acquisition folder and select the file: manifest.
?. [Data standardization]
In the new windows, select the files that are requested, for example the "white" or "dark reference". These files are located in the Capture folder.
?. [Data standardization]
Once all the files are selected. A new window will appear with a blue bar: "Normalization".
?. [Data standardization]
As soon as normalization is complete, new windows will be opened that can be closed. A new file is also created during normalization (_refl.dat). This file will be used for all future processing.
?. [Data standardization]
Then close ENVI classic+IDL. Then repeat the previous steps for a new acquisition or continue this protocol.
For the acquisition of multiple cores, it is also possible to complete all acquisitions before doing all normalization.
When acquiring multiple cores, try to keep the same software settings and heights (samples, illumination and camera) to be able to compare data with each other. For this, it is advisable to always work at the same focal length, so the other acquisition parameters are the same.
?. [Switching off the hyperspectral core logger]
In the LUMO acquisition software,
?. [Switching off the hyperspectral core logger]
Switch off the computer in a conventional way, and with the O/I "power" button (top block) (1).
?. [Switching off the hyperspectral core logger]
Turn off the illumination unit at the base of the camera support.
?. [Switching off the hyperspectral core logger]
Switching off the camera (2)For the VNIR: Turn off the small grey "VNIR power supply" box located on the top of the computer. For the SWIR: Pull the "HSI POWER" and "main power" lockers on the central block of the computer.
?. [Switching off the hyperspectral core logger]
Pull the lockers "Main power" at the base (3).
?. [Switching off the hyperspectral core logger]
Turn off the air conditioning in the room.
?. [Switching off the hyperspectral core logger]
Store the white reference.
?. [Switching off the hyperspectral core logger]
Clean the various components of the room (tray, benches, tools) and put them away.
?. [Adjusting the camera height]
Reduce or increase the height of the camera with the hand crank at the back above the camera support and lock the rack with the brake screw (small and black).
?. [Adjusting the camera height]
The height of the camera is measured between the bottom of the lens and the calibration table.To place the sample tray on the calibration table, in Lumo in the "Adjust" tab, you must define its position in the "Sensor 1" - "Focus grid" box, it is at 150 (if this is not the case, change it, click on Go, wait for the sample tray to be placed, and validate with set).
?. [Adjusting the camera height]
Note the chosen height in the spreadsheet so that the calculated parameters are correct.
?. [Switching off the hyperspectral core logger]
Go to "Setup" in the upper right-hand corner, on the left in the "Motor 1" tab, click on "Disconnect".
?. [Switching off the hyperspectral core logger]
Then click on "Disconnect" in the tab "Sensor 1" (upper left-hand corner).
?. [Switching off the hyperspectral core logger]
Close the LUMO software.