Pixy 2.1 cam transferring object dimension values to sketch

Hi,
I would like to know if the dimensions (the actual values i.e. 2" wide by 5" high) of an object that the camera observes, can be used in a sketch to perform different operations ?

Thanks,
TT

No, because you don't get real dimensions from a camera. The size is only measured in pixels, and that value depends not only on the size of the object, but also on how close it is to the camera.

Ah Ok thanks for the feedback. Any suggestions on how to achieve this. As an example I want a robot gripper to grab a ping pong ball, and have the grippers grip exactly across the max diameter of the ball (I.e. The equator of the ball) Is there a camera out there that would be able to send the diameter value, which in the sketch would divide by 2 to get the height from the table to the equator of the ball to send the gripper to that level. I don't necessarily just want to perform only this function. I would need the camera to send this measured value to the sketch for a variety of different sized and shaped objects.

Thanks
TT

It is extremely difficult, if not impossible to do something like that with just one camera.

The camera image would have to be carefully analyzed to match the separation of the two gripper jaws with the ball diameter.

To do that, the camera has to be placed so that the image can be unambiguously interpreted, with the image plane parallel to the plane of the ball and gripper.

How would you imagine centering the gripper on the ball, and positioning it in the same plane as the ball?

The only way you could do this is with a camera that measured depth, then you might be able to calibrate the image you get with a true size.

There are many different types of camera that measures depth, this thread discusses some of them.
depth camera

But I warn you this is not an easy thing to do, and you are not guaranteed to be successful. You are asking a lot here, and you might have to move away from the Arduino platforms to be able to do it. Something like a Raspberry Pi with more speed and much more memory.

OK thanks for the reply. I used the ping pong ball and gripper as an example. What I am really trying to do is to measure the diameter of the end of a log section that has just been cut, (and is on it's way to be split) and halve that value to adjust the 4 way splitter up or down, so it cuts the log section into 4 somewhat equal pieces. After thinking about things, I realize that I the camera must only take 1 snapshot and record that value. It cannot be a continuous video feed.
The attached video is not of me. Look at the 2:00 minute mark for about 10 seconds. I am trying to have that function controlled automatically, instead of it being adjusted manually.
Hydraulic Log Splitter BUILD Part 5 - FIRST TEST! (youtube.com)

Any ideas?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.