File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -2820,12 +2820,12 @@ bool guo_hall_thinning(const Mat1b & img, Mat& skeleton)
2820
2820
p8 = (skeleton.data [row * skeleton.cols + col-1 ]) > 0 ;
2821
2821
p9 = (skeleton.data [(row-1 ) * skeleton.cols + col-1 ]) > 0 ;
2822
2822
2823
- int C = (!p2 & (p3 | p4)) + (!p4 & (p5 | p6)) +
2824
- (!p6 & (p7 | p8)) + (!p8 & (p9 | p2));
2825
- int N1 = (p9 | p2) + (p3 | p4) + (p5 | p6) + (p7 | p8);
2826
- int N2 = (p2 | p3) + (p4 | p5) + (p6 | p7) + (p8 | p9);
2823
+ int C = (!p2 && (p3 || p4)) + (!p4 && (p5 | | p6)) +
2824
+ (!p6 && (p7 || p8)) + (!p8 && (p9 | | p2));
2825
+ int N1 = (p9 || p2) + (p3 || p4) + (p5 || p6) + (p7 | | p8);
2826
+ int N2 = (p2 || p3) + (p4 || p5) + (p6 || p7) + (p8 | | p9);
2827
2827
int N = N1 < N2 ? N1 : N2;
2828
- int m = iter == 0 ? ((p6 | p7 | !p9) & p8) : ((p2 | p3 | !p5) & p4);
2828
+ int m = iter == 0 ? ((p6 || p7 || !p9) && p8) : ((p2 || p3 || !p5) & & p4);
2829
2829
2830
2830
if ((C == 1 ) && (N >= 2 ) && (N <= 3 ) && (m == 0 ))
2831
2831
{
You can’t perform that action at this time.
0 commit comments