LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

egg crack detection by compare Golden template

Solved!
Go to solution

Hello friends 

i am trying to find crack on egg by using compare  Golden template . i creat a template of normal (not cracked) egg, then compare it with egg capture at real time using web cam .

when i capture template image,save it , and then capture the same egg for crack detection without changing its position (position is same for template) , program is working well ,give expected results.

problem is if egg (under inspection) is not place  at same position as template was , vi consider it cracked egg whether egg is  crack or not .

Hoe i can solve this problem ?

following is attchement of VI 

0 Kudos
Message 1 of 17
(3,893 Views)

HI Hammad,

 

With the Golden Template, it's looking to match each pixel in the image (within a tolerance). This probably isn't the best solution since eggs could be different sizes and shapes. In any case, you will definitely want to perform some sort of match on the object so that you can create a coordinate space and align the image. (This would have to be done even if you were reading identical objects to make sure they are aligned exactly right to compare pixel-to-pixel)

 

I would look into potentially using an Edge Detection Algorithm instead and checking for edges once you've located the egg. Finding edges in the egg should give you a better idea if the egg is broken.

Ty Prather
Technical Marketing Specialist
National Instruments
Message 2 of 17
(3,817 Views)

HI Tytanic

your advice is well, i appriciate it, i understand know that edge detection is good way to detect crack ,

but i have question how i can find the boundry of egg as its a elliptical shape?

i can locate the egg by using patteren matching technique but this just give me the center position of egg and its angle , what to do for boundries ,

i think to know boundry location is necessary because bountry should not part of area for edge detection.

whats your opinon?  

0 Kudos
Message 3 of 17
(3,805 Views)

Hi , i have simple solution for your Problem , all you have to use ROI (rigion of interest) for the selection of your desired area and then matching the image

0 Kudos
Message 4 of 17
(3,775 Views)

I wonder how you would differentiate a crack from a blemish?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 5 of 17
(3,769 Views)

your point of view may be different

I did work on that to image dectection in particular region

0 Kudos
Message 6 of 17
(3,761 Views)

@afarhan7 wrote:

your point of view may be different

I did work on that to image dectection in particular region


Maybe you can have the egg lit evenly - e.g., a light box - and then check a rectangular ROI a little bigger than the egg?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 7 of 17
(3,751 Views)

RIO  i think just help in finding where the edd ki located , its not help in "Golden template compare" it compare pixel to pixel, if egg is still displace even in RIO area then how respective pixel  be same intensity  ?

 

0 Kudos
Message 8 of 17
(3,726 Views)

hi billko 

its difficult to differentiat both in vision . 

0 Kudos
Message 9 of 17
(3,721 Views)

@Hammad-Farooq wrote:

hi billko 

its difficult to differentiat both in vision . 


I'm sorry, I have no idea what you mean.  What "both" are you talking about?  I was thinking of putting the egg against a white(ish) background and use edge detection to find any cracks?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 10 of 17
(3,712 Views)