Runs the canny edge detector algorithm over the input image. More...
Data Structures | |
struct | VPICannyEdgeDetectorParams |
Structure that defines the parameters for vpiSubmitCannyEdgeDetector. More... | |
Functions | |
VPIStatus | vpiCreateCannyEdgeDetector (uint64_t backends, int32_t imageWidth, int32_t imageHeight, VPIPayload *payload) |
Creates payload for vpiSubmitCannyEdgeDetector. More... | |
VPIStatus | vpiInitCannyEdgeDetectorParams (VPICannyEdgeDetectorParams *params) |
Initialize vpiInitCannyEdgeDetectorParams with default values. More... | |
VPIStatus | vpiSubmitCannyEdgeDetector (VPIStream stream, uint64_t backend, VPIPayload payload, VPIImage input, VPIImage output, float thresholdStrong, float thresholdWeak, float edgeValue, float nonEdgeValue, const VPICannyEdgeDetectorParams *params) |
Runs the canny edge detector algorithm over an image. More... | |
Runs the canny edge detector algorithm over the input image.
Refer to Canny edge detector for more details and usage examples.
struct VPICannyEdgeDetectorParams |
Structure that defines the parameters for vpiSubmitCannyEdgeDetector.
Definition at line 107 of file CannyEdges.h.
Data Fields | ||
---|---|---|
VPINormType | normType | Determine the norm to calculate the gradient intensity. |
VPIGradientMethod | gradMethod | Specify the method used to generate gradient from the input image. |
int32_t | gradientSize |
Gradient window size.
|
VPIStatus vpiCreateCannyEdgeDetector | ( | uint64_t | backends, |
int32_t | imageWidth, | ||
int32_t | imageHeight, | ||
VPIPayload * | payload | ||
) |
#include </opt/nvidia/vpi2/include/vpi/algo/CannyEdges.h>
Creates payload for vpiSubmitCannyEdgeDetector.
[in] | backends | VPI backends that are eligible to execute the algorithm.
|
[in] | imageWidth,imageHeight | Input image dimensions.
|
[out] | payload | Pointer to the payload variable that receives the created handle. |
VPI_ERROR_INVALID_ARGUMENT | payload is NULL. |
VPI_ERROR_INVALID_ARGUMENT | imageWidth and imageHeight outside valid range. |
VPI_ERROR_INVALID_ARGUMENT | backends refers to an invalid backend. |
VPI_ERROR_INVALID_OPERATION | Backend isn't enabled in current context. |
VPI_ERROR_NOT_IMPLEMENTED | Canny edge detector algorithm is not supported by given backend. |
VPI_ERROR_INVALID_CONTEXT | Current context is destroyed. |
VPI_ERROR_OUT_OF_MEMORY | Cannot allocate required resources. |
VPI_SUCCESS | Operation executed successfully. |
VPIStatus vpiInitCannyEdgeDetectorParams | ( | VPICannyEdgeDetectorParams * | params | ) |
#include </opt/nvidia/vpi2/include/vpi/algo/CannyEdges.h>
Initialize vpiInitCannyEdgeDetectorParams with default values.
Default values:
[out] | params | Structure to be filled with default values. |
VPIStatus vpiSubmitCannyEdgeDetector | ( | VPIStream | stream, |
uint64_t | backend, | ||
VPIPayload | payload, | ||
VPIImage | input, | ||
VPIImage | output, | ||
float | thresholdStrong, | ||
float | thresholdWeak, | ||
float | edgeValue, | ||
float | nonEdgeValue, | ||
const VPICannyEdgeDetectorParams * | params | ||
) |
#include </opt/nvidia/vpi2/include/vpi/algo/CannyEdges.h>
Runs the canny edge detector algorithm over an image.
[in] | stream | A stream handle where the operation will be queued into.
| ||||||||||||||||||||||||||||||
[in] | backend | Backend that will execute the algorithm.
| ||||||||||||||||||||||||||||||
[in] | payload | Pointer to the payload variable that receives the created handle. | ||||||||||||||||||||||||||||||
[in] | input | Input image.
| ||||||||||||||||||||||||||||||
[out] | output | Output image where the result is written to.
| ||||||||||||||||||||||||||||||
[in] | thresholdStrong | Strong threshold for the hysteresis procedure. | ||||||||||||||||||||||||||||||
[in] | thresholdWeak | Weak threshold for the hysteresis procedure. | ||||||||||||||||||||||||||||||
[in] | edgeValue | Value used to mark edge.
| ||||||||||||||||||||||||||||||
[in] | nonEdgeValue | Value used to mark non-edge.
| ||||||||||||||||||||||||||||||
[in] | params | Control parameters of the canny edge detector algorithm. |
VPI_ERROR_INVALID_ARGUMENT | stream is NULL. |
VPI_ERROR_INVALID_ARGUMENT | input or output are NULL. |
VPI_ERROR_INVALID_ARGUMENT | input or output image dimensions ouside valid range. |
VPI_ERROR_INVALID_ARGUMENT | backend is invalid or unknown. |
VPI_ERROR_INVALID_IMAGE_FORMAT | input or output image format not supported. |
VPI_ERROR_INVALID_OPERATION | Backend hardware is not available. |
VPI_ERROR_INVALID_OPERATION | The needed backends aren't enabled in stream , input or output . |
VPI_ERROR_NOT_IMPLEMENTED | Canny edge detector algorithm is not supported by given backend. |
VPI_SUCCESS | Operation executed successfully. |