User`s guide
5 Geometri c Transformation
Rotating an Image
YoucanusetheRotateblocktorotateyourimageorvideostreambya
specified angle. In this exampl e, you le arn how to use the R otate block to
continuously rotate an image:
1 Define an R GB image in the MATLAB workspace. At the MATLAB
command prompt, type
I = checker_board;
I
is a 100-by-100-by-3 array of double-precision values. Each plane of the
array represents the reg, green, or blue color values of the image.
2 To view the image this matrix represents, at the MATLAB command
prompt, type
imshow(I)
3 Create a new Simulink model, and add to it the blocks shown in the
following table.
Block Librar y Quantity
Image From
Workspace
Video and Image Processing
Blockset > Source s
1
5-6