0

I'm looking for a way to track two different colors at the same time using a single camera with OpenCV 2.3 (python bindings).

I've read through a number of papers regarding OpenCV but can't find any mention as to whether or not it's capable of analyzing multiple histograms at once.

Is this is even technically possible or do I need a separate camera for each color?

1
  • You can do it without separate cameras, you would have to generate two histograms, if you wish to use that technique. Commented Nov 16, 2011 at 13:36

2 Answers 2

3

You don't need two cameras. Instead threshold image for two colours and add it. Then use contours to find the blobs. Below is an example,which tracks blue and yellow color separately.

https://github.com/abidrahmank/OpenCV-Python/blob/master/Other_Examples/multi_color_two_object.py

Below is its output:

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

0

I don't really understand your concern.

With the camera, you would get an image object. With this image object, you can calculate as much different histograms as you want.

Each histogram would be a different output object :). Basicaly, you could track hundreds of colors at the same time!

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.