| 1737 | } |
| 1738 | |
| 1739 | void 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 | |
| 1769 | namespace cv |
nothing calls this directly
no test coverage detected