Camera Control
Introduction
These functions are responsible for controlling various parameters of the camera.
VxResetUVC
Function:
- C++
- Python
- C#
- C
int VxResetUVC(std::shared_ptr<VxCamera> vxcam)
def VxResetUVC(vxcam)
int VxResetUVC(VxCamera vxcam)
int vx_reset_uvc(vx_camera vxcam)
Function Description:
- This function is for resetting the UVC device.
Parameter Description:
- vxcam : A pointer shared ownership of a camera obtained from VxInitialCameraDevice().
- return 0 = PASS, return -1 = FAIL.
Example:
- C++
- Python
- C#
- C
// reset the UVC device
VxResetUVC(vxcam);
# reset the UVC device
pyvizionsdk.VxResetUVC(vxcam)
// reset the UVC device
CSVizionSDK.VxResetUVC(vxcam);
vx_reset_uvc(vxcam);
VxGetUVCImageProcessingRange
Function:
- C++
- Python
- C#
- C
int VxGetUVCImageProcessingRange(std::shared_ptr<VxCamera> vxcam,
VX_UVC_IMAGE_PROPERTIES propId,
long& min,
long& max,
long& step,
long& def)
def VxGetUVCImageProcessingRange(vxcam, propId)
int VxGetUVCImageProcessingRange(VxCamera vxcam,
VX_UVC_IMAGE_PROPERTIES propId,
out long min,
out long max,
out long step,
out long def)
int vx_get_uvc_image_processing_range(vx_camera vxcam,
vx_uvc_image_properties propId,
long* min,
long* max,
long* step,
long* def)
Function Description:
- This function is for the UVC device to get the range of image processing parameters.
Parameter Description:
- vxcam : A pointer shared ownership of a camera obtained from VxInitialCameraDevice().
- propId : A VX_UVC_IMAGE_PROPERTIES format UVC image processing property for which the range is being queried.
- min : A long type variable to store the minimum allowable value for the property.
- max : A long type variable to store the maximum allowable value for the property.
- step : A long type variable to store the step value for the property.
- def : A long type variable to store the default value for the property.
- Return:
- return 0 = PASS, return -1 = FAIL
- Python : tuple(return_code, min, max, step, def)
return_code : return 0 = PASS, return -1 = FAIL
Example:
- C++
- Python
- C#
- C
long min = 0, max = 0, step = 0, def = 0;
auto propId = static_cast<VX_UVC_IMAGE_PROPERTIES>(0);
// get the UVC image processing range
VxGetUVCImageProcessingRange(vxcam, propId, min, max, step, def);
from pyvizionsdk import VX_UVC_IMAGE_PROPERTIES
# get the UVC image processing range
result, brightness_min, brightness_max, brightness_step, brightness_def = pyvizionsdk.VxGetUVCImageProcessingRange(vxcam, VX_UVC_IMAGE_PROPERTIES.UVC_IMAGE_BRIGHTNESS)
print("UVC brightness range:", brightness_min, brightness_max, brightness_step, brightness_def)
print("Return code:", result)
long min, max, step, def;
VX_UVC_IMAGE_PROPERTIES propId = VX_UVC_IMAGE_PROPERTIES.UVC_IMAGE_BRIGHTNESS;
// get the UVC image processing range
CSVizionSDK.VxGetUVCImageProcessingRange(vxcam, propId, out min, out max, out step, out def);
long min = 0, max = 0, step = 0, def = 0;
// get the UVC image processing range
vx_get_uvc_image_processing_range(vxcam, UVC_IMAGE_BRIGHTNESS, &min, &max, &step, &def);
VxGetUVCImageProcessing
Function:
- C++
- Python
- C#
- C
int VxGetUVCImageProcessing(std::shared_ptr<VxCamera> vxcam,
VX_UVC_IMAGE_PROPERTIES propId,
long& value,
int& flag)
def VxGetUVCImageProcessing(vxcam, propId)
int VxGetUVCImageProcessing(VxCamera vxcam,
VX_UVC_IMAGE_PROPERTIES propId,
out long value,
out int flag)
int vx_get_uvc_image_processing(vx_camera vxcam,
vx_uvc_image_properties propId,
long* value,
int* flag)
Function Description:
- This function is for the UVC device to get the image processing parameters’ current value and the flag to indicate whether the property is in auto mode or not.
Parameter Description:
- vxcam : A pointer shared ownership of a camera obtained from VxInitialCameraDevice().
- propId : A VX_UVC_IMAGE_PROPERTIES format UVC image processing property for which being queried.
- value : A long type variable to store the current value of the property.
- flag : An int type variable to indicate whether the property is read only or not. If the flag is 1, it means the property is in auto mode for read-only.
- Return:
- return 0 = PASS, return -1 = FAIL
- Python : tuple(return_code, value, flag)
return_code : return 0 = PASS, return -1 = FAIL
Example:
- C++
- Python
- C#
- C
long value = 0;
int flag = 0;
auto propId = static_cast<VX_UVC_IMAGE_PROPERTIES>(0);
// get the UVC image processing
VxGetUVCImageProcessing(vxcam, propId, value, flag);
from pyvizionsdk import VX_UVC_IMAGE_PROPERTIES
# get the UVC image processing
result, brightness, flag = pyvizionsdk.VxGetUVCImageProcessing(vxcam, VX_UVC_IMAGE_PROPERTIES.UVC_IMAGE_BRIGHTNESS)
print("UVC brightness:", brightness)
print("Flag:", flag)
print("Return code:", result)
long value;
int flag;
VX_UVC_IMAGE_PROPERTIES propId = VX_UVC_IMAGE_PROPERTIES.UVC_IMAGE_BRIGHTNESS;
// get the UVC image processing
CSVizionSDK.VxGetUVCImageProcessing(vxcam, propId, out value, out flag);
long value = 0;
int flag = 0;
// get the UVC image processing
vx_get_uvc_image_processing(vxcam, UVC_IMAGE_BRIGHTNESS, &value, &flag);
VxSetUVCImageProcessing
Function:
- C++
- Python
- C#
- C
int VxSetUVCImageProcessing(std::shared_ptr<VxCamera> vxcam,
VX_UVC_IMAGE_PROPERTIES propId,
long value,
int flag)
def VxSetUVCImageProcessing(vxcam, propId, value, flag)
int VxSetUVCImageProcessing(VxCamera vxcam,
VX_UVC_IMAGE_PROPERTIES propId,
long value,
int flag)
int vx_set_uvc_image_processing(vx_camera vxcam,
vx_uvc_image_properties propId,
long value,
int flag)
Function Description:
- This function is for the UVC device to set image processing parameters value and the flag.
Parameter Description:
- vxcam : A pointer shared ownership of a camera obtained from VxInitialCameraDevice().
- propId : A VX_UVC_IMAGE_PROPERTIES format UVC image processing property for which being queried.
- value : A long type variable to set the value of the property.
- flag : A int type variable to indicate whether the property is read only or not. If the flag is 1, it means the property is in auto mode for read-only.
- return 0 = PASS, return -1 = FAIL.
Example:
- C++
- Python
- C#
- C
// set the brightness to 16
VxSetUVCImageProcessing(vxcam, VX_UVC_IMAGE_PROPERTIES::UVC_IMAGE_BRIGHTNESS, 16, 0);
from pyvizionsdk import VX_UVC_IMAGE_PROPERTIES
# set the UVC image processing
result = pyvizionsdk.VxSetUVCImageProcessing(vxcam, VX_UVC_IMAGE_PROPERTIES.UVC_IMAGE_BRIGHTNESS, 16, 0)
print("Set UVC brightness return code:", result)
// set the brightness to 16
CSVizionSDK.VxSetUVCImageProcessing(vxcam, VX_UVC_IMAGE_PROPERTIES.UVC_IMAGE_BRIGHTNESS, 16, 0);
// set the brightness to 16
vx_set_uvc_image_processing(vxcam, UVC_IMAGE_BRIGHTNESS, 16, 0);
VxGetISPImageProcessingRange
Function:
- C++
- Python
- C#
- C
int VxGetISPImageProcessingRange(std::shared_ptr<VxCamera> vxcam,
VX_ISP_IMAGE_PROPERTIES propId,
int& min,
int& max,
int& step,
int& def)
def VxGetISPImageProcessingRange(vxcam, propId)
int VxGetISPImageProcessingRange(VxCamera vxcam,
VX_ISP_IMAGE_PROPERTIES propId,
out int min,
out int max,
out int step,
out int def)
int vx_get_isp_image_processing_range(vx_camera vxcam,
vx_isp_image_properties propId,
int* min,
int* max,
int* step,
int* def)
Function Description:
- This function is for the ISP device to get the range of image processing parameters.
Parameter Description:
- vxcam : A pointer shared ownership of a camera obtained from VxInitialCameraDevice().
- propId : A VX_ISP_IMAGE_PROPERTIES format ISP image processing property for which the range is being queried.
- min : An integer type variable to store the minimum allowable value for the property.
- max : An integer type variable to store the maximum allowable value for the property.
- step : An integer type variable to store the step value for the property.
- def : An integer type variable to store the default value for the property.
- Return:
- return 0 = PASS, return -1 = FAIL
- Python : tuple(return_code, min, max, step, def)
return_code : return 0 = PASS, return -1 = FAIL
Example:
- C++
- Python
- C#
- C
int min = 0, max = 0, step = 0, def = 0;
auto propId = static_cast<VX_ISP_IMAGE_PROPERTIES>(0);
// get the ISP image processing range
VxGetISPImageProcessingRange(vxcam, propId, min, max, step, def);
from pyvizionsdk import VX_ISP_IMAGE_PROPERTIES
# get the ISP image processing range
result, brightness_min, brightness_max, brightness_step, brightness_def = pyvizionsdk.VxGetISPImageProcessingRange(vxcam, VX_ISP_IMAGE_PROPERTIES.ISP_IMAGE_BRIGHTNESS)
print("ISP brightness range:", brightness_min, brightness_max, brightness_step, brightness_def)
print("Return code:", result)
int min, max, step, def;
VX_ISP_IMAGE_PROPERTIES propId = VX_ISP_IMAGE_PROPERTIES.ISP_IMAGE_BRIGHTNESS;
// get the ISP image processing range
CSVizionSDK.VxGetISPImageProcessingRange(vxcam, propId, out min, out max, out step, out def);
int min = 0, max = 0, step = 0, def = 0;
// get the ISP image processing range
vx_get_isp_image_processing_range(vxcam, ISP_IMAGE_BRIGHTNESS, &min, &max, &step, &def);
VxGetISPImageProcessing
Function:
- C++
- Python
- C#
- C
int VxGetISPImageProcessing(std::shared_ptr<VxCamera> vxcam,
VX_ISP_IMAGE_PROPERTIES propId,
int& value,
int& flag)
def VxGetISPImageProcessing(vxcam, propId)
int VxGetISPImageProcessing(VxCamera vxcam,
VX_ISP_IMAGE_PROPERTIES propId,
out int value,
out int flag)
int vx_get_isp_image_processing(vx_camera vxcam,
vx_isp_image_properties propId,
int& value,
int& flag)
Function Description:
- This function is for the ISP device to get an image processing parameter value and the flag.
Parameter Description:
- vxcam : A pointer shared ownership of a camera obtained from VxInitialCameraDevice().
- propId : A VX_ISP_IMAGE_PROPERTIES format ISP image processing property for which being queried.
- value : An integer type variable to store the current value of the property.
- flag : An integer type variable to indicate whether the property is read only or not. If the flag is 1, it means the property is read-only.
- Return:
- return 0 = PASS, return -1 = FAIL
- Python : tuple(return_code, value, flag)
return_code : return 0 = PASS, return -1 = FAIL
Example:
- C++
- Python
- C#
- C
int value;
int flag = 0;
// get the ISP image processing value and flag
VxGetISPImageProcessing(vxcam, VX_ISP_IMAGE_PROPERTIES::ISP_IMAGE_BRIGHTNESS, value, flag);
from pyvizionsdk import VX_ISP_IMAGE_PROPERTIES
# get the ISP image processing value and flag
result, brightness, flag = pyvizionsdk.VxGetISPImageProcessing(vxcam, VX_ISP_IMAGE_PROPERTIES.ISP_IMAGE_BRIGHTNESS)
print("ISP brightness:", brightness)
print("Flag:", flag)
print("Return code:", result)
int value, flag;
// get the ISP image processing value and flag
CSVizionSDK.VxGetISPImageProcessing(vxcam, VX_ISP_IMAGE_PROPERTIES.ISP_IMAGE_BRIGHTNESS, out value, out flag);
int value;
int flag = 0;
// get the ISP image processing value and flag
vx_get_isp_image_processing(vxcam, ISP_IMAGE_BRIGHTNESS, &value, &flag);
VxSetISPImageProcessing
The following ISP settings will be reset to default values by the driver each time the camera starts streaming:
ISP_IMAGE_EXPOSURE_MIN_TIME
ISP_IMAGE_EXPOSURE_MAX_TIME
ISP_IMAGE_JPEG_QUALITY
If you need to maintain custom values for these settings, you must re-apply them after each stream start.
Function:
- C++
- Python
- C#
- C
int VxSetISPImageProcessing(std::shared_ptr<VxCamera> vxcam,
VX_ISP_IMAGE_PROPERTIES propId,
int value)
def VxSetISPImageProcessing(vxcam, propId, value)
int VxSetISPImageProcessing(VxCamera vxcam,
VX_ISP_IMAGE_PROPERTIES propId,
int value)
int vx_set_isp_image_processing(vx_camera vxcam,
vx_isp_image_properties propId,
int value)
Function Description:
- This function is for the ISP device to set an image processing parameter value.
Parameter Description:
- vxcam : A pointer shared ownership of a camera obtained from VxInitialCameraDevice().
- propId : A VX_ISP_IMAGE_PROPERTIES format ISP image processing property for which being queried.
- value : An integer type variable to set the value of the property.
- return 0 = PASS, return -1 = FAIL.
Example:
- C++
- Python
- C#
- C
// set the brightness to 16
VxSetISPImageProcessing(vxcam, VX_ISP_IMAGE_PROPERTIES::ISP_IMAGE_BRIGHTNESS, 16);
from pyvizionsdk import VX_ISP_IMAGE_PROPERTIES
# set the brightness to 16
result = pyvizionsdk.VxSetISPImageProcessing(vxcam, VX_ISP_IMAGE_PROPERTIES.ISP_IMAGE_BRIGHTNESS, 16)
print("Set ISP brightness return code:", result)
// set the brightness to 16
CSVizionSDK.VxSetISPImageProcessing(vxcam, VX_ISP_IMAGE_PROPERTIES.ISP_IMAGE_BRIGHTNESS, 16);
// set the brightness to 16
vx_set_isp_image_processing(vxcam, ISP_IMAGE_BRIGHTNESS, 16);
VxSetISPImageProcessingDefault
Function:
- C++
- Python
- C#
- C
int VxSetISPImageProcessingDefault(std::shared_ptr<VxCamera> vxcam)
def VxSetISPImageProcessingDefault(vxcam)
int VxSetISPImageProcessingDefault(VxCamera vxcam)
int vx_set_isp_image_processing_default(vx_camera vxcam)
Function Description:
- This function is for the ISP device to set an image processing parameter to the default value.
Parameter Description:
- vxcam : A pointer shared ownership of a camera obtained from VxInitialCameraDevice().
- return 0 = PASS, return -1 = FAIL.
Example:
- C++
- Python
- C#
- C
// set the ISP image processing to default value
VxSetISPImageProcessingDefault(vxcam);
# set the ISP image processing to default value
result = pyvizionsdk.VxSetISPImageProcessingDefault(vxcam)
print("Return code:", result)
// set the ISP image processing to default value
CSVizionSDK.VxSetISPImageProcessingDefault(vxcam);
// set the ISP image processing to default value
vx_set_isp_image_processing_default(vxcam);
VxGetCurrentGain
Function:
- C++
- Python
- C#
- C
int VxGetCurrentGain(std::shared_ptr<VxCamera> vxcam, uint8_t& gain)
def VxGetCurrentGain(vxcam)
int VxGetCurrentGain(VxCamera vxcam, out byte gain)
int vx_get_current_gain(vx_camera vxcam, uint8_t* gain)
Function Description:
- This function is for the device to obtain the current exposure gain value. When in Auto Exposure mode, this returns the automatically adjusted gain value.
Parameter Description:
- vxcam : A pointer shared ownership of a camera obtained from VxInitialCameraDevice().
- gain : A reference of the uint8_t(byte) variable that stores the gain value.
- Return:
- return 0 = PASS, return -1 = FAIL
- Python : tuple(return_code, gain)
return_code : return 0 = PASS, return -1 = FAIL
Example:
- C++
- Python
- C#
- C
uint8_t gain;
// get the gain value
VxGetCurrentGain(vxcam, gain);
# get the gain value
result, gain = pyvizionsdk.VxGetCurrentGain(vxcam)
print("Gain value:", gain)
print("Return code:", result)
byte gain;
// get the gain value
CSVizionSDK.VxGetCurrentGain(vxcam, out gain);
uint8_t gain;
// get the gain value
vx_get_current_gain(vxcam, &gain);
VxGetCurrentExposure
Function:
- C++
- Python
- C#
- C
int VxGetCurrentExposure(std::shared_ptr<VxCamera> vxcam, uint32_t& exp)
def VxGetCurrentExposure(vxcam)
int VxGetCurrentExposure(VxCamera vxcam, out uint exp)
int vx_get_current_exposure(vx_camera vxcam, uint32_t* exp)
Function Description:
- This function is for the device to obtain the current exposure time value. When in Auto Exposure mode, this returns the automatically adjusted exposure time value.
Parameter Description:
- vxcam : A pointer shared ownership of a camera obtained from VxInitialCameraDevice().
- exp : A reference of the uint32_t(uint) variable which stored the exposure value.
- Return:
- return 0 = PASS, return -1 = FAIL
- Python : tuple(return_code, exp)
return_code : return 0 = PASS, return -1 = FAIL
Example:
- C++
- Python
- C#
- C
uint32_t exp;
// get the exposure time value
VxGetCurrentExposure(vxcam, exp);
# get the exposure value
result, exp = pyvizionsdk.VxGetCurrentExposure(vxcam)
print("Exposure value:", exp)
print("Return code:", result)
uint exp;
// get the exposure time value
CSVizionSDK.VxGetCurrentExposure(vxcam, out exp);
uint32_t exp;
// get the exposure time value
vx_get_current_exposure(vxcam, &exp);
VxGetMaxFPS & VxSetMaxFPS
These settings will be reset to default values by the driver each time the camera starts streaming. If you need to maintain custom MaxFPS settings, you must re-apply them after each stream start.
Function:
- C++
- Python
- C#
- C
int VxGetMaxFPS(std::shared_ptr<VxCamera> vxcam, uint8_t& fps)
int VxSetMaxFPS(std::shared_ptr<VxCamera> vxcam, uint8_t fps)
def VxGetMaxFPS(vxcam)
def VxSetMaxFPS(vxcam, fps)
int VxGetMaxFPS(VxCamera vxcam, out byte fps)
int VxSetMaxFPS(VxCamera vxcam, byte fps)
int vx_get_max_fps(vx_camera vxcam, uint8_t* fps)
int vx_set_max_fps(vx_camera vxcam, uint8_t fps)
Function Description:
- VxGetMaxFPS : This function is for retrieving the maximum frame rate supported by the camera.
- VxSetMaxFPS : This function is for the device to set the maximum frame rate
Parameter Description:
- vxcam : A pointer shared ownership of a camera obtained from VxInitialCameraDevice().
- fps : A reference of a uint8_t(byte) variable that will be used to get or set the maximum frame rate.
- VxGetMaxFPS :
-
return 0 = PASS, return -1 = FAIL
-
Python : return tuple(return_code, fps)
return_code: return 0 = PASS, return -1 = FAIL
-
VxSetMaxFPS : return 0 = PASS, return -1 = FAIL.
-
Example:
- C++
- Python
- C#
- C
uint8_t max_fps;
// get the maximum frame rate
VxGetMaxFPS(vxcam, max_fps);
// Set the frame rate to the maximum value
VxSetMaxFPS(vxcam, max_fps);
# get the maximum frame rate
result, max_fps = pyvizionsdk.VxGetMaxFPS(vxcam, max_fps)
print("Max FPS:", max_fps)
print("Return code:", result)
# Set the frame rate to the maximum value
result = pyvizionsdk.VxSetMaxFPS(vxcam, max_fps)
print("Return code:", result)
byte max_fps;
// get the maximum frame rate
CSVizionSDK.VxGetMaxFPS(vxcam, out max_fps);
// Set the frame rate to the maximum value
CSVizionSDK.VxSetMaxFPS(vxcam, max_fps);
uint8_t max_fps;
// get the maximum frame rate
vx_get_max_fps(vxcam, &max_fps);
// Set the frame rate to the maximum value
vx_set_max_fps(vxcam, max_fps);
VxGetThroughPut & VxSetThroughPut
These settings will be reset to default values by the driver each time the camera starts streaming. If you need to maintain custom ThroughPut settings, you must re-apply them after each stream start.
Function:
- C++
- Python
- C#
- C
int VxGetThroughPut(std::shared_ptr<VxCamera> vxcam, uint16_t& throughPut)
int VxSetThroughPut(std::shared_ptr<VxCamera> vxcam, uint16_t throughPut)
def VxGetThroughPut(vxcam)
def VxSetThroughPut(vxcam, throughPut)
int VxGetThroughPut(VxCamera vxcam, out ushort throughPut)
int VxSetThroughPut(VxCamera vxcam, ushort throughPut)
int vx_get_throughput(vx_camera vxcam, uint16_t* throughPut)
int vx_set_throughput(vx_camera vxcam, uint16_t throughPut)
Function Description:
- VxGetThroughPut : This function is for retrieving the throughput value from the camera.
- VxSetThroughPut : This function is for the device to set the throughput value.
Parameter Description:
-
vxcam : A pointer shared ownership of a camera obtained from VxInitialCameraDevice().
-
throughPut : A uint16_t(ushort) variable that will be used to get or set the throughput value.
-
VxGetThroughPut :
- return 0 = PASS, return -1 = FAIL
- Python : return tuple(return_code, throughPut)
return_code : return 0 = PASS, return -1 = FAIL
-
VxSetThroughPut : return 0 = PASS, return -1 = FAIL.
Example:
- C++
- Python
- C#
- C
uint16_t throughPut;
// get the throughPut
VxGetThroughPut(vxcam, throughPut);
// set the throughPut
VxSetThroughPut(vxcam, throughPut);
# get the throughput value
result, throughPut = pyvizionsdk.VxGetThroughPut(vxcam)
print("ThroughPut:", throughPut)
print("Return code:", result)
# Set the throughput value
result = pyvizionsdk.VxSetThroughPut(vxcam, throughPut)
print("Return code:", result)
ushort throughPut;
// get the throughPut
CSVizionSDK.VxGetThroughPut(vxcam, out throughPut);
// set the throughPut
CSVizionSDK.VxSetThroughPut(vxcam, throughPut);
uint16_t throughPut;
// get the throughPut
vx_get_throughput(vxcam, &throughPut);
// set the throughPut
vx_set_throughput(vxcam, throughPut);
VxGetTimestamp & VxGetFrameCount
Function:
- C++
- Python
- C#
- C
int VxGetTimestamp(std::shared_ptr<VxCamera> vxcam, float& timestamp)
int VxGetFrameCount(std::shared_ptr<VxCamera> vxcam, uint8_t& frameCount)
def VxGetTimestamp(vxcam)
def VxGetFrameCount(vxcam)
int VxGetTimestamp(VxCamera vxcam, out float timestamp)
int VxGetFrameCount(VxCamera vxcam, out byte frameCount)
int vx_get_timestamp(vx_camera vxcam, float* timestamp)
int vx_get_frame_count(vx_camera vxcam, uint8_t* frameCount)
Function Description:
- VxGetTimeStamp : This function is for retrieving the timestamp value from the camera.
- VxGetFrameCount : This function is for retrieving the frame count value from the camera.
Parameter Description:
- vxcam : A pointer shared ownership of a camera obtained from VxInitialCameraDevice().
- timestamp : A float variable that will be used to get the timestamp value.
- frameCount : A uint8_t(byte) variable that will be used to get the frame count value.
- VxGetTimestamp & VxGetFrameCount:
- return 0 = PASS, return -1 = FAIL
- Python :
- VxGetTimestamp : return tuple(return_code, timestamp)
- VxGetFrameCount : return tuple(return_code, frameCount)
return_code : return 0 = PASS, return -1 = FAIL
Example:
- C++
- Python
- C#
- C
// get image
uint8_t* raw_data = new uint8_t[3840 * 2160 * 2];
int raw_size = 0;
VxGetImage(vxcam, raw_data, &raw_size, 3000)
// get the timestamp and frame count value after getting image
float timestamp;
uint8_t framecnt;
VxGetTimestamp(vxcam, timestamp);
VxGetFrameCount(vxcam, framecnt);
std::cout << "TimeStamp: " << timestamp << std::endl;
std::cout << "framecnt: " << framecnt << std::endl;
# get image
result, format_list = pyvizionsdk.VxGetFormatList(vxcam)
mjpg_format = None
min_resolution = float('inf')
for format in format_list:
# get mjpg format and minimum resolution
if format.format == VX_IMAGE_FORMAT.VX_IMAGE_FORMAT_MJPG:
resolution = format.width * format.height
if resolution < min_resolution:
min_resolution = resolution
mjpg_format = format
result, image = pyvizionsdk.VxGetImage(vxcam, 1000, mjpg_format)
# get the timestamp and frame count value after getting image
result, timestamp = pyvizionsdk.VxGetTimestamp(vxcam)
print("Timestamp: ", timestamp)
result, frameCount = pyvizionsdk.VxGetFrameCount(vxcam)
print("FrameCount: ", frameCount)
// get image
int dataSize;
byte[] buffer = new byte[width * height * 2];
VX_CAPTURE_RESULT result = CSVizionSDK.VxGetImage(cam, buffer, out dataSize, 3000);
// get the timestamp and frame count value after getting image
float timestamp;
byte framecnt;
CSVizionSDK.VxGetTimestamp(vxcam, out timestamp);
CSVizionSDK.VxGetFrameCount(vxcam, out framecnt);
Console.WriteLine($"Timestamp / FrameCount: {timestamp} / {framecnt}");
// get image
int max_size = 3840 * 2160 * 2;
uint8_t *raw_data = (uint8_t *)malloc(max_size);
int raw_size = 0;
vx_capture_result cap = vx_get_image(cam, raw_data, &raw_size, 3000);
// get the timestamp and frame count value after getting image
float timestamp;
uint8_t framecnt;
vx_get_timestamp(vxcam, ×tamp);
vx_get_frame_count(vxcam, &framecnt);
printf("Timestamp: %f\n", timestamp);
printf("FrameCount: %d\n", framecnt);
VxResetTimestamp & VxResetFrameCount
These reset functions must be used when the camera is not in standby mode.
Function:
- C++
- Python
- C#
- C
int VxResetTimestamp(std::shared_ptr<VxCamera> vxcam)
int VxResetFrameCount(std::shared_ptr<VxCamera> vxcam)
def VxResetTimestamp(vxcam)
def VxResetFrameCount(vxcam)
int VxResetTimestamp(VxCamera vxcam)
int VxResetFrameCount(VxCamera vxcam)
int vx_reset_timestamp(vx_camera vxcam)
int vx_reset_frame_count(vx_camera vxcam)
Function Description:
- VxResetTimeStamp : This function is for resetting the timestamp value from the camera.
- VxResetFrameCount : This function is for resetting the frame count value from the camera.
Parameter Description:
- vxcam : A pointer shared ownership of a camera obtained from VxInitialCameraDevice().
- VxResetTimestamp & VxResetFrameCount: return 0 = PASS, return -1 = FAIL
Example:
- C++
- Python
- C#
- C
// start streaming
VxStartStreaming(vxcam);
// reset the timestamp and frame count
VxResetTimestamp(vxcam);
VxResetFrameCount(vxcam);
# start streaming
pyvizionsdk.VxStartStreaming(vxcam)
# reset the timestamp and frame count
pyvizionsdk.VxResetTimestamp(vxcam)
pyvizionsdk.VxResetFrameCount(vxcam)
// start streaming
CSVizionSDK.VxStartStreaming(vxcam);
// reset the timestamp and frame count
CSVizionSDK.VxResetTimestamp(vxcam);
CSVizionSDK.VxResetFrameCount(vxcam);
// start streaming
vx_start_streaming(vxcam);
// reset the timestamp and frame count
vx_reset_timestamp(vxcam);
vx_reset_frame_count(vxcam);
Parameter Structure
VX_UVC_IMAGE_PROPERTIES
- C++
- Python
- C#
- C
enum class VX_UVC_IMAGE_PROPERTIES {
UVC_IMAGE_BRIGHTNESS,
UVC_IMAGE_CONTRAST,
UVC_IMAGE_HUE,
UVC_IMAGE_SATURATION,
UVC_IMAGE_SHARPNESS,
UVC_IMAGE_GAMMA,
UVC_IMAGE_COLORENABLE,
UVC_IMAGE_WHITEBALANCE,
UVC_IMAGE_BACKLIGHT_COMPENSATION,
UVC_IMAGE_GAIN,
UVC_IMAGE_PAN,
UVC_IMAGE_TILT,
UVC_IMAGE_ROLL,
UVC_IMAGE_ZOOM,
UVC_IMAGE_EXPOSURE,
UVC_IMAGE_IRIS,
UVC_IMAGE_FOCUS,
UVC_IMAGE_PROP_MAX
}
class VX_UVC_IMAGE_PROPERTIES(Enum):
UVC_IMAGE_BRIGHTNESS = 0
UVC_IMAGE_CONTRAST = 1
UVC_IMAGE_HUE = 2
UVC_IMAGE_SATURATION = 3
UVC_IMAGE_SHARPNESS = 4
UVC_IMAGE_GAMMA = 5
UVC_IMAGE_COLORENABLE = 6
UVC_IMAGE_WHITEBALANCE = 7
UVC_IMAGE_BACKLIGHT_COMPENSATION = 8
UVC_IMAGE_GAIN = 9
UVC_IMAGE_PAN = 10
UVC_IMAGE_TILT = 11
UVC_IMAGE_ROLL = 12
UVC_IMAGE_ZOOM = 13
UVC_IMAGE_EXPOSURE = 14
UVC_IMAGE_IRIS = 15
UVC_IMAGE_FOCUS = 16
UVC_IMAGE_PROP_MAX = 17
public enum VX_UVC_IMAGE_PROPERTIES {
UVC_IMAGE_BRIGHTNESS,
UVC_IMAGE_CONTRAST,
UVC_IMAGE_HUE,
UVC_IMAGE_SATURATION,
UVC_IMAGE_SHARPNESS,
UVC_IMAGE_GAMMA,
UVC_IMAGE_COLORENABLE,
UVC_IMAGE_WHITEBALANCE,
UVC_IMAGE_BACKLIGHT_COMPENSATION,
UVC_IMAGE_GAIN,
UVC_IMAGE_PAN,
UVC_IMAGE_TILT,
UVC_IMAGE_ROLL,
UVC_IMAGE_ZOOM,
UVC_IMAGE_EXPOSURE,
UVC_IMAGE_IRIS,
UVC_IMAGE_FOCUS,
UVC_IMAGE_PROP_MAX
}
typedef enum vx_uvc_image_properties {
UVC_IMAGE_BRIGHTNESS,
UVC_IMAGE_CONTRAST,
UVC_IMAGE_HUE,
UVC_IMAGE_SATURATION,
UVC_IMAGE_SHARPNESS,
UVC_IMAGE_GAMMA,
UVC_IMAGE_COLORENABLE,
UVC_IMAGE_WHITEBALANCE,
UVC_IMAGE_BACKLIGHT_COMPENSATION,
UVC_IMAGE_GAIN,
UVC_IMAGE_PAN,
UVC_IMAGE_TILT,
UVC_IMAGE_ROLL,
UVC_IMAGE_ZOOM,
UVC_IMAGE_EXPOSURE,
UVC_IMAGE_IRIS,
UVC_IMAGE_FOCUS,
UVC_IMAGE_PROP_MAX
} vx_uvc_image_properties;
VX_ISP_IMAGE_PROPERTIES
ISP Image Properties | min | max | step | default | Description | Notes |
---|---|---|---|---|---|---|
BRIGHTNESS | -10 | 10 | 1 | 0 | ||
CONTRAST | -50 | 50 | 1 | 0 | ||
SATURATION | 0 | 50 | 1 | 10 | ||
WHITEBALANCE_MODE | 0 | 1 | 1 | 1 | Manual Temperature (0) Auto (1) | |
WHITEBALANCE_TEMPERATURE | 2300 | 15000 | 1 | 5000 | ||
EXPOSURE_MODE | 0 | 2 | 1 | 1 | Manual Mode (0) Auto Mode (1) Auto gain (2) | |
EXPOSURE_TIME | 1 | 1000000 | 1 | 33333 | ||
EXPOSURE_MIN_TIME | 1 | 1000000 | 1 | The default value is followed by VxExposure.yaml min value | ||
EXPOSURE_MAX_TIME | 1 | 1000000 | 1 | The default value is followed by VxExposure.yaml max value | ||
EXPOSURE_GAIN | 1 | 64 | 1 | 1 | ||
GAMMA | 4 | 79 | 1 | 22 | ||
SHARPNESS | -20 | 20 | 1 | 0 | ||
BACKLIGHT_COMPENSATION | -150 | 150 | 1 | 10 | ||
SPECIAL_EFFECT_MODE | 0 | 4 | 1 | 0 | Normal Mode (0) Black White Mode (1) Grayscale Mode (2) Negative Mode (3) Sketch Mode (4) | |
DENOISE | -20 | 20 | 1 | 0 | ||
FLIP_MODE | 0 | 3 | 1 | 0 | Normal (0) H-Mirror (1) V-Mirror (2) Rotate-180 (3) | |
PAN | 0 | 10 | 1 | 5 | ||
TILT | 0 | 10 | 1 | 5 | ||
ZOOM | 10 | 80 | 1 | 10 | ||
FLICK_MODE | 0 | 3 | 1 | 0 | Disable (0) 50Hz (1) 60Hz (2) Auto (3) | |
JPEG_QUALITY | 0 | 255 | 1 | 233 | ||
TRIGGER_MODE | 0 | 3 | 1 | 0 | Disable (0) Sync (1) Periodic (2) Non Periodic(3) | Supported Device:
|
EHDR_MODE | 0 | 1 | 1 | 0 | Enable (0) Disable (1) | Disable mode will turn off the eHDR effect |
EHDR_EXPOSURE_MIN_NUMBER | 1 | 4 | 1 | 1 | ||
EHDR_EXPOSURE_MAX_NUMBER | 1 | 4 | 1 | 4 |
eHDR features are only supported on the following devices:
- VCS-AR0821 / VCS-AR0822
- VC-VLS-AR0821 / VC-VLS-AR0822
- VC-VL-GM2-AR0821 / VC-VL-GM2-AR0822
- C++
- Python
- C#
- C
enum class VX_ISP_IMAGE_PROPERTIES {
ISP_IMAGE_BRIGHTNESS,
ISP_IMAGE_CONTRAST,
ISP_IMAGE_SATURATION,
ISP_IMAGE_WHITEBALANCE_MODE,
ISP_IMAGE_WHITEBALANCE_TEMPERATURE,
ISP_IMAGE_EXPOSURE_MODE,
ISP_IMAGE_EXPOSURE_TIME,
ISP_IMAGE_EXPOSURE_MIN_TIME,
ISP_IMAGE_EXPOSURE_MAX_TIME,
ISP_IMAGE_EXPOSURE_GAIN,
ISP_IMAGE_GAMMA,
ISP_IMAGE_SHARPNESS,
ISP_IMAGE_BACKLIGHT_COMPENSATION,
ISP_IMAGE_SPECIAL_EFFECT_MODE,
ISP_IMAGE_DENOISE,
ISP_IMAGE_FLIP_MODE,
ISP_IMAGE_PAN,
ISP_IMAGE_TILT,
ISP_IMAGE_ZOOM,
ISP_IMAGE_FLICK_MODE,
ISP_IMAGE_JPEG_QUALITY,
ISP_IMAGE_TRIGGER_MODE,
ISP_IMAGE_EHDR_MODE,
ISP_EHDR_EXPOSURE_MIN_NUMBER,
ISP_EHDR_EXPOSURE_MAX_NUMBER,
ISP_IMAGE_PROP_MAX
}
class VX_ISP_IMAGE_PROPERTIES(Enum):
ISP_IMAGE_BRIGHTNESS = 0
ISP_IMAGE_CONTRAST = 1
ISP_IMAGE_SATURATION = 2
ISP_IMAGE_WHITEBALANCE_MODE = 3
ISP_IMAGE_WHITEBALANCE_TEMPERATURE = 4
ISP_IMAGE_EXPOSURE_MODE = 5
ISP_IMAGE_EXPOSURE_TIME = 6
ISP_IMAGE_EXPOSURE_MIN_TIME = 7
ISP_IMAGE_EXPOSURE_MAX_TIME = 8
ISP_IMAGE_EXPOSURE_GAIN = 9
ISP_IMAGE_GAMMA = 10
ISP_IMAGE_SHARPNESS = 11
ISP_IMAGE_BACKLIGHT_COMPENSATION = 12
ISP_IMAGE_SPECIAL_EFFECT_MODE = 13
ISP_IMAGE_DENOISE = 14
ISP_IMAGE_FLIP_MODE = 15
ISP_IMAGE_PAN = 16
ISP_IMAGE_TILT = 17
ISP_IMAGE_ZOOM = 18
ISP_IMAGE_FLICK_MODE = 19
ISP_IMAGE_JPEG_QUALITY = 20
ISP_IMAGE_TRIGGER_MODE = 21
ISP_IMAGE_EHDR_MODE = 22
ISP_EHDR_EXPOSURE_MAX_NUMBER = 23
ISP_EHDR_EXPOSURE_MIN_NUMBER = 24
ISP_IMAGE_PROP_MAX = 25
public enum VX_ISP_IMAGE_PROPERTIES {
ISP_IMAGE_BRIGHTNESS,
ISP_IMAGE_CONTRAST,
ISP_IMAGE_SATURATION,
ISP_IMAGE_WHITEBALANCE_MODE,
ISP_IMAGE_WHITEBALANCE_TEMPERATURE,
ISP_IMAGE_EXPOSURE_MODE,
ISP_IMAGE_EXPOSURE_TIME,
ISP_IMAGE_EXPOSURE_MIN_TIME,
ISP_IMAGE_EXPOSURE_MAX_TIME,
ISP_IMAGE_EXPOSURE_GAIN,
ISP_IMAGE_GAMMA,
ISP_IMAGE_SHARPNESS,
ISP_IMAGE_BACKLIGHT_COMPENSATION,
ISP_IMAGE_SPECIAL_EFFECT_MODE,
ISP_IMAGE_DENOISE,
ISP_IMAGE_FLIP_MODE,
ISP_IMAGE_PAN,
ISP_IMAGE_TILT,
ISP_IMAGE_ZOOM,
ISP_IMAGE_FLICK_MODE,
ISP_IMAGE_JPEG_QUALITY,
ISP_IMAGE_TRIGGER_MODE,
ISP_IMAGE_EHDR_MODE,
ISP_EHDR_EXPOSURE_MIN_NUMBER,
ISP_EHDR_EXPOSURE_MAX_NUMBER,
ISP_IMAGE_PROP_MAX
}
typedef enum vx_isp_image_properties {
ISP_IMAGE_BRIGHTNESS,
ISP_IMAGE_CONTRAST,
ISP_IMAGE_SATURATION,
ISP_IMAGE_WHITEBALANCE_MODE,
ISP_IMAGE_WHITEBALANCE_TEMPERATURE,
ISP_IMAGE_EXPOSURE_MODE,
ISP_IMAGE_EXPOSURE_TIME,
ISP_IMAGE_EXPOSURE_MIN_TIME,
ISP_IMAGE_EXPOSURE_MAX_TIME,
ISP_IMAGE_EXPOSURE_GAIN,
ISP_IMAGE_GAMMA,
ISP_IMAGE_SHARPNESS,
ISP_IMAGE_BACKLIGHT_COMPENSATION,
ISP_IMAGE_SPECIAL_EFFECT_MODE,
ISP_IMAGE_DENOISE,
ISP_IMAGE_FLIP_MODE,
ISP_IMAGE_PAN,
ISP_IMAGE_TILT,
ISP_IMAGE_ZOOM,
ISP_IMAGE_FLICK_MODE,
ISP_IMAGE_JPEG_QUALITY,
ISP_IMAGE_TRIGGER_MODE,
ISP_IMAGE_EHDR_MODE,
ISP_EHDR_EXPOSURE_MIN_NUMBER,
ISP_EHDR_EXPOSURE_MAX_NUMBER,
ISP_IMAGE_PROP_MAX
} vx_isp_image_properties;