extended Mat::setTo() to support multi-channel arrays; fixed bug #1095

This commit is contained in:
Vadim Pisarevsky
2011-06-13 20:56:27 +00:00
parent 07217b17bf
commit 6407093463
5 changed files with 68 additions and 116 deletions

View File

@@ -531,7 +531,7 @@ double cv::threshold( InputArray _src, OutputArray _dst, double thresh, double m
int v = type == THRESH_BINARY ? (ithresh >= 255 ? 0 : imaxval) :
type == THRESH_BINARY_INV ? (ithresh >= 255 ? imaxval : 0) :
type == THRESH_TRUNC ? imaxval : 0;
dst = Scalar::all(v);
dst.setTo(v);
}
else
src.copyTo(dst);