Adding NDVI and ENDVI for NGB cameras

Dear Piero,

Thanks for the latest improvements on ODM.

I am using a NGB camera for calculating NDVI and ENDVI. I am sorry that this is not possible to calculate on the new version of ODM.

The formula for NDVI is (N-B)/(N+B)
The formula for ENDVI is (N+G) - (2B) / (N+G) + (2B)

Would it be possible to add it?

Many thanks in advance,

Miguel

1 Like

If a particular formula / filter is not available, could you add it and make a pull request https://github.com/OpenDroneMap/WebODM/blob/master/app/api/formulas.py ?

In this case we already have NDVI, but perhaps add a NGR filter so that you can map the blue band to the NDVI formula.

If you have questions about how to do that just ask :+1:

1 Like

Thank you, I already did this, I hope it’s ok since it’s my first time:

Forget the first edition, this is the good one:

Thanks! A few things: NDVI is already in the list. You can’t add it a second time (so it should be removed from the proposed change) The only concern is the band mapping, which currently does not allow the use of the blue band. For that to work, just add a new camera filter (see bottom the script) with the proper band order.

Also test your changes by running WebODM with:

./webodm.sh restart --dev

Which will launch WebODM in development mode, so that your changes take effect.

Hi Piero,

I am not a programmer or developer, I am just copy pasting and made some modifications in your code, but I know nothing.

I renamed the second NDVI for BLUE NDVI, may it work out?

I don’t really get how to add a new camera filter in the script you mention. The proper band order of this kind of cameras is NIR - Green - Blue. May you indicate me how to do it?

BTW, I bought the installer of ODM, so the only way to see the changes is by updating.

Thanks a lot

Ok, no worries; I’d recommend to open a feature request on https://github.com/OpenDroneMap/WebODM/issues referencing this thread then. Once there’s some time (or a developer contributor comes along) we’ll add it.

Maybe you can give me some instructions and I copy paste again?