I would like to recognize objects from images taken with my smartphone and estimate the distance from the position taken to the object.
Right now, I'm able to recognize objects from the images I took with my smartphone.
However, I don't know how to estimate the distance from the object.I don't want to use a stereo camera.
I would appreciate it if you could tell me how to estimate the distance.
Environment
Android Studio
Opencv 3.3
Windows 10
1) If you know the size and orientation of the object
For example, the official soccer ball (ball No. 5) has a diameter of 22 cm, so you can find the distance from the viewing angle and diameter of the object.
2) When multiple images can be obtained by changing focus
There are digital cameras on sale that can change focus later, but you can take multiple images while changing focus position, and you can choose from them later.
Similarly, you can estimate the best focus position (object position) by taking multiple images while changing focus positions and evaluating whether a symmetrical object is in focus.
3) Related research
There are various research papers that extract three-dimensional space (space that estimates distance from each object) from a single image.
A is a relatively short paper, so you should read it first.
B is a long thesis, but the description is detailed.
B: A Study on Three-Dimensional Image Measurement Using Single-Eye Point of View
© 2024 OneMinuteCode. All rights reserved.