2
votes

Is it possible to exactly determine the distance between a wall and a smart card holding person who is walking at normal speed ? There is just a single camera in the smart phone. Can it be done through optical flow ? I am asking that because on google search I found out that calculating distance can be misleading . Read the comment of Peter Meijer here.

Also, I wanna know is there any other option that I can have to calculate distance traveled by walking person given only resource I have is a smart phone with camera and accelerometer . Just mentioning algorithms or giving links would be suffice.

Information available with me :-

  1. Maximum distance of the camera from wall

  2. Acceleration from Android accelerometer to find out approximate velocity of user

Please comment if I am unclear in asking my question.

1
I don't think you can really justify the C++ tag on this. - Component 10
Is there any other information available? Speed of the person walking? Exact direction of the person walking? Size of the wall? For problems like this you need to include any information you may be able to use. If you don't know ANYTHING about your scene, then no, you can't find the distance to the wall. - Hammer
@Hammer Added the information available with me - Prashant Singh
Is your wall textured? If so you can do it with something like this With this method you would initialize a group of points on the plane using two views and your estimate of the distance between those views. Your results would be very dependent on that initialization step. Once you have a scale to your coordinate system established you can proceed with tracking a planar object. - Hammer

1 Answers

0
votes

I can think of two 3 ways:

  1. If you know the size of the object the person is holding you can estimate the distance of the person to the camera and without moving the phone you can track the person and obtain the projected distance traveled. Here you would need an initial calibration with respect to the object the person is holding and you also need the focal length of the camera in your phone. Also the line walked by the person should be parallel to the phone's image plane. I'm thinking here that your result would be highly inaccurate for a phone's camera.
  2. The second way is to use the height at which you hold the phone and point to the feet of the person. Use the angle which can be obtained from the accelerometer to calculate the distance to the person and do the tracking same as above (same conditions apply).
  3. You could use the compass to calculate the angle traveled and the compute the length of the two sides of a triangle by the method #2. Then get the other side, this is more accurate and much simpler.