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: (


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++
static void cvCalcBackProject(
	array<IntPtr>^ image, 
	IntPtr backProject, 
	IntPtr hist


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


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