Grape Detection in Vineyards Ishay Levi Eran Brill

21
Grape Detection in Vineyards Ishay Levi Eran Brill

description

Grape Detection in Vineyards Ishay Levi Eran Brill. Introduction. - PowerPoint PPT Presentation

Transcript of Grape Detection in Vineyards Ishay Levi Eran Brill

Page 1: Grape Detection in Vineyards  Ishay  Levi Eran  Brill

Grape Detection in Vineyards

Ishay LeviEran Brill

Page 2: Grape Detection in Vineyards  Ishay  Levi Eran  Brill

Introduction

In our work we characterized areas that are likely to contain grapes as well as areas which don't. We characterized areas based on both statistic information we gathered from the database, and according to the shape their edges create.

Page 3: Grape Detection in Vineyards  Ishay  Levi Eran  Brill

Statistic analysis

The information was analyzed based not on a specific pixel but on a selected window, we examine:

• Gradient size• RGB values• General brightness

Page 4: Grape Detection in Vineyards  Ishay  Levi Eran  Brill

Statistic analysis - finding

Areas that contain grapes have:• High, but not an extreme, gradient magnitude• Average brightness• Round edges

Areas that don’t contain grapes have:• Extreme gradient values• Extreme brightness values • Non green RGB values

Page 5: Grape Detection in Vineyards  Ishay  Levi Eran  Brill

Gradient

Grapes have gradient magnitude between 2 and 35 .

Average gradient = 1.8

Average gradient = 7.4

Average gradient = 0.9

Page 6: Grape Detection in Vineyards  Ishay  Levi Eran  Brill

RGB values

Generally in a green pixel G>R G>BR =168 G =74 B =69

R =120 G =122 B =100

R =63 G =49 B =79

R =253 G =253 B =253

Page 7: Grape Detection in Vineyards  Ishay  Levi Eran  Brill

Shape recognition

After cleaning most non- grape section using image statistical analysis.Second phase: cleaning using shape recognition.

As grape areas contain mainly two shapes:Circles and ellipses.

Will use a method learned during the course for shape recognition.

Page 8: Grape Detection in Vineyards  Ishay  Levi Eran  Brill

Using Hough transform

A very short reminder:

Using Hough for detecting circles

Page 9: Grape Detection in Vineyards  Ishay  Levi Eran  Brill

Using Hough transform

Brief description of usage:1. edge detection2. Counting each edge point as an edge of a circle (using a pre

fixed limits for radius, and all angles).3. Finding for each circle center its most used radius.4. For each found circle (that passes a certain limit of edge

pointers), report all edge points in the picture that defines its edge.

5. Return only the reported edges from previous section.

Page 10: Grape Detection in Vineyards  Ishay  Levi Eran  Brill

Hough transform – some examples

A simple input:

sample edge map using Hough

Page 11: Grape Detection in Vineyards  Ishay  Levi Eran  Brill

Hough transform – some examples

• A real Grape area

Sample edge detection using Hough

Page 12: Grape Detection in Vineyards  Ishay  Levi Eran  Brill

Final Results

Page 13: Grape Detection in Vineyards  Ishay  Levi Eran  Brill

Brightness filter

Page 14: Grape Detection in Vineyards  Ishay  Levi Eran  Brill

Gradient + RGB filter

Page 15: Grape Detection in Vineyards  Ishay  Levi Eran  Brill

Edge detection

Page 16: Grape Detection in Vineyards  Ishay  Levi Eran  Brill

Using Hough to remove edges

Page 17: Grape Detection in Vineyards  Ishay  Levi Eran  Brill

Final result

Page 18: Grape Detection in Vineyards  Ishay  Levi Eran  Brill

Result image

Page 19: Grape Detection in Vineyards  Ishay  Levi Eran  Brill

Correcting errors

Errors can accrue- i.e. a grape can have a small brown pixel.

Reducing and correcting errors:• using a window instead of single pixel.• Using correcting function (finding “remains”

and deleting them, filling small “holes” in grape area and with original picture.

Page 20: Grape Detection in Vineyards  Ishay  Levi Eran  Brill

conclusion

• Using correct statistical analysis removes high percentage of non- grape areas. Most grape areas are left untouched.

• As getting the correct values for the variables of this usage. Big database of samples is required

• This information can be adjusted to suit specific conditions: season, time in day, type and age of grapes – improving the analysis and results!

Page 21: Grape Detection in Vineyards  Ishay  Levi Eran  Brill

conclusion

• Using Hough transform improves results but cannot “stand alone”, Many areas in the images contain many circular-like shapes.

• In addition, its success relays on good edge detection, and correct radiuses input (as checking a large range cost running time, and not may causes errors).

• As in previous part, a good pre- analysis proves is the key for success.