360 likes | 531 Views
PAINSTAKINGLY COUNTING RICE Morphology and Object Recognition in Image Processing. Franz Parkins and Lamar Davies Mentored by: Dr. Josip Derado , Ph.D. Morphology.
E N D
PAINSTAKINGLY COUNTING RICEMorphology and Object Recognition in Image Processing Franz Parkins and Lamar Davies Mentored by: Dr. Josip Derado, Ph.D
Morphology • The term morphology refers to the form or structure of anything; hence linguistic morphology , Geomorphology, Bio-morphology, Cosmic morphology, etc.
Morphology in Industry and Research • Morphology is prolific in industry. • A wide variety of unpolished ideas lie at the forefront.
The Ultimate Goal • Our focus is on: • Detecting objects • Enumerating them
Characterization Morphological characterization for object recognition is, put simply, to decipher between the objects and their background.
The Algorithm has two main parts; CLEANING and COUNTING. Complexity of Algorithm
Cleaning Rice This step doesn’t involve a tiny broom. Metaphorically however, it is oddly appropriate, as we must somehow ‘sweep away’ all of the non-relevant data that will prevent an accurate rice count.
But Wait!!!!! It is an absolute necessity to have quality photos! This it true for two reasons: • Clarity prevents “clutter” • Standardized distance
Combined Filter Original image Strel + Contrast + Grid Filters
Combined Filter Original image Contrast + Circle + Grid Filters
How Do We Actually Count Rice? • Area Estimation • Border Following • Horizontal Layered Scanning (HLS)
Area Estimation The idea behind area estimation is simply to count the number of rice pixels in the image and then divide by the number of pixels in an average single rice grain. 2,694 pixels!!
Area Estimation • Pros: • Easily implemented • Less complex • Cons: • Reliance on average grain size (variance) • Inability to use destructive filters
Border Following The intention is to define the border and starting pixel of each rice grain, then follow each border around to the starting point, thus circling the rice grain and marking it as counted before moving on to the next.
Border-defined Image 1 2 3 4 5 6 7 8 9 10
Border Following • Pros • Very accurate and easy to filter “false” rice • Cons • Algorithm exceeds limits of Matlab unless used in conjunction with a very small image (approx 200x200 pixels). • Difficult to differentiate rice in close proximity.
Horizontal Layered Scanning HLS scans the image one row at a time while comparing to the previous row. The amount of rice scanned in each row is tracked, tallied, and counted accordingly.
Horizontal Layered Scanning [1, 0] [2, 0] [1,1] [0, 2] [1, 2] [0, 3]
Horizontal Layered Scanning • Pros • Easily implemented and accurate • Does not rely on massively looping algorithms, making it more efficient • Cons • Accuracy is greatly dependent on quality cleaning • Consecutive line errors
OVERALL ACCURACY With industry grade strel filter 95% !!!
OVERALL ACCURACY With our original circular filter 93% !!!
Progression • Given more time, we would use this program to bring about world peace, and of course count the amount of rice it takes to cure world hunger…. By hand… and then have our program tell us that we are a couple of grains short of a bushel!!
No, Seriouslygiven more time… • Refine the border program with switches. • Tracking rice centers instead of averaging counts on multiple scans. • Better recognition of multiple-rice image segments. • Reconstruction of overlapping rice.
THANK YOU FOR YOUR TIME! ANY QUESTIONS?