Python API Reference
ArducamEvkSDK
- class ArducamEvkSDK.Camera
Bases:
object
- add_log_file(filename: str) bool
add a log file
- property bandwidth: int
A property of bandwidth (read-only).
- property bin_config: dict
A property of bin_config (read-only).
- capture(timeout: int = 2000) Any
capture a image, return a object of Frame, or None if failed
- property capture_fps: int
A property of capture_fps (read-only).
- check_usb_type() bool
check the connection usb type is expected or not
- clear_buffer() bool
clear the buffer
- close() bool
close the camera
- property config: CameraConfig
A property of config.
- property config_type: str
A property of config_type (read-only). (‘NONE’ | ‘TEXT’ | ‘BINARY’)
- enable_console_log(enable: bool = True) None
enable/disable console log
- property force_capture: bool
A property of force_capture.
- get_auto_transfer() Any
get the recommended transfer configuration
- get_avail_count() int
get the available frame count
- has_capture_callback() bool
check if the callback function for reading a frame is set
- has_event_callback() bool
check if the callback function for event is set
- has_message_callback() bool
check if the callback function for message is set
- init() bool
init the camera
- is_opened() bool
check if the camera is opened
- property last_error: int
A property of last_error (read-only).
- property last_error_message: str
A property of last_error_message (read-only).
- property log_level: LoggerLevel
A property of log_level.
- read_board_config(command: int, value: int, index: int, buf_size: int) Any
read sensor register
- read_reg_16_16(ship_addr: int, reg_addr: int) Any
Reads a register value with 16 bit address and 16-bit value.
- read_reg_16_8(ship_addr: int, reg_addr: int) Any
Reads a register value with 16 bit address and 8-bit value.
- read_reg_8_16(ship_addr: int, reg_addr: int) Any
Reads a register value with 8 bit address and 16-bit value.
- read_reg_8_8(ship_addr: int, reg_addr: int) Any
Reads a register value with 8 bit address and 8-bit value.
- read_sensor_reg(reg_addr: int) Any
read sensor register
- read_user_data(addr: int, len: int) Any
read sensor register
- send_vr(command: int, direction: int, value: int, index: int, buffer: list[int]) Any
send vendor request
- set_auto_transfer(auto_transfer: bool) bool
enable or disable the automatic transfer configuration before starting the camera
- set_capture_callback(callback: Callable[[Frame], None]) None
set the callback function for reading a frame, or None to disable it
- set_control(controlId: str, value: int) bool
set control value
- set_event_callback(callback: Callable[[EventCode], None]) None
set the callback function for event, or None to disable it
- set_message_callback(callback: Callable[[LoggerLevel, str], None]) None
set the callback function for messages, or None to disable it
- set_transfer(transfer_size: int, transfer_buffer_size: int) bool
set transfer size and buffer size
- start() bool
start the camera
- stop() bool
stop the camera
- switch_mode(mode_id: int) bool
switch the camera mode
- property usb_type: str
A property of usb_type (read-only).
- property usb_type_num: int
A property of usb_type_num (read-only).
- wait_capture(timeout: int = 2000) bool
wait for a frame to be captured, return True if success, False if timeout
- write_board_config(command: int, value: int, index: int, buffer: list[int]) bool
write sensor register
- write_reg_16_16(ship_addr: int, reg_addr: int, value: int) bool
Writes a register value with 16 bit address and 16-bit value.
- write_reg_16_8(ship_addr: int, reg_addr: int, value: int) bool
Writes a register value with 16 bit address and 8-bit value.
- write_reg_8_16(ship_addr: int, reg_addr: int, value: int) bool
Writes a register value with 8 bit address and 16-bit value.
- write_reg_8_8(ship_addr: int, reg_addr: int, value: int) bool
Writes a register value with 8 bit address and 8-bit value.
- write_sensor_reg(reg_addr: int, value: int) bool
write sensor register
- write_user_data(addr: int, data: list[int]) bool
write sensor register
- class ArducamEvkSDK.CameraConfig
Bases:
object
- property bit_width: int
A property of bit_width.
- property format: int
A property of format.
- property height: int
A property of height.
- property i2c_addr: int
A property of i2c_addr.
- property i2c_mode: int
A property of i2c_mode.
- property width: int
A property of width.
- class ArducamEvkSDK.Control
Bases:
object
- property code: str
A property of code.
- property default: int
A property of default.
- property flags: int
A property of flags.
- property func: str
A property of func (read-only).
- property max: int
A property of max.
- property min: int
A property of min.
- property name: str
A property of name (read-only).
- property step: int
A property of step.
- ArducamEvkSDK.Critical: LoggerLevel
- ArducamEvkSDK.Debug: LoggerLevel
- class ArducamEvkSDK.Device
Bases:
object
- property dev_path: str
A property of dev_path (const).
- property id_product: int
A property of id_product (const).
- property id_vendor: int
A property of id_vendor (const).
- property in_used: bool
A property of in_used (const).
- property serial_number: list[int]
A property of serial_number (const).This is a list with 12 elements.
- property usb_type: int
A property of usb_type (const).
- class ArducamEvkSDK.DeviceList
Bases:
object
- has_event_callback() bool
Check if the callback function for event is set
- refresh() bool
Refreshes the device list
- ArducamEvkSDK.DeviceToHost: VRCommandDirection
- ArducamEvkSDK.Err: LoggerLevel
- class ArducamEvkSDK.ErrorCode(value: int)
Bases:
object
Members:
Success : Success.
Empty : Empty.
ReadConfigFileFailed : Failed to read configuration file.
ConfigFileEmpty : Configuration file is empty.
ConfigFormatError : Camera configuration format error.
ControlFormatError : Camera control format error.
OpenCameraFailed : Failed to open camera.
UnknownUSBType : Unknown USB type.
UnknownDeviceType : Unknown Device type.
InitCameraFailed : Failed to initialize camera.
MemoryAllocateFailed : Failed to allocate memory.
USBTypeMismatch : USB type mismatch.
CaptureTimeout : Capture timeout.
CaptureMethodConflict : Capture method conflict.
FreeEmptyBuffer : Free empty buffer.
FreeUnknowBuffer : Free unknown buffer.
RegisterMultipleCallback : Register multiple callback.
StateError : Camera state error.
NotSupported : Not supported.
VRCommandError : Vendor command error.
UserdataAddrError : Userdata address error.
UserdataLenError : Userdata length error.
UnknownError : Unknown error.
- property name: str
- property value: int
- class ArducamEvkSDK.EventCode(value: int)
Bases:
object
Members:
FrameStart : Frame start
FrameEnd : Frame end
Exit : Exit
TransferError : Transfer error
TransferTimeout : Transfer timeout
TransferLengthError : Transfer length error
DeviceConnect : Device connect
DeviceDisconnect : Device disconnect
- property name: str
- property value: int
- class ArducamEvkSDK.Format
Bases:
object
- property bit_depth: int
A property of bit_depth.
- property format_code: int
A property of format_code.
- property height: int
A property of height.
- property width: int
A property of width.
- class ArducamEvkSDK.FormatMode(value: int)
Bases:
object
Members:
RAW : RAW
RGB : RGB
YUV : YUV
JPG : JPG
MON : MON
RAW_D : RAW_D
MON_D : MON_D
TOF : TOF, deprecated
STATS : STATS
RGB_IR : RGB_IR
- JPG: ClassVar[FormatMode]
- MON: ClassVar[FormatMode]
- MON_D: ClassVar[FormatMode]
- RAW: ClassVar[FormatMode]
- RAW_D: ClassVar[FormatMode]
- RGB: ClassVar[FormatMode]
- RGB_IR: ClassVar[FormatMode]
- STATS: ClassVar[FormatMode]
- TOF: ClassVar[FormatMode]
- YUV: ClassVar[FormatMode]
- property name: str
- property value: int
- class ArducamEvkSDK.Frame
Bases:
object
- property bad: bool
A property of bad.
- property data: numpy.ndarray[Any, numpy.dtype[numpy.uint8]]
A property of data.
- property seq: int
A property of seq.
- ArducamEvkSDK.HostToDevice: VRCommandDirection
- class ArducamEvkSDK.I2CMode(value: int)
Bases:
object
Members:
I2C_MODE_8_8 : 8-bit register address and 8-bit data
I2C_MODE_8_16 : 8-bit register address and 16-bit data
I2C_MODE_16_8 : 16-bit register address and 8-bit data
I2C_MODE_16_16 : 16-bit register address and 16-bit data
I2C_MODE_16_32 : 16-bit register address and 32-bit data
- property name: str
- property value: int
- ArducamEvkSDK.Info: LoggerLevel
- ArducamEvkSDK.JPG: FormatMode
- class ArducamEvkSDK.LoggerLevel(value: int)
Bases:
object
Members:
Trace : trace log level
Debug : debug log level
Info : info log level
Warn : warn log level
Err : err log level
Critical : critical log level
Off : off log level
- Critical: ClassVar[LoggerLevel]
- Debug: ClassVar[LoggerLevel]
- Err: ClassVar[LoggerLevel]
- Info: ClassVar[LoggerLevel]
- Off: ClassVar[LoggerLevel]
- Trace: ClassVar[LoggerLevel]
- Warn: ClassVar[LoggerLevel]
- property name: str
- property value: int
- ArducamEvkSDK.MON: FormatMode
- ArducamEvkSDK.MON_D: FormatMode
- class ArducamEvkSDK.MemType(value: int)
Bases:
object
Members:
DMA : DMA
RAM : RAM
- property name: str
- property value: int
- ArducamEvkSDK.Off: LoggerLevel
- class ArducamEvkSDK.Param
Bases:
object
- property bin_config: bool
A property of bin_config.
- property config_file_name: str
A property of config_file_name.
- property ext_config_file_name: str
A property of ext_config_file_name.
- ArducamEvkSDK.RAW: FormatMode
- ArducamEvkSDK.RAW_D: FormatMode
- ArducamEvkSDK.RGB: FormatMode
- ArducamEvkSDK.RGB_IR: FormatMode
- ArducamEvkSDK.STATS: FormatMode
- ArducamEvkSDK.TOF: FormatMode
- ArducamEvkSDK.Trace: LoggerLevel
- class ArducamEvkSDK.USBSpeed(value: int)
Bases:
object
Members:
Unknown : The OS doesn’t report or know the device speed.
Low : The device is operating at low speed (1.5MBit/s).
Full : The device is operating at full speed (12MBit/s).
High : The device is operating at high speed (480MBit/s).
Super : The device is operating at super speed (5000MBit/s).
SuperPlus : The device is operating at super speed plus (10000MBit/s).
- property name: str
- property value: int
- class ArducamEvkSDK.VRCommandDirection(value: int)
Bases:
object
Members:
HostToDevice : Host to device
DeviceToHost : Device to host
- DeviceToHost: ClassVar[VRCommandDirection]
- HostToDevice: ClassVar[VRCommandDirection]
- property name: str
- property value: int
- ArducamEvkSDK.Warn: LoggerLevel
- ArducamEvkSDK.YUV: FormatMode
- ArducamEvkSDK.get_error_name(ec: int) str
get the error name