Detect the most used color in image : <p>I am trying to detect lane lines in a video while I am driving. I reached the step where Canny Edge detection is applied on the region of interest. The region of interest contains only the white line, yellow line and the street (in gray color). Now, I need to mask any other color inside the region of interest because the gray color sometimes interrupt the other color in the edge detection. Then, when we apply the Hough Lines on the yellow and white lines, the detection is not accurate.</p>

<p>So, can how can I apply another mask on the image to leave the yellow and white parts alone?</p>

<p>I am using OpenCV for computer vision and image processing functions with Python.</p>
