Ask Your Question

Improper Computation of NDVI

asked 2017-02-16 02:36:21 -0500

jay_tanna gravatar image

updated 2017-02-16 02:37:12 -0500

I am new to image processing. I am applying NDVI index on an image of an agricultural farm taken by drone. But the formula (NIR-Red)/(NIR+Red) is giving me wrong output (here instead of NIR we are using the blue channel). Then I came to know that the image I am using is taken by camera with NIR sensors. Would the formula differ from normal formula of NDVI?

edit retag flag offensive close merge delete


  1. What does it mean wrong output?
  2. "here instead of NIR we are using the blue channel" NIR= near-infrared regions it is not blue channel...
LBerger gravatar imageLBerger ( 2017-02-16 02:52:53 -0500 )edit

@LBerger Ideally when we apply NDVI on imaage plant should colored light grey and ground should colored dark grey. But I am getting reverse.

jay_tanna gravatar imagejay_tanna ( 2017-02-16 03:05:30 -0500 )edit

Yes, because you can't just switch the infrared channel with the blue channel!

In the image of a plant, red and blue values are roughly equal (R~B=a). Then the formula will give you (a-a)/(a+a)=0. Hence the dark color of the plant on your image.

One more thing: RGB cameras with IR blocking filter removed (like the Raspberry Pi NoIR camera) won't give you good NDVI.

kbarni gravatar imagekbarni ( 2017-02-16 09:08:31 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2017-02-16 07:40:16 -0500

Ok some replies

here instead of NIR we are using the blue channel

How are you expecting that to work? NDVI only works with NIR information available, not with blue channel information.

the image I am using is taken by camera with NIR sensorsably

Then there should be a NIR channel available. In normal circumstances this imagery is 4 channel data, where the 4th channel has the NIR information.

but the formula (NIR-Red)/(NIR+Red) is giving me wrong output

My best guess, you are running into data range issues, simply dividing integer channel images. Show us your code so we can have a look at what is acually going wrong.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-02-16 02:36:21 -0500

Seen: 190 times

Last updated: Feb 16 '17