Move cv::Mat out of core.hpp
This commit is contained in:
@@ -2456,7 +2456,8 @@ cvCompareHist( const CvHistogram* hist1,
|
||||
|
||||
if( !CV_IS_SPARSE_MAT(hist1->bins) )
|
||||
{
|
||||
cv::Mat H1((const CvMatND*)hist1->bins), H2((const CvMatND*)hist2->bins);
|
||||
cv::Mat H1 = cv::cvarrToMat(hist1->bins);
|
||||
cv::Mat H2 = cv::cvarrToMat(hist2->bins);
|
||||
return cv::compareHist(H1, H2, method);
|
||||
}
|
||||
|
||||
@@ -2758,7 +2759,7 @@ cvCalcArrHist( CvArr** img, CvHistogram* hist, int accumulate, const CvArr* mask
|
||||
|
||||
if( !CV_IS_SPARSE_HIST(hist) )
|
||||
{
|
||||
cv::Mat H((const CvMatND*)hist->bins);
|
||||
cv::Mat H = cv::cvarrToMat(hist->bins);
|
||||
cv::calcHist( &images[0], (int)images.size(), 0, _mask,
|
||||
H, cvGetDims(hist->bins), H.size, ranges, uniform, accumulate != 0 );
|
||||
}
|
||||
@@ -2768,7 +2769,8 @@ cvCalcArrHist( CvArr** img, CvHistogram* hist, int accumulate, const CvArr* mask
|
||||
|
||||
if( !accumulate )
|
||||
cvZero( hist->bins );
|
||||
cv::SparseMat sH(sparsemat);
|
||||
cv::SparseMat sH;
|
||||
sparsemat->copyToSparseMat(sH);
|
||||
cv::calcHist( &images[0], (int)images.size(), 0, _mask, sH, sH.dims(),
|
||||
sH.dims() > 0 ? sH.hdr->size : 0, ranges, uniform, accumulate != 0, true );
|
||||
|
||||
@@ -2820,13 +2822,14 @@ cvCalcArrBackProject( CvArr** img, CvArr* dst, const CvHistogram* hist )
|
||||
|
||||
if( !CV_IS_SPARSE_HIST(hist) )
|
||||
{
|
||||
cv::Mat H((const CvMatND*)hist->bins);
|
||||
cv::Mat H = cv::cvarrToMat(hist->bins);
|
||||
cv::calcBackProject( &images[0], (int)images.size(),
|
||||
0, H, _dst, ranges, 1, uniform );
|
||||
}
|
||||
else
|
||||
{
|
||||
cv::SparseMat sH((const CvSparseMat*)hist->bins);
|
||||
cv::SparseMat sH;
|
||||
((const CvSparseMat*)hist->bins)->copyToSparseMat(sH);
|
||||
cv::calcBackProject( &images[0], (int)images.size(),
|
||||
0, sH, _dst, ranges, 1, uniform );
|
||||
}
|
||||
|
Reference in New Issue
Block a user