1 Pattern Recognition Guillaume Lemaître 22 ... - Guillaume Lemaitre

Convert BGR Image to YCrCb. Take only channel Cr. Threshold to keep the equivalence of orange color. Morphology operation : open. P rocessing. Processing ...
699KB taille 2 téléchargements 63 vues
Guillaume Lemaître

Pattern Recognition Guillaume Lemaître 22 mai 2008

1

Plan

Guillaume Lemaître

Introduction Methods Performance Plan

2

I ntroduc tio n Methods Performance Plan

Aim Technologie

Plan

Guillaume Lemaître

Introduction Methods Performance Plan

3

I ntroduc tio n Methods Performance Plan

A im Technologie

Aim

Create a system which detect different objects : Mid water target Bottom target Tyre Cone

Guillaume Lemaître

4

I ntroduc tio n Methods Performance Plan

A im Technologie

Aim

Constraints : « Real-Time » system Use minimum ressources (CPU, memory, ...)

Guillaume Lemaître

5

I ntroduc tio n Methods Performance Plan

Aim T ec hno log ie

Technologie

Use technologie : Acquisition with analog camera and card MPEG 4 Intel OpenCV (Computer Vision) librairy Programmation in C++

Guillaume Lemaître

6

Introduction M ethods Performance Plan

C o lor detec tio n Form detection Tracking object

Plan

Guillaume Lemaître

Introduction Methods Performance Plan

7

Introduction M ethods Performance Plan

C o lor detec tio n Form detection Tracking object

Color detection :

Processing : Convert BGR Image to YCrCb

Threshold to keep the equivalence of orange color

Processing

Take only channel Cr

Morphology operation : open

Guillaume Lemaître

8

Introduction M ethods Performance Plan

C o lor detec tio n Form detection Tracking object

Color detection :

Processing for mid water target : Search contours Calculate perimeter and area Calculate circularity

Decision : If circularity superior to a specific threshold Guillaume Lemaître

9

Introduction M ethods Performance Plan

Color detection Fo rm detec tion Tracking object

Form detection :

Lign Hough Transform : Each points admit an infinity of straight lines. The general equation of lines which pass by one point is : But we use the polar representation which is :

Guillaume Lemaître

10

Introduction M ethods Performance Plan

Color detection Fo rm detec tion Tracking object

Form detection :

Lign Hough Transform : Each lines is characteristic of two parameters Θ and ρ Plan of Hough :

Guillaume Lemaître

11

Introduction M ethods Performance Plan

Color detection Fo rm detec tion Tracking object

Form detection :

Lign Hough Transform :

Plan cartesien

Each point has a representation in space of Hough Plan Hough

Intersection in space of Hough represents a straight line in space cartesien

Guillaume Lemaître

12

Introduction M ethods Performance Plan

Color detection Fo rm detec tion Tracking object

Form detection :

Lign Hough Transform : Implementation of Line Hough Transform in OpenCV : CvSeq* cvHoughLines2( CvArr* image, void* line_storage, int method, double rho, double theta, int threshold, double param1=0, double param2=0 )

Rho : Distance resolution in pixel Theta : Angle resolution in pixel Threshold : Number minimum of points

Guillaume Lemaître

13

Introduction M ethods Performance Plan

Color detection Fo rm detec tion Tracking object

Form detection :

Circle Hough Transform : The general equation of circle is : The parametrics equations are :

Guillaume Lemaître

14

Introduction M ethods Performance Plan

Color detection Fo rm detec tion Tracking object

Form detection :

Circle Hough Transform :

Guillaume Lemaître

y

b

x

a

15

Introduction M ethods Performance Plan

Color detection Fo rm detec tion Tracking object

Form detection :

Circle Hough Transform : Implementation of Circles Hough Transform in OpenCV : CvSeq* cvHoughCircles( CvArr* image, void* circle_storage, int method, double dp, double min_dist, double param1=100, double param2=100 )

min-dst : minimum distance between centers param1 : threshold Canny param2 : Number minimum of points on circles

Guillaume Lemaître

16

Introduction M ethods Performance Plan

Color detection Form detection T ra c k ing objec t

Tracking Object :

Mean-shift Algorithm : Aim : Search a model in image Two stages : Initialisation : definition model Processing : search model in image

Guillaume Lemaître

17

Introduction M ethods Performance Plan

Color detection Form detection T ra c k ing objec t

Tracking Object :

Mean-shift Algorithm : Initialisation : definition model : Create a histogram with discretisation of the representation choosen (hue, saturation ...) Calculate density gradient estimation of the representation choosen Guillaume Lemaître

18

Introduction M ethods Performance Plan

Color detection Form detection T ra c k ing objec t

Tracking Object :

Mean-shift Algorithm : Initialisation : definition model : Initialisation of the current position in

Guillaume Lemaître

19

Introduction M ethods Performance Plan

Color detection Form detection T ra c k ing objec t

Tracking Object :

Mean-shift Algorithm : Iteration : search model in current image : Calculate density gradient estimation of current candidate in : Calculate the Bhattacharya distance

Guillaume Lemaître

20

Introduction M ethods Performance Plan

Color detection Form detection T ra c k ing objec t

Tracking Object :

Mean-shift Algorithm : Iteration : search model in current image : The Bhattacharya distance measures the similarity between two discrete probability which are here the density gradient estimation of model and current candidate

Guillaume Lemaître

21

Introduction M ethods Performance Plan

Color detection Form detection T ra c k ing objec t

Tracking Object :

Mean-shift Algorithm : Iteration : search model in current image : Calculate weigth vector

Calculate position of next candidate Guillaume Lemaître

22

Introduction M ethods Performance Plan

Color detection Form detection T ra c k ing objec t

Tracking Object :

Mean-shift Algorithm : Implementation of Mean-Shift in OpenCV :

int cvCamShift( const CvArr* prob_image, CvRect window, CvTermCriteria criteria, CvConnectedComp* comp, CvBox2D* box=NULL ); void cvCalcBackProject( IplImage** image, CvArr* back_project, const CvHistogram* hist );

Guillaume Lemaître

23

Introduction Methods P erfo rm a nc e Plan

Comparison

Plan

Guillaume Lemaître

Introduction Methods Performance Plan

24

Introduction Methods P erfo rm a nc e Plan

C o m pa ris on

Comparison

Guillaume Lemaître

25

Introduction Methods Performance P la n

Plan

Guillaume Lemaître

Introduction Methods Performance Plan

26

Introduction Methods Performance P la n

Plan

Application of methods to detect different objects

Guillaume Lemaître

27