CUDAErosion
CUDAErosion[img,r]
gives the morphological erosion of img with respect to a range-r square.
CUDAErosion[list,r]
gives the morphological erosion of list with respect to a range-r square.
CUDAErosion[mem,r]
gives the morphological erosion of mem with respect to a range-r square.
Details and Options
- The CUDALink application must be loaded using Needs["CUDALink`"].
- CUDAErosion works with binary, grayscale, and other images.
- CUDAErosion works with CUDAMemory and lists.
- CUDAErosion[image,r] is equivalent to Erosion[image,r].
- If multiple image channels are present, CUDADilation operates on each of them separately.
- The following options can be given:
-
"Device" Automatic device used for CUDA computation Padding "Fixed" value used on boundary "OutputMemory" None CUDAMemory where output is stored
Examples
Basic Examples (6)Summary of the most common use cases
First, load the CUDALink application:

https://wolfram.com/xid/04h86q1vm2mvc4z5jqysla471e-9h8a50
Erosion reduces smaller, light features:

https://wolfram.com/xid/04h86q1vm2mvc4z5jqysla471e-eifnxu


https://wolfram.com/xid/04h86q1vm2mvc4z5jqysla471e-0c1z44

Erosion operates on each color channel independently:

https://wolfram.com/xid/04h86q1vm2mvc4z5jqysla471e-rqk7oo

Erosion can be used to perform a max filter on an input list:

https://wolfram.com/xid/04h86q1vm2mvc4z5jqysla471e-hjc1w

CUDAErosion works with graphics objects:

https://wolfram.com/xid/04h86q1vm2mvc4z5jqysla471e-bbavb0

Using CUDAMemory, one can speed up computation by reducing the amount of memory operations. This loads memory onto the CPU:

https://wolfram.com/xid/04h86q1vm2mvc4z5jqysla471e-f3hsxr
This performs the erosion operation:

https://wolfram.com/xid/04h86q1vm2mvc4z5jqysla471e-ie3ki6

This gets the memory back to the CPU:

https://wolfram.com/xid/04h86q1vm2mvc4z5jqysla471e-dg0ah9


https://wolfram.com/xid/04h86q1vm2mvc4z5jqysla471e-ccytfa
Wolfram Research (2010), CUDAErosion, Wolfram Language function, https://reference.wolfram.com/language/CUDALink/ref/CUDAErosion.html.
Text
Wolfram Research (2010), CUDAErosion, Wolfram Language function, https://reference.wolfram.com/language/CUDALink/ref/CUDAErosion.html.
Wolfram Research (2010), CUDAErosion, Wolfram Language function, https://reference.wolfram.com/language/CUDALink/ref/CUDAErosion.html.
CMS
Wolfram Language. 2010. "CUDAErosion." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/CUDALink/ref/CUDAErosion.html.
Wolfram Language. 2010. "CUDAErosion." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/CUDALink/ref/CUDAErosion.html.
APA
Wolfram Language. (2010). CUDAErosion. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/CUDALink/ref/CUDAErosion.html
Wolfram Language. (2010). CUDAErosion. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/CUDALink/ref/CUDAErosion.html
BibTeX
@misc{reference.wolfram_2024_cudaerosion, author="Wolfram Research", title="{CUDAErosion}", year="2010", howpublished="\url{https://reference.wolfram.com/language/CUDALink/ref/CUDAErosion.html}", note=[Accessed: 30-April-2025
]}
BibLaTeX
@online{reference.wolfram_2024_cudaerosion, organization={Wolfram Research}, title={CUDAErosion}, year={2010}, url={https://reference.wolfram.com/language/CUDALink/ref/CUDAErosion.html}, note=[Accessed: 30-April-2025
]}