Ask Your Question

Revision history [back]

Math on every pixel to Calculate NDVI?

I'm very new to OpenCV and attempting to do something which seems simple, but execution for an amateur is difficult.

I have to iterate through every pixel in an image, perform some math on the current pixel's RGB values (Red-Blue/Red+Blue), and output an image (in HSL) with a hue:

newHue = (ndvi-.5)*(-360)

and a saturation & brightness of 1 (constant across the output image).

Any tips on getting started with something like this?