[BUGFIX] Fix messed up canny edge orientation sector detection.
This commit is contained in:
parent
0468c47858
commit
b92850f4c9
@ -202,7 +202,7 @@ class CannyEdgeMachine {
|
|||||||
if(new_dx >= 0 && new_dx >= new_dy) orientation_sector = 0;
|
if(new_dx >= 0 && new_dx >= new_dy) orientation_sector = 0;
|
||||||
if(new_dx >= 0 && new_dx < new_dy) orientation_sector = 1;
|
if(new_dx >= 0 && new_dx < new_dy) orientation_sector = 1;
|
||||||
if(new_dx < 0 && -new_dx < new_dy) orientation_sector = 2;
|
if(new_dx < 0 && -new_dx < new_dy) orientation_sector = 2;
|
||||||
if(new_dx < 0 && -new_dy >= new_dy) orientation_sector = 3;
|
if(new_dx < 0 && -new_dx >= new_dy) orientation_sector = 3;
|
||||||
return orientation_sector;
|
return orientation_sector;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ class HoughMachine {
|
|||||||
if(new_dx >= 0 && new_dx >= new_dy) orientation_sector = 0;
|
if(new_dx >= 0 && new_dx >= new_dy) orientation_sector = 0;
|
||||||
if(new_dx >= 0 && new_dx < new_dy) orientation_sector = 1;
|
if(new_dx >= 0 && new_dx < new_dy) orientation_sector = 1;
|
||||||
if(new_dx < 0 && -new_dx < new_dy) orientation_sector = 2;
|
if(new_dx < 0 && -new_dx < new_dy) orientation_sector = 2;
|
||||||
if(new_dx < 0 && -new_dy >= new_dy) orientation_sector = 3;
|
if(new_dx < 0 && -new_dx >= new_dy) orientation_sector = 3;
|
||||||
return orientation_sector;
|
return orientation_sector;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user