Change the dimesion of concatenation of RGB images

1 回表示 (過去 30 日間)
NAVNEET NAYAN
NAVNEET NAYAN 2021 年 8 月 13 日
回答済み: Simon Chan 2021 年 8 月 13 日
I am concatenating 95 RGB images of size 240-by-320 and as output I am getting a 4-D image of dimension 240-by-320-by-3-by-95.
output_image = cat(4, I1, I2); % this is being run in the loop to concatenate all the images.
I want to get output as 240-by-320-by-95-by-3 i.e. the number of channels should be in the last dimension. Can anyone suggest some way for this?

採用された回答

Simon Chan
Simon Chan 2021 年 8 月 13 日
Try this:
B = permute(A, [1 2 4 3])

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeModify Image Colors についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by