From b92850f4c9295df7124c83f774d75ed0d26be93e Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Fri, 8 Jan 2016 02:05:03 +0100 Subject: [PATCH] [BUGFIX] Fix messed up canny edge orientation sector detection. --- canny_edge_machine.cpp | 2 +- hough_machine.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/canny_edge_machine.cpp b/canny_edge_machine.cpp index eeb7724..dd30b11 100644 --- a/canny_edge_machine.cpp +++ b/canny_edge_machine.cpp @@ -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 = 1; 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; }; diff --git a/hough_machine.cpp b/hough_machine.cpp index b770026..3a8ae1d 100644 --- a/hough_machine.cpp +++ b/hough_machine.cpp @@ -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 = 1; 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; };