UW-Madison ECE 533 - Properties and Utility in Leaf Classification

Unformatted text preview:

Fourier DescriptorsProperties and Utility in Leaf ClassificationECE 533 Fall 2006Tyler KarrelsFourier Descriptors: Properties and Utility for Leaf Classification2IntroductionNow that large-scale data storage is feasible due to the large capacity and low costof hard drives, huge image databases are becoming more prevalent. We need to be ableto search these databases with a textual description of the image we desire in order for alarge database to have any use. Manually entering this searchable information (meta-data) is tedious and impractical when the number of images is large. One way to quicklyextract and assign information contained in images is using Fourier descriptors torecognize shapes.Fourier descriptors are a classical method to shape recognition and they havegrown into a general method to encode various shape signatures. Previous experimentshave used Fourier descriptors to recognize different types of marine life, productdeformations, and tree leaves. I chose to implement a tree leaf identification programusing Matlab because of a personal interest in nature and a database of leaf images is easyto create. There are many unique leaf shapes such as the oak tree leaf and the maple treeleaf. These leaves are easily recognized by any one who has grown up around thesetrees. But there are also more subtle differences between leaf shapes. A red maple leafhas notched lobes; a sugar maple leaf has smooth lobes. Because a good method forshape recognition needs to detect these subtleties, leaf shapes are a great example to testthe limits of Fourier descriptor methods.The general procedure begins with a color image containing a shape that we wantto recognize. The color image is converted to a grayscale image. Then a threshold isapplied to the grayscale image converting it into a black and white (ie. binary image).The threshold is applied so that the shape is enhanced and can easily be found. The shapeFourier Descriptors: Properties and Utility for Leaf Classification3is located and its boundary is extracted. A shape signature is then used to describe theboundary. Several shape signatures exist such as the canonical complex boundarysequence or the centroid contour distance curve, which I apply here.ApproachThe database images are pictures of five different species of tree leaves and onetype of shrub. Each leaf was placed on a white sheet of paper and labeled with the leaftype and a number for identification purposes. Over 200 pictures where taken of 59different leaf samples in different orientations and places in the image. Once a databaseof leaf images was acquired, work began to extract the leaf boundary.Before any processing takes place the image size is reduced from 3 Mega-pixelsto 0.5 Mega-pixel. This speeds up all calculations by eliminating unnecessary precisionin the image. The color image is then converted to a grayscale image. An appropriategrayscale threshold is obtained by locating the largest valley in the grayscale histogram.Due to the controlled environment during image acquisition, a single threshold clearlydistinguishes the leaf and stem from the background in most cases.The resulting binary image hasa black background and the leaf andstem appear white. The image is thendilated by a small (3 pixel square)structuring element to remove anyminor tears in the leaf boundary. Thenthe six longest boundaries areFourier Descriptors: Properties and Utility for Leaf Classification4displayed, and a human must select which one is the leaf. This human interaction makesworking with a database of just over 200 images tedious and time consuming. A finalsolution must address this problem. After the leaf is identified, it is isolated by placing itin the center of a new zero-padded (black) image. Any internal holes in the leaf are thenfilled.To achieve a rotation invariant description, the stem is always used as the startingpoint. To find the stem, the leaf is eroded (10 pixel square structuring element) toremove the stem. The resulting leaf body is dilated twice (15 pixel square structuringelement) so the body grows larger than it was before erosion. This “window” issubtracted from the original leaf yielding only the stem. The stem boundary is thelongest boundary remaining. The stem is next subtracted from the original leaf image toyield just the leaf. The leaf boundary is the longest boundary remaining. Precision ispreserved since the result has not been eroded or dilated (except initially to remove tears).To find the starting point on the leaf boundary we find the closest point on thestem boundary to the leaf. To do this, the centroid of the leaf is calculated and then theclosest point to it on the stem boundary is found. This point is the closest to the body ofthe leaf. Then the point on the leaf boundary that is closest to the stem point is found.This point is the starting point of the centroid contour distance curve. This is a quick andcomputationally efficient method to find a reliable starting point.Fourier Descriptors: Properties and Utility for Leaf Classification5The leaf outline is green, stem outline red, and the centroid and starting point are marked in blue.Next the centroid contour distance curve (CCDC) and Fourier descriptors arecalculated. The boundary sequence is rotated so that the first index is the derived startingpoint. Then using the Euclidean distance metric the distance from boundary point tocentroid is calculated. Using the centroid as a frame of reference for our calculationgives us a translation invariant description. The first 64 coefficients of the Fouriertransform of the CCDC are the resulting Fourier descriptors. These remainingcoefficients are scaled to the interval [0, 1] by the first coefficient. This makes theFourier descriptors scale invariant.To recognize a leaf the above procedure is followed to obtain the Fourierdescriptors (FDs) of the leaf in question. A set of the FDs for the known leaf types areFourier Descriptors: Properties and Utility for Leaf Classification6created by averaging the FDs of leaf images in which the leaf and stem were correctlylocated. To save processing time a database of the Fourier Descriptors for each type ofleaf was constructed using file I/O and comma-delimited files. The


View Full Document

UW-Madison ECE 533 - Properties and Utility in Leaf Classification

Documents in this Course
Load more
Download Properties and Utility in Leaf Classification
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Properties and Utility in Leaf Classification and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Properties and Utility in Leaf Classification 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?