Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get accurate reuslt in Pattern matching

Hello all,

    I'm new to NI and currently doing image processing in VBAI using NI smart camera (NI1742) for the last one month.

 

 My aim is find a pattern (circle) printed in carton box. I tried with both pattern matching and geometric matching of VBAI. But the repeatable to find the pattern for continues image from the camera is not that much accurate.

 

            When I reduce the score level below 750, the pattern got detected in wrong position, please find the attachment.

Can any one give suggestion how to avoid this error detection to get more accurate result and how to improve the lighting.

 

For Reference - I’m using smart camera NI1742 with Red ring light and working in Vision builder
With Thanks & regards Vijayakumar N
Download All
0 Kudos
Message 1 of 10
(5,021 Views)
The image illumination is pretty dull. Can this be improved? What is the template that you have defined. Is it just the star that you want to identify?
Message Edited by muks on 03-08-2010 03:30 PM
0 Kudos
Message 2 of 10
(5,014 Views)
I have tried some gamma correction and this template should work fine. Check it and get back.
Download All
0 Kudos
Message 3 of 10
(5,011 Views)

Thanks you Muks for the reply,

 

 

 I have only Vision builder sofftware. Can you tell me how to implement the labview code in this. 

With Thanks & regards Vijayakumar N
0 Kudos
Message 4 of 10
(5,008 Views)
My point was to suggest a increase in the brightness of the image and then define the template so that you have a better consistency. You can do that by varying the exposure time in max or do the brightness correction in vba
Message Edited by muks on 03-08-2010 04:12 PM
0 Kudos
Message 5 of 10
(5,006 Views)
Thanks I'll try and get back you
With Thanks & regards Vijayakumar N
0 Kudos
Message 6 of 10
(5,002 Views)

Dear Mr Vijatkumar,

 

Muks is right. The image is pretty dull. You need to do some image correction before proceeding to pattern matching or geomatric matching (specially for pattern matching). The calculations done to preform pattern matching directly work on the intensity values for the pixel. Higher the contrast, more stable the results. Geometric matching would be more suitable for your application. Even more suitable (as per my opinion) is circular detection or detect object functions in LabVIEW since your background is pretty clear. Also these steps are far less time consuming.

 

Regards,

Shivam Awasthi

0 Kudos
Message 7 of 10
(4,944 Views)

Dear Shivam

 

I can accept both the suggestion given by you and muks. There are two reason why I chosen pattern matching rather than geometric path

 

1. The Position and lighting of the setup is going to be static for the entire project.

2. The carton has text printing on other two sides and while running in conveyor, it can come on any four directions / rotation (The circle symbol is printed in all direction). When I tried with geometric matching unwanted objects are getting detected on the printed side. Because of this I am gone with pattern matching.

 

      I have one more question. For the pervious attached image I have kept the camera parameter - Exposure time as 9.532 and gain as 60.

 

    While running the conveyor at high speed, the image taken by camera gets blurred. For this I retried to reduce the exposure time, the image was very dull in such a way I not unable see any data on it.Is there any other parameter for camera to get brighter image with less exposure time?

With Thanks & regards Vijayakumar N
0 Kudos
Message 8 of 10
(4,916 Views)

Vijaykr wrote:

Dear Shivam

 

I can accept both the suggestion given by you and muks. There are two reason why I chosen pattern matching rather than geometric path

 

1. The Position and lighting of the setup is going to be static for the entire project.

2. The carton has text printing on other two sides and while running in conveyor, it can come on any four directions / rotation (The circle symbol is printed in all direction). When I tried with geometric matching unwanted objects are getting detected on the printed side. Because of this I am gone with pattern matching.

 

      I have one more question. For the pervious attached image I have kept the camera parameter - Exposure time as 9.532 and gain as 60.

 

    While running the conveyor at high speed, the image taken by camera gets blurred. For this I retried to reduce the exposure time, the image was very dull in such a way I not unable see any data on it.Is there any other parameter for camera to get brighter image with less exposure time?


These are the constraints for any machine vision project. You have to bring a balance between the exposure time and the lighting illumination. If the you feel you cannot vary any mmore of the shutter speed then increase your illumination. Now if you feel the illumination required is a bit high. Try high intesity led lights and strobe them if required. Do gamma corerction only if you are not able to do the above. I dont think the image is complicated here and repeatability can be got easily using either gepmetric matching or pattern matching is not going to make any major difference.
0 Kudos
Message 9 of 10
(4,913 Views)

What about using a a linescan camera? This will give decent images of moving objects. Blurring will be a problem at higher exposures with an area scan camera.  If speed is constant you won't need an encoder to trigger the linescan camera. Basler do a range of good linescan cameras, e2v are bringing out a new low cost linescan camera in April - cost around £1K for a gigE 2K pixels.

 

Simon

0 Kudos
Message 10 of 10
(4,883 Views)