Ask Your Question
0

get position of an object from image

asked 2018-10-03 18:33:51 -0600

ashkan_abd gravatar image

my environment is gazebo 7 and ros kinetic and I work on a virtual robots project.
my robot model only supports thermal camera and rgb camera (I don't have depth camera).
I can detect an object in x , y position of robot camera with w width and h height.
Now my question is, how can I find position of that object in map? for example: if my robot position is (250, 250) and x , y , w , h are (72 , 22 , 23 , 109) in camera ( camera resolution is (240 , 320)), how can get position of that object? (I know true position is (245 , 269))

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2018-10-04 01:34:39 -0600

Choco93 gravatar image

You can take a look at visual servoing package. This out of the box thing will work with qr codes and it gives you the pose of the object you are trying to detect.

Or you can detect any other object that you want to detect and get it's pose, take a look here.

edit flag offensive delete link more
0

answered 2018-10-03 21:19:28 -0600

The short answer is you can't.

The long answer is that if you can make some additional assumptions then you can sometimes make a good estimate.

The x and y position within the image when combined with a calibrated lens model for the camera can tell you which 'direction' an object is in. If you know where your camera is then you know that the object lies somewhere along a line, but not where it is on that line.

However if the size of the object is fixed and known then you can use the width and height values to estimate it's range from the camera, although this will not be very precise.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2018-10-03 18:33:51 -0600

Seen: 1,429 times

Last updated: Oct 04 '18