# Sequoia Sunshine Sensor Support

I have uploaded OpenDroneMap to GitHub, which supports reading the sunshine sensor value of the Sequoia camera.

The algorithm for calculating the reflectance of an object from the “pixel intensity of the image” and the “sunshine sensor values” has been reviewed and improved so that the reflectance image for each wavelength is the correct value.

Even without photographing the standard calibration plate, the correct reflectance can be obtained “to some extent” by using the “calibration coefficients that vary from individual to individual” in the Exif.

Also, additional calibration coefficients can be given as an option during the ODM calculation to increase the certainty of the reflectance values.

2 Likes

Hey @ckato3 thanks for the contribution! It looks very useful. I’m wondering, how do you calculate the additional calibration coefficients? I wonder if there’s a way to partially automate that step, or perhaps provide a workflow that is easier (e.g. provide a single JSON file with the calibration coefficients instead of adding new 8 command line parameters, as we’re trying to keep the number of command line arguments under control).

2 Likes

I understand, like, 10% of what you did, but it sounds 100% awesome!

Thanks for your contribution!

It is cumbersome to create a software tool that can (semi-)automatically determine the calibration coefficients that are unique to each individual camera.

It is necessary to capture standard grayscale images with several different exposure times and other conditions, and then analyze the resulting images to determine the parameters.

So, I devised a way to obtain the correct reflectance to some extent, without specifying additional calibration coefficients on the user side, just using the factory calibration coefficients in the Exif.

However, with the camera I use, I had to specify some additional calibration coefficients.

If we omit parameters such as ISO sensitivity and exposure time, the conceptual formula for the calculation is as follows:

Reflectance
= proportionality_constant_A x (pixel_intensity - black_level_B) / sunshine_value

In my camera, the proportionality_factor_A is the default value of 0.5, while the calibration values I obtained are Green=0.56, Red=0.39, Rededge=0.41, NIR=0.49, so it is not extremely far off.

However, the black_level_B was significantly off only for GREEN band, and required additional correction.
The factory calibration factor in the Exif is about 4000, but I had to add about 2000 more.

Normally, the correct calibration coefficients should be provided by the camera manufacturer, but in reality, this does not seem to be the case.

1 Like

In order to reduce the total number of command line arguments, it is effective to load a text file (JSON file ?) with additional calibration coefficients at the time of ODM calculation.

However, as a beginner in Python, it would be difficult for me to write such program code.

Also, my coding may cause inconsistency in the overall flow of the ODM program.

I think it would be best if pierotofy coded the program using the root of the calculation in the source code I have PullRequest.

(I am noy a native speaker of English, so I am using translation software to help me, so please forgive my poor English.)

1 Like

Makes sense; I can try to find some time to make the necessary changes to use a single JSON file.

I’ve noticed from the PR that the code logic for computing the reflectance only gets triggered with the condition that the dataset is captured from a Parrot Sequoia. Do you think the PR would work with other sensors too?

1 Like

I think the ability to make additional corrections to the calibration coefficients would be useful for other sensors as well.

I am considering buying the DJI P4 Multispectral due to the fact that drones equipped with my Sequoia camera are unpowered and have limitations on flight altitude and flight time.

I should be receiving my 3-day rental of the P4 Multispectral today !

I plan to improve the code so that ODM can be used with the P4 Multispectral.

2 Likes

After reviewing ODM’s multispectral analysis routines, in addition to the Sequoia Camera, the DJI P4 Multispectral can now support reflectance and NDVI measurements using the Sunshine Sensor. We will make a “Pull Request” as soon as possible.

As for the P4 Multispectral, the current official ODM version has some issues with EXIF dark level and gain readout, etc., resulting in different or streaked reflectance and NDVI map values, which we have fixed. Also, additional correction coefficients are needed to compensate for individual camera differences, so we have made it possible to specify 2 additional parameters per band (10 parameters for 5 bands, Blue Green Red RedEdge and Near-Infrared).

2 Likes

Absolutely bang-up stuff! Sounds incredible!

Will you have any examples of before/after and other documentation/comments on this?

It sounds massive, so I’d like to make sure I get it into our Documentation once it gets approved.

1 Like

This is awesome ckato3 !

Would you be able to condense/aggregate all the upcoming changes into a single pull request? It will make it easier to integrate.

2 Likes

Examples of NDVI ortho map calculation results are shown below.
Tiff files of “DJI P4 Multispectral” are sample set by navogt.
[Phantom 4 Multispectral Test Data - Google Drive ]
(Phantom 4 Multispectral Test Data - Google Drive)

In the official version, there are striped steps on the road and in the forest, and the NDVI value itself deviates from the expected value of around 0.8.

(1) Official ODM 2.6.1

(2) Modified ODM from 2.6.1

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.