Hi all, i want to get the cropped image in another axes with the same size of the crop rectangle??Is there any way....
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi all i am stuck with my code.I want my cropped image in an axes which is having the same size as that of the crop rectangle.Thanks in advance.....
댓글 수: 0
채택된 답변
Massimo Zanetti
2016년 9월 28일
Here it is.
%open image and crop it
I = imread('peppers.png');
rect = [70,10,100,200];
Icrop = imcrop(I,rect);
%display results
figure;
subplot(1,2,1);
image(I); axis image;
subplot(1,2,2);
image(Icrop); axis image;
댓글 수: 3
Massimo Zanetti
2016년 9월 28일
Ok, then it is simpler.
I = imread('peppers.png');
Icrop = imcrop(I);
figure;
imshow(Icrop);
When first image displays, draw a rectangle and then confirm "crop image" after right clicking.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 White에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!