Statistics Functions

This palette contains functions for statistics analysis.

Note: An vi icon with yellow background means they work on color images. With gray background means they only work on single channel image. With half yellow and half gray background means they work on both color and single channel image. Others vi icon background are for either examples or high level vis. For controls descriptions, you need to go to the vi in LabVIEW, use help (ctrl+H) and move mouse over the controls to see them.


IVision_CountNonZero.vi

Counts number of non-zero pixels in the whole image or selected image ROI. Must be single-channel image or multi-channel image with COI set.

Connector Pane

IVision_CountNonZero.vi


IVision_MeanAndDeviation.vi

The function calculates the average value M=*_M and standard deviation S=*_S of image elements, independently for each channel.

If COI is set, the function processes the selected channel only and stores the average and standard deviation to the first compoenents of output scalars (Mean and Deviation).

Connector Pane

IVision_MeanAndDeviation.vi


IVision_MinMaxLoc.vi

Finds minimum and maximum pixel values and their

positions. The extremums are searched over the whole image, selected ROI or, if mask

is not NULL,in an image region of arbitrary shape. If the image has more than one

channel, the COI must be selected first.

Connector Pane

IVision_MinMaxLoc.vi


IVision_Norm.vi

Calculates different types of norm for single or a pair of images. If mask image is not NULL, only certain pixels will be considered to do the calculation.

A

The first source image.

B

The second source image. If it is NULL, the absolute norm of A is calculated, otherwise absolute or relative norm of A-B is calculated.

normType

Type of norm, see the discussion.

mask

The optional operation mask.

This function calculates the absolute norm of A if B is NULL:

norm = ||A||C = maxI abs(A(I)),  if normType = CV_C
 
norm = ||A||L1 = ∑I abs(A(I)),  if normType = CV_L1
 
norm = ||A||L2 = sqrt( ∑I A(I)2),  if normType = CV_L2
 

And the function calculates absolute or relative difference norm if B is not NULL:

norm = ||A-B||C = maxI abs(A(I)-B(I)),  if normType = CV_C
 
norm = ||A-B||L1 = ∑I abs(A(I)-B(I)),  if normType = CV_L1
 
norm = ||A-B||L2 = sqrt( ∑I (A(I)-B(I))2 ),  if normType = CV_L2
 
or
 
norm = ||A-B||C/||B||C, if normType = CV_RELATIVE_C
 
norm = ||A-B||L1/||B||L1, if normType = CV_RELATIVE_L1
 
norm = ||A-B||L2/||B||L2, if normType = CV_RELATIVE_L2
 

This function returns the calculated norm. The multiple-channel images are treated as single-channel, that is results for all channels are combined.

Connector Pane

IVision_Norm.vi


IVision_SumPixels.vi

Calculates sum S of image elements, independently for each channel.

If COI is set, the function processes the selected channel only and stores the sum to the first element of the sum cluster.

Connector Pane

IVision_SumPixels.vi