LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Vision: Measuring light intensity from web cam

Solved!
Go to solution

Hi, I am trying to measure light intensity from LED diodes with a webcam to detect if the light is on or off. I started with a example from labview: "Light meter" and tried to change that to work with the feed from a web cam as input. I didn't work at all.. What am I doing wrong? I will post both my file and the example.

 

I want it work like the example "light meter". And then decide at what range of light intensity the light is on or off.

 

All that I have done in "Test 7" is to try too make the "input data" come from a web cam insted of a file. Please help! 

Download All
0 Kudos
Message 1 of 9
(5,776 Views)

Anyone who can help me?

0 Kudos
Message 2 of 9
(5,752 Views)

Hey,

 

The issue is with the copy paste approach which you should do after understanding the code.

 

Light meter will work absolutly as expected and so your code will.

 

All you need to do is passing the 'Rectangle' information/ROI of your LED in the image. (Currently it is constant as a cluster of some values).

 

YOu can use a property node of your ROI (of image indicator)instead of constant and pass ROI information drawn on the image ROI.PNG

0 Kudos
Message 3 of 9
(5,747 Views)

333.JPG

I don't understand what you mean, where do I go from here?

0 Kudos
Message 4 of 9
(5,744 Views)

Please find attached code modified with the ROI property

Draw an ROI on image indicator(frontPanel)

Edited: Your Code: Just draw ROI in image Source on your LED

 

0 Kudos
Message 5 of 9
(5,739 Views)
Solution
Accepted by topic author Intershade

444.JPG

I get this error.. Anyway I don't really want that function. I want a constant ROI. I have gotten the vi to work. 

0 Kudos
Message 6 of 9
(5,731 Views)
Great...!!
0 Kudos
Message 7 of 9
(5,728 Views)

But how do I make it so the image log created in and by the vision acquisition will be deleted after each run of the sequence? The log takes up quite a bit of memory after some runs..

0 Kudos
Message 8 of 9
(5,724 Views)
You can replace Vision Acquisition express VI with the code you had created in Test 7.vi keeping everything same.

Note: Also as I see in your code (Test 8.vi) vision assistant is used only for color plane extraction instead use the basic block available in vision pallet "IMAQ Extract Single Color Plane"

Please try it yourself .If failed then let us know
Message 9 of 9
(5,702 Views)