It seems that every time I start my Zed2i camera at 1080p30, the camera would run at 1080p15 instead. This applies to both my Python code and Zed tools like Zed Explorer.
When I start Zed Explorer, even though the drop down menus on the top left of the screen is HD1080 and 30, the “Framerate” would be 15 and “Frame drop” keeps increasing. This can be temporary fixed by switching to other resolution or framerate then change back to HD1080 and 30 then the camera will work correctly at 30 FPS. This only happens with 1080p30 as other modes run correctly at start. Also, quitting Zed Explorer and starting it again at 1080p30 will make the issue happen again.
When I test on Python, it seems that the issue also happens as well. Here is the code I used to test:
import pyzed.sl as sl
if __name__ == "__main__":
# Create a ZED camera object
zed = sl.Camera()
# Set config params
init_params = sl.InitParameters()
init_params.camera_resolution = sl.RESOLUTION.HD1080
init_params.camera_fps = 30
# Open the camera
err = zed.open(init_params)
if err != sl.ERROR_CODE.SUCCESS:
print("Cannot open the camera. Replug it.")
exit(-1)
# Grab an image
i = 0
image = sl.Mat()
runtime_parameters = sl.RuntimeParameters()
prev_timestamp = zed.get_timestamp(sl.TIME_REFERENCE.CURRENT).get_milliseconds()
while i < 50:
if zed.grab(runtime_parameters) == sl.ERROR_CODE.SUCCESS:
zed.retrieve_image(image, sl.VIEW.LEFT)
timestamp = zed.get_timestamp(sl.TIME_REFERENCE.CURRENT)
width = image.get_width()
height = image.get_height()
timestamp_ms = timestamp.get_milliseconds()
print(f"Image resolution: {width} x {height} || Image timestamp: {timestamp_ms}")
print(f"Delta: {timestamp_ms - prev_timestamp}")
i = i + 1
prev_timestamp = timestamp_ms
# Close the camera
zed.close()
With this code, the correct timedelta for 1080p30 should be around 33 but when I run it, the delta is around 66 instead, confirming that there is an issue when the camera is initialized with 1080p30 mode. I also checked using other resolutions and framerates and they are all correct, only 1080p30 has this issue.
Could you investigate this? Thank you.
Here is my diagnostic file: link