Reducing size of image

조회 수: 3 (최근 30일)
Oah Joan
Oah Joan 2018년 10월 15일
편집: Rena Berman 2021년 1월 15일
Well I want to write a function reducesize(imagematrix, amount) that returns a new image that is reduced in size by the given amount. In particular, it reduces the size of an image by taking only pixels every ‘amount’ pixels apart. For example, if amount=3 then the image will be one third as high and one third as wide. Can you help me?
  댓글 수: 2
Rik
Rik 2020년 11월 20일
Why did you remove all you questions? That is extremely rude.
Rena Berman
Rena Berman 2021년 1월 15일
(Answers Dev) Restored edit

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

답변 (1개)

KALYAN ACHARJYA
KALYAN ACHARJYA 2018년 10월 15일
편집: KALYAN ACHARJYA 2018년 10월 15일
function reduced_image=reducesize(imagematrix,amount)
[rows colm]=size(imagematrix);
x=randi(rows);
y=round(amount/x);
reduced_image=imresize(imagematrix,[x y])
end

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by