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: Apply mask to Image
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Avri Alony

Posts: 40
Registered: 1/22/11
Apply mask to Image
Posted: Mar 18, 2013 11:31 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I would like to set '0' in RGB image at few pixels using BW mask.
the only way I know to do so is to disassemble the image to R,G and B arrays, set
R(BW) = 0, G(BW) = 0, B(BW) = 0
and then to reassemble by
I(:,:,3) = B; I(:,:,2) = G; I(:,:,1) = R;

Is there any elegant way to do this?
Thanks



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.