Reputation: 47
I = imread("C:/Users/Hp/Desktop/download.jpg");
dir = [1 0 0]
J = rotate(I,dir,90);
This is the code i have written. but it doesnt seem to work. Is there any direct command to rotate an image by say 45 degree or 90 degree.
it gives the following errors:
rotate: H must be an array of one or more graphics handles
I am new to image processing. Help would be appreciated.
Upvotes: 0
Views: 3043
Reputation: 3657
rotate(h, dir, alpha)
is for rotating graphical objects ie obects that are defined by sets of coordinates eg grids, surfaces etc...
To rotate images you need to use imrotate()
Upvotes: 1