How to Downsample image in both Horizontal and Vertical Direction
56 ビュー (過去 30 日間)
古いコメントを表示
Any one help me how to downsample image in horizontal direction and vertical direction.
i used downsample(image,4), it will down sample image in both the direction, but i need to downsample separately for horizontal and vertical.
Does any know suggest me please.
Thank You
0 件のコメント
採用された回答
Sean de Wolski
2012 年 12 月 7 日
編集済み: Sean de Wolski
2012 年 12 月 7 日
For grayscale:
Xdown = X(1:2:end,1:2:end);
If it's RGB, keep the third dimension:
Xdown = X(1:2:end,1:2:end,:);
1 件のコメント
Image Analyst
2012 年 12 月 7 日
That's how I'd do it for simple subsampling by an integer (2, 3, 4, etc.). There is also the imresize() function that you can use. It will handle interpolation if the subsampling is not by integer amounts.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Multirate Signal Processing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!