문제

Suppose we have number five from handwritten digit dataset. I want to rotate it 30 degrees (counter clockwise) then shift it 10 pixels vertical and horizontal. How should I do it?

도움이 되었습니까?

해결책

Let I be your image.

%I = Input image;
J = imrotate(I,30); %To rotate
JS = [zeros(size(J,1),10), J]; %To shift 10pix horizontally 

figure,imshow(I)
figure,imshow(J)
figure,imshow(JS)
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top