フィルターのクリア

Resize 4D image (RGB + another channel)

2 ビュー (過去 30 日間)
RuiQi
RuiQi 2016 年 6 月 17 日
コメント済み: RuiQi 2016 年 6 月 17 日
Hi
I cant use imresize to resize an image with 4 channels. How do i do this ? Do i need to resize each channel individually ? Help thanks.

採用された回答

Guillaume
Guillaume 2016 年 6 月 17 日
It depends on what that extra channel represents (and on the resizing method that you want to use). Assuming that extra channel is completely independent from the RGB data, then you can just use two imresize|
resizedimage = imresize(origimage(:, :, 1:3), ...)
resizedimage(:, :, 4) = imresize(origimage(:, :, 4), ...)
If you use imresize with any method other than nearest neighbour interpolation, then matlab also performs antialiasing which may blend some colours.
  1 件のコメント
RuiQi
RuiQi 2016 年 6 月 17 日
Thanks ! It is indeed independent !

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeRead, Write, and Modify Image についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by