Calculate the field of view for a camera to draw on the map
-
Hello!
I have a camera installed on a drone and need to draw a field of view on the map.So, i have next data:
- Angle of a camera lens and a current zoom.
- Coordinate of a camera.
- Tilt and pan of a camera.
- Altitude (sea level) of a ground.
Has Qt some components to calculate a FOV in my case?
Thanks!
-
Hello!
I have a camera installed on a drone and need to draw a field of view on the map.So, i have next data:
- Angle of a camera lens and a current zoom.
- Coordinate of a camera.
- Tilt and pan of a camera.
- Altitude (sea level) of a ground.
Has Qt some components to calculate a FOV in my case?
Thanks!
@BrMisha said in Calculate the field of view for a camera to draw on the map:
Has Qt some components to calculate a FOV in my case?
It's called math :)
In Qt 3D you can get the current field of view from your virtual camera, but for a real camera with real data you have to calculate it by yourself.
There are a lot of guides that show how to achieve this. And you know all parameters you need to make these calculations (camera/lens specs etc.)
-
@BrMisha said in Calculate the field of view for a camera to draw on the map:
Has Qt some components to calculate a FOV in my case?
It's called math :)
In Qt 3D you can get the current field of view from your virtual camera, but for a real camera with real data you have to calculate it by yourself.
There are a lot of guides that show how to achieve this. And you know all parameters you need to make these calculations (camera/lens specs etc.)
-
@Pl45m4 Thanks for reply. I found many Qt classes with methods "fieldOfView". Those will not help for me?
@BrMisha said in Calculate the field of view for a camera to draw on the map:
I found many Qt classes with methods "fieldOfView". Those will not help for me?
These are most likely Qt 3D / QML classes for virtual /rendered scenes with a virtual camera to manage the perspective (POV / FOV).
eg.
- https://doc.qt.io/qt-5/qml-qtquick3d-perspectivecamera.html#fieldOfView-prop
- https://doc.qt.io/qt-5/qt3drender-qcamera.html#fieldOfView-prop
I don't know if one of those classes above would help you at all (unless you want to render your image in some virtual 3D environment).
I could be wrong, but in my opinion, you dont need any framework or class for this, since it's just plain math / physics.