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

CUDAColorNegate

CUDAColorNegate[image]
performs color negation on image.
CUDAColorNegate[list]
performs color negation on list.
CUDAColorNegate[mem]
performs color negation on memory referenced by mem.
  • The CUDALink package must be loaded using Needs.
  • works with binary, grayscale, and other images.
  • If multiple image channels are present, operates on each of them separately.
  • If the input type is Real, then the input is subtracted from , not .
  • does not work on fixed vector structure types like , , ....
  • The following options can be given:
"Device"$CUDADeviceCUDA device used to perform computation
"OutputMemory"Noneoutput memory provided to avoid creating new memory location
First, load the CUDALink application:
This performs color negation on the input color image:
This inverts a grayscale image:
This inverts a binary image:
This performs color negation on the input list:
If the input is CUDAMemory, then memory is returned as output:
This negates the input:
Memory is retrieved using CUDAMemoryGet:
First, load the CUDALink application:
In[1]:=
Click for copyable input
This performs color negation on the input color image:
In[2]:=
Click for copyable input
Out[2]=
 
This inverts a grayscale image:
In[1]:=
Click for copyable input
Out[1]=
 
This inverts a binary image:
In[1]:=
Click for copyable input
Out[1]=
 
This performs color negation on the input list:
In[1]:=
Click for copyable input
Out[1]=
 
If the input is CUDAMemory, then memory is returned as output:
In[1]:=
Click for copyable input
Out[1]=
This negates the input:
In[2]:=
Click for copyable input
Out[2]=
Memory is retrieved using CUDAMemoryGet:
In[3]:=
Click for copyable input
Out[3]=