Skip to content

Commit c87b295

Browse files
committed
ximgproc: add an assert in thinning()
1 parent 4f524db commit c87b295

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

modules/ximgproc/src/thinning.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ static void thinningIteration(Mat img, int iter, int thinningType){
6969
// Apply the thinning procedure to a given image
7070
void thinning(InputArray input, OutputArray output, int thinningType){
7171
Mat processed = input.getMat().clone();
72+
CV_Assert(processed.type == CV_8UC1);
7273
// Enforce the range of the input image to be in between 0 - 255
7374
processed /= 255;
7475

0 commit comments

Comments
 (0)