LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Overlay black and white picture transparent on Live Stream using Vision Acquisition

Solved!
Go to solution

Hi All,

 

I want to overlay a black and white Picture transparent on a live stream that i got from Vision Acquisition. I have one solution that works partially (added in the bottom) but two questions.

 

First: I want to use the case selector to switch between cameras. When i do switch it in the Front Panel i get the error at the "IMAQ ImageToImage 2" vi and at the "Array to color image" vi. Although when i then stop the vi and start it again with the case selector already at AP it works perfectly fine and there's no error anymore so it probably has to do something with switching the case. 

 

Second: As it is very ineffective to overlay every pixel the live stream is very laggy. I want to optimize it and think about converting both pictures to black and white and overlay those to make it faster but it doesnt work with the same principle using Build Array.

 

Does someone have an answer or a suggestion to this? it would help me a lot!

 

Thank you

0 Kudos
Message 1 of 3
(561 Views)
Solution
Accepted by topic author steffeol
03-09-2018 04:04 AM

Hi Steffeol,

 

Just some common suggestions:

- always wire your error terminals between sub-VIs

- use a wait function in your while-loops to reduce processor load

- image references do not need to be written back into shift registers. you can do so but I would recommend to do it for all or not at all.

 

concerning your errors:

Normally the description of the error gives a good hint where to start. if not try to search online for the error code (works in 95%). So without you telling us the what the error message is we have to guess. I would guess: the error occurs after you switch fom "Idle" to another case, because  you overwrite two image-references with default values during "Idle".

 

Hope that might help you.

ʍolɟɐʇɐp ʞuıɥʇ
Message 2 of 3
(544 Views)

Wow, you helped me a lot!

 

After using your first and third suggestion the program runs perfectly fine! Thank you very much!

 

I would have an other question. I don't know how to select the region of my overlay which i want to process. I think i can select it by connecting a mask to the "IMAQ ImageToImage 2" vi. However, I don't know how to do it. Would you have a suggestion?

0 Kudos
Message 3 of 3
(530 Views)