class_docstr: Class for image processing. Methods for detecting lines in an image and clustering them. Helper methods for
  drawing.
docstr: Detect lines in input image using hough transform.
  Return detected lines as list with tuples:
  (rho, theta, normalized theta with 0 <= theta_norm < np.pi, DIRECTION_VERTICAL or DIRECTION_HORIZONTAL)
docstr_tok: ["Detect","lines","in","input","image","using","hough","transform",".","Return","detected","lines","as","list","with","tuples",":","(","rho",",","theta",",","normalized","theta","with","0","<","=","theta_norm","<","np.pi",",","DIRECTION_VERTICAL","or","DIRECTION_HORIZONTAL",")"]
code: def detect_lines(
      self,
      canny_low_thresh,
      canny_high_thresh,
      canny_kernel_size,
      hough_rho_res,
      hough_theta_res,
      hough_votes_thresh,
      gray_conversion=cv2.COLOR_BGR2GRAY,
  ):
      """
      Detect lines in input image using hough transform.
      Return detected lines as list with tuples:
      (rho, theta, normalized theta with 0 <= theta_norm < np.pi, DIRECTION_VERTICAL or DIRECTION_HORIZONTAL)
      """
  
      self.gray_img = cv2.cvtColor(self.input_img, gray_conversion)
      self.edges = cv2.Canny(
          self.gray_img,
          canny_low_thresh,
          canny_high_thresh,
          apertureSize=canny_kernel_size,
      )
  
      # detect lines with hough transform
      lines = cv2.HoughLines(
          self.edges, hough_rho_res, hough_theta_res, hough_votes_thresh
      )
      if lines is None:
          lines = []
  
      self.lines_hough = self._generate_hough_lines(lines)
  
      return self.lines_hough
  
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 2 for calling the ImageProc obj's underlying member method code with example usage: obj.detect_lines(canny_low_thresh, canny_high_thresh, canny_kernel_size, hough_rho_res, hough_theta_res, hough_votes_thresh, gray_conversion) and returns: self