# getcv

Gets the grayscale/RGB/RGBA matrix R, which represents the pixels of the image handle.

## Syntax

R = getcv(handle)

## Inputs

handle
Handle of an image.
Type: integer

## Outputs

R
R represents the pixels in h. For a grayscale or binary image, R will be a 2D real matrix. For color images, it will be a real, ND matrix, where the first slice represents the red channel, second slice represents the blue channel, third slice represents the green channel and the fourth slice represents the alpha channel, if applicable.
Type: matrix

## Example

Get the pixel data of an image read with the ComputerVision library:

handle = imreadcv('cv1.jpg');
R = getcv(handle);
size(R)

ans = [Matrix] 1 x 3
200  200  3