get position of an object from 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))
Asked by ashkan_abd on 2018-10-03 18:33:51 UTC
Answers
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.
Asked by PeteBlackerThe3rd on 2018-10-03 21:19:28 UTC
Comments
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.
Asked by Choco93 on 2018-10-04 01:34:39 UTC
Comments