zero pad to resize an image
조회 수: 50 (최근 30일)
이전 댓글 표시
How to add zeros by comparing the file sizes of the two images?
Suppose the first image is 240x152 and the second image is 240x168
And i need to resize the first image using zeros to the same as the bigger one that is 240x168
so how is it possible to do the same?
댓글 수: 0
답변 (2개)
Himanshu tripathi
2019년 6월 28일
Try this
I = rand(240,152) ; // first image
iwant = zeros(240,168) ;
iwant(1:240,1:152) = I ;
댓글 수: 3
Himanshu tripathi
2019년 6월 28일
Are you looking for this?
zero_matrix = zeros(240,168-152);
I = [zero_matrix,I]
AISWARYA SUBRAMANIAN
2019년 6월 28일
편집: AISWARYA SUBRAMANIAN
2019년 6월 28일
I would suggest you to look through the following link:
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!