18
Ron Cohen Ramy Ben-Aroya Ben-Gurion University ICBV 2009 Final Project

Ron Cohen Ramy Ben-Aroya Ben-Gurion University ICBV 2009 Final Project

Embed Size (px)

Citation preview

Page 1: Ron Cohen Ramy Ben-Aroya Ben-Gurion University ICBV 2009 Final Project

Ron Cohen Ramy Ben-Aroya

Ben-Gurion University

ICBV 2009 Final Project

Page 2: Ron Cohen Ramy Ben-Aroya Ben-Gurion University ICBV 2009 Final Project

Grape Detection in Vineyards is a very complex problem. As far as we know its an unsolved problem till these days.

There are some different ways to try deal with this problem.

Page 3: Ron Cohen Ramy Ben-Aroya Ben-Gurion University ICBV 2009 Final Project

We chose to hybrid two different techniques The first one is a statistic filtering,

which take measures from the picture’s gradient and compares measures we gathered from grapes images only.

The second way is partial circles detection, which tries to determine if a pixel is the center of a partial circle with fixed radius.

Page 4: Ron Cohen Ramy Ben-Aroya Ben-Gurion University ICBV 2009 Final Project

During the course we learned about the gradient and it’s power, which can tell us a lot about the edges in the pictures.

Our filter components are:Measuring the average gray scale of all

the pixels of the picture.Filtering windows that their average gray

scale is much greater from the whole image average.

Statistic Filtering

Page 5: Ron Cohen Ramy Ben-Aroya Ben-Gurion University ICBV 2009 Final Project

Measuring the average gradient magnitude of dark and bright grape’s picture (only grapes from different pictures).

Mapping dark and bright areas in the image

Filtering windows that their average gradient magnitude is far from the measure we gathered .

Page 6: Ron Cohen Ramy Ben-Aroya Ben-Gurion University ICBV 2009 Final Project

As you can see in a bright picture below:

ContCont’’

Page 7: Ron Cohen Ramy Ben-Aroya Ben-Gurion University ICBV 2009 Final Project

And in a darker picture below:

ContCont’’

Page 8: Ron Cohen Ramy Ben-Aroya Ben-Gurion University ICBV 2009 Final Project

Cont’

Here we can see the final rough filtering

Page 9: Ron Cohen Ramy Ben-Aroya Ben-Gurion University ICBV 2009 Final Project

Edge Detection We used Canny’s edge detector We thought how to overcome the threshold

values problem. A pair of threshold can get reliable results

when applied on a certain picture, while on another picture it could be a disaster.

We found that applying Canny’s ED on small parts of the image and then combining the result to one image can yield averagely better results.

Page 10: Ron Cohen Ramy Ben-Aroya Ben-Gurion University ICBV 2009 Final Project

Cont’

Here you can see the different:Canny's results with no window partitioning Canny's results with window 100x100 partitioning

Page 11: Ron Cohen Ramy Ben-Aroya Ben-Gurion University ICBV 2009 Final Project

Partial Circles Detection

After getting edge elements we can scan the edge map for partial circles.

Our method is basically looking for pixels that are surrounded by edge pixels with a fixed distance (radius).

Page 12: Ron Cohen Ramy Ben-Aroya Ben-Gurion University ICBV 2009 Final Project

Cont’

The pseudo-code of the pixel p checking is: radiuses vector of fixed radius sum vector at the size 1x length(radiuses) sum(i) sum of the pixels with distance radiuses(i) from

p avgs vector at the size 1x length(radiuses) avgs(i) sum(i)/6/radiuses(i) maxAvg, maxAvgIndex max(avgs) if maxAvg > fixedRatio* then mark p as a center with

the corresponding radius : radiuses(maxAvgIndex)

*fixed ratio – the minimum part of a circle

Page 13: Ron Cohen Ramy Ben-Aroya Ben-Gurion University ICBV 2009 Final Project

Cont’

We can see the results when looking for partial circle in the next image:

10 pixels Radius Found Centers

10 pixel radius quarter circle Found Centers

Page 14: Ron Cohen Ramy Ben-Aroya Ben-Gurion University ICBV 2009 Final Project

Here we can see the application of the method on the image

Page 15: Ron Cohen Ramy Ben-Aroya Ben-Gurion University ICBV 2009 Final Project

Cont’

Now all we need to do is to look for centers only in the filtered areas.

After getting the centers we color around the center by their corresponding radius.

Page 16: Ron Cohen Ramy Ben-Aroya Ben-Gurion University ICBV 2009 Final Project

Final Results

Original ImageDetected Grapes

Page 17: Ron Cohen Ramy Ben-Aroya Ben-Gurion University ICBV 2009 Final Project

Building a dictionary which hold a set of measures of different types of grapes, stems, leaves etch’.

Detecting branches as linear lines and trying to detect grapes on areas close to the lines

Detection by texture segmentation.Adjust the measures to specific conditions

like lightning and sun position and even grapes age, which can indicate grape radius

Ideas for further research:

Page 18: Ron Cohen Ramy Ben-Aroya Ben-Gurion University ICBV 2009 Final Project

One method can never suit for every image. Therefore several methods must be combined

Circles identification is an efficient method for detecting grapes in vineyard.

Lighting conditions are critical for accurate identification and can be a major obstacle. Predicting these conditions like sun position and image brightness analysis can get better results.