http://www.emgu.com
Calculates the back project of the histogram. For each tuple of pixels at the same position of all input single-channel images the function puts the value of the histogram bin, corresponding to the tuple, to the destination image. In terms of statistics, the value of each output image pixel is probability of the observed tuple given the distribution (histogram).

Namespace: Emgu.CV
Assembly: Emgu.CV (in Emgu.CV.dll) Version: 2.4.0.1717 (2.4.0.1717)

Syntax

C#
public static void cvCalcBackProject(
	IntPtr[] image,
	IntPtr backProject,
	IntPtr hist
)
Visual Basic
Public Shared Sub cvCalcBackProject ( _
	image As IntPtr(), _
	backProject As IntPtr, _
	hist As IntPtr _
)
Visual C++
public:
static void cvCalcBackProject(
	array<IntPtr>^ image, 
	IntPtr backProject, 
	IntPtr hist
)

Parameters

image
Type: array<System..::..IntPtr>[]()[][]
Source images (though you may pass CvMat** as well), all are of the same size and type
backProject
Type: System..::..IntPtr
Destination back projection image of the same type as the source images
hist
Type: System..::..IntPtr
Histogram

Examples

To find a red object in the picture, one may do the following: 1. Calculate a hue histogram for the red object assuming the image contains only this object. The histogram is likely to have a strong maximum, corresponding to red color. 2. Calculate back projection of a hue plane of input image where the object is searched, using the histogram. Threshold the image. 3. Find connected components in the resulting picture and choose the right component using some additional criteria, for example, the largest connected component. That is the approximate algorithm of Camshift color object tracker, except for the 3rd step, instead of which CAMSHIFT algorithm is used to locate the object on the back projection given the previous object position.

See Also