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

thanks much Alexderjuengere!! Got it!!

0 Kudos
Message 11 of 23
(1,106 Views)

can you post your code or a screenshot?

0 Kudos
Message 12 of 23
(1,089 Views)
 

Here is a snapshot of the simple code I wrote which is working. The code takes the live camera video and overlays some patterns on top of it, using Image overlay.

sanpshotcam.PNG

Below is the output showing a live camera video in background and some patterns (Red circle, pink circle, green square, blue text) overlaid on top of camera live view.  I used the overlay function to overlay these patterns, except the green square, which I directly drew on top of the video using the menu options shown on the left of the live camera view below.

 

 

rightpupil.PNG

 

The problem is that I'm trying to overlay a pre-calibrated size of concentric circles based on camera pixel size (such as an image below). I'm still not sure how to overlay that pattern on top of my camera video. How to draw the circles of a known size?

In case I try to overlay an image such as shown below (where we made the circles of the size we want), the background of the image gets on top of the video and hides the video.

 

rtclV10i_t0.png

 

I have attached my code, currently I'm using 2 cameras and the code also uses 2 cameras. If you try to run it, make sure to have 2 cameras, or you can delete one from the code and run it with 1 camera. When you run it, it will directly overlay some patterns on top of your live video. 

0 Kudos
Message 13 of 23
(1,076 Views)

Has anyone used 'Draw Circle by Radius VI'  (http://zone.ni.com/reference/en-XX/help/371361R-01/lvpict/draw_circle_by...to draw circles on video? or do you think this can work for videos, since this needs picture input..?

 

 

0 Kudos
Message 14 of 23
(1,067 Views)

 

Hi, I'm getting this error (see attached snapshot or picture below) when trying to connect the Draw Circle VI to the camera. I'm connecting IMAQdx Grab->ImageOut to DrawCircle--> Picture and getting error of incompatible types. Any ideas on how can I connect the two? I'm trying to draw circle on top of the video.

 

error_camera_circle.PNG

0 Kudos
Message 15 of 23
(1,057 Views)

Hi , I'm trying to write this program which Alexderjuengere has shown above from Altenbach. Can anyone please help me by indicating what these functions are and where can I find them? I have marked them by arrows. 

 

The one marked in red looks like an array, but I'm unable to find anything looking exactly like this. 

 

Other three are marked by black arrows, these are related to for loop, but I don't know how to add these?

 

Thank you for your help!!

 

loop.PNG

0 Kudos
Message 16 of 23
(1,051 Views)

The item circled in red should be the Build Array function. 

 

The tunnels you have marked with the black arrows are automatically created when you draw a wire from a block outside a loop to a block inside a loop.  

 

The tunnel that is created by default may not be the specific tunnel you want.  You can right click on a tunnel to change its type.  

---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 17 of 23
(1,045 Views)

Thank you Pallen!! Really appreciate your quick reply, I'll try it out now.

0 Kudos
Message 18 of 23
(1,042 Views)

I've attached a quick test.  Not sure if this was what you were looking for or not.  

 

---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 19 of 23
(1,038 Views)

That's so great of you Pallen!! Thank you so much!! Yes, I was trying to draw these circles first, and then will have to overlay them on the video which I'm getting from my camera. I'll try adding this in my camera code. Thanks again!!

 

Best,

Swati

0 Kudos
Message 20 of 23
(1,036 Views)