Functions related to the Polarization Camera. More...
Typedefs | |
typedef struct BGAPI2_Polarizer | BGAPI2_Polarizer |
Struct for pointers of type Polarizer. More... | |
Enumerations | |
enum | BGAPI2_POLARIZER_FORMATS { BGAPI2_POLARIZER_AOP = 0, BGAPI2_POLARIZER_DOLP = 1, BGAPI2_POLARIZER_ADOLP = 2, BGAPI2_POLARIZER_INTENSITY = 3, BGAPI2_POLARIZER_POL0_DEG = 4, BGAPI2_POLARIZER_POL45_DEG = 5, BGAPI2_POLARIZER_POL90_DEG = 6, BGAPI2_POLARIZER_POL135_DEG = 7, BGAPI2_POLARIZER_REFLECTION_MIN = 8, BGAPI2_POLARIZER_REFLECTION_MAX = 9 } |
Enumeration containing the string representation of the possible polarization formats. More... | |
Functions | |
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL | BGAPI2_Polarizer_Create (BGAPI2_Polarizer **polarizer) |
Creates a polarizer object. More... | |
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL | BGAPI2_Polarizer_Release (BGAPI2_Polarizer *polarizer) |
Release a polarizer object. More... | |
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL | BGAPI2_Polarizer_Initialize (BGAPI2_Polarizer *polarizer, BGAPI2_Buffer *buffer) |
Initialize the Polarizer and provide the buffer with the raw polarized data for calculations. More... | |
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL | BGAPI2_Polarizer_ReadCalibrationData (BGAPI2_Polarizer *polarizer, BGAPI2_Device *device) |
Get the calibration data and angle offset from the camera. More... | |
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL | BGAPI2_Polarizer_EnableInterpolation (BGAPI2_Polarizer *polarizer, bo_bool interpolate) |
Keep output image the same size as the input buffer. The default is disabled. More... | |
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL | BGAPI2_Polarizer_Enable (BGAPI2_Polarizer *polarizer, BGAPI2_POLARIZER_FORMATS format, bo_bool enable) |
Each component to be calculated must be enabled first. More... | |
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL | BGAPI2_Polarizer_Get (BGAPI2_Polarizer *polarizer, BGAPI2_POLARIZER_FORMATS format, BGAPI2_Image *image) |
Get the calculated component (BGAPI_POLARIZER_AOP, etc.) from the buffer. More... | |
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL | BGAPI2_Polarizer_GetFormatString (BGAPI2_Polarizer *polarizer, BGAPI2_POLARIZER_FORMATS format, char *format_string, bo_uint64 *size) |
Get the string of the polarization format. More... | |
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL | BGAPI2_Polarizer_SetMaxThreads (BGAPI2_Polarizer *polarizer, bo_uint number) |
Set the number of threads the Polarizer can use for calculations. More... | |
Detailed Description
Functions related to the Polarization Camera.
Typedef Documentation
◆ BGAPI2_Polarizer
typedef struct BGAPI2_Polarizer BGAPI2_Polarizer |
Struct for pointers of type Polarizer.
Enumeration Type Documentation
◆ BGAPI2_POLARIZER_FORMATS
Enumeration containing the string representation of the possible polarization formats.
Function Documentation
◆ BGAPI2_Polarizer_Create()
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Polarizer_Create | ( | BGAPI2_Polarizer ** | polarizer | ) |
Creates a polarizer object.
- Parameters
-
[out] polarizer Pointer on polarizer object
- Return values
-
BGAPI2_RESULT_SUCCESS No error
◆ BGAPI2_Polarizer_Release()
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Polarizer_Release | ( | BGAPI2_Polarizer * | polarizer | ) |
Release a polarizer object.
- Parameters
-
[in] polarizer Pointer to the polarizer object
- Return values
-
BGAPI2_RESULT_SUCCESS No error
◆ BGAPI2_Polarizer_Initialize()
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Polarizer_Initialize | ( | BGAPI2_Polarizer * | polarizer, |
BGAPI2_Buffer * | buffer | ||
) |
Initialize the Polarizer and provide the buffer with the raw polarized data for calculations.
- Parameters
-
[in] polarizer Instance of polarizer. [in] buffer A valid buffer with polarized data acquired by a Baumer camera
- Return values
-
BGAPI2_RESULT_SUCCESS No error BGAPI2_RESULT_INVALID_PARAMETER Error for invalid parameters BGAPI2_RESULT_ERROR Internal error
◆ BGAPI2_Polarizer_ReadCalibrationData()
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Polarizer_ReadCalibrationData | ( | BGAPI2_Polarizer * | polarizer, |
BGAPI2_Device * | device | ||
) |
Get the calibration data and angle offset from the camera.
Reads the calibration matrix and the configured polarization angle offset from the camera device to enhance the calculation of different polarization formats.
- Parameters
-
[in] polarizer Instance of polarizer. [in] device The polarization camera (opened, must be able to read features from the camera)
- Return values
-
BGAPI2_RESULT_SUCCESS No error BGAPI2_RESULT_INVALID_PARAMETER Error for invalid parameters BGAPI2_RESULT_NOT_INITIALIZED The is not open.
◆ BGAPI2_Polarizer_EnableInterpolation()
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Polarizer_EnableInterpolation | ( | BGAPI2_Polarizer * | polarizer, |
bo_bool | interpolate | ||
) |
Keep output image the same size as the input buffer. The default is disabled.
If enabled, the calculated images will be interpolated to have the same size as the raw image buffer provided
- Parameters
-
[in] polarizer Instance of polarizer [in] interpolate If set to true the result images will be interpolated
- Return values
-
BGAPI2_RESULT_SUCCESS No error BGAPI2_RESULT_INVALID_PARAMETER Error for invalid parameters
◆ BGAPI2_Polarizer_Enable()
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Polarizer_Enable | ( | BGAPI2_Polarizer * | polarizer, |
BGAPI2_POLARIZER_FORMATS | format, | ||
bo_bool | enable | ||
) |
Each component to be calculated must be enabled first.
To speed up the calculation of the different components it is necessary to enable them first. This allows for the calculation to re-use and combine some of the necessary calculations
- Parameters
-
[in] polarizer Instance of polarizer [in] format The format to enable or disable [in] enable Set to true to enable or false to disable
- Return values
-
BGAPI2_RESULT_SUCCESS No error BGAPI2_RESULT_INVALID_PARAMETER Error for invalid parameters
◆ BGAPI2_Polarizer_Get()
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Polarizer_Get | ( | BGAPI2_Polarizer * | polarizer, |
BGAPI2_POLARIZER_FORMATS | format, | ||
BGAPI2_Image * | image | ||
) |
Get the calculated component (BGAPI_POLARIZER_AOP, etc.) from the buffer.
For performance reasons when handling more than one component, a component must first be enabled via the BGAPI2_Polarizer_Enable() method
- Parameters
-
[in] polarizer Instance of polarizer [in] format The format to enable or disable [in,out] image BGAPI2_Image to store the result of the calculation
- Return values
-
BGAPI2_RESULT_SUCCESS No error BGAPI2_RESULT_INVALID_PARAMETER Error for invalid parameters BGAPI2_RESULT_NOT_AVAILABLE Polarizer result not available BGAPI2_RESULT_ERROR Internal error
◆ BGAPI2_Polarizer_GetFormatString()
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Polarizer_GetFormatString | ( | BGAPI2_Polarizer * | polarizer, |
BGAPI2_POLARIZER_FORMATS | format, | ||
char * | format_string, | ||
bo_uint64 * | size | ||
) |
Get the string of the polarization format.
- Parameters
-
[in] polarizer Instance of polarizer. [in] format The polarization format [out] format_string The buffer of the polarization format [in,out] size The buffer size (in) / The format string size (out)
- See also
- BGAPI2_POLARIZER_FORMATS
- Return values
-
BGAPI2_RESULT_SUCCESS No error BGAPI2_RESULT_INVALID_PARAMETER Error for invalid parameters
◆ BGAPI2_Polarizer_SetMaxThreads()
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Polarizer_SetMaxThreads | ( | BGAPI2_Polarizer * | polarizer, |
bo_uint | number | ||
) |
Set the number of threads the Polarizer can use for calculations.
To speed up the calculation of components more than one thread can be used internally. The default is 4 threads on processors which have 8 or more logical cores, otherwise half of the logical cores are used. Depending on your application you can change this here
- Parameters
-
[in] polarizer Instance of polarizer [in] number The amount of threads used internally
- Return values
-
BGAPI2_RESULT_INVALID_PARAMETER Error for invalid parameters BGAPI2_RESULT_SUCCESS No error