fourier descriptors for shape recognition

15
Fourier Descriptors For Shape Recognition Applied to Tree Leaf Identification By Tyler Karrels

Upload: mariam-holder

Post on 31-Dec-2015

286 views

Category:

Documents


20 download

DESCRIPTION

Fourier Descriptors For Shape Recognition. Applied to Tree Leaf Identification By Tyler Karrels. Motivation. Shape recognition can be useful any time we want to detect a distinct shape. Seek one description that can characterize all shapes to a desired accuracy. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Fourier Descriptors  For Shape Recognition

Fourier Descriptors For Shape Recognition

Applied to Tree Leaf Identification

By Tyler Karrels

Page 2: Fourier Descriptors  For Shape Recognition

Motivation

• Shape recognition can be useful any time we want to detect a distinct shape.

• Seek one description that can characterize all shapes to a desired accuracy.

• The Fourier coefficients have this property. We can approximate with the first M coef.

• The goal is automatic tree identification.

Page 3: Fourier Descriptors  For Shape Recognition

Different Leaf Shapes

FDs is not a good technique for identifying compound leaves.

Page 4: Fourier Descriptors  For Shape Recognition

Preparation

• Needed a database of leaves.

• Collected leaves from 6 species.

• Took over 200 pictures of various orientations.

QuickTime™ and aTIFF (LZW) decompressor

are needed to see this picture.

Page 5: Fourier Descriptors  For Shape Recognition

Theory

• Scale Invariant

- A big square and a small square should both be classified as squares.

• Shift Invariant- Where the square exists in an image should not affect performance.

• Rotation Invariant

- Any rotated version of the square should be recognized.

• And it should work!

Imagine a picture with a square in it.A useful shape representation should be…

The Centroid Contour Distance Curve (CCDC) can satisfy these.

Page 6: Fourier Descriptors  For Shape Recognition

Method

1. Reduce the resolution by a factor of 6 - original is 3 Mega pixels, now 0.5 Mega pixels- increases speed of future calculations

2. Convert original image to grayscale image.

(Black Cherry Tree Leaf)

QuickTime™ and aTIFF (LZW) decompressor

are needed to see this picture.

QuickTime™ and aTIFF (LZW) decompressor

are needed to see this picture.

Page 7: Fourier Descriptors  For Shape Recognition

3. Calculate an appropriate grayscale threshold.

4. Threshold to produce a binary image.

QuickTime™ and aTIFF (LZW) decompressor

are needed to see this picture.

QuickTime™ and aTIFF (LZW) decompressor

are needed to see this picture.

threshold

Page 8: Fourier Descriptors  For Shape Recognition

5. Find and label 6 longest boundaries in the image. At this point, the user must select the leaf’s boundary.

Once the database is completed, eccentricity canhelp detect the leaf correctly.

Page 9: Fourier Descriptors  For Shape Recognition

6. Fill in any interior holes in the leaf.

7. Remove stem by erosion with a square of size 10x10 pixels.

After the leaf is identified it is extracted from the larger image with some additional zero padding.

QuickTime™ and aTIFF (LZW) decompressor

are needed to see this picture.

QuickTime™ and aTIFF (LZW) decompressor

are needed to see this picture.

Page 10: Fourier Descriptors  For Shape Recognition

8. Dilate a few times by 15 pixel square to enlarge the image of the leaf with no stem

Next create a window to overlay on leaf image to extract the stem.

• The goal is to create an area larger than the leafs area so we can subtract the images.

• Notice that we cannot reconstruct the sharp points of the leaf.

QuickTime™ and aTIFF (LZW) decompressor

are needed to see this picture.

Original Leaf

QuickTime™ and aTIFF (LZW) decompressor

are needed to see this picture.

Page 11: Fourier Descriptors  For Shape Recognition

9. Select the area with longest boundary. This should be the leafs stem.

The set difference is taken and the resulting image is again thresholded to convert back to binary image (removes -1 entries).

• The point on the stem closest to the leaf body will be the starting point of the boundary sequence.

Extracted Stem (enlarged)

QuickTime™ and aTIFF (LZW) decompressor

are needed to see this picture.

QuickTime™ and aTIFF (LZW) decompressorare needed to see this picture.

Page 12: Fourier Descriptors  For Shape Recognition

QuickTime™ and aTIFF (LZW) decompressor

are needed to see this picture.

10. Calculate centroid.

Starting Point

Centroid

• Assuming a stem is present this method should accurately reproduce the same starting point on different leaves giving us a rotation invariant representation.

Page 13: Fourier Descriptors  For Shape Recognition

QuickTime™ and aTIFF (LZW) decompressor

are needed to see this picture.

11. Calculate the Centroid Contour Distance Curve (CCDC) in the clockwise direction, beginning at the derived starting point.

Centroid

Page 14: Fourier Descriptors  For Shape Recognition

What’s Next?

• Take the Discrete Fourier Transform using the FFT.

• Normalize the transform to [0,1] for a scale invariant representation.

• Approximate with a reasonable amount of accuracy.

• Store results in a database for use later in comparing and classify a leaf.

• Distance function between database entry and unidentified leaf will be calculated with Time-Warp Distance and/or CCDC, angle code histogram, and eccentricity.

Page 15: Fourier Descriptors  For Shape Recognition

Thank You For Your Attention!