필터 지우기
필터 지우기

How to cut an image manually using pixels values with for loop without imcrop ?

조회 수: 3 (최근 30일)
How can I apply Matlab code to do what the imcrop function does but manually using for loop?

답변 (2개)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2021년 9월 4일

Image Analyst
Image Analyst 2021년 9월 5일
Not sure what you mean. How about this
grayImage = imread('moon.tif');
figure(1)
imshow(grayImage)
for k = 1 : 3
uiwait(helpdlg('Drag out a box to crop the image.'));
croppedImage = imcrop(grayImage);
figure(2) % Switch to a figure just for the cropped images only.
subplot(2, 2, k);
imshow(croppedImage); % Display it.
figure(1); % Return to the original image.
end

카테고리

Help CenterFile Exchange에서 Geometric Transformation and Image Registration에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by