The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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 ]

Posts: 13,022
Registered: 12/26/06
Re: creating rgb image using pixels values
Posted: Dec 29, 2012 11:48 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Shobana " <> wrote in message <kbn609$gvt$>...
> hai..
> I am having red,green and blue plane pixel values and i want to form image with this values.Is there any function is available in the matlab?
> I tried cat() function and imwrite also but its not working.if anybody knows please help me

cat() should work:

rgbImage = cat(3, redChannel, greenChannel, blueChannel);

You might need to cast the channels to uint8 beforehand depending on what you're going to do with the image. If you want to display it with imshow() or write it to disk with imwrite() you'll need to cast to uint8

rgbImage = cat(3, uint8(redChannel), uint8(greenChannel), uint8(blueChannel));


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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.