diff --git a/exp/hough.py b/exp/hough.py --- a/exp/hough.py +++ b/exp/hough.py @@ -66,7 +66,7 @@ class HoughTransform: (alphaDeg,d)=keys[k] line=Line(alphaDeg*math.pi/180,d-self._diagLen//2) res[-1].append(self._transformOutput(line)) - res[-1].sort(key=lambda line: line.d if line.alpha=math.pi: + shiftedLine=Line(shiftedLine.alpha-math.pi,-shiftedLine.d) + return shiftedLine + def _transformOutput(self,line): (x,y)=self._center basis=EPoint(-x,y)