<< return to Pixycam.com

Event counter without rebounds.

Hello everyone.

I’m trying to make a counter application, using color codes Pixy.
Pixy will have to recognize different color codes placed on objects that pass through his field of vision from left to right.
The problem I have is that sometimes rebounds and double counts occur. Below I include the code I am using in my Arduino if anyone has any idea about it.

There is only one object on the screen every time, as we approach the passage of a conveyor laterally. I design an algorithm that increases the counter once every rising edge of an object.

Would greatly appreciate any comment.

Best regards. Manuel Rodriguez.

The problemo that I have, is still keeping an object constantly in front of the camera, I get a constant output signal Pixy.
For example:
If I run my program. Serial.println (pixi.blocks [0] signature.)
I get the following response. 10000100001000010000100001 …
and accordingly, although anti-bounce algorithm available, is not effective because
data may fluctuate during detection of a signature.

Hi Manuel,

Are the objects moving at a constant speed? Maybe you could help with the debouncing effort by also timing how long the object has been in view. Or, if you want to get a bit more complicated, you could track the speed/acceleration of the object and use that to determine if it should still be in view in the next frame.

Hope this helps!

Scott

Thanks Scott.
It is very interesting the idea that exposing these, because in fact may be the case, at some point, that one object is arrested in front of the camera.
Two days I do not play the project but I can not stop thinking about it makes. Things are never as simple as they seem at first glance.
Try this weekend implement your idea about tracking speed. I think it’s the best starting point to determine with certainty the passage of objects in front of the camera and thus obtain a reliable count.

Thanks again and keep you current.
By the way, Pixy amply meets all my expectations, you can be proud of the work you have done.

Manuel.