• Hardware
  • how to get real FOV of camera on different resolution?

Hi. I'd like to get real HFOV of camera, while setting up different resolution (.THE_12_MP, THE_720_P).

But calling

calibData = device.readCalibration()

HFOV = calibData.getFov(dai.CameraBoardSocket.CAM_A)

returns all the time same resolution (108°, 79.475 with useSpec=False)

That is most probably not true, since the image is cropped for 720p.

Is thare any in-build function, how to get real HFOV?

Thank you, best wishes, Jan

Hi @JanKanka
No built-in function. But you can calculate it with np.rad2deg(2*np.arctan(VIDEO_W/MAX_W * np.tan(MAX_FOV*2*np.pi/(2*360))))

Thoughts?

Hi. Thank you for your reply. That might be true, if you crop the sub image (a.k.a. the 720p resolution image) from the source(12MPX). That is not tru, if I'm not mistaken, based on the image look:

  1. The 12MPx image, with red rectangle simulation 720p sub image

  1. 720p image directly from camera

Thank you, best wishes Jan

Yes, that's it. I did not know how the 720p image is produced. TH conversion from 12MPx -> 4k was important.

And should I use the MAX_FOV returned by getFov with useSpec True / False (or as is shown here)?

I'm not sure, why the FOV saved in eprom is 108° and calculated from Intrinsics is 79.47562085721047

Thanks, Jan

4 days later

Hi @JanKanka
MAX fov will be 108 at 12MP. Intrinsics should be calculated for 12MP since they are sensor based. Use spec should be set to false otherwise the specified fov will be used, not the calibrated one. Eeprom also has the spec FOV, thats why the 108.

Thanks,
Jaka

Hi Jaka. Thank you for the answer, unfortunatelly I do not understand what you mean by that.

Thanks, Jan

Hi @JanKanka
Whn flashing the device, the standard sensord values are used to provide a baseline to perform calibration on top of it. It used to be that the specified FOV was more accurate than the calculated one (calibrated). They are both saved in the eeprom but useSpec lets you select which one you want.

Thanks ,
Jaka