LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

superimposing 2 images

Oh yes, the comutative property of multiplication...

Good Chaos (Is that a oxymoron?)!

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 11 of 27
(3,302 Views)
Color blending ?
Commutativity ?
Oxymoron ?

See Ben how good you can be when there are no logarithms around ! LOL :D:D:D
Chilly Charly    (aka CC)
Message 12 of 27
(3,297 Views)
Thanks all but...

Chaos has gone and taught me something here.

For some reason, I was expecting the image to be an 32 bit field.

Something must have changed since I looked at this close.

I can not explain why either version worked!

OK, I looked again. The image is now three bytes for each pixel. I think in LV 6 it was one I32 for each pixel. That means most of my original example did NOTHING!

Here is yet another variation on the same theme that take advantage of this new knowledge.

A bit shift right replaces the divide which in turn allows me to stick with a U8.

That is what I love about this Exchange. You think you are helping others and in the end you learn something.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 13 of 27
(3,292 Views)
More discusions re the LV picture control cn be found at the link below.

http://forums.ni.com/ni/board/message?board.id=BreakPoint&message.id=576

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 14 of 27
(3,265 Views)
I'm not sure about the LV6 format, but in the newer version it depends on whether you use a flattened or unflattened pixmap. One has a 1D U8 array with 3 elements for each pixel (in 24 bit depth) and the other has a 2D U32 array with one element for each pixel. Is it possible that's what you were thinking about?

___________________
Try to take over the world!
Message 15 of 27
(3,255 Views)
Thank you tst!

You called this correctly.

Flattened vs non.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 16 of 27
(3,259 Views)
You guys are amazing. Thanks so much for all the help. I'm trying to combine both the color modulation and superimposing the images to create a shadowing effect. I'm able to manually create the shadowing, but I was trying to use the draw multiple lines vi to create an automated loop that would draw a shadow that went from grey to white gradually, but for some reason my loop would only draw one line instead of the full range I was expecting. I'll attach the vi to see if you can see what I did wrong
0 Kudos
Message 17 of 27
(3,240 Views)
here is the vi where I superimpose a picture with my manual shadowing. If you have any suggestion on more efficient ways to do this, please let me know
0 Kudos
Message 18 of 27
(3,241 Views)
Your VI is very very messy. It's impossible to understand which wire goes where. You should really keep it clean.
Also, I didn't understand what it's supposed to do. As more comments, you should not draw the picture in every iteration (heavy on the CPU), and part of the solution probably needs to be passing the picture through a shift register.
Look at the attached as an example. It draws each line of the picture after calculating the right color for it. Note that the diagram is clean. Another good idea would be to document the diagram if necessary.
Note the second version which is even cleaner.

Message Edited by tst on 06-20-2005 09:15 PM


___________________
Try to take over the world!
Download All
0 Kudos
Message 19 of 27
(3,227 Views)
If you can get your images into .png format, you can use transparency and overlay the two images in a picture control. Here is a link to some NI info.

http://digital.ni.com/public.nsf/allkb/00736861C29ADFB786256D120079D119
Message 20 of 27
(3,201 Views)