MCPcopy Create free account
hub / github.com/creatale/node-dv / calcBackProject

Method calcBackProject

deps/opencv/modules/imgproc/src/histogram.cpp:1739–1766  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1737}
1738
1739void cv::calcBackProject( const Mat* images, int nimages, const int* channels,
1740 InputArray _hist, OutputArray _backProject,
1741 const float** ranges, double scale, bool uniform )
1742{
1743 Mat hist = _hist.getMat();
1744 vector<uchar*> ptrs;
1745 vector<int> deltas;
1746 vector<double> uniranges;
1747 Size imsize;
1748 int dims = hist.dims == 2 && hist.size[1] == 1 ? 1 : hist.dims;
1749
1750 CV_Assert( dims > 0 && hist.data );
1751 _backProject.create( images[0].size(), images[0].depth() );
1752 Mat backProject = _backProject.getMat();
1753 histPrepareImages( images, nimages, channels, backProject, dims, hist.size, ranges,
1754 uniform, ptrs, deltas, imsize, uniranges );
1755 const double* _uniranges = uniform ? &uniranges[0] : 0;
1756
1757 int depth = images[0].depth();
1758 if( depth == CV_8U )
1759 calcBackProj_8u(ptrs, deltas, imsize, hist, dims, ranges, _uniranges, (float)scale, uniform);
1760 else if( depth == CV_16U )
1761 calcBackProj_<ushort, ushort>(ptrs, deltas, imsize, hist, dims, ranges, _uniranges, (float)scale, uniform );
1762 else if( depth == CV_32F )
1763 calcBackProj_<float, float>(ptrs, deltas, imsize, hist, dims, ranges, _uniranges, (float)scale, uniform );
1764 else
1765 CV_Error(CV_StsUnsupportedFormat, "");
1766}
1767
1768
1769namespace cv

Callers

nothing calls this directly

Calls 12

histPrepareImagesFunction · 0.85
calcBackProj_8uFunction · 0.85
calcSparseBackProj_8uFunction · 0.85
MatClass · 0.85
getMatMethod · 0.45
createMethod · 0.45
sizeMethod · 0.45
depthMethod · 0.45
dimsMethod · 0.45
channelsMethod · 0.45
isContinuousMethod · 0.45
totalMethod · 0.45

Tested by

no test coverage detected