Hi, We are using zed 2i camera I coudn’t find fov of just one camera. there is no data for it in datasheet.
Hi @OnurS
Welcome to the Stereolabs forum.
What do you mean by fov of just one camera
? The FoV of reported in the datasheet always refer to a single optic group
But when I calculate from image it is about 36 degree but datasheet is 70 for vertical? Am I missing a point?
Thanks for your reply. I am getting error get camera has no attribution v_fov
21 Tem 2023 Cum, saat 17:31 tarihinde Walter Lucetti (Stereolabs) support@stereolabs.com şunu yazdı:
@OnurS please share your code so that we can check it.
zed = sl.Camera()
print(zed.get_camera_information().v_fov)
warning is belove
'pyzed.sl.CameraInformation' object has no attribute 'v_fov'
File "C:\Users\onurs\Downloads\ball_tracking.py", line 161, in main
print(zed.get_camera_information().v_fov)
File "C:\Users\onurs\Downloads\ball_tracking.py", line 296, in <module>
main()
AttributeError: 'pyzed.sl.CameraInformation' object has no attribute 'v_fov'
Here is the correct code (full version):
import pyzed.sl as sl
def main():
# Create a Camera object
zed = sl.Camera()
# Create a InitParameters object and set configuration parameters
init_params = sl.InitParameters()
init_params.sdk_verbose = False
# Open the camera
err = zed.open(init_params)
if err != sl.ERROR_CODE.SUCCESS:
exit(1)
# Get camera information (ZED serial number)
zed_serial = zed.get_camera_information().serial_number
print("ZED serial number: {0}".format(zed_serial))
# Get camera information (Model)
model = zed.get_camera_information().camera_model
print(" * Model: {0}".format(model))
# Get camera information (Resolution)
w = zed.get_camera_information().camera_configuration.resolution.width
h = zed.get_camera_information().camera_configuration.resolution.height
print(" * Resolution: {0} x {1}".format(w,h))
# Get camera information (Field of View)
h_fov = zed.get_camera_information().camera_configuration.calibration_parameters.left_cam.h_fov
v_fov = zed.get_camera_information().camera_configuration.calibration_parameters.left_cam.v_fov
d_fov = zed.get_camera_information().camera_configuration.calibration_parameters.left_cam.d_fov
print(" * Field of view: {0:.2f}° x {1:.2f}° - D: {2:.2f}°".format(h_fov,v_fov,d_fov))
# Close the camera
zed.close()
if __name__ == "__main__":
main()
Expected output (with different FoV values):
ZED serial number: 35199186
* Model: ZED 2i
* Resolution: 1280 x 720
* Field of view: 101.16° x 68.77° - D: 108.77°
Thanks for your reply. I get 41 and 68 which are close to my calculations. Your reply solve my problem thanks.
1 Like