1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

Bool masks support in imgproc module.

This commit is contained in:
Alexander Smorkalov
2025-08-08 15:07:24 +03:00
parent 0559a76c6b
commit 958ded3dcd
5 changed files with 58 additions and 7 deletions
+2 -2
View File
@@ -928,7 +928,7 @@ void cv::calcHist( const Mat* images, int nimages, const int* channels,
std::vector<double> uniranges;
Size imsize;
CV_Assert( mask.empty() || mask.type() == CV_8UC1 );
CV_Assert( mask.empty() || mask.type() == CV_8UC1 || mask.type() == CV_BoolC1);
histPrepareImages( images, nimages, channels, mask, dims, hist.size, ranges,
uniform, ptrs, deltas, imsize, uniranges );
const double* _uniranges = uniform ? &uniranges[0] : 0;
@@ -1106,7 +1106,7 @@ static void calcHist( const Mat* images, int nimages, const int* channels,
std::vector<double> uniranges;
Size imsize;
CV_Assert( mask.empty() || mask.type() == CV_8UC1 );
CV_Assert( mask.empty() || mask.type() == CV_8UC1 || mask.type() == CV_BoolC1 );
histPrepareImages( images, nimages, channels, mask, dims, hist.hdr->size, ranges,
uniform, ptrs, deltas, imsize, uniranges );
const double* _uniranges = uniform ? &uniranges[0] : 0;