CUDAImageConvolve[img,kern]
gives the convolution of img with kern.
CUDAImageConvolve[list,kern]
gives the convolution of list with kern.
CUDAImageConvolve[mem,kern]
gives the convolution of mem with kern.
CUDAImageConvolve
CUDAImageConvolve[img,kern]
gives the convolution of img with kern.
CUDAImageConvolve[list,kern]
gives the convolution of list with kern.
CUDAImageConvolve[mem,kern]
gives the convolution of mem with kern.
更多信息和选项
- The CUDALink application must be loaded using Needs["CUDALink`"].
- CUDAImageConvolve works with binary, grayscale, and other images.
- CUDAImageConvolve works with CUDAMemory and lists.
- CUDAImageConvolve[image,kern] is equivalent to ImageConvolve[image,kern].
- If multiple image channels are present, CUDAImageConvolve 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
范例
打开所有单元 关闭所有单元基本范例 (3)
First, load the CUDALink application:
Needs["CUDALink`"]CUDAImageConvolve[[image], N[BoxMatrix[1] / 9]]Use CUDAImageConvolve on a grayscale image with a Sobel mask to detect vertical edges:
CUDAImageConvolve[[image], {{-1, 0, 1}, {-2, 0, 2}, {-1, 0, 1}}]Using CUDAImageConvolve on a graphics object will automatically rasterize the graphic:
CUDAImageConvolve[[image], {{1, 1, 1}, {1, -8, 1}, {1, 1, 1}}]Applications (2)
CUDAImageConvolve can be used to perform heat diffusion:
initialPoints = ConstantArray[0.0, {1000, 1000}];
Do[
initialPoints[[Sequence@@(RandomInteger[{1, #}]& /@ Dimensions[initialPoints])]] = RandomReal[1.0],
{10}
];frame = CUDAMemoryLoad[initialPoints];
Dynamic[Refresh[
CUDAImageDivide[
CUDAImageConvolve[CUDAMemoryGet[frame], 1.0 * {{0, 1, 0}, {1, -4, 1}, {0, 1, 0}}, "OutputMemory" -> frame], 5.0, "OutputMemory" -> frame];
Image[CUDAMemoryGet@frame], UpdateInterval -> 0]]CUDAImageConvolve can be used to process geographic elevation data:
gisData = Import[ "http://exampledata.wolfram.com/sdtsdem.tar.gz", "Data" ];ReliefPlot[CUDAImageConvolve[gisData, {{1, 0, -1}}], ColorFunction -> "GreenBrownTerrain"]相关指南
-
▪
- CUDALink
文本
Wolfram Research (2010),CUDAImageConvolve,Wolfram 语言函数,https://reference.wolfram.com/language/CUDALink/ref/CUDAImageConvolve.html.
CMS
Wolfram 语言. 2010. "CUDAImageConvolve." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/CUDALink/ref/CUDAImageConvolve.html.
APA
Wolfram 语言. (2010). CUDAImageConvolve. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/CUDALink/ref/CUDAImageConvolve.html 年
BibTeX
@misc{reference.wolfram_2026_cudaimageconvolve, author="Wolfram Research", title="{CUDAImageConvolve}", year="2010", howpublished="\url{https://reference.wolfram.com/language/CUDALink/ref/CUDAImageConvolve.html}", note=[Accessed: 09-August-2026]}
BibLaTeX
@online{reference.wolfram_2026_cudaimageconvolve, organization={Wolfram Research}, title={CUDAImageConvolve}, year={2010}, url={https://reference.wolfram.com/language/CUDALink/ref/CUDAImageConvolve.html}, note=[Accessed: 09-August-2026]}