From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
07-27-2019 03:02 AM
I have to make a program that can count number of screws on the picture (Image-00.jpg). It can be up to 150 screws and could be different types. I found an example ("Match Multiple Geometric Patterns.vi") that looks like what I need, but I have to use different settings for different mix of screws and it counts wrong from time to time...
Also, it cannot separate 2 similar types (attached picture "1563977562357 (converted).jpg"). Have anybody such experience or ideas?
07-27-2019 11:41 AM
@NPalesund wrote:
Also, it cannot separate 2 similar types (attached picture "1563977562357 (converted).jpg"). Have anybody such experience or ideas?
Well, I obviously can't help because when I look at this picture, I also can't separate two similar types -- I see 11 screws that all look the same (except, of course, for orientation).
LabVIEW's Vision routines are some of the most challenging and least documented parts of LabVIEW. I hope you have several years of LabVIEW experience to tackle such problems.
Bob Schor
07-27-2019 11:51 AM
It's different diameters - 2.4 and 2.7 mm
But on the Image-00.jpg all screws are the same and still I have the same problems to count
07-27-2019 01:35 PM
OK, I need new glasses ...
BS
07-27-2019 05:28 PM
We need a better description of the problem.
"It counts wrong from time to time". How is is wrong? Does it count too many, not enough, none?
When using the same picture, is it right sometimes and wrong other times?
Are these examples of problem pictures or examples of typical good pictures?
150 screws, what does that picture look like?
How can we debug a VI that you didn't attach? (And a picture of code is not very debug-able either.)
07-28-2019 01:39 AM
Ok, I'll prepare several pictures and VI example on the next week.
07-29-2019 06:53 AM
Rule 1 in Vision is to ensuring a good image.
Right now, the lightning is 'not optimal'. Note that shadows overlap the objects, making the background as dark as values of the objects.
Try backlighting, or at least diffuse lightning. Your shadows are overlapping. That will confuse most algorithms.
You can consider a colored background, and a color camera. That would make it easier to separate the objects from the foreground.
Patter matching might not work very well with directional lightning, as the orientation of the object changes it's looks. A simple object labeling, and then an object analysis might work, but you'd have to do the classification yourself, based on the measurements.
07-29-2019 06:56 AM - edited 07-29-2019 06:58 AM
Also, as metal reflections are circularly polarized, a polaroid filter will remove the specular highlights. That will greatly enhance your contrast.
If a commercial circular filter is too expensive (the are), use 3D movie theater glasses. They are CW and CCW circular filters (don't use both ).