Easy masking of RGB images
Adam Hughes
hughesadam87 at gmail.com
Wed Nov 19 19:02:56 EST 2014
Ah, right you are!
Dunno what I was mixed up about...
On Wednesday, November 19, 2014 10:33:21 AM UTC-5, Stefan van der Walt
wrote:
>
> Hi Adam
>
> On 2014-11-19 00:01:06, Adam Hughes <hughes... at gmail.com <javascript:>>
> wrote:
> > img1 + img 2 --> adds values
> > img1 U img2 --> replaces values
> >
> > Essentially, overlay all the pixels that are not black.
> >
> > Is there a library or set of functions somewhere that makes this easy?
> I
> > remember a while back thinking I would have to write my own
> overlay/masking
> > utilities to get this behavior, but I hope that's not true.
>
> It should be fairly straightforward, if I understand correctly:
>
> mask = (img2 != 0)
> img1[mask] = img2[mask]
>
> Regards
> Stéfan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20141119/4d9d1e39/attachment.html>
More information about the scikit-image
mailing list