From 12:00 AM CDT Sunday, October 17 - 11:30 AM CDT Sunday, October 17, will be undergoing system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.


Showing results for 
Search instead for 
Did you mean: 

egg crack detection by compare Golden template

Go to solution

hi billko 

sorry i was talking about differentiate between crack and blemish .

you are right about edge detection.

now i am trying to find edge for detection of crack, i put egg in black background , but boundries of egg still confusing me how to deal with boundries of egg because bountries show alot of edges .

how i can distinguish that edge is due to boundries or crack  ? 

( i ahve also converted image into threshold and  i analysis that there are alot of dots at boundries)

0 Kudos
Message 11 of 17

LOL now you know why some things still take a human eye.  😄

(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 12 of 17
Accepted by topic author Hammad-Farooq

I would say, first detect an egg itself - binarization, bright object on dark background.

Use IMAQ particle filter to leave only correct size particle, fill holes. This will be your mask for edge detection.

Use edge detection on original image

Erode mask (Morphology VI) to reduce its size. Apply a new mask to the image with edges, then binarization and particle report will give you crack(s) with location. 

Message 13 of 17

hi ALexander 

sorry for late reply .

can you please elaborate your idea of crack detection by mentioning step number .

i will be very thankful to you 

0 Kudos
Message 14 of 17



What are you asking for with the step number? Can you give me a little more detail about what you need clarified?




Ty Prather
Technical Marketing Specialist
National Instruments
Message 15 of 17

hi tytanic

i have done some work on your idea of edge detection for finding crack on egg and also thanks to all other member who give good quality ideas which help me  to got good results ,

following is attachment of VI  and image of crack egg,. you can see it (ignor the patteren macthing part in VI ) ..

now which problem i am facing is setting the fixed threshold range whcih can be efficent range for any egg come under camra  during run time . threshold should be one that will not remove hair level crack information 

second problem is how i get good quality of image to detect hair level crack ? what should be the camera resoluton for hair level crack? and what type of unit should design which  help camera to capture image in uniform light effect?    

Download All
0 Kudos
Message 16 of 17



The image you attached was very blurry. Can you post a few different, focused images with the sorts of cracks that you're looking for?


Ty Prather
Technical Marketing Specialist
National Instruments
0 Kudos
Message 17 of 17