Image Statistics
Calculate mean, variance, and standard deviation
Libraries:
Vision HDL Toolbox /
Statistics
Description
The Image Statistics block calculates the mean, variance, and standard deviation of streaming video data. Each calculation is performed over all pixels in the input region of interest (ROI). The block implements the calculations by using hardware-efficient algorithms.
Ports
This
block uses a streaming pixel interface with a bus for frame control signals. This interface
enables the block to operate independently of image size and format. The
pixel input port supports single pixel streaming or multipixel
streaming. Single pixel streaming accepts a single pixel value each clock cycle. Multipixel
streaming accepts a vector of M pixels per clock cycle to support
high-frame-rate or high-resolution formats. The M value corresponds to the
Number of pixels parameter of the Frame To Pixels block.
Along with the pixel, the block accepts a pixelcontrol
bus that contains
five control signals. The control signals indicate the validity of each pixel and their
location in the frame. For multipixel streaming, one set of control signals applies to all
pixels in the vector. To convert a frame (pixel matrix) into a serial pixel stream and control
signals, use the Frame To Pixels block. For a full description
of the interface, see Streaming Pixel Interface.
Input
Output
Parameters
Tips
To change the size and dimensions of the ROI, you can manipulate the input video stream control signals. See Regions of Interest.
The number of valid pixels in the input image affects the accuracy of the mean approximation. To avoid approximation error, use an image that contains a multiple of 64n pixels, up to 64n+1 pixels, where n equals 0, 1, 2, or 3. For details of the mean approximation, see Algorithm.
The block calculates statistics over frames up to 644 (16, 777, 216) pixels in size. This size supports HD frames.
Algorithms
Extended Capabilities
Version History
Introduced in R2015aSee Also
2-D
Mean (Computer Vision Toolbox) | 2-D
Variance (Computer Vision Toolbox) | 2-D
Standard Deviation (Computer Vision Toolbox) | Frame To Pixels | visionhdl.ImageStatistics