Greetings All,
I’m new to OpenCV and image processing, but am looking to use it in a class project I have coming up. My team and I are looking for recommendations on what methods/functions/etc within OpenCV we should use to detect some purple 3D printed icosahedrons that will be laying on a black surface that is surrounded by black painted 2x4s. There is an image of a rendering of the course posted below. (I’ll post some actual photos once we have the course built). The objective is to locate the purple objects, pick them up, then place them in a bin. Our team is hoping to use a vision system to detect and navigate a small, mobile robot up to the objectives which a robotic arm will pick them up and deposit them into a hopper.
Our thinking thus far has been simpleBlobDetector would be the best best. However, initial testing did not yield very good results. Then we shifted to possibly sampling the color space of the icosahedrons then using a color mask to “erase” all of the image except that occupied by the objectives. That proved to be unsuccessful as well.
So, before heading down any other rabbit holes, we thought perhaps we should get some guidance from some folks who actually know what they’re doing.
What strategy, or better yet what specific functions, would you use to identify where in the image view the objectives are such that this information can be passed on to a navigation module that can command the robot move to within range so that the objectives can be picked up?
Please remember, we’re all new to OpenCV and image processing so feel free to keep your suggestions and advice as elementary as you can =)
Thanks so much!
that’s going to be a challenge then.
stick to Python. don’t waste your time writing C++.
browse the tutorials sections in the OpenCV docs.
you can make a simple robot that doesn’t involve “mapping” the environment or knowing its own position. position the camera so the gripper expects a widget showing up in the bottom center of the picture. then look for widgets and “kinda” drive towards one of them until it’s in the right place. I see an AR (aruco) code in the picture. when you need to find that and drive towards it, you can just turn in place until you see it.
color space transforms, masks, blob detector are sensible approaches. if they failed, that’s a matter of execution, not an issue with the approaches.
stick to Python. don’t waste your time writing C++.
We initially started out wanting to do it in C/C++, since most programming courses we’ve taken up to this point have bee in C/C++, but since a vast majority of the reference material that’s out there is in Python, we decided to go that route instead.
you can make a simple robot that doesn’t involve “mapping” the environment or knowing its own position. position the camera so the gripper expects a widget showing up in the bottom center of the picture. then look for widgets and “kinda” drive towards one of them until it’s in the right place. I see an AR (aruco) code in the picture. when you need to find that and drive towards it, you can just turn in place until you see it.
This is exactly what we’re going to try and do. If one searches for robot navigation, there are lots of references to mapping, localization, path planning, kinematics, etc…none of which seem all that necessary for our application. Finding the object, turning toward it, then driving up to it until the gripper is in range seems like the “just enough” solution.
color space transforms, masks, blob detector are sensible approaches. if they failed, that’s a matter of execution, not an issue with the approaches.
No doubt our attempts at implementing blob detection and color masking were wrought with errors. But knowing those are the things we need to be trying to pursue is extremely helpful in and of itself.