CUDAImageAdd[img,x]
adds an amount x to each channel value in img.
CUDAImageAdd[mem,x]
adds an amount x to each channel value in mem.
CUDAImageAdd[img1,img2]
gives an image in which each pixel is the sum of the corresponding pixels in img1 and img2.
CUDAImageAdd[mem1,mem2]
gives a CUDAMemory in which each pixel is the sum of the corresponding pixels in mem1 and mem2.
CUDAImageAdd
CUDAImageAdd[img,x]
adds an amount x to each channel value in img.
CUDAImageAdd[mem,x]
adds an amount x to each channel value in mem.
CUDAImageAdd[img1,img2]
gives an image in which each pixel is the sum of the corresponding pixels in img1 and img2.
CUDAImageAdd[mem1,mem2]
gives a CUDAMemory in which each pixel is the sum of the corresponding pixels in mem1 and mem2.
Details and Options
- The CUDALink application must be loaded using Needs["CUDALink`"].
- CUDAImageAdd works with binary, grayscale, and other images.
- CUDAImageAdd works with CUDAMemory and lists.
- CUDAImageAdd[image1,x] is equivalent to ImageAdd[image1,x].
- The image returned by CUDAImageAdd[image,…] has the same dimensions as image.
- image1 and image2 must be the same dimensions in CUDAImageAdd[image1,image2].
- If image2 is a single-channel image, each channel of image1 is added to image2 in CUDAImageAdd[image1,image2].
- In CUDAImageAdd[image,x], the number x is normally in the range 0 to 1.
- CUDAImageAdd[image,x] gives an image with the same underlying data type as image, clipping or truncating values if necessary.
- CUDAImageAdd[image1,image2] gives an image with the type of image1, clipping or truncating values if necessary.
- The following options can be given:
-
"Device" Automatic device used for CUDA computation "OutputMemory" None CUDAMemory where output is stored
Examples
open all close allBasic Examples (5)
First, load the CUDALink application:
Needs["CUDALink`"]Mask an image by adding a thresholded version of it:
CUDAImageAdd[ [image], [image]]Brighten a color image by adding a constant amount to all channels:
CUDAImageAdd[[image], 0.15]CUDAImageAdd[[image], [image]]Logical OR of two binary images:
CUDAImageAdd[[image], [image]]CUDAImageAdd can be used to add rank 2 or 3 lists:
CUDAImageAdd[ConstantArray[1, {10, 10}], 2]//MatrixFormTech Notes
Related Guides
-
▪
- CUDALink
Text
Wolfram Research (2010), CUDAImageAdd, Wolfram Language function, https://reference.wolfram.com/language/CUDALink/ref/CUDAImageAdd.html.
CMS
Wolfram Language. 2010. "CUDAImageAdd." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/CUDALink/ref/CUDAImageAdd.html.
APA
Wolfram Language. (2010). CUDAImageAdd. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/CUDALink/ref/CUDAImageAdd.html
BibTeX
@misc{reference.wolfram_2026_cudaimageadd, author="Wolfram Research", title="{CUDAImageAdd}", year="2010", howpublished="\url{https://reference.wolfram.com/language/CUDALink/ref/CUDAImageAdd.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_cudaimageadd, organization={Wolfram Research}, title={CUDAImageAdd}, year={2010}, url={https://reference.wolfram.com/language/CUDALink/ref/CUDAImageAdd.html}, note=[Accessed: 13-June-2026]}