micasense / imageprocessing

MicaSense RedEdge and Altum image processing tutorials
https://www.micasense.com
MIT License
247 stars 148 forks source link

Irradiance calculation in actual code #167

Closed Camilochiang closed 2 years ago

Camilochiang commented 2 years ago

Good day,

Thanks!

poynting commented 2 years ago

In the tutorial, for simplicity, irradiance isn't considered at all. In this case it's simply that there is a scale factor from pixel values (or, more specifically, linear radiance as computed by the calibration function) to linear reflectance. This scale factor is computed by the average of the panel region. Since we use a radiance image and reflectance values in this computation, the scale factor will have the pi factor included.

In image.py and panel.py the irradiance may be used to calculate the reflectance if provided to the function, or may come from the image metadata. We normalize around the units of radiance and irradiance, and convert back and forth as needed. Therefore when we use a panel, we use the radiance image to calculate the irradiance at the panel, and use that irradiance to convert other radiance images to reflectance images. This is useful for more complex processing because the output of the DLS is also irradiance, so the functions to compute reflectance from radiance images are already in place. This also makes it easier when the irradiance comes from another source, like a lab spectroradiometer.

So the normal process is to find the irradiance using a panel image, then apply that irradiance to other images using image.reflectance(irradiance)