title: Opencv python lane detection draw line using cv2.line() change line color bug unsuccessfully
body: <p>i am sucked here for quite a while. I was going through lane detection with opencv python and the program can detect lines and draw it on a black mask image. However, only in color white. According to doc, if i got it correctly, then in case of a blue line it should like <code>cv2.line(mask_image, firstpoint_line, seconpoint_line, (255, 0, 0), 5)</code>. Yet, my program will draw correct lines in color white not blue. Then if i tried to change into red lines by using <code>cv2.line(mask_image, (x1, y1), (x2, y2), (0, 0, 255), 5)</code>, it won't draw any lines, which i guess it did draw lines however with color black, black lines on black mask image then can't see any. I have played around with the RGB values, what i got is, no matter how i change the R B G values, it draws only lines in grayscale color. I tried to test <code>cv2.line()</code> function with another .py file by simply creating a black image and then draw lines with different colors, it worked just fine.
  I hope someone could give me a hint about where may goes wrong. Thanks ahead!</p>
  <pre><code>import cv2
  import numpy as np
  import matplotlib.pyplot as plt
  
  '''
  Canny edge detection
  '''
  def canny(image):
      # RGB to Gray
      gray = cv2.cvtColor(image, cv2.COLOR_RGB2GRAY)
      # apply a 5 by 5 gussian blur kernel on grayscale image
      blur = cv2.GaussianBlur(gray,(5, 5), 0)
      # apply canny operator for edge detection
      canny = cv2.Canny(blur, 50, 150)
      return canny
  '''
  Create mask on the canny image to only show the region of inteste (lane to be tracked)
  '''
  def region_to_track(image):
      # get the height of the image
      height = image.shape[0]
      # create a region with coordinates as a numpy array
      # in this case we only need one region (one list)
      region = np.array([
          [(200, height), (1200, height), (550, 250)]
          ])
      # create mask as a full black image (all zeros) with the same size of our image
      mask = np.zeros_like(image)
      # full mask with region(full white). Be aware that fillPoly() takes more than one regions
      cv2.fillPoly(mask, region, 255)
      # implement bitwise-&amp; operation using mask on the edge image, ultimately masking the edge image only show the lane region 
      masked_image = cv2.bitwise_and(image, mask)
      return masked_image
  '''
  draw the detected line on the image
  '''
  def display_lines(image, lines):
      # black image surface
      line_image = np.zeros_like(image)
      # if line detected
      if lines is not None:
          # loop through the lines
          for line in lines:
              # return of HoughLinesP() is a 2D array (n row and 1 column). each row is a line determined by 2 points
              # unpack the 2D array
              x1, y1, x2, y2 = line.reshape(4)
              # draw line on black image surface
              # usage: cv2.line(image, firstpoint, secondpoint, color of line, line thickness)
              cv2.line(line_image, (x1, y1), (x2, y2), (255, 0, 0), 5)
      return line_image
  
  # load image as a numpy array object 
  image = cv2.imread('test_image.jpg')
  # set new vaiable for image processing
  lane_image = np.copy(image)
  canny = canny(lane_image)
  # get masked image with only lane region
  lane_region = region_to_track(canny)
  # find line using hough transformation
  # HoughLinesP() taks two arguments about the resolution of the grid of Hough space (rho in pixels, theta in radian). Here, 1 pixels and 1 degree resolution. 
  lines = cv2.HoughLinesP(lane_region, 1, np.pi/180, 120, np.array([]), minLineLength=30, maxLineGap=5)
  detected_lines_image = display_lines(lane_region, lines)
  # show image
  cv2.imshow(&quot;output_image&quot;, detected_lines_image)
  # show the opened window till keyboard input detected
  cv2.waitKey(0)
  
  </code></pre>