CoreFlow 1.0.0
A modern orchestration and execution runtime
|
The Public Threshold API. More...
Typedefs | |
typedef struct Threshold * | vx_threshold |
The Threshold Object. A thresholding object contains the types and limit values of the thresholding required. | |
Enumerations | |
enum | vx_threshold_type_e { VX_THRESHOLD_TYPE_BINARY = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_THRESHOLD_TYPE) + 0x0 , VX_THRESHOLD_TYPE_RANGE = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_THRESHOLD_TYPE) + 0x1 } |
The Threshold types. More... | |
enum | vx_threshold_attribute_e { VX_THRESHOLD_TYPE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_THRESHOLD) + 0x0 , VX_THRESHOLD_INPUT_FORMAT = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_THRESHOLD) + 0x7 , VX_THRESHOLD_OUTPUT_FORMAT = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_THRESHOLD) + 0x8 } |
The threshold attributes. More... | |
Functions | |
VX_API_ENTRY vx_threshold VX_API_CALL | vxCreateThresholdForImage (vx_context context, vx_enum thresh_type, vx_df_image input_format, vx_df_image output_format) |
Creates a threshold object and returns a reference to it. | |
VX_API_ENTRY vx_threshold VX_API_CALL | vxCreateVirtualThresholdForImage (vx_graph graph, vx_enum thresh_type, vx_df_image input_format, vx_df_image output_format) |
Creates an opaque reference to a threshold object without direct user access. | |
VX_API_ENTRY vx_status VX_API_CALL | vxCopyThresholdValue (vx_threshold thresh, vx_pixel_value_t *value_ptr, vx_enum usage, vx_enum user_mem_type) |
Allows the application to copy the thresholding value from/into a threshold object with type VX_THRESHOLD_TYPE_BINARY . | |
VX_API_ENTRY vx_status VX_API_CALL | vxCopyThresholdRange (vx_threshold thresh, vx_pixel_value_t *lower_value_ptr, vx_pixel_value_t *upper_value_ptr, vx_enum usage, vx_enum user_mem_type) |
Allows the application to copy thresholding values from/into a threshold object with type VX_THRESHOLD_TYPE_RANGE . | |
VX_API_ENTRY vx_status VX_API_CALL | vxCopyThresholdOutput (vx_threshold thresh, vx_pixel_value_t *true_value_ptr, vx_pixel_value_t *false_value_ptr, vx_enum usage, vx_enum user_mem_type) |
Allows the application to copy the true and false output values from/into a threshold object. | |
VX_API_ENTRY vx_status VX_API_CALL | vxReleaseThreshold (vx_threshold *thresh) |
Releases a reference to a threshold object. The object may not be garbage collected until its total reference count is zero. | |
VX_API_ENTRY vx_status VX_API_CALL | vxSetThresholdAttribute (vx_threshold thresh, vx_enum attribute, const void *ptr, vx_size size) |
Sets attributes on the threshold object. | |
VX_API_ENTRY vx_status VX_API_CALL | vxQueryThreshold (vx_threshold thresh, vx_enum attribute, void *ptr, vx_size size) |
Queries an attribute on the threshold object. | |
The Public Threshold API.
typedef struct Threshold* vx_threshold |
#include <vx_types.h>
The Threshold Object. A thresholding object contains the types and limit values of the thresholding required.
#include <vx_types.h>
The threshold attributes.
Enumerator | |
---|---|
VX_THRESHOLD_TYPE | The value type of the threshold. Read-only. Use a |
VX_THRESHOLD_INPUT_FORMAT | The input image format the threshold was created for. Read-only. Use a |
VX_THRESHOLD_OUTPUT_FORMAT | The output image format the threshold was created for. Read-only. Use a |
enum vx_threshold_type_e |
#include <vx_types.h>
The Threshold types.
Enumerator | |
---|---|
VX_THRESHOLD_TYPE_BINARY | A threshold with only 1 value. |
VX_THRESHOLD_TYPE_RANGE | A threshold with 2 values (upper/lower). Use with Canny Edge Detection. |
VX_API_ENTRY vx_status VX_API_CALL vxCopyThresholdOutput | ( | vx_threshold | thresh, |
vx_pixel_value_t * | true_value_ptr, | ||
vx_pixel_value_t * | false_value_ptr, | ||
vx_enum | usage, | ||
vx_enum | user_mem_type ) |
#include <vx_api.h>
Allows the application to copy the true and false output values from/into a threshold object.
[in] | thresh | The reference to the threshold object that is the source or the destination of the copy. |
[in,out] | true_value_ptr | The address of the memory location where to store the true output value if the copy was requested in read mode, or from where to get the true output value to store into the threshold object if the copy was requested in write mode. |
[in,out] | false_value_ptr | The address of the memory location where to store the false output value if the copy was requested in read mode, or from where to get the false output value to store into the threshold object if the copy was requested in write mode. |
[in] | usage | This declares the effect of the copy with regard to the threshold object using the vx_accessor_e enumeration. Only VX_READ_ONLY and VX_WRITE_ONLY are supported:
|
[in] | user_mem_type | A vx_memory_type_e enumeration that specifies the type of the memory referenced by true_value_ptr and false_value_ptr . |
vx_status_e
enumeration. VX_ERROR_INVALID_REFERENCE | The threshold reference is not actually a threshold reference. |
VX_ERROR_INVALID_PARAMETERS | An other parameter is incorrect. |
VX_API_ENTRY vx_status VX_API_CALL vxCopyThresholdRange | ( | vx_threshold | thresh, |
vx_pixel_value_t * | lower_value_ptr, | ||
vx_pixel_value_t * | upper_value_ptr, | ||
vx_enum | usage, | ||
vx_enum | user_mem_type ) |
#include <vx_api.h>
Allows the application to copy thresholding values from/into a threshold object with type VX_THRESHOLD_TYPE_RANGE
.
[in] | thresh | The reference to the threshold object that is the source or the destination of the copy. |
[in,out] | lower_value_ptr | The address of the memory location where to store the lower thresholding value if the copy was requested in read mode, or from where to get the lower thresholding value to store into the threshold object if the copy was requested in write mode. |
[in,out] | upper_value_ptr | The address of the memory location where to store the upper thresholding value if the copy was requested in read mode, or from where to get the upper thresholding value to store into the threshold object if the copy was requested in write mode. |
[in] | usage | This declares the effect of the copy with regard to the threshold object using the vx_accessor_e enumeration. Only VX_READ_ONLY and VX_WRITE_ONLY are supported:
|
[in] | user_mem_type | A vx_memory_type_e enumeration that specifies the type of the memory referenced by lower_value_ptr and upper_value_ptr . |
vx_status_e
enumeration. VX_ERROR_INVALID_REFERENCE | The threshold reference is not actually a threshold reference. |
VX_ERROR_NOT_COMPATIBLE | The threshold object doesn't have type VX_THRESHOLD_TYPE_RANGE |
VX_ERROR_INVALID_PARAMETERS | An other parameter is incorrect. |
VX_API_ENTRY vx_status VX_API_CALL vxCopyThresholdValue | ( | vx_threshold | thresh, |
vx_pixel_value_t * | value_ptr, | ||
vx_enum | usage, | ||
vx_enum | user_mem_type ) |
#include <vx_api.h>
Allows the application to copy the thresholding value from/into a threshold object with type VX_THRESHOLD_TYPE_BINARY
.
[in] | thresh | The reference to the threshold object that is the source or the destination of the copy. |
[in,out] | value_ptr | The address of the memory location where to store the thresholding value if the copy was requested in read mode, or from where to get the thresholding value to store into the threshold object if the copy was requested in write mode. |
[in] | usage | This declares the effect of the copy with regard to the threshold object using the vx_accessor_e enumeration. Only VX_READ_ONLY and VX_WRITE_ONLY are supported:
|
[in] | user_mem_type | A vx_memory_type_e enumeration that specifies the type of the memory referenced by value_ptr . |
vx_status_e
enumeration. VX_ERROR_INVALID_REFERENCE | The threshold reference is not actually a threshold reference. |
VX_ERROR_NOT_COMPATIBLE | The threshold object doesn't have type VX_THRESHOLD_TYPE_BINARY |
VX_ERROR_INVALID_PARAMETERS | An other parameter is incorrect. |
VX_API_ENTRY vx_threshold VX_API_CALL vxCreateThresholdForImage | ( | vx_context | context, |
vx_enum | thresh_type, | ||
vx_df_image | input_format, | ||
vx_df_image | output_format ) |
#include <vx_api.h>
Creates a threshold object and returns a reference to it.
The threshold object defines the parameters of a thresholding operation to an input image, that generates an output image that can have a different format. The thresholding 'false' or 'true' output values are specified per pixel channels of the output format and can be modified with vxCopyThresholdOutput
. The default 'false' output value of pixels channels should be 0, and the default 'true' value should be non-zero. For standard image formats, default output pixel values are defined as following:
[in] | context | The reference to the context in which the object is created. |
[in] | thresh_type | The type of thresholding operation. |
[in] | input_format | The format of images that will be used as input of the thresholding operation. |
[in] | output_format | The format of images that will be generated by the thresholding operation. |
vx_threshold
. Any possible errors preventing a successful creation should be checked using vxGetStatus
. VX_API_ENTRY vx_threshold VX_API_CALL vxCreateVirtualThresholdForImage | ( | vx_graph | graph, |
vx_enum | thresh_type, | ||
vx_df_image | input_format, | ||
vx_df_image | output_format ) |
#include <vx_api.h>
Creates an opaque reference to a threshold object without direct user access.
[in] | graph | The reference to the parent graph. |
[in] | thresh_type | The type of thresholding operation. |
[in] | input_format | The format of images that will be used as input of the thresholding operation. |
[in] | output_format | The format of images that will be generated by the thresholding operation. |
vxCreateThresholdForImage
vx_threshold
. Any possible errors preventing a successful creation should be checked using vxGetStatus
. VX_API_ENTRY vx_status VX_API_CALL vxQueryThreshold | ( | vx_threshold | thresh, |
vx_enum | attribute, | ||
void * | ptr, | ||
vx_size | size ) |
#include <vx_api.h>
Queries an attribute on the threshold object.
[in] | thresh | The threshold object to set. |
[in] | attribute | The attribute to query. Use a vx_threshold_attribute_e enumeration. |
[out] | ptr | The location at which to store the resulting value. |
[in] | size | The size of the container to which ptr points. |
vx_status_e
enumeration. VX_SUCCESS | No errors; any other value indicates failure. |
VX_ERROR_INVALID_REFERENCE | thresh is not a valid vx_threshold reference. |
VX_API_ENTRY vx_status VX_API_CALL vxReleaseThreshold | ( | vx_threshold * | thresh | ) |
#include <vx_api.h>
Releases a reference to a threshold object. The object may not be garbage collected until its total reference count is zero.
[in] | thresh | The pointer to the threshold to release. |
vx_status_e
enumeration. VX_SUCCESS | No errors; any other value indicates failure. |
VX_ERROR_INVALID_REFERENCE | thresh is not a valid vx_threshold reference. |
VX_API_ENTRY vx_status VX_API_CALL vxSetThresholdAttribute | ( | vx_threshold | thresh, |
vx_enum | attribute, | ||
const void * | ptr, | ||
vx_size | size ) |
#include <vx_api.h>
Sets attributes on the threshold object.
[in] | thresh | The threshold object to set. |
[in] | attribute | The attribute to modify. Use a vx_threshold_attribute_e enumeration. |
[in] | ptr | The pointer to the value to which to set the attribute. |
[in] | size | The size of the data pointed to by ptr. |
vx_status_e
enumeration. VX_SUCCESS | No errors; any other value indicates failure. |
VX_ERROR_INVALID_REFERENCE | thresh is not a valid vx_threshold reference. |