Hundreds of functions in MATLAB® and dozens of functions in Image Processing
Toolbox™ run automatically on a GPU if you supply a gpuArray
argument. Whenever any of these functions is called with at
least one gpuArray
as an input argument, the function executes on the
GPU and generates a gpuArray
as the result. You can mix inputs using
both gpuArray
and MATLAB arrays in the same function call; the MATLAB arrays are transferred to the GPU for the function execution.
The following table lists all the Image Processing Toolbox functions that have been enabled to run on a GPU. In most cases, the functions support the same syntaxes and operate the same, but in some cases there are certain differences. This table lists these limitations, if any.
Function | Remarks/Limitations |
---|---|
bwdist | Input images must be 2-D and have less than 232 elements. Euclidean is the only distance metric supported. |
bwlabel | — |
— | |
bwmorph | — |
corr2 | — |
edge | Canny method is not supported on the GPU. |
histeq | — |
im2double | — |
im2int16 | — |
im2single | — |
im2uint8 | — |
im2uint16 | — |
imabsdiff | — |
imadjust | — |
| |
| |
imcomplement | — |
The | |
The | |
imfill | Inputs must be 2-D, supporting only the 2-D connectivities (4 and 8). Does not support the interactive hole filling syntax. |
Input kernel must be 2-D | |
imgaussfilt | — |
imgaussfilt3 | — |
imgradient | — |
imgradientxy | — |
imhist | When running on a GPU, imhist does not display the histogram. To display
the histogram, use stem(binLocations,counts) . |
imlincomb | — |
imnoise | — |
| |
imreconstruct | Inputs must be 2-D, supporting only the 2-D connectivities (4 and 8). |
imregdemons | The parameter 'DisplayWaitbar' is not supported on the GPU. |
imregionalmax | Inputs must be 2-D, supporting only the 2-D connectivities (4 and 8). |
imregionalmin | Inputs must be 2-D, supporting only the 2-D connectivities (4 and 8). |
imresize | gpuArray input must be of type single or
double . Only bicubic interpolation is supported on
GPU and the function always performs antialiasing. |
The | |
— | |
| |
Only affine2d, affine3d, and projective2d transformations are
supported. Only | |
iradon | The GPU implementation of this function supports only nearest-neighbor and linear interpolation methods. |
mat2gray | — |
mean2 | — |
medfilt2 | Padding options are not supported on the GPU. |
normxcorr2 | — |
— | |
radon | — |
rgb2gray | — |
rgb2ycbcr | — |
regionprops | gpuArray input must be a 2-D logical matrix or a 2-D
label matrix. The connected component structure (CC )
input is not supported. The following properties are not supported:
'ConvexArea' , 'ConvexHull' ,
'ConvexImage' , 'EulerNumber' ,
'FilledArea' , 'FilledImage' , and
'Solidity' . 'struct' is the only
return type supported. |
— | |
stdfilt | The filtering neighborhood must be two-dimensional. |
stretchlim | — |
ycbcr2rgb | — |