LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pattern matching

Hi all,
I'm sampling a led with a camera, and processing the stream of data with the Labview.
To determine whether the led is on or off, I'm using the pattern maching vi.
My problem is that the led is stationed outdoors, and hence the lighting is changing during day and night, while the template is still the same.
So, is there a way of refreshing the template every now and then, so the matching would be more accurate?
Secondly, how can I create a ROI as an interface from the panel?
Thanks a bunch,
Amir Klein.
0 Kudos
Message 1 of 5
(3,310 Views)

Hi

As I know you can use different pictures as template, not only one, so you can add to template few pictures from day and night.

bogdani

0 Kudos
Message 2 of 5
(3,299 Views)
Thank you for your comment.
This project is ment to work on different weather conditions and different light conditions,
so I can not store all the possible scenarios.
If it is still impossible to update the template on real time, how can I use several different templates?
Thanks,
Amir Klein.
0 Kudos
Message 3 of 5
(3,295 Views)
Hi Amir -

Are you using a color camera?  If so, I recommend using the Color Matching or Color Location functions instead.  These will examine the hue spectrum of your ROI, which disregards saturation and intensity changes.  This will eliminate many of the problems you'll face when trying to work under different lighting conditions. (Chapter 15 of the Vision Concepts Manual explains this advantage more fully.)

If you are using a B&W camera, I have this question:  Is the LED moving within the frame, or is its pixel location static every time?  If it does not move, then I recommend examination of the average pixel intensity in the region (with a Histogram or Histograph) instead of trying to match a specific pattern.  You'll find more success this way, since the entire average should be different between the "off" and "on" conditions.

If neither of these options seems viable, please give me more details about your setup so I can see what we can do.
David Staab, CLA
Staff Systems Engineer
National Instruments
0 Kudos
Message 4 of 5
(3,271 Views)
Hi David,
I am using a color camera, and I do think continuing through color matching is much better,
but I looked at the color matching example, and I did not understand much.
In addition, I did not find an example of color location at all.
The led is static, so if it's easier maybe I can try the averaging you suggested.
If you can adjust the existing color matching VI, or any any other,
for only 1 led it would be appreciated,
Thank you,
Amir Klein.
 
0 Kudos
Message 5 of 5
(3,245 Views)