C API References
Enums
-
enum ArducamConnection
camera connection method.
Values:
-
enumerator CSI
-
enumerator USB
-
enumerator CONNECT_COUNT
-
enumerator CSI
-
enum ArducamDeviceType
DeviceType.
Values:
-
enumerator ARDUCAM_DEVICE_VGA
-
enumerator ARDUCAM_DEVICE_HQVGA
-
enumerator ARDUCAM_DEVICE_VGA
-
enum ArducamFrameType
Some types of frame data.
Values:
-
enumerator RAW_FRAME
-
enumerator CONFIDENCE_FRAME
-
enumerator DEPTH_FRAME
-
enumerator CACHE_FRAME
-
enumerator FRAME_TYPE_COUNT
-
enumerator RAW_FRAME
-
enum ArducamControl
Values:
-
enumerator ARDUCAM_CONTROL_RANGE
-
enumerator ARDUCAM_CONTROL_FMT_WIDTH
-
enumerator ARDUCAM_CONTROL_FMT_HEIGHT
-
enumerator ARDUCAM_CONTROL_MODE
-
enumerator ARDUCAM_CONTROL_FRAME_MODE
-
enumerator ARDUCAM_CONTROL_EXPOSURE
-
enumerator ARDUCAM_CONTROL_FRAME_RATE
-
enumerator ARDUCAM_CONTROL_SKIP_FRAME
-
enumerator ARDUCAM_CONTROL_SKIP_FRAME_LOOP
-
enumerator ARDUCAM_CONTROL_CONFIG_DIR_EXT
-
enumerator ARDUCAM_CONTROL_RANGE
-
enum ArducamTofWorkMode
Values:
-
enumerator ARDUCAM_MODE_SINGLE_FREQ
work with single frequency
-
enumerator ARDUCAM_MODE_DOUBLE_FREQ
-
enumerator ARDUCAM_MODE_TRIPLE_FREQ
-
enumerator ARDUCAM_MODE_QUAD_FREQ
-
enumerator ARDUCAM_MODE_DISTANCE
according to distance measurement parameters to choose parameters
-
enumerator ARDUCAM_MODE_HDR
configure chip to measure very near or far object (useful for AE)
-
enumerator ARDUCAM_MODE_AE
-
enumerator ARDUCAM_MODE_BG_OUTDOOR
configure chip to measure background IR radiation (no light from vcsel during phase frame)
-
enumerator ARDUCAM_MODE_GRAY_ONLY
-
enumerator ARDUCAM_MODE_CUSTOM1
for hw-cstar project
-
enumerator ARDUCAM_MODE_CUSTOM2
-
enumerator ARDUCAM_MODE_CUSTOM3
-
enumerator ARDUCAM_MODE_SINGLE_FREQ
-
enum ArducamTofFrameWorkMode
Values:
-
enumerator ARDUCAM_SUBMODE_SINGLE_FREQ_2PHASE
-
enumerator ARDUCAM_SUBMODE_SINGLE_FREQ_4PHASE
-
enumerator ARDUCAM_SUBMODE_SINGLE_FREQ_4PHASE_GRAY
whole frame: 4phase+gray
-
enumerator ARDUCAM_SUBMODE_SINGLE_FREQ_4PHASE_BG
whole frame: 4phase+bg
-
enumerator ARDUCAM_SUBMODE_SINGLE_FREQ_4PHASE_4BG
whole frame: 4phase+4bg
-
enumerator ARDUCAM_SUBMODE_SINGLE_FREQ_4PHASE_GRAY_5BG
whole frame: 4phase+gray+5bg
-
enumerator ARDUCAM_SUBMODE_SINGLE_FREQ_GRAY_BG_4PHASE_GRAY_BG
-
enumerator ARDUCAM_SUBMODE_SINGLE_FREQ_GRAY_BG_4PHASE_BG
-
enumerator ARDUCAM_SUBMODE_SINGLE_FREQ_BG_GRAY_BG_4PHASE
-
enumerator ARDUCAM_SUBMODE_SINGLE_FREQ_BG_4PHASE_BG_GRAY
-
enumerator ARDUCAM_SUBMODE_DOUBLE_FREQ_4PHASE
each frequency has 4phase, whole frame: 4phase+4phase
-
enumerator ARDUCAM_SUBMODE_DOUBLE_FREQ_4PHASE_GRAY_4PHASE_BG
whole frame: (4phase+gray)+(4phase+bg)
-
enumerator ARDUCAM_SUBMODE_DOUBLE_FREQ_4PHASE_4BG
whole frame: (4phase+4bg)+(4phase+4bg)
-
enumerator ARDUCAM_SUBMODE_DOUBLE_FREQ_4PHASE_GRAY_5BG
whole frame: (4phase+gray+5bg)+(4phase+gray+5bg)
-
enumerator ARDUCAM_SUBMODE_TRIPLE_FREQ_4PHASE
whole frame: (4phase)+(4phase)+(4phase)
-
enumerator ARDUCAM_SUBMODE_TRIPLE_FREQ_4PHASE_GRAY_4PHASE_GRAY_4PHASE_BG
whole frame: (4phase+gray)+(4phase+gray)+(4phase+bg)
-
enumerator ARDUCAM_SUBMODE_QUAD_FREQ_4PHASE
whole frame: (4phase)+(4phase)+(4phase)+(4phase)
-
enumerator ARDUCAM_SUBMODE_QUAD_FREQ_4PHASE_GRAY_4PHASE_BG_4PHASE_GRAY_4PHASE_BG
-
enumerator ARDUCAM_SUBMODE_BG_OUTDOOR
-
enumerator ARDUCAM_SUBMODE_GRAY_ONLY
-
enumerator ARDUCAM_SUBMODE_CUSTOM
-
enumerator ARDUCAM_SUBMODE_SINGLE_FREQ_2PHASE
Functions
-
ArducamDepthCamera createArducamDepthCamera()
Create a camera instance.
- Returns:
Return a ArducamDepthCamera instance.
-
Status arducamCameraOpen(ArducamDepthCamera camera, ArducamConnection conn, int index)
Initialize the camera configuration and turn on the camera, set the initialization frame according to the
conn
.- Parameters:
camera – Camera instance, obtained through createArducamDepthCamera().
conn – Specify the connection method. This parameter can be one of the following values:
CSI
USB
index – Device node, the default value is video0.
- Returns:
Return Status code.
-
Status arducamCameraOpenWithFile(ArducamDepthCamera camera, const char *path, int index)
Initialize the camera configuration and turn on the camera, set the initialization frame according to the
path
.- Parameters:
camera – Camera instance, obtained through createArducamDepthCamera().
path – Specify the configuration file path.
index – Device node, the default value is video0.
- Returns:
Return Status code.
-
Status arducamCameraClose(ArducamDepthCamera *camera)
Close camera.
- Parameters:
camera – Camera instance.
- Returns:
Return Status code.
-
Status arducamCameraStart(ArducamDepthCamera camera, ArducamFrameType type)
Start the camera stream and start processing.
- Parameters:
camera – Camera instance.
type – Type of camera output frame.
- Returns:
Return Status code.
-
Status arducamCameraStop(ArducamDepthCamera camera)
Stop camera stream and processing.
- Parameters:
camera – Camera instance.
- Returns:
Return Status code.
-
ArducamCameraInfo arducamCameraGetInfo(ArducamDepthCamera camera)
Specifies the frame format.
- Parameters:
camera – Camera instance.
format – Specifies the frame format. If the set format is not supported, the function will modify the value of this parameter to return the actual value used.
camera – Camera instance.
- Returns:
Return Status code. Get the Camera frames format.
- Returns:
All frame data formats contained in frame, The returned value include: width, height and Frametype
-
ArducamFrameFormat arducamCameraGetFormat(ArducamFrameBuffer fb, ArducamFrameType type)
Get the format of the specified frame.
- Parameters:
fb – Frame instance.
type – Frame type. This parameter can be one of the following values:
RAW_FRAME
CONFIDENCE_FRAME
DEPTH_FRAME
- Returns:
Return frame format.
-
Status arducamCameraSetCtrl(ArducamDepthCamera camera, ArducamControl id, int val)
Get the current camera output format.
- Parameters:
camera – Camera instance.
id – The id of the control.
val – The value that needs to be set.
- Returns:
Return Status code.
-
Status arducamCameraGetCtrl(ArducamDepthCamera camera, ArducamControl id, int *val)
Get the current camera output format.
- Parameters:
camera – Camera instance.
id – The id of the control.
val – Return the value that needs to be get.
- Returns:
Return Status code.
-
ArducamFrameBuffer arducamCameraRequestFrame(ArducamDepthCamera camera, int timeout)
Read frame from the camera.
- Parameters:
camera – Camera instance.
timeout – Timeout time, -1 means to wait all the time, 0 means immediate range, other values indicate the maximum waiting time, the unit is milliseconds.
- Returns:
Return Status code.
-
Status arducamCameraReleaseFrame(ArducamDepthCamera camera, ArducamFrameBuffer fb)
Release the ArducamFrameBuffer.
- Parameters:
camera – Camera instance.
fb – ArducamFrameBuffer.
- Returns:
Return Status code.
-
void *arducamCameraGetDepthData(ArducamFrameBuffer fb)
Read depth data from the frame.
Note
The output mode is the depth type, and the function can be called to obtain data
- Parameters:
fb – dataframe object.
- Returns:
Return Status code.
-
void *arducamCameraGetConfidenceData(ArducamFrameBuffer fb)
Read depth data from the frame.
Note
The output mode is the depth type, and the function can be called to obtain data.
- Parameters:
fb – dataframe object.
- Returns:
Return Status code.
-
void *arducamCameraGetRawData(ArducamFrameBuffer fb)
Read raw data from the frame.
Note
The output mode is the raw type, and the function can be called to obtain data.
- Parameters:
fb – dataframe object.
- Returns:
Return Status code.
-
struct ArducamFrameFormat
- #include <ArducamDepthCamera.h>
Description of frame data format.
Public Members
-
uint16_t width
width of frame
-
uint16_t height
height of frame
-
ArducamFrameType type
type of frame
-
uint64_t timestamp
timestamp of frame
-
uint16_t width
-
struct ArducamCameraInfo
- #include <ArducamDepthCamera.h>
Basic information of the camera module.
Public Members
-
unsigned int index
-
ArducamConnection connect
-
ArducamDeviceType device_type
-
ArducamFrameType type
-
unsigned int width
-
unsigned int height
-
unsigned int bit_width
-
unsigned int bpp
-
unsigned int index