- 11 Apr 2025
- 1 Minute to read
- Print
- DarkLight
- PDF
Camera Profile Config
- Updated on 11 Apr 2025
- 1 Minute to read
- Print
- DarkLight
- PDF
Introduction
These functions are responsible for configuring the camera profile.
VxLoadProfileConfig
Function:
int VxLoadProfileConfig(std::shared_ptr<VxCamera> vxcam, const std::string profile)
def VxLoadProfileConfig(vxcam)
Function Description:
This function is for loading the profile configuration from a JSON-formatted string.
Parameter Description:
vxcam: A pointer shared ownership of a camera obtained from VxInitialCameraDevice().
profile: A constant string variable that stores the profile configuration.
return 0 = PASS, return -1 = FAIL.
Example:
const std::string profile;
// load the profile config
VxLoadProfileConfig(vxcam, profile);
# load the profile config
pyvizionsdk.VxLoadProfileConfig(vxcam)
VxActivateProfileStreaming
Function:
int VxActivateProfileStreaming(std::shared_ptr<VxCamera> vxcam)
def VxActivateProfileStreaming(vxcam)
Function Description:
This function enables streaming based on a specified camera profile.
Parameter Description:
vxcam: A pointer shared ownership of a camera obtained from VxInitialCameraDevice().
return 0 = PASS, return -1 = FAIL.
Example:
// streaming base on the profile config
VxActivateProfileStreaming(vxcam);
# streaming base on the profile config
pyvizionsdk.VxActivateProfileStreaming(vxcam)
VxActivateProfileImageProcessing
Function:
int VxActivateProfileImageProcessing(std::shared_ptr<VxCamera> vxcam)
def VxActivateProfileImageProcessing(vxcam)
Function Description:
This function activates image processing based on a specified camera profile.
Parameter Description:
vxcam: A pointer shared ownership of a camera obtained from VxInitialCameraDevice().
return 0 = PASS, return -1 = FAIL.
Example:
// activates image processing base on the profile config
VxActivateProfileImageProcessing(vxcam);
# activates image processing base on the profile config
pyvizionsdk.VxActivateProfileImageProcessing(vxcam)
VxGetOSPProfileConfig
Function:
int VxGetOSPProfileConfig(std::shared_ptr<VxCamera> vxcam, std::string& profile)
def VxGetOSPProfileConfig(vxcam)
Function Description:
This function is used to retrieve the OSP profile configuration and save it to the provided string.
Parameter Description:
vxcam: A pointer shared ownership of a camera obtained from VxInitialCameraDevice().
profile: A reference of sting format variable which stores the profile configuration.
Return:
C++: return 0 = PASS, return -1 = FAIL
Python: tuple(return_code, profile)
※ return_code: 0 = PASS, return -1 = FAIL
Example:
std::string profile;
// get the OSP profile configuration
VxGetOSPProfileConfig(vxcam, profile);
# get the OSP profile configuration
pyvizionsdk.VxGetOSPProfileConfig(vxcam)
VxSetOSPProfileFlag & VxGetOSPProfileFlag
Function:
int VxSetOSPProfileFlag(std::shared_ptr<VxCamera> vxcam, VX_OSP_PROFILE_FLAG flag)
int VxGetOSPProfileFlag(std::shared_ptr<VxCamera> vxcam, VX_OSP_PROFILE_FLAG& flag)
def VxSetOSPProfileFlag(vxcam, flag)
def VxGetOSPProfileFlag(vxcam)
Function Description:
VxSetOSPProfileFlag: This function is used to set the flag to the OSP profile configuration.
VxGetOSPProfileFlag: This function is for retrieving the flag from the OSP profile configuration.
Parameter Description:
vxcam: A pointer shared ownership of a camera obtained from VxInitialCameraDevice().
flag: A VX_OSP_PROFILE_FLAG format variable which set and stored the flag value.
VX_OSP_PROFILE_FLAG format:
enum class VX_OSP_PROFILE_FLAG { DISABLED, ENABLED, ENABLED_AND_SAVE };
class VX_OSP_PROFILE_FLAG(Enum):
DISABLED = 0
ENABLED = 1
ENABLED_AND_SAVE = 2
Return Values:
C++:
0 = Disable
1 = Enable, but don't write OSP
2 = Enable, write OSP by controller
-1 = FAIL.
Python:
VxSetOSPProfileFlag: return value same as C++
VxGetOSPProfileFlag: tuple(return_code, flag)
※ return_code: return value same as C++
Example:
// set the OSP profile flag
VxSetOSPProfileFlag(vxcam, VX_OSP_PROFILE_FLAG::ENABLED);
VX_OSP_PROFILE_FLAG flag;
// get the OSP profile flag
VxGetOSPProfileFlag(vxcam, flag);
from pyvizionsdk import VX_OSP_PROFILE_FLAG
# set the OSP profile flag
pyvizionsdk.VxSetOSPProfileFlag(vxcam, VX_OSP_PROFILE_FLAG.ENABLED)
# get the OSP profile flag
pyvizionsdk.VxGetOSPProfileFlag(vxcam)