Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

BGA ball damage detection-center of mass related enquiry

 

Hi everyone,

we are doing BGA ball damage detection by using NI machine vision technology. 500M pixel mono camera with PCIe-8255R 1394 frame grabber. some damage ball as attached binary image shows. we can see in good ball, normally black area located in the center of the ball, but for damage ball, black area shifted away from the center of the ball. so we can base on the black area located in the center or not to determine the ball is damaged or not. the question is how to achieve it in algorithms ? I have searched the forum regarding the center of mass in particle analysis related topics. But can not find a solution for me to differentiate the good ball and damage ball as I attached here.

even I get center of mass x and y coordinate of each ball, but how to use it to determine the center of mass is shifted away from the center of ball. 

 

may I know who can help and give some advice?  thanks a lot.

Ball damage.JPG

0 Kudos
Message 1 of 6
(3,329 Views)

My initial thoughts:

 

Locate each ball by binary threshold.  Use Fill Holes to make each ball solid, and find the centroid of the ball in the binary image.

 

Next, use the binary image to mask the original image.  Invert the grayscale image and find the centroid of the masked image of the ball.

 

Good balls should match the binary centroid very well.  Defect balls should have significantly different centroids.

 

Bruce

Bruce Ammons
Ammons Engineering
Message 2 of 6
(3,325 Views)

Hi Bruce,thanks for your reply and ideas. I still not very clear about it:

1) in your reply: "use the binary image to mask the original image." the binary image refer to the binary image before fill hole or the image after fill hole? what's the purpose for this step,  can you eleberate more about it. it use IMAQ mask vi to achieve it,right?

2) for fill hole, I encountered problem, I found after fill hole, the whole binary image changed to black, no balls appears. why?

3)binary centroid refer to center of mass x and center of mass y, compare centroid is to compare these x and y values, right?

 

which VIs will be used in the process? any examples for reference? thanks a lot.

 

0 Kudos
Message 3 of 6
(3,299 Views)

I didn't work out all the details.  The binary image is intended to provide the shape of the balls regardless of defects.  I am guessing when you use fill holes it is reducing all the values to either zero or one.  Try using a binary palette to view the image.

 

I would use the binary image after fill holes.

 

Yes, compare the x and y values.  I would calculate the distance between the two points.

 

You might need to use IMAQ Label to make each item in the binary mask unique.  After Label, it may be possible to use IMAQ Quantify on the grayscale image while using the Label image as the mask.  I'm not sure if centroid is included in the Quantify outputs.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 4 of 6
(3,296 Views)

Hi there

if we look the good and the bad, most of the time the bad have two holes, this could be a criterion for filtering after thresholding

Moreover, if you compute the ratio of particles area and hole's area, this should be different for good and bad samples.

You can add this to Bruce comments and should get what you expect, good and bad balls

Keep an "tracking"

PierreS

0 Kudos
Message 5 of 6
(3,269 Views)

Sorry for late update. actually I was stuck on other related matters to cause the algorithm evaluation for this kind of damage ball detection was on hold, it should be next week I can try Bruce's solutions. thanks again for all of your kindness and good ideas. 

0 Kudos
Message 6 of 6
(3,259 Views)