class_docstr: Class for image processing. Methods for detecting lines in an image and clustering them. Helper methods for
  drawing.
docstr: 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
docstr_tok: ["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"]
code: 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
  
imports: from logging import warning
  from math import degrees
  import numpy
  import cv2
  from pdftabextract.common import ROTATION, SKEW_X, SKEW_Y, DIRECTION_HORIZONTAL, DIRECTION_VERTICAL
  from pdftabextract.geom import normalize_angle, project_polarcoord_lines
  from pdftabextract.clustering import zip_clusters_and_values, find_clusters_1d_break_dist, calc_cluster_centers_1d
label_desc: Use image node_id 9 for calling the ImageProc obj's underlying member method code with example usage: obj.draw_lines(orig_img_as_background, draw_line_num) and returns: baseimg