loading
 
Help
Anonymous
17 year
We are going to test 3 colour object.

a) blue object b) yellow object c) red object

Before we test the object,we have to connect 3 led's to the parellel port

Now we have to set,when the camera detect the blue object,the first led have to on and then when the camera detect yellow object,the second led must on,finally when the red object is detected,the third led must on.

Actually we are join to replace a dc motor with led,but for now we just join to test the led.This out project overall.

The problem we face is,we cannot filter 3 color at the same time and also control the three led.Hope that you can help us on using the is if statement and light on the led in right order.

Thank for someone who are help us in this problem.
Tracking multiple colored objects
Anonymous
17 year
Kenneth,

The trick here is to track one object at a time. For example, you can RGBFilter for one color, check its center of gravity, assign a variable with any results you need to keep and then revert the image back to the source (currently done with a marker). Once reverted you then process for the next color.

Included below is a .robo file that we think demonstrates this principal. Note that you may need to tweak the COG module a little to eliminate colored objects that you don't want. For example, increasing the density or checking that the bounding box of the COG is < than some value can help reduce noise.

If you have any additional questions please also include image results of what you have so far as that helps in displaying any issues.

STeven.
program.robo
Tracking multiple colored objects
Kenneth Ong from Malaysia  [2 posts]
17 year
Hi Steven

Thank for you help me to solve previous quention.After i apply the example you give me.We face some problem for set valuable.First when i apply the example in pc and connect to pareller port.After that when i tracking the object it cant defined 3 colour in pareller port our led light still off.So may i know how to get red bit ,bluw bit and yellow bit value and then send to the pareller port.And then may i know set the bit in blue bit , yellow bit and red bit and what value i have to set in pareller port.

thank for somebody who are helping me

kenneth

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index