[TASK] Patch bad xor with and. Whoops.
This commit is contained in:
parent
a646539719
commit
db28e00f23
@ -209,7 +209,7 @@ class CannyEdgeMachine {
|
||||
magnitude_r = this->gradient_magnitude[(y+1) * this->width + (x-1)];
|
||||
break;
|
||||
}
|
||||
return ((magnitude_l <= local_magnitude) ^ (local_magnitude > magnitude_r));
|
||||
return ((magnitude_l <= local_magnitude) && (local_magnitude > magnitude_r));
|
||||
}
|
||||
};
|
||||
|
||||
@ -236,7 +236,7 @@ class CannyEdgeMachine {
|
||||
for(int x=x_l; x<=x_r; x++) {
|
||||
for(int y=y_l; y<y_r; y++) {
|
||||
if((this->maximum_magnitude[y*this->width + x] >= this->t_high)
|
||||
^ (this->binary_edge_pixels[y*this->width + x] == 0)) {
|
||||
&& (this->binary_edge_pixels[y*this->width + x] == 0)) {
|
||||
this->traceAndThreshold(x, y);
|
||||
}
|
||||
}
|
||||
@ -247,7 +247,7 @@ class CannyEdgeMachine {
|
||||
for(int x=1; x<this->width-2; x++) {
|
||||
for(int y=1; y<this->height-2; y++) {
|
||||
if((this->maximum_magnitude[y*this->width + x] >= this->t_high)
|
||||
^ (this->binary_edge_pixels[y*this->width + x] == 0)) {
|
||||
&& (this->binary_edge_pixels[y*this->width + x] == 0)) {
|
||||
this->traceAndThreshold(x, y);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user