Common Vision Blox 14.1
LightMeter

Common Vision Blox Foundation Package Tool


C-Style

 C++ 

 .Net API (C#, VB, F#) 

Python
 LightMeter.dll      Stemmer.Cvb.HistogramAnalyzer   cvb.foundation 

Introduction

The LightMeter Tool

  • provides a convenient and straightforward way of generating a histogram of intensity values of an AOI (Area Of Interest) in an image,
  • obtains a number of common statistical measures from the values,
  • can be used for simple presence/absence inspections measuring reflective variations of certain image regions.
  • can also be used for the complex task of inspecting the quality of a surface in terms of homogeneity, scratches etc,
  • is to automatically monitor and respond to variations in the image exposure quality. In this way unexpected changes in exposure due to variations of lighting or camera settings can be detected and immediately acted upon without human intervention.

Furthermore the Tool can be used for adjusting the threshold and other important parameters of additional tools (e.g. Edge Tool, or Blob Tool ... ) used for the inspection task. This speeds up the process of determining and optimizing the correct system settings tremendously.

The DrawGraph Tool which is shipped with the LightMeter Tool can be used to display results generated by the LightMeter Tool in a very straightforward way (please refer also to the DrawGraph Tool Tool documentation). The LightMeter Tool is available as a Control (OCX) for fast application programming as well as a dynamic link library (Dll). The DrawGraph Tool is available as Control only. The LightMeter Tool is available as part of the CVB Foundation Package.

Theory of Operation

The LightMeter Tool functionality is mainly based on computing the histogram of an AOI of an image. The following figure shows a typical histogram plot with several points of interest indicated. In the plot the pixel intensity value is plotted along the X axis while the frequency of occurrence of those intensity values is plotted along the Y axis.


A typical image histogram

The histogram data is used to calculate further statistical values of interest. Following statistical values (SVxxx where SV marks a Statistical Value) are provided by the tool:

SVTotal

The total number of pixels in the AOI used for computing the histogram. This value is depending on the size of the AOI and the Density property of the LightMeter Tool (refer to the Common Vision Image Manager documentation to learn more about the density value).

SVMean

The arithmetic mean of all histogram values.

SVMode

The intensity value that occurs most often in the histogram. If there is more than one value that occurs most often the smaller intensity is returned.

SVMin

The smallest intensity value in the histogram.

SVMax

The largest intensity value in the histogram.

SVVariance

The variance or mean square deviation.


The variance formula

SVStdDev

The standard deviation computed as the square root of the variance. This is easier to use for make further calculations then the variance.

SVPixelInLimits

The number of pixels with a intensity value between a lower and a upper limit.

LightMeter ActiveX Control

LightMeter Control Pixel statistic values can be used in very simple applications to detect part or feature presence/absence. This is achieved by examining the grey value statistics (histogram) of an image region:


Property Pages

In addition to the standard properties dialog you can select and change most properties in the Property Pages of LightMeter Control. This is a convenient way to setup the tool. In addition you can set Draw Graph properties.


The Property Page of a LightMeter Control (left) and The Main Page of a LightMeter Control (right)

The Main page of the LightMeter Control allows you to change the properties online and have a direct feedback of this changes:

  • The Image Handling section allows you to load a new image and start a continuous grab if a frame grabber driver is selected. You can zoom into the image and view any portion of the image while you use the scrollbars of the display. The display enables you to select an AOI inside the image which is valid for processing.
  • The Draw Graph section outputs a graphical representation of the histogram computed by the LightMeter. With the Style and Scaling settings you can change the graphical output of the histograms processed by the LightMeter.
  • The Light Meter section contains several frames for different purposes:
    • In the Density section you can change the density for the selected planes.
    • The Statistic section shows all statistical results computed by the LightMeter.

Example Applications

Find example applications under %CVB%Tutorials\LightMeter. Quick and easy analysis of an image using statistical calculations such as mean value, standard deviation, etc. ideally suited for evaluation of object completeness and presence checks, surface inspection (homogeneity, scratches, print, etc.), or the supervision of a camera image in regard to integration time, lighting, etc.

The following images show some example applications the LightMeter Tool can be used for:

Homogeneity


Distortions on fabric

Surface


Scratches on CDs

Absence/Presence


Missing atomizer head

Other applications are blister inspection, print quality inspection, automatic thresholding etc...