此为 Mathematica 8 文档,内容基于更早版本的 Wolfram 语言
查看最新文档(版本11.2)

CUDAImageMultiply


multiplies an amount x to each channel value in img.

multiplies an amount x to each channel value in mem.

gives an image in which each pixel is the product of the corresponding pixels in and .

gives a CUDAMemory in which each pixel is the product of the corresponding pixels in and .
  • The CUDALink application must be loaded using Needs.
  • works with binary, grayscale, and other images.
  • 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 multiplied by 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"Automaticdevice used for CUDA computation
"OutputMemory"NoneCUDAMemory where output is stored
First, load the CUDALink application:
This multiplies two images together:
This multiplies an image with a constant value 2.0:
Logical AND of two binary images:
can be used to multiply rank 2 or 3 lists:
First, load the CUDALink application:
In[1]:=
Click for copyable input
This multiplies two images together:
In[2]:=
Click for copyable input
Out[2]=
 
This multiplies an image with a constant value 2.0:
In[1]:=
Click for copyable input
Out[1]=
 
Logical AND of two binary images:
In[1]:=
Click for copyable input
Out[1]=
 
can be used to multiply rank 2 or 3 lists:
In[1]:=
Click for copyable input
Out[1]//MatrixForm=
Multiplying two images together can produce an overlay effect: