Skip to content

Commit

Permalink
Merge pull request opencv#498 from rokm:opencv_text-warning
Browse files Browse the repository at this point in the history
  • Loading branch information
alalek committed Jul 11, 2016
2 parents 9bea717 + 80342bc commit 6a5f8e4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions modules/text/src/erfilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2820,12 +2820,12 @@ bool guo_hall_thinning(const Mat1b & img, Mat& skeleton)
p8 = (skeleton.data[row * skeleton.cols + col-1]) > 0;
p9 = (skeleton.data[(row-1) * skeleton.cols + col-1]) > 0;

int C = (!p2 & (p3 | p4)) + (!p4 & (p5 | p6)) +
(!p6 & (p7 | p8)) + (!p8 & (p9 | p2));
int N1 = (p9 | p2) + (p3 | p4) + (p5 | p6) + (p7 | p8);
int N2 = (p2 | p3) + (p4 | p5) + (p6 | p7) + (p8 | p9);
int C = (!p2 && (p3 || p4)) + (!p4 && (p5 || p6)) +
(!p6 && (p7 || p8)) + (!p8 && (p9 || p2));
int N1 = (p9 || p2) + (p3 || p4) + (p5 || p6) + (p7 || p8);
int N2 = (p2 || p3) + (p4 || p5) + (p6 || p7) + (p8 || p9);
int N = N1 < N2 ? N1 : N2;
int m = iter == 0 ? ((p6 | p7 | !p9) & p8) : ((p2 | p3 | !p5) & p4);
int m = iter == 0 ? ((p6 || p7 || !p9) && p8) : ((p2 || p3 || !p5) && p4);

if ((C == 1) && (N >= 2) && (N <= 3) && (m == 0))
{
Expand Down

0 comments on commit 6a5f8e4

Please sign in to comment.