I was wondering if the PIXY can track an object like an automobile going between 50-125 miles per hours. If yes, how would it do that since I saw the getBlocks API but I didn’t see any time for these block that would tell me the time of an object.
I am new to this camera so I don’t really know all that it can do.
I’ve never tried this, but there’s a possibility that it would work. For fast objects, you need good lighting to reduce motion blur. To detect velocity, you can use Pixy2’s blocks object and the m_x, m_y, m_index and m_age fields to infer the velocity over 2 or more frames.
You can determine the number of pixels a given block travels between frames by matching the m_index values of the blocks between frames, so that you are referring to the same object.
But pixels are not the same as physical distance. Relating pixels to physical distance is a different problem. An object can move away from the camera 1 meter (for example) and not move within Pixy’s image, although you would expect it to get smaller. Relating physical movement based on movement within an image can be tricky…
It’s possible to determine the “pixels per inch”, but bear in mind that this value changes based on the distance from the camera. If the object is far, the “PPI” is small. If the object is close, the PPI is large.
If your object is at a given (known, consistent) distance from the camera, the PPI will stay constant (more or less) and you can measure it by moving an object a known distance (1 foot, for example) parallel to the camera’s image plane, such that the distance from the camera doesn’t change and seeing how far within the image the object has moved in pixels. You then divide the pixels by distance (1 foot) and then you get pixels per foot for that distance. This is called camera calibration and once you’ve done it, you can recover real distances with that pixels/foot value.
If your object is moving non-parallel to the image plane (such that the distance from the camera changes) things are going to get much more complicated.
Measuring the speed of a object traveling at 100 to 200 mph (arrow speed) is challenging, mostly because of motion blur. Motion blur will smear the object with the background, so the color that Pixy sees will be different than when the object is sitting still.
If the object is large, the problem is simplified, because motion blur affects larger objects less. And you can move the Pixy back from the motion so that the object isn’t moving so fast across the image.
The fact that the arrow is skinny makes things more difficult.
You will need very bright lighting at least. Hope this helps.
Thanks, actually this would be for very young user just starting out. I don’t think they would get over 80-100 mph from what I have seem so far. Also if I added a bright color sticker around the shaft it may help.
Anyways thanks for all your help… I may give it a try!