How to rearrange pixels into a new matrix form

2 ビュー (過去 30 日間)
sadiqa ilyas
sadiqa ilyas 2019 年 8 月 17 日
コメント済み: sadiqa ilyas 2019 年 8 月 19 日
I have 64*64 rgb image. I want to reaarange its pixels in matrix form.I.e lowest intensity value comes to the first place (1,1) Second pixel should come to (2,1) and so on till the end of first column. Then move to the next colum. But I dont know how to do it in matlab.Can any one help me

採用された回答

KALYAN ACHARJYA
KALYAN ACHARJYA 2019 年 8 月 17 日
編集済み: KALYAN ACHARJYA 2019 年 8 月 17 日
"I have 64*64 rgb image. I want to reaarange its pixels in matrix form.I.e lowest intensity value comes to the first place (1,1) Second pixel should come to (2,1) and so on till the end of first column. Then move to the next colum. But I dont know how to do it in matlab.Can any one help me"
I have done for single gray image (RGB Just having three plane), or you can easily incorparates the same.
image_test=magic(5) % Just for example 5x5 gray image
data1=sort(image_test(:));
final_image=reshape(data1,[5 5])
Command Window:
image_test=
17 24 1 8 15
23 5 7 14 16
4 6 13 20 22
10 12 19 21 3
11 18 25 2 9
final_image =
1 6 11 16 21
2 7 12 17 22
3 8 13 18 23
4 9 14 19 24
5 10 15 20 25
*If you have look for RGB images, just extract the all three plane and do the same and later concanate results again to 3 plane image.
Hope it Helps!
  1 件のコメント
sadiqa ilyas
sadiqa ilyas 2019 年 8 月 19 日
Thanks a lot.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by