0
\$\begingroup\$

I've been trying to make a butter passing bot, like the one from rick and morty. https://www.youtube.com/watch?v=X7HmltUWXgs I can do pretty much everything on there, but I need someone to help with the camera on the front. I need a low cost system that will look for the butter and tell my motors to go to it.

\$\endgroup\$

closed as too broad by Trevor_G, laptop2d, Transistor, JRE, Lior Bilia Nov 6 '17 at 14:44

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • \$\begingroup\$ you may find something here opencv.org \$\endgroup\$ – jsotola Nov 5 '17 at 1:41
  • \$\begingroup\$ "I need a low cost system that will look for the butter and tell my motors to go to it." - I wish I could express a huge problem sounding like a walk in the park like you. \$\endgroup\$ – Harry Svensson Nov 5 '17 at 7:38
  • \$\begingroup\$ Using a neural network wouldn't be too bad either, just saying. \$\endgroup\$ – Harry Svensson Nov 6 '17 at 14:39
1
\$\begingroup\$

Since you're new to computer vision, I'd suggest the below algorithm based on color segmentation. It will be pretty fast using OpenCV in Python on a Raspberry Pi.

1) Read in the live video one frame at a time (you can find lots of OpenCV tutorials where people do this)

2) Classify pixels as buttery yellow or not. The easiest way is probably to convert the image to HSV color space, and use a simple threshold on the H and S. (This way you gain a little robustness to changes in lighting)

3) Find the median x and y of the buttery yellow pixels

4) Convert the x to an angle, and have your robot turn there. (Basically just establish the left and right angles of your camera and hard-code those in.)

There are lots of other possible ways too, like the SURF algorithm to recognize a specific butter dish, or a QR code on the butter dish. But the above is probably the best place to start.

I recommend you just install OpenCV on your PC, take a picture of your stick of butter, and try things out! (By the way, StackOverflow has a "computer vision" tag; you probably want to post further questions there.)

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.