I want to create an image using a matrix.
古いコメントを表示
1) Suppose i have a (8x8) matrix and i want this matrix to be converted into image (as shown in below image).

Note that each row of the matrix correspond to the each row of color in the image.
2) Also if i have R,G,B matrix, then how can i create the image (as shown in below image)
10 件のコメント
Jason Moore
2015 年 2 月 11 日
Is the imwrite function what you are looking for? imwrite has the ability to take a file name argument and a matrix for your RGB colors and write them to the file format of your choosing.
Nikhil Chourasia
2015 年 2 月 13 日
編集済み: Nikhil Chourasia
2015 年 3 月 2 日
Image Analyst
2015 年 2 月 13 日
Nikhil, for #1, can you give us the 8 by 8 matrix . I'm not clear how a 8 by 8 matrix (64 elements) can go into a much larger image that has colors and gray frames. Where are you getting the colors from? And what does the 8 by 8 matrix have to do at all with the output image? And how thick are the gray stripes, and how big do you want the overall image to be?
For #2, there is no " image below ". Please edit your post to insert it, just like you did with the image for #1 - by using the green and brown frame icon.
Image Analyst
2015 年 3 月 2 日
Nikhil, it's not clear what your edit was. What did you change?
Nikhil Chourasia
2015 年 3 月 2 日
編集済み: Nikhil Chourasia
2015 年 3 月 3 日
Nikhil Chourasia
2015 年 3 月 3 日
Nikhil Chourasia
2015 年 3 月 3 日
編集済み: Nikhil Chourasia
2015 年 3 月 4 日
U cannot obtain RGB image untill your matrix is 3 dimensional. First create a Three dimensional matrix I with (8,8,3) dimensions . where I(:,:,1) corresponds to red channel. means according to image shown u need for the I(1,:,1) higher values as compared to the values in I(1,:,2)and I(1,:,3). for second row I(2,:,2) should be greater then blue and red components. For third row blue values should be higher it means I(3,:,3) should have higher values than I(3,:,1) and I(3,:,2).
Nikhil Chourasia
2015 年 3 月 8 日
編集済み: Nikhil Chourasia
2015 年 3 月 8 日
Nikhil Chourasia
2015 年 3 月 10 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Images についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

