From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to overlay a pattern on live video capture in LabVIEW

Solved!
Go to solution

Hi, I'm brand new to LabVIEW. I learnt using YouTube on how to capture continuous video from my camera and display it using LabVIEW. Below is my block diagram. Next, I want to permanently overlay a pattern  at a selected location on my live video capture, is that possible to do in LabVIEW? 

 

In particular, when the camera is looking at some circular object, I want to permanently overlay a pattern of concentric circles with cross hairs on the live video capture , with the center of cross hair matching to the center of the circular object in the video. 

 

Once, I overlay the pattern in the video, I want the overlay to stay there even if my camera is now looking at something else in the world!

 

image.png

 

Thanks for looking in this. I appreciate your help!!

 

0 Kudos
Message 1 of 23
(2,473 Views)
Solution
Accepted by topic author Swati.Bh

Try the IMAQ overlay functions.  

 

Documentation here: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019M2BSAU&l=en-CA

---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 2 of 23
(2,423 Views)

Hi Pallen, Thank you so much for the quick reply. I really appreciate it!!

 

 I was trying these overlay functions, but looked like they will work to overlay on an image and not on video?

 

Could you please let me know if you think that these will work to overlay on continuous video from a camera? 

0 Kudos
Message 3 of 23
(2,417 Views)

I don't have IMAQ installed on this PC at the moment, but I found a post with some VIs attached.  

 

https://forums.ni.com/t5/LabVIEW/Overlay-bitmap-image-onto-video/m-p/745609/highlight/true#M341595

 

These may not do exactly what you need, but hopefully will give you some ideas. 

---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 4 of 23
(2,411 Views)

Hi Pallen!! I checked out the link and that’s very helpful!! Thanks again!! I’ll try this out today.

 

Best,

Swati

0 Kudos
Message 5 of 23
(2,396 Views)

I used overlay function to overlay patterns on the live video and it worked!! Thank you so much Pallen!!

 

My next question is that I need to overlay only the white circles from this image on top of the live video. How can I selectively overlay ONLY these white circles on top of the video (and not the black space behind)?

 

When I overlay this image using bitmap overlay functionality on top of the live video, then of course, I can see this complete image including the black background on top of the live video, and the video gets obstructed in the areas where this image is overlaid. 

rtcl.jpg

 

Probably will have to do some image processing to this image (what type of image processing?) or will have to generate these calibration circles in labview itself (how?)? Any thoughts anyone?

 

Thanks for helping.

 

 

 

0 Kudos
Message 6 of 23
(2,353 Views)

can you apply IMAQ Overlay Contour VI

?

 

@Swati.Bh wrote:

 

[...] will have to generate these calibration circles in labview itself (how?)?

 


Altenbach showed here  how to plot concentric circles on a XY graph

https://forums.ni.com/t5/LabVIEW/Bouncing-Large-Ball-in-LabVIEW-2018/m-p/4087987?profile.language=en...

 

concentric_circles.png

0 Kudos
Message 7 of 23
(2,329 Views)

Hi Alexderjuengere, Thank you so much!! I really appreciate it. I'm checking this out, and I hope I'll be able to use this to overlay concentric circles on the video. 

0 Kudos
Message 8 of 23
(2,322 Views)

Hi Alexderjuengere,

 

I was not able to find the (r, theta, z) operator when making this in labview, could you please let me know where can I find it?  (i'm referring to the snapshot you had posted which shows flow diagram).

 

Also, what operator is being used to create array? is it using 'build array' operator?

 

I'm new to labview, so trying to figure out these trivial things, thanks for helping.

 

Best,

Swati

0 Kudos
Message 9 of 23
(2,308 Views)

@Swati.Bh wrote:

Hi Alexderjuengere,

 

I was not able to find the (r, theta, z) operator when making this in labview, could you please let me know where can I find it?  (i'm referring to the snapshot you had posted which shows flow diagram).

 


 

 

Programming VIs and Functions > Numeric Functions> complex

 

https://zone.ni.com/reference/en-XX/help/371361R-01/glang/polar_to_complex/

0 Kudos
Message 10 of 23
(2,294 Views)