Can anyone help me in this please, I try to resize the image. I'm beginner

조회 수: 2 (최근 30일)
Sandeep parajuli
Sandeep parajuli 2020년 5월 30일
댓글: Image Analyst 2020년 5월 31일
A=imshow("my.jpg");
[rows,columns]= size(A);
i=1;j=1;
c= zeros(rows/2,columns/2);
for x= 1:2:rows
for y = 1:2:columns
c(i,j) = A(x,y);
j=j+1;
end
i=i+1;
j=1;
end
figure,imshow(A);
figure,imshow(c/255);
figure,imshow(c),colormap(gray);

답변 (1개)

Sai Sri Pathuri
Sai Sri Pathuri 2020년 5월 30일
You may use imresize function
  댓글 수: 3
Image Analyst
Image Analyst 2020년 5월 31일
imresize() should work. Post the image that you claim it did not work on, and post your code where you called imresize() so we can try to reproduce your problem. https://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Read, Write, and Modify Image에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by