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

Post on 31-Dec-2015

218 views 0 download

Tags:

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

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.

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.

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

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 .

As you can see in a bright picture below:

ContCont’’

And in a darker picture below:

ContCont’’

Cont’

Here we can see the final rough filtering

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.

Cont’

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

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).

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

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

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

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.

Final Results

Original ImageDetected Grapes

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:

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.