Skip to content

Commit

Permalink
ximgproc: add an assert in thinning()
Browse files Browse the repository at this point in the history
  • Loading branch information
berak committed Mar 17, 2021
1 parent 4f524db commit c87b295
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/ximgproc/src/thinning.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ static void thinningIteration(Mat img, int iter, int thinningType){
// Apply the thinning procedure to a given image
void thinning(InputArray input, OutputArray output, int thinningType){
Mat processed = input.getMat().clone();
CV_Assert(processed.type == CV_8UC1);
// Enforce the range of the input image to be in between 0 - 255
processed /= 255;

Expand Down

0 comments on commit c87b295

Please sign in to comment.