cropcv

Crops an image to the specified region of interest.

Syntax

R = cropcv(handle, regionofinterest)

Inputs

handle
Handle of an image.
Type: integer
regionofinterest
Real vector representing [startx, starty, endx, endy] of the region of interest.
Type: vector

Outputs

R
Handle of the resulting cropped image.
Type: integer

Example

Crop an image to the region of interest in pixels :

handle = imreadcv('bird3.jpg');
roi = [750, 200, 1100 500];
R = cropcv(handle, roi);
Figure 1. Input image


Figure 2. Cropped image