Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to detect screws with IMAQ

 
       Hi  All.
 
         I'm in trouble....  I have my application running on the production line,   We manufacture radios.  I'm checkhing the 4 sides of the
    unit.
 
         REAR:    Screws and connectors......
         LEFT BRACKET:   Screws and some holes......
         RIGHT BRACKET:  Srews and some holes......
         FRONT:  Buttons/Legends......
 
         I'm having a big issue to dectect the screws on the unit.  What I have is not working well, sometimes is good and other bad.  Also
    even a radio with no screws pass the inspection.
 
         Does anyone has done something similar?
 
        I'll really appreciate your coments.....
        Best Regards.
 
         Rlima
         Test Software Development Engineer
           
 
       
Ing. Reynaldo Lima Villarreal
Ingenieria Electronica (I N G E L)
Reynosa, Tamps. México

Cel: +52 899 160-52-59
Email: reynaldolima@aol.com
0 Kudos
Message 1 of 21
(5,581 Views)

Can you post images of the problem areas, it may be as simple as optimizing the lighting. If you can post your code, that may help others assist too.

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 2 of 21
(5,580 Views)

  Hi Analogkit....

      Thanks for you interest.

       Attach you will find some of my code that I have been trying.  It works but not for the screws.  I also will include  my images so you can have a better idea of what I'm talking...

       Thanks

       

 

   

 

 

Ing. Reynaldo Lima Villarreal
Ingenieria Electronica (I N G E L)
Reynosa, Tamps. México

Cel: +52 899 160-52-59
Email: reynaldolima@aol.com
0 Kudos
Message 3 of 21
(5,577 Views)
 
 
           Here are 3 of my code.  will send pic next
Ing. Reynaldo Lima Villarreal
Ingenieria Electronica (I N G E L)
Reynosa, Tamps. México

Cel: +52 899 160-52-59
Email: reynaldolima@aol.com
0 Kudos
Message 4 of 21
(5,576 Views)

 

  Hi are the pic samples

    

Ing. Reynaldo Lima Villarreal
Ingenieria Electronica (I N G E L)
Reynosa, Tamps. México

Cel: +52 899 160-52-59
Email: reynaldolima@aol.com
0 Kudos
Message 5 of 21
(5,574 Views)

Hi Rlima:

Unfortunately I no longer have IMAQ functions on my PC so I can't run the code, but it looks like most of the screws are nice and bright compared to the surrounding sheet metal when they are present. Is there addisitonal lighting you can add to make the remainder of the screws glint. I am not sure what screws you need to detect- all of them?

I would approach the task by setting up a coordinate system based off of clean edges of the radio or support fixture and then do a region of interest around where you expect the screws to be within the coordinate system. Set a threshold intensity on that region- if screws are present their higher brightness in intensity would indicate they are there. If intensiry is below the threshold they they would be detected as not present.

I hope this helps

Message Edited by AnalogKid2DigitalMan on 08-22-2006 12:28 PM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 6 of 21
(5,564 Views)

 

       Thanks Analogkit.

        I really appreciate your comments,  You're right I want to check all  the screws in the radio,  You just gave me a very good idea to use the treshold to detect the screws.  I will try,  It's there a  vi to get a treshold, I guess i will need to dive into LabVIEW help to find it.

        I will follow this direction.

        Best Regards   Rlima

Ing. Reynaldo Lima Villarreal
Ingenieria Electronica (I N G E L)
Reynosa, Tamps. México

Cel: +52 899 160-52-59
Email: reynaldolima@aol.com
0 Kudos
Message 7 of 21
(5,556 Views)

  Thanks Analogkit..

     I can detect the screws using threshold tool,  thanks for your advise. It was't hard to do it. its the first time  i use a treshold.

    Rlima

   

Ing. Reynaldo Lima Villarreal
Ingenieria Electronica (I N G E L)
Reynosa, Tamps. México

Cel: +52 899 160-52-59
Email: reynaldolima@aol.com
0 Kudos
Message 8 of 21
(5,534 Views)

     Hi all in the forum...

     I'm doing some improvements to my current vision systems to be able to detect the screws on the radio sides,  I had try some before

     but had no good solution,,  Now I'm just starting again,  so far I'm trying to detect the screws for presence meassuring intensity, but I

     don't have  enought range to put some limits I have very close values when screw is presence and not.   Could some one have any

     suggestion..  see  what I have on the vi..  also I include the two pictures.. (the pictures are taken in the equipment with some light

     conditions, it works fine for  pattern match and color match..

 

     I'm using  LabVIEW 7.1

 

     Best Regards.

     Reynaldo Lima V.

     

 

      

 

    

Ing. Reynaldo Lima Villarreal
Ingenieria Electronica (I N G E L)
Reynosa, Tamps. México

Cel: +52 899 160-52-59
Email: reynaldolima@aol.com
0 Kudos
Message 9 of 21
(4,809 Views)

Dear Lima,

 

I would suggest:

1. Use only gray level images.

2. Your screws in the image are constantly over exposed (saturated). You need to adjust your auto exposure algorithm.

3. The illumination that you use is not even on all the image. Try to do better even illumination.

4. When you get the first 3 correct a simple pattern matching should do the job.

 

Regards - Amit,

 

 

Amit Shachaf
Message 10 of 21
(4,764 Views)