# Build reflectance maps with Python and GDAL

I would like know how to calculate a reflectance map for each band (RGB) in an image. The imagery was captured using a Ricoh GRII from a Fixed wing UAV, the UAV does not have an irradiance sensor mounted.

The reason for doing this is; I was wanting to use the reflectance values to classify vegetation, water and bare earth in a point cloud (608,434,398 points). To do this I was hoping I could leverage the power of Python and GDAL.

I am currently learning python.

This is a non-trivial problem. One solution is to collect ground reflectance spectra coincident with the time of UAV flight. The reference spectra may consist of white, grey and black panels that are placed on the ground in a visible location. A spectral radiometer is then used to measure the reflectance of each calibration panel.

The radiometer readings are then used to perform an empirical line calibration. This is essentially a linear regression between the raw DN values recorded by the UAV and the ground reflectance spectra recorded by the radiometer. This is done individually for each spectral band.

The black and white calibration panels should ideally be the darkest and brightest objects in the scene (this prevents unwanted extrapolation which can lead to poor results). The grey reflectance panel should fall in between these two min-max values, however a non-linear correction my be applied if this is not the case:

Once you have the linear relationship for each band, you can apply the correction using band math or raster calculator functions in GDAL or QGIS.

References: Smith, G. M., & Milton, E. J. (1999). The use of the empirical line method to calibrate remotely sensed data to reflectance. International Journal of remote sensing, 20(13), 2653-2662.

• Wow this is very interesting, can this method be used after the capture has occurred providing the weather conditions are similar and time of day is the same? – Xenu May 15 '17 at 5:49
• Ideally, it should be done at the same time. I suppose you could try it! The other solution is to use pseudo-invariant features (objects that do not change their reflectance over time). Again, you would need bright and dark objects. As you are using an UAV, the atmospheric effects should be negligible, however the bidirectional effects (caused by varying solar illumination conditions) will be significant. – Osian May 15 '17 at 5:54
• Potential pseudo-invariant features in your scene: bright = white road markings, dark = deep water or dark dense vegetation. – Osian May 15 '17 at 6:03
• @Osian would you mind elaboration a little bit more on how to derive this linear relationship. I know this is an old post; but, I am facing a similar issue. I collected some images and now I need to calibrate them. Before my mission I took some pictures of a calibration panel, but I don't really know how to use this. Thank you – Perro Feb 4 at 19:45
• Hi Perro, I'm sorry for the late reply. To use this method, you ideally need spectral radiometer readings over each panel (acquired coincident with your imagery). Once you have the radiometer readings, its simply a question of regressing the DN values from your imagery (usually the mean of several pixels covering each panel) against the spectral radiometer readings. You repeat the regression for every spectral band in your camera... – Osian Mar 15 at 12:10