1 | initial version |
"whenever i add another line to put in a new hue,sat,value it overrides the other color so i only detect the one that is the last to be read by the compiler": In the following line you are using the same image as in the previous line (I mean the "thresholded).
//inRange(hsvImage_2, Scalar(14, 0, 0), Scalar(16, 255, 255), thresholded);// Orange Color
Try to create a second thresholded image (say "thresholded2"), and use:
inRange(hsvImage_2, Scalar(14, 0, 0), Scalar(16, 255, 255), thresholded2);// Orange Color
2.In this link you can find a basic tutorial for color object tracking where a circle is drawn around a color object tracked using OpenCV (it also explains how to set the center coordinates of the circle).