http://www.mathworks.com/matlabcentral/answers/10089-image-rotate

 

 

 

 

Irot = imrotate(I,theta);
Mrot = ~imrotate(true(size(I)),theta);
Irot(Mrot&~imclearborder(Mrot)) = 255;
%View 'er
imtool(Irot)
Posted by uniqueone
,