V-REP OpenCV

Typically: "How do I... ", "How can I... " questions
Post Reply
Pretenas
Posts: 13
Joined: 14 Jul 2015, 16:05

V-REP OpenCV

Post by Pretenas » 17 Jul 2015, 12:12

Hello there,

I have a vision sensor which has to detect some markers. For the moment, i decided that the marker would be a red circle. I get the image in my c++ plugin via simGetVisionSensorImage and I display it with opencv function imshow. i process the image until eventually i reach this stage.Image
As you can see, it only sees the red circles, which is great.
I know that the next stage is that i have to use the HoughCircles function, but here is the problem.
When i do this, the plugin compiles, is ok. But when the simulation starts in v-rep, there is some kind of error with the heap memory, and it crashes.
Has anybody ever had this problem?

Also, after i detect those circles, i have to move the robot arm so that it stays just above the marker.
Is there another solution to my problem? Can I avoid using HoughCircles? Because I've been struggling with this thing for about two days.

Thanks, cheers!

coppelia
Site Admin
Posts: 7441
Joined: 14 Dec 2012, 00:25

Re: V-REP OpenCV

Post by coppelia » 18 Jul 2015, 10:17

Hello,

your problem seems to be directly linked to the usage of OpenCV, in particular of the Hough Circle Transform, you will get better answers on the OpenCV related forums/mailing lists.

If at a later stage your robot arm needs to move according to some calculation results from the OpenCV image processing, it will probably be easiest to use Ik to move the robot's tooltip.

Cheers

andreiman
Posts: 3
Joined: 21 Mar 2016, 14:35

Re: V-REP OpenCV

Post by andreiman » 18 Apr 2016, 14:32

Hello,
Can you show me your C++ code? I try to do almost the same thing, but I don't know how to transfer the image in C++/OpenCV
Thanks

Post Reply