Corrosion algorithm for image processing. It is a morphological processing algorithm and can be used to eliminate noises and some boundary values. The float16, float32, and uint8 types are supported. Asynchronous calling is supported, but preloading is not. The inplace operation is not supported.
It is supported by the Atlas inference product.
The following conditions must be met:
1 | APP_ERROR Erode(const Tensor& src, Tensor& dst, const BlurConfig& blurconfig, AscendStream& stream=AscendStream::DefaultStream()); |
Parameter |
Input/Output |
Description |
|---|---|---|
src |
Input |
Tensor class, input tensor, tensor to be corroded. The uint8, fp16, and fp32 data types are supported. The dimension must be HWC (c = 1, 3, 4). The tensor width and height must be within the range of [64, 4096]. |
dst |
Output |
Tensor class, output tensor. The data type and shape are the same as those of src. An empty tensor can be passed. If dst is not an empty tensor, call Tensor.Malloc() to allocate memory in advance. |
blurConfig |
Input |
Parameter configuration for the corrosion algorithm. For details, see BlurConfig. |
stream |
Input |
AscendStream type. The default value is AscendStream::DefaultStream(). When the parameter value is the default value, the API calling is a synchronous operation. In other cases, the API calling is an asynchronous operation. |
Data Structure |
Description |
|---|---|
APP_ERROR |
For details about the returned error codes, see APP_ERROR Description. |