Change dimensions of 2d data

조회 수: 9 (최근 30일)
Avinash Nunna
Avinash Nunna 2020년 6월 3일
편집: Mohammad Sami 2020년 6월 15일
I have a 2d matrix of size 3281*3164 with pixel size 0.009 , I want to convert it to size 2987*2880 with pixel size 0.01. Can anyone help?

답변 (1개)

Mohammad Sami
Mohammad Sami 2020년 6월 3일
You can use the imresize function to scale the image up or down.
a = rand(3281,3164);
b = imresize(a,0.91024);
  댓글 수: 3
darova
darova 2020년 6월 13일
maybe interp2?
Mohammad Sami
Mohammad Sami 2020년 6월 15일
편집: Mohammad Sami 2020년 6월 15일
Im resize support both scale factor and absolute size.
a = rand(3281,3164);
b = imresize(a,[2987 2880]);

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

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by