Open ktiwari9 opened 10 years ago
You can change the detecting colors to make it detecting PCB. My code detect a red color ball. These are the parameter you need to change: int LowerH = 160; int LowerS = 52; int LowerV = 139; int UpperH = 180; int UpperS = 196; int UpperV = 170;
So you are simply detecting the HSV values ? If I set the upper and lower values of HSV to match the green color it can simply detect a PCB ?
Also is this code compatible with ROS Hydro ?
You can give it a shot. I'm not 100% sure. You can use trackerbar to adjust the HSV and inspect the result.
And I'm not sure if it's compatible with Hydro. I have never used it on hydro before.
On Sun, Jun 1, 2014 at 6:27 AM, Kshitij Tiwari notifications@github.com wrote:
Also is this code compatible with ROS Hydro ?
— Reply to this email directly or view it on GitHub https://github.com/dustsnow/ros_object_detection/issues/1#issuecomment-44775330 .
Which version of ROS did you use ?
Groovy.
On Sun, Jun 1, 2014 at 8:12 AM, Kshitij Tiwari notifications@github.com wrote:
Which version of ROS did you use ?
— Reply to this email directly or view it on GitHub https://github.com/dustsnow/ros_object_detection/issues/1#issuecomment-44777428 .
Okay. One quick question, you detect red circles in this code. If I were to detect a PCB which is a green rectangle, I can change the HSV values to match a green color but how do i change from a circle detection to a rectangle detection ?
Unfortunate, there's no rectangle detection. The thing you can do is filter out color in the image, then detect lines in the image. Using these information, you can find a colored rectangle
On Sun, Jun 1, 2014 at 8:15 AM, Kshitij Tiwari notifications@github.com wrote:
Okay. One quick question, you detect red circles in this code. If I were to detect a PCB which is a green rectangle, I can change the HSV values to match a green color but how do i change from a circle detection to a rectangle detection ?
— Reply to this email directly or view it on GitHub https://github.com/dustsnow/ros_object_detection/issues/1#issuecomment-44777478 .
I am trying to write a object detection code for a Baxter on ROS Hydro that can detect a printed circuit board in a computer chassis. Please advise, how can i replicate your code to detect a PCB ?