Calculating distance to an unknown object with single camera
Hi all,
The title says it all, I have a camera mounted on a moving boat and I want to know the distance of the detected targets. Here is the scenario:
- I have the GPS information.
- I do know my velocity and direction.
- I have a single camera and an algorithm to detect the targets.
- I am moving, changing my location all the time. However the camera is mounted.
- Targets are moving, they are mostly boats sailing around.
- My camera is calibrated already.
- Edit: Targets have different sizes. They could be kayaks, boats, huge container ships, sailing boats, etc.
Give these, is there a way to find how far is the detected target from me?
Any help is appreciated.
Thanks
If the boats have all the same size maybe you can use the size of the detected objects, but unfortunately the boats have different sizes and more, the side is not having the same aspect ratio with the front/back of the boat, it is very difficult to say... Or you can measure the water to the object...
Thank you for your rapid answer. Yes, unfortunately the targets have different sizes. They could be small jet-skis, kayaks, fishing boats or huge container ships. Therefore going over the size parameter would not work in my case.
So does your camera see the water? can you detect it? just compute the distance from your boat to the object on water, if it is very small, then it is very close... lol You should find some equation, maybe the best is to see very little of your boat and the camera very close to the boat border...
This is what I see and out of this field, I am trying to get the distance to the dynamic targets. I did not understand what you meant by "just compute the distance from boat to the object on water", that is what I am wondering anyway, I mean that is the question that I pose. Calculating the distance to the object on the water surface.