How to compare size of to image?
2 ビュー (過去 30 日間)
古いコメントを表示
I'm a fresher to MATLAB. i m looking for how to compare size of two images, if no then how to make the images to the same size.
0 件のコメント
回答 (1 件)
Walter Roberson
2013 年 1 月 23 日
size() applied to the variable will tell you the dimensions in each direction.
If you have the Image Processing toolbox then imresize() can resize images. For example,
newB = imresize(B, [size(A,1), size(A,2)])
2 件のコメント
Image Analyst
2013 年 1 月 23 日
編集済み: Image Analyst
2013 年 1 月 23 日
or simply newB = imresize(B, size(A)); if A is a monochrome image.
Walter Roberson
2013 年 1 月 23 日
Not if A is an RGB image: size(A) would have 3 elements instead of 2 in that case.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!