LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI of the Day (11/6/2009) - Create Mask VI

Well, today is the 50th VIOTD so I could have done a clip show, but instead I chose one of my most-used picture VIs, "Create Mask".  This VI does a lot of work for you, give it a picture, tell it the color you want to me transparent, and it calculates the mask for you.  What can you do with this?  A few things, like spruce up your boring shape fills with some nice gradients.

 

 GradientFill.png

 

Or, if you want something a little more psychedelic 

 

LogSpiralOval.png

 

Or how about adding a little zip to drab text

 

BilinearText.png

 

Not too shabby.  As you see in the example code, all of these involved the same basic trick.  Draw your boring shape in all black and pass it to Create Mask.  Generate your background bitmap (you can use an image as well), and substitute masks in the image data.  Usually you will invert the mask so the part outside your shape is transparent.  Enjoy.

 

VIOTD groundrules here

 

P.S.  50 was one of those nice, round numbers I had in my head when I started this.  If I am back here on Monday I guess I will have signed on until the next one.  Maybe 75, 100,1000?  Who knows. 

Message 1 of 7
(3,831 Views)
Well, you just missed an apportunity. "Create Mask" would have been great for a Halloween VIOTD. 😄
Message 2 of 7
(3,826 Views)

altenbach wrote:
Well, you just missed an apportunity. "Create Mask" would have been great for a Halloween VIOTD. 😄
How did I miss that?  Oh that's right I was in Vegas for Halloween.  If I had brought my laptop along, and my wife had caught me posting to this forum on our vacation.  Ouch, that may not have ended well.... 

 

Message 3 of 7
(3,817 Views)

VOITD for the next trip: Keep the Wife Happy.vi

 

Lynn 

Message 4 of 7
(3,794 Views)

How did I miss that?  Oh that's right I was in Vegas for Halloween.  If I had brought my laptop along, and my wife had caught me posting to this forum on our vacation.  Ouch, that may not have ended well.... 

 


 

well my boss doesnt like when i post at work but i do it anyways...then again i dont have to live with him..

 

Message Edited by for(imstuck) on 11-06-2009 10:17 AM
Message 5 of 7
(3,791 Views)

for(imstuck) wrote:
...well my boss doesnt like when i post at work but i do it anyways...then again i dont have to live with him..

 

Message Edited by for(imstuck) on 11-06-2009 10:17 AM

 

 Same here and your post insiped me. Smiley Wink

 

I'm shunned from posting to the web,

Under normal or under neB.

But if they find LabVIEW doesn't work,

They will be looking for this jerk.

 

Smiley Surprised

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 7
(3,765 Views)

Congratulations. You've managed to recreate WordArt, not an evil creation in itself, but one which has allowed many many things which should not have seen the light of day to be unleashed on the world.

 

Come to think of it, that sounds like a lot of the features in LabVIEW. 😉


___________________
Try to take over the world!
0 Kudos
Message 7 of 7
(3,704 Views)