mean2() - Image Processing
B = mean2(A) computes the
mean of the values in A.gpuarrayB = mean2(gpuarrayA) computes
the mean of the values in gpuarrayA, performing
the operation on a GPU. This syntax requires the Parallel Computing Toolbox™.Code Generation support:
Yes.MATLAB Function Block support:
Yes.
Syntax
B = mean2(A)gpuarrayB = mean2(gpuarrayA)
Example
Compute Mean of an ImageOpen This Example
Read an image into the workspace.I = imread('liftingbody.png');
Compute the mean.meanval = mean2(I)
meanval =
140.2991
Output / Return Value
Limitations
Alternatives / See Also
Reference