Public Lab Research note

NGB NDVI Video Optimization (Red/Blue Manual Gain Control)

by MaggPi | August 03, 2018 02:06 | 506 views | 0 comments | #16844 | 506 views | 0 comments | #16844 03 Aug 02:06

Read more:

This project demonstrates the impact of different Raspberry Pi camera gain settings when collecting NGB NDVI images.
The project's goal is to identify camera settings so that camera levels can be optimized for high resolution image processing such as image sequencer. Project video can be seen at:

Project Description: NGB NDVI (Normalized Difference Vegetative Index) cameras work by sorting blue (B), green (G) and near infrared (N) light into the blue/green/red channels of a color camera (without infrared filter). Since the NGB NDVI equation, NDVI=(NIR-B)/(NIR+B), depends on NIR and B light levels, it is useful to optimize NIR and B channel camera gain for quality NDVI imaging.
The project demonstrates software to alter camera gain settings and observe the impact on NDVI imagery in (near) real time. Major elements of the system design (with key features) include:

image description Related Work: Major efforts that provided invaluable insight to the project include:

Discussions on NGB design/processing: - -- -- --

NDVI processing algorithm(s)

--Robert Wilson’s - NDVI processing algorithm


Fastie colormap: --

AWB discussions: -- --

Image stretching: --

Software Display: Picture below describes the quad format used to display video input frames and processed NDVI images:

  • Upper left - RGB image with blue gain setting (this was originally the blue channel but its much more exciting to see the color balance shift when adjusting gains)
  • Upper right – Red(N) image with red gain setting
  • Lower left - NDVI with fastie colorap
  • Lower right - NDVI with Jet colormap

image description

image description

Image Processing Steps: Picture below describes the major processing steps: Code available at:

image description

Live NDVI/Video description: Video describes different scenes during gain adjustment. Some portions of the video demonstrate very high gain settings to observe the impact on RGB and NDVI images.

image description

In the first video scene, the nearest tree is 20 m away with leaves as close as 10m. There is a wide range of sun illumination conditions due to sunlight filtering through the trees and clouds.

In the second video scene, the nearest tree is 200m. Sun illumination is more consistent but was done in the late afternoon.

Related posts:

@warren, @icarito, @amirberAgain, @cfastie @tech4gt


Login to comment.

Public Lab is open for anyone and will always be free. By signing up you'll join a diverse group of community researchers and tap into a lot of grassroots expertise.

Sign up