| Contents | Index |
Y = imapplymatrix(M,X)
Y = imapplymatrix(M,X,C)
Y = imapplymatrix(..., output_type)
Y = imapplymatrix(M,X) computes the linear combination of the rows of M with the color channels of X. The output data type is the same as the type of X.
Y = imapplymatrix(M,X,C) computes the linear combination of the rows of M with the color channels of X, adding the corresponding constant value from C to each combination. The output data type is the same as the type of X.
Y = imapplymatrix(..., output_type) returns the result of the linear combination in an array of type output_type.
Y |
Array that contains the linear combination of the rows of M with the color channels of X. |
Convert RGB values to grayscale:
RGB = imread('peppers.png');
M = [0.30, 0.59, 0.11];
gray = imapplymatrix(M, RGB);
figure
subplot(1,2,1), imshow(RGB), title('Original RGB')
subplot(1,2,2), imshow(gray), title('Grayscale Conversion')


Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |