Erase

cvcuda.erase(src: nvcv.Tensor, anchor: nvcv.Tensor, erasing: nvcv.Tensor, values: nvcv.Tensor, imgIdx: nvcv.Tensor, random: int, seed: int, stream: nvcv.cuda.Stream | None = None) nvcv.Tensor

Executes the Erase operation on the given cuda stream.

See also

Refer to the CV-CUDA C API reference for the Erase operator for more details and usage examples.

Parameters:
  • src (nvcv.Tensor) – Input tensor containing one or more images.

  • anchor (nvcv.Tensor) – anchor an array of size num_erasing_area that gives the x coordinate and y coordinate of the top left point in the eraseing areas.

  • erasing (nvcv.Tensor) – Eraisng an array of size num_erasing_area that gives the widths of the eraseing areas, the heights of the eraseing areas and integers in range 0-15, each of whose bits indicates whether or not the corresponding channel need to be erased.

  • values (nvcv.Tensor) – An array of size num_erasing_area*4 that gives the filling value for each erase area.

  • imgIdx (nvcv.Tensor) – An array of size num_erasing_area that maps a erase area idx to img idx in the batch.

  • random (int, optional) – 8-bit integer value for random op.

  • seed (int, optional) – seed random seed for random filling erase area.

  • stream (nvcv.cuda.Stream, optional) – CUDA Stream on which to perform the operation.

Returns:

The output tensor.

Return type:

nvcv.Tensor

Caution

Restrictions to several arguments may apply. Check the C API references of the CV-CUDA operator.

cvcuda.erase(src: nvcv.ImageBatchVarShape, anchor: nvcv.Tensor, erasing: nvcv.Tensor, values: nvcv.Tensor, imgIdx: nvcv.Tensor, random: int, seed: int, stream: Optional[nvcv.cuda.Stream] = None) -> nvcv.ImageBatchVarShape

Executes the Erase operation on the given cuda stream.

See also

Refer to the CV-CUDA C API reference for the Erase operator for more details and usage examples.

Parameters:
  • src (nvcv.ImageBatchVarShape) – Input image batch containing one or more images.

  • anchor (nvcv.Tensor) – anchor an array of size num_erasing_area that gives the x coordinate and y coordinate of the top left point in the eraseing areas.

  • erasing (nvcv.Tensor) – Eraisng an array of size num_erasing_area that gives the widths of the eraseing areas, the heights of the eraseing areas and integers in range 0-15, each of whose bits indicates whether or not the corresponding channel need to be erased.

  • values (nvcv.Tensor) – An array of size num_erasing_area*4 that gives the filling value for each erase area.

  • imgIdx (nvcv.Tensor) – An array of size num_erasing_area that maps a erase area idx to img idx in the batch.

  • random (int, optional) – 8-bit integer value for random op.

  • seed (int, optional) – seed random seed for random filling erase area.

  • stream (nvcv.cuda.Stream, optional) – CUDA Stream on which to perform the operation.

Returns:

The output image batch.

Return type:

nvcv.ImageBatchVarShape

Caution

Restrictions to several arguments may apply. Check the C API references of the CV-CUDA operator.

cvcuda.erase_into(dst: nvcv.Tensor, src: nvcv.Tensor, anchor: nvcv.Tensor, erasing: nvcv.Tensor, values: nvcv.Tensor, imgIdx: nvcv.Tensor, random: int, seed: int, stream: nvcv.cuda.Stream | None = None)

Executes the Erase operation on the given cuda stream.

See also

Refer to the CV-CUDA C API reference for the Erase operator for more details and usage examples.

Parameters:
  • dst (nvcv.Tensor) – Output tensor to store the result of the operation.

  • src (nvcv.Tensor) – Input tensor containing one or more images.

  • anchor (nvcv.Tensor) – anchor an array of size num_erasing_area that gives the x coordinate and y coordinate of the top left point in the eraseing areas.

  • erasing (nvcv.Tensor) – Eraisng an array of size num_erasing_area that gives the widths of the eraseing areas, the heights of the eraseing areas and integers in range 0-15, each of whose bits indicates whether or not the corresponding channel need to be erased.

  • values (nvcv.Tensor) – An array of size num_erasing_area*4 that gives the filling value for each erase area.

  • imgIdx (nvcv.Tensor) – An array of size num_erasing_area that maps a erase area idx to img idx in the batch.

  • random (int, optional) – 8-bit integer value for random op.

  • seed (int, optional) – seed random seed for random filling erase area.

  • stream (nvcv.cuda.Stream, optional) – CUDA Stream on which to perform the operation.

Returns:

None

Caution

Restrictions to several arguments may apply. Check the C API references of the CV-CUDA operator.

cvcuda.erase_into(dst: nvcv.ImageBatchVarShape, src: nvcv.ImageBatchVarShape, anchor: nvcv.Tensor, erasing: nvcv.Tensor, values: nvcv.Tensor, imgIdx: nvcv.Tensor, random: int, seed: int, stream: Optional[nvcv.cuda.Stream] = None)

Executes the Erase operation on the given cuda stream.

See also

Refer to the CV-CUDA C API reference for the Erase operator for more details and usage examples.

Parameters:
  • src (nvcv.ImageBatchVarShape) – Input image batch containing one or more images.

  • dst (nvcv.ImageBatchVarShape) – Output image batch containing the result of the operation.

  • anchor (nvcv.Tensor) – anchor an array of size num_erasing_area that gives the x coordinate and y coordinate of the top left point in the eraseing areas.

  • erasing (nvcv.Tensor) – Eraisng an array of size num_erasing_area that gives the widths of the eraseing areas, the heights of the eraseing areas and integers in range 0-15, each of whose bits indicates whether or not the corresponding channel need to be erased.

  • values (nvcv.Tensor) – An array of size num_erasing_area*4 that gives the filling value for each erase area.

  • imgIdx (nvcv.Tensor) – An array of size num_erasing_area that maps a erase area idx to img idx in the batch.

  • random (int, optional) – 8-bit integer value for random op.

  • stream (nvcv.cuda.Stream, optional) – CUDA Stream on which to perform the operation.

Returns:

None

Caution

Restrictions to several arguments may apply. Check the C API references of the CV-CUDA operator.