11-01-2016 05:26 AM
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
Solved! Go to Solution.
11-02-2016 10:49 AM
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.
11-02-2016 11:18 AM
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?
11-03-2016 07:59 AM
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
11-03-2016 08:11 AM
I wonder how you would differentiate a crack from a blemish?
11-03-2016 08:23 AM
your point of view may be different
I did work on that to image dectection in particular region
11-03-2016 08:36 AM
@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?
11-03-2016 10:44 AM
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 ?
11-03-2016 10:50 AM
hi billko
its difficult to differentiat both in vision .
11-03-2016 11:03 AM
@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?