Skip to content

Commit

Permalink
Merge pull request opencv#2894 from berak:imgproc_fix_thinning
Browse files Browse the repository at this point in the history
  • Loading branch information
alalek committed Mar 17, 2021
2 parents eb2c9bd + 22cbfd6 commit 4de4ede
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_CheckTypeEQ(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 4de4ede

Please sign in to comment.