CameraOneConfiguration.InitParametersOne Class Reference

Class containing the options used to initialize the sl.CameraOne object. More...

Detailed Description

Class containing the options used to initialize the sl.CameraOne object.

This class allows you to select multiple parameters for the sl.Camera such as the selected camera, resolution, depth mode, coordinate system, and units of measurement.
Once filled with the desired options, it should be passed to the sl.Camera.open() method.

import pyzed.sl as sl
def main() :
zed = sl.CameraOne() # Create a ZED camera object
init_params = sl.InitParametersOne() # Set initial parameters
init_params.sdk_verbose = 0 # Disable verbose mode
# Use the camera in LIVE mode
init_params.camera_resolution = sl.RESOLUTION.HD1080 # Use HD1080 video mode
init_params.camera_fps = 30 # Set fps at 30
# Or use the camera in SVO (offline) mode
#init_params.set_from_svo_file("xxxx.svo")
# Or use the camera in STREAM mode
#init_params.set_from_stream("192.168.1.12", 30000)
# Other parameters are left to their default values
# Open the camera
err = zed.open(init_params)
if err != sl.ERROR_CODE.SUCCESS:
exit(-1)
# Close the camera
zed.close()
return 0
if __name__ == "__main__" :
main()
Definition: sl.pyx:1

With its default values, it opens the camera in live mode at sl.RESOLUTION.HD720
You can customize it to fit your application.

Note
The parameters can also be saved and reloaded using its save() and load() methods.