|
SOLUTIONS
|
CUDALINK SYMBOL
CUDAImageAdd
adds an amount x to each channel value in img.
![]()
adds an amount x to each channel value in mem.
![]()
gives an image in which each pixel is the sum of the corresponding pixels in
and
.
![]()
gives a CUDAMemory in which each pixel is the sum of the corresponding pixels in
and
.
DetailsDetails
- The CUDALink application must be loaded using Needs["CUDALink`"].
works with binary, grayscale, and other images.
works with CUDAMemory and lists.
is equivalent to ImageAdd[image1, x].- The image returned by
has the same dimensions as image.
and
must be the same dimensions in
.- If
is a single-channel image, each channel of
is added to
in
. - In
, the number x is normally in the range 0 to 1.
gives an image with the same underlying data type as image, clipping or truncating values if necessary.
gives an image with the type of
, 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
ExamplesExamplesopen allclose all
Basic Examples (5)Basic Examples (5)
First, load the CUDALink application:
| In[1]:= |
Mask an image by adding a thresholded version of it:
| In[2]:= |
| Out[2]= | ![]() |
Brighten a color image by adding a constant amount to all channels:
| In[1]:= |
| Out[1]= | ![]() |
| In[1]:= |
| Out[1]= | ![]() |
Logical OR of two binary images:
| In[1]:= |
| Out[1]= |
can be used to add rank 2 or 3 lists:
| In[1]:= |
Out[1]//MatrixForm= | |
![]() | |
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »






