Ejemplo n.º 1
0
 def detectLines(self, color):
     bw, edge_color = self._colorFilter(color)
     lines = self._HoughLine(edge_color)
     centers, normals = self._findNormal(bw, lines)
     return Detections(lines=lines,
                       normals=normals,
                       area=bw,
                       centers=centers)
Ejemplo n.º 2
0
 def detectLines(self, color):
     bw, edge_color = self._colorFilter(color)
     lines = self._HoughLine(edge_color)
     if self.parking == 0:
         centers, normals = self._findNormal(bw, lines)
     else:
         centers = None
         normals = None
         print('_findNormal2')
     return Detections(lines=lines,
                       normals=normals,
                       area=bw,
                       centers=centers)
Ejemplo n.º 3
0
    def detectLines2(self, color, hough_threshold, hough_min_line_length,
                     hough_max_line_gap):
        bw, edge_color = self._colorFilter(color)

        lines = self._HoughLine2(edge_color, hough_threshold,
                                 hough_min_line_length, hough_max_line_gap)
        if self.parking == 0:
            centers, normals = self._findNormal(bw, lines)
        else:
            centers = None
            normals = None
#print('_findNormal2')
        return Detections(lines=lines,
                          normals=normals,
                          area=bw,
                          centers=centers)