(self, orig_img_as_background=True, draw_line_num=False)
return baseimg
Draw detected lines and return the rendered image.
        <orig_img_as_background>: if True, draw on top of input image
        <draw_line_num>: if True, draw line number
Draw detected lines and return the rendered image.
        <orig_img_as_background>: if True, draw on top of input image
        <draw_line_num>: if True, draw line number
Draw detected lines and return the rendered image . <orig_img_as_background > : if True draw on top of input image <draw_line_num > : if True draw line number
def draw_lines(self, orig_img_as_background=True, draw_line_num=False):
        """
        Draw detected lines and return the rendered image.
        <orig_img_as_background>: if True, draw on top of input image
        <draw_line_num>: if True, draw line number
        """
        lines_ab = self.ab_lines_from_hough_lines(self.lines_hough)
        
        baseimg = self._baseimg_for_drawing(orig_img_as_background)
        
        for i, (p1, p2, line_dir) in enumerate(lines_ab):
            line_color = (0, 255, 0) if line_dir == DIRECTION_HORIZONTAL else (0, 0, 255)
            
            cv2.line(baseimg, pt_to_tuple(p1), pt_to_tuple(p2), line_color, self.DRAW_LINE_WIDTH)
            
            if draw_line_num:
                p_text = pt_to_tuple(p1 + (p2 - p1) * 0.5)
                cv2.putText(baseimg, str(i), p_text, cv2.FONT_HERSHEY_SIMPLEX, 1, line_color, 3)
        
        return baseimg
def draw_lines ( self , orig_img_as_background = True , draw_line_num = False ) : lines_ab = self . ab_lines_from_hough_lines ( self . lines_hough ) baseimg = self . _baseimg_for_drawing ( orig_img_as_background ) for i , ( p1 , p2 , line_dir ) in enumerate ( lines_ab ) : line_color = ( 0 , 255 , 0 ) if line_dir == DIRECTION_HORIZONTAL else ( 0 , 0 , 255 ) cv2 . line ( baseimg , pt_to_tuple ( p1 ) , pt_to_tuple ( p2 ) , line_color , self . DRAW_LINE_WIDTH ) if draw_line_num : p_text = pt_to_tuple ( p1 + ( p2 - p1 ) * 0.5 ) cv2 . putText ( baseimg , str ( i ) , p_text , cv2 . FONT_HERSHEY_SIMPLEX , 1 , line_color , 3 ) return baseimg