I am trying to filter out a traffic light from the camera feed of my autonomous robot. I convert the captured frames into HSV colourspace, threshold them until I can get to detect all red objects that are roughly as "red" as the traffic light, then I apply Hough transform to find out the red light among them( which is obviously a circle).
Now the problem here is that I found that Hough transform only works with single channel images, and I seem to be working with three, so I tried converting the HSV thresholded image to Grayscale using the following code-
imgFinal = thresholded #initialising the variable with the thresholded image.
framenew = cv2.cvtColor(threshNew, cv2.COLOR_HSV2GRAY)
However during runtime I get an error saying 'module' object has no attribute 'COLOR_HSV2GRAY'. I found several questions regarding this topic but none were the answer to my problem. I only have to detect the red traffic light, I tried seperating the channels but I don't have any idea how to proceed with that approach. I am also open to any other approaches.
Thank you!
P.S- This might be off topic, but which language you all suggest for this project? C++ or Python? I've written the code for both, I'm just confused about which one to use. I'm currently developing it on my Windows 8.1 PC but it needs to run on the Raspberry Pi 3 for the final project.