Ask Your Question

Optical flow based Obstacle Avoidance

asked 2016-04-23 10:10:22 -0500

Giorgos_ts gravatar image

updated 2016-04-23 11:14:04 -0500

Hello everyone , i am trying to build a obstacle avoiding robot with monocular vision and want to use the optical flow from the camera to make it take decisions and avoid some static obstacles in a room , such as walls , tables , chairs etc. How can i achieve it ?

EDIT : I have read several papers , they suggest an approach of comparing the optical flow vectors in the camera view and if the right one are bigger than the left , then turn left to avoid the obstacle. However , I have not been able to understand how I can achieve that using c++ .

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-04-23 10:53:25 -0500

Tetragramm gravatar image

Hi. Unfortunately, this question is far to vauge for us to really help with. We can help with specific questions like "Why is this method not working?" or, "How do I do specific thing "X" with OpenCV?"

Read the FAQ to get a better idea of what we can help with.

To get a better idea of what you are doing, why don't you search the internet for previous obstacle avoidance schemes and begin trying those out. By reading the papers on them, you will get a better idea for what you need to do to achieve it. Once you've tried it and something doesn't work, then you can come to us and we can help.

edit flag offensive delete link more


I have edited my question . @Tetragramm

Giorgos_ts gravatar imageGiorgos_ts ( 2016-04-23 11:15:41 -0500 )edit

So what's the problem? Can you run optical flow? Can you tell which side of the image is left and which is right? Can you tell how large the flow is for a given point? That's all you need.

The first is really the only one that's an OpenCV problem, and there are lots of tutorials for Optical Flow. As I said, if you have a problem with a specific function not working the way you thought it should or the documentation not being clear, we can help, but we can't do your work for you.

Tetragramm gravatar imageTetragramm ( 2016-04-23 11:21:49 -0500 )edit

I can compute the optical flow but how can i tell right from left image? Or do you mean if the result is positive or negative ?

Giorgos_ts gravatar imageGiorgos_ts ( 2016-04-23 14:23:33 -0500 )edit

@Tetragramm welcome to downvoted answers clup :)

sturkmen gravatar imagesturkmen ( 2016-04-23 16:33:02 -0500 )edit

Do you understand why you're looking for larger optical flow vectors? When I said left/right, I mean literally the left half of the image, and the right half of the image.

Tetragramm gravatar imageTetragramm ( 2016-04-23 17:29:26 -0500 )edit

Yes i can understand that larger optical flow equals closer distance from object. But do i simply have to divide the width of the camera view(e.g. 480pixels) by 2 ?

Giorgos_ts gravatar imageGiorgos_ts ( 2016-04-23 18:52:32 -0500 )edit

That would certainly split the image left/right.

Look, we can do how, and occasionally what. But you have to figure out why, and most of the what. So, when you have actual questions, then come back and ask them. For now you need to figure out the what and why and as much of the how as you can of your project.

Tetragramm gravatar imageTetragramm ( 2016-04-23 18:57:25 -0500 )edit

Question Tools

1 follower


Asked: 2016-04-23 10:10:22 -0500

Seen: 853 times

Last updated: Apr 23 '16