loading
 
Tracking for distance
Panayiotis Mousarris from United Kingdom  [20 posts]
16 year
  I am trying to track red objects in front of the camera that are square and have dimensions of 15cmx15cm and height also 15cm. I need to know the distance that an object is in front of the camera. By observing the box size variable I can see that I can rely only on the values of variable box size, when the object is between a range of 20cm - 50cm ahead of camera.
  I would like to know if there's any way I can improve the range of which I can rely on the box values and try to relate them to an estimated distance.

Thank you
Anonymous 16 year
I'd probably try using the object's size (i.e. number of pixels) rather than the bounding box size which will change drastically based on a single pixel. The objects size will change slowly as the size changes and give you a more stable estimate of the distance.

You'll have to determine your own size to distance formula as it will depend on some of your camera's characteristics and the objects color/lighting stability. Start by literally measuring the actual distance and the sampled pixel size of the object. Using a couple readings you should be able to create a reasonable approximation formula.

STeven.
Panayiotis Mousarris from United Kingdom  [20 posts] 16 year
  I can't figure out which variable I am supposed to be looking at in order to check the object size.

Anonymous 16 year
This was already mentioned on another post but just for completeness ... the variable should be the AREA variable created by the Geometric_Statistics module.

STeven.

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index