フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

What those permute numbers mean?

1 回表示 (過去 30 日間)
Stelios Fanourakis
Stelios Fanourakis 2018 年 6 月 21 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I have seen by research that in order to permute the image the command is as follows:
im = flip(permute(Img, [3 2 1 4]),1);
Can someone please explain me what those 3,2,1,4 digits mean?
  1 件のコメント
Stephen23
Stephen23 2018 年 6 月 21 日
編集済み: Stephen23 2018 年 6 月 21 日
"Can someone please explain me what those 3,2,1,4 digits mean?"
The permute documentation explains exactly what the inputs do: did you read it? Did you try any examples?

回答 (2 件)

Adam
Adam 2018 年 6 月 21 日
編集済み: Adam 2018 年 6 月 21 日
They are the order of permutation of the dimensions, as described in
doc permute
So after the permutation what was the 3rd dimension will now be the 1st, what was the 2nd will stay the 2nd, what was the 1st will now be the 3rd and the 4th will remain as is.
However, that example assumes Img is 4-dimensional, which is odd for an image, unless it is a stack of RGB images in some manner.

KARSH THARYANI
KARSH THARYANI 2018 年 6 月 21 日
The Img is supposedly an array of dimension a X b X c X d. permute() will change the access order to access the elements. So, if you accessed the Img(a, b, c, d) element in the array Img, now you would use Img(c, b, a, d) to access this element, because of the order = [3, 2, 1, 4]. The array is still the same. See more here

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by