Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: creating rgb image using pixels values
Replies: 3   Last Post: Dec 29, 2012 11:48 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Sadik

Posts: 382
Registered: 1/12/09
Re: creating rgb image using pixels values
Posted: Dec 29, 2012 8:56 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi Shobana,

How about the following:

% Assuming you have three matrices R, G and B
I = uint8(zeros([size(R) 3]));
I(:,:,1) = R;
I(:,:,2) = G;
I(:,:,3) = B;

imwrite(I,'Combined.png');

Best.



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.