CUDALink`
CUDALink`

CUDAOpening

CUDAOpening[img,r]

gives the morphological opening of img with respect to a range-r square.

CUDAOpening[list,r]

gives the morphological opening of list with respect to a range-r square.

CUDAOpening[mem,r]

gives the morphological opening of mem with respect to a range-r square.

更多信息和选项更多信息
  • The CUDALink application must be loaded using Needs["CUDALink`"].
  • CUDAOpening works with binary, grayscale, and other images.
  • CUDAOpening[image,r] is equivalent to Opening[image,r].
  • If multiple image channels are present, CUDAOpening operates on each of them separately.
  • The following options can be given:
  • "Device"Automaticdevice used for CUDA computation
    Padding"Fixed"value used on boundary
    "OutputMemory"NoneCUDAMemory where output is stored
  • 范例

    基本范例  (5)

    First, load the CUDALink application:

    In[1]:=
    Click for copyable input

    Use morphological opening to extract objects larger than the structuring element:

    In[2]:=
    Click for copyable input
    Out[2]=

    The radius can be varied:

    In[1]:=
    Click for copyable input
    Out[1]=

    CUDAOpening works with lists:

    In[1]:=
    Click for copyable input
    Out[1]//MatrixForm=

    CUDAOpening works with graphics objects:

    In[1]:=
    Click for copyable input
    Out[1]=

    Using CUDAMemory, you can speed up computation by reducing the time spent on memory operations. This loads memory onto the GPU:

    In[1]:=
    Click for copyable input

    This performs the opening operation:

    In[2]:=
    Click for copyable input
    Out[2]=

    This gets the memory back to the CPU:

    In[3]:=
    Click for copyable input
    Out[3]=

    Memory must be deleted:

    In[4]:=
    Click for copyable input
    Out[4]=

    参见

    Opening  CUDAErosion  CUDADilation  CUDAClosing

    教程