CUDAOpening
CUDAOpening[img,r]
gives the morphological opening of img with respect to a range-r square.
CUDAOpening[list,r]
gives the morphological opening of list with respect to a range-r square.
CUDAOpening[mem,r]
gives the morphological opening of mem with respect to a range-r square.
Details and Options
- The CUDALink application must be loaded using Needs["CUDALink`"].
- CUDAOpening works with binary, grayscale, and other images.
- CUDAOpening[image,r] is equivalent to Opening[image,r].
- If multiple image channels are present, CUDAOpening 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 (5)Summary of the most common use cases
First, load the CUDALink application:

https://wolfram.com/xid/0cer7h7p4pr1m44sijmazvju6-9h8a50
Use morphological opening to extract objects larger than the structuring element:

https://wolfram.com/xid/0cer7h7p4pr1m44sijmazvju6-eifnxu


https://wolfram.com/xid/0cer7h7p4pr1m44sijmazvju6-400cb1


https://wolfram.com/xid/0cer7h7p4pr1m44sijmazvju6-hjc1w

CUDAOpening works with graphics objects:

https://wolfram.com/xid/0cer7h7p4pr1m44sijmazvju6-bbavb0

Using CUDAMemory, you can speed up computation by reducing the time spent on memory operations. This loads memory onto the GPU:

https://wolfram.com/xid/0cer7h7p4pr1m44sijmazvju6-f3hsxr
This performs the opening operation:

https://wolfram.com/xid/0cer7h7p4pr1m44sijmazvju6-ie3ki6

This gets the memory back to the CPU:

https://wolfram.com/xid/0cer7h7p4pr1m44sijmazvju6-dg0ah9


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