1.0K views

Uploaded by pi194043

Feature Detection - Overview of Harris Corner Feature Detector ,implementation details and opencv ccode

save

You are on page 1of 9

Pi19404

February 23, 2013

Contents

Contents

Feature Detection - Harris Corner Detector 3

0.1 Introduction . . . . . . . . . 0.2 Feature Detection . . . . 0.3 Morvec Corner Detector 0.4 Corner Filtering . . . . . . 0.5 Implementation . . . . . . . . 0.6 Code . . . . . . . . . . . . . . References . . . . . . . . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

3 3 3 7 7 8 9

2 | 9

0.1 Introduction

In this article we will look at the implementation of of a feature detection technique called Harris Corner Detector by Chris Harris and Mike Stephens

The aim of feature detection is to identify point in the image that correpond to object in motion that can be tracked in adjacent image frames reliably. It is also required the feature be as sparse as possible to reduce the computational requirement and enable us to achieve real time tracking. Potential candidates for good feature are edge pixels. A subset of edge pixels are choosen as feature as seen in good feature to track feature detector where the edges were filtered based on criteria that minimum eigen value is greater than a specific threshold. Thus in generic terms first stage of feature detection corresponds to edge filtering. The edge maps consits of connected of linked edges and juntion or corners where edge orientation changes by large ammount.

Moravecs corner detector functions by considering a local window in the image.

3 | 9

Feature Detection - Harris Corner Detector Now the window is shifted by small ammount and average change in intensity are analysed by shifting the window by small ammount in different directions. If the windowed patch has approximately constant intensity then all shifts will result in small change in average intensity. If the window consists of edge then shifts along the edge will produce small change while shifts perpendicular to edge will produce a large change, If the windowed patch consits of a corner or isolated point then all shifts will result in large change.

E (x; y ) =

jI (x + u; y + v) I (u; v)j

(1)

x,y is the shift in x and y direction and u,v is pixels within the window. The set of sifts analysed are (0; 1); (1; 1); (0; 1); (1; 1). Thus expression computes the sum of derivatives in horizontal and vertical directions of a small patch centered at (u; v ). If the minimum value of E (x; y ) is above a threshold we mark the pixel (u; v ) are desired corner. This implies that if the magnitude of derivative along vertical and horizontal direction are above a certain threshold it is marked as desired corner. Such a point corresponds to isolated pixel or corner.

4 | 9

@I @x

+ y @y

@I

P( P( P(

u;v )

jx

@I @x

+ y @y

@I

u;v )

jxX + yY j

X 2 + y2

u;v )

x2 X 2 + y 2 Y 2 + 2xyXY

E (x; y ) = x2

P(

u;v )

P(

u;v )

Y 2 + 2xy

P(

u;v )

XY

(2)

A C C B

!

x y

x x y M where M is 2 x 2 matrix y

Let us analyze the eigen values of the matrix which again are indicative of the strength of derivative and edge orientation along the x and y direction. If the window has constant intensity the eigen values will be small as derivatives will be small. If one eigen value is large while other is small it indicates a edge and indicates windows contains a linear edge. If both eigen values are large then it indicates a corner or isolated point . Thus we have to classify the point as corner based on the above criteria.

5 | 9

4 A A C C G= C B C B

2

E=

(A

) (B ) (C )

=0

T r (M )+

T r (M )2 4

p p

(3)

det(M )

0:25

T r(M ) det(M )

2

0:25

T r(M ) det(M )

2

det(M ) will be small if any one of eigen values is small det(M ) will be large if both eigen values are large. T r(M ) will be large only if one/both of eigen values are large

In the original paper they construct a measure to test if eigen values are large called response function

R = Det(M ) kT r(M )2

(4)

Amplitue of response function is plotted for various values of eigen values and different type of region flat,edge,corners were analysed and emprical values of k was determined to be 0.04. Also if image contrast changes due to illumination etc the reponse function amplitude increases.Thus we need to define what we mean by small amplitude of response function. R is positive in the corner regions ,negative in the edge regions and small in the flat regions.

6 | 9

Feature Detection - Harris Corner Detector Thus the first task of feature detector is to detector points for which response function gives large values.

The next Step of the algorithm is corner filtering.We are required to return a specified subset of detected corners. The approach for corner filtering is same as that of good features to track. In the first stage we divide image into blocks and select the corner with maximum response function in the block that are above a specified threshold. the threshold is choose to be some factor of maximum values of response function observed over the image. In the next step we select the corners with storngest response function that are at minimum distance. The Haris corner detector feature detector is sparse compared to good features to track feature detector since it only detects corner points as compared to corner as well as edge points. Feature returned by harris corner detector can be considered as subset of feature returned by good feature to track feature detector.

0.5 Implementation

The factor used for response function thresholding is called quality level and is choosen to be 1/100 of maximum value by defaul. The block size is window size of the path which is used for computation of the elements of matrix M. The minDistance is the minimum distance between adjancent corner pixels and the cell size over which local maximum is choosen.

7 | 9

0.6 Code

we define a main feature_detector base class containing methods and data common to all feature detector. the harris_corner class is derived class containing specific implementations of algorithms. The code OpenCV code can be found in code repository https://github.com/pi19404/m19404/tree/master/FEATURE_DETECTOR or https://code.google.com/p/m19404/source/browse/FEATURE_DETECTOR/

8 | 9

Bibliography

Bibliography

[1] Chris Harris and Mike Stephens. A combined corner and edge detector. In: In

Proc. of Fourth Alvey Vision Conference.

[2]

Jianbo Shi and C. Tomasi. Good features to track. In: Computer Vision and

Pattern Recognition, 1994. Proceedings CVPR '94., 1994 IEEE Computer Society Conference on.

doi: 10.1109/CVPR.1994.323794.

9 | 9

- OpenCL Heterogenenous program for Image Processing - ColorSpace conversion BGR-HSV,HSV-BGR,BGR-GRAYUploaded bypi194043
- Fast 2D Separable Symmetric/Anti-Symmmetric ConvolutionUploaded bypi194043
- Spatio Temporal Feature extraction using harris 3d corner detectorUploaded bypi194043
- Android OpenCV Simple Face TrackerUploaded bypi194043
- A linear channel filterUploaded bypi194043
- Fast Asymmetric Learning for Cascade Face Detection Training/Testing UtilityUploaded bypi194043
- OpenCL Image Convolution Filter - Box FilterUploaded bypi194043
- SubPixel Corner Localization AlgorithmUploaded bypi194043
- Overview and Implementation of Fast Corner Detection MethodUploaded bypi194043
- polynomial approximation of a 2D signalUploaded bypi194043
- Overview of Good Features to Track Feature DetectorUploaded bypi194043
- Polynomial Approximation of 1D signalUploaded bypi194043
- Android OpenCV Face detectionUploaded bypi194043
- OpenCL 2D Convolution Using Separable Filters -Box FilterUploaded bypi194043
- Fast 3D Extension of Fast Feature Detection for SpatioTemporal Corner DetectionUploaded bypi194043
- OpenCV Lections: 3. Mat classUploaded byDenis Perevalov
- A detailed descriptions and results for different color constancy algorithmsUploaded bypi194043
- Normalized convolution for image interpolationUploaded bypi194043
- What Computer Vision with the OpenCVUploaded byDenis Perevalov
- Control Limited Adaptive Histogram Equalization for Image EnhancementUploaded bypi194043
- Dense optical flow expansion based on polynomial basis approximationUploaded bypi194043
- Adaptive Skin Color DetectorUploaded bypi194043
- Image enhancement using FusionUploaded bypi194043
- OpenCV Lections: 6. ContoursUploaded byDenis Perevalov
- OpenCV Lections: 5. SmoothingUploaded byDenis Perevalov
- Noise Models in Image processingUploaded bypi194043
- Modified Canny Edge DetectionUploaded bypi194043
- temporal filtersUploaded bypi194043
- Gesture Recognition using Hidden Markov ModeUploaded bypi194043
- shape classification using Histogram of oriented gradientsUploaded bypi194043

- Markov chain implementation in C++ using EigenUploaded bypi194043
- Implementation of discrete hidden markov model for sequence classification in C++ using EigenUploaded bypi194043
- Continuous Emission Hidden Markov Model for sequence classificationUploaded bypi194043
- Dense optical flow expansion based on polynomial basis approximationUploaded bypi194043
- Adaptive Skin Color DetectorUploaded bypi194043
- ARM Neon Optimization for image interleaving and deinterleavingUploaded bypi194043
- OpenVision Library Gaussian Mixture Model ImplementationUploaded bypi194043
- Multi Class Logistic Regression Training and TestingUploaded bypi194043
- Compiling Native C/C++ library for AndroidUploaded bypi194043
- Gaussian Multivariate Distribution -Part 1Uploaded bypi194043
- Polynomial Approximation of 2D image patch -Part 2Uploaded bypi194043
- polynomial approximation of a 2D signalUploaded bypi194043
- Modified Canny Edge DetectionUploaded bypi194043
- Tan and Triggs Illumination normalizationUploaded bypi194043
- Normalized convolution for image interpolationUploaded bypi194043
- Mean Shift TrackingUploaded bypi194043
- Uniform Local Binary Pattern and Spatial Histogram ComputationUploaded bypi194043
- C++ static members and functionUploaded bypi194043
- C++ virtual functions and abstract classUploaded bypi194043
- C++ Class Members and friendsUploaded bypi194043
- Embedded Systems Programming with ARM on Linux - Blinking LEDUploaded bypi194043
- Random Ferns for Patch DescriptionUploaded bypi194043
- Integral Image for Computation of Mean And VarianceUploaded bypi194043
- C++ Const,Volatile Type QualifiersUploaded bypi194043
- Polynomial Approximation of 1D signalUploaded bypi194043
- C++ InheritanceUploaded bypi194043
- Mean Shift AlgorithmUploaded bypi194043
- Local Binary PatternUploaded bypi194043

- Logística y Distribución de Carga Urbana de MercancíasUploaded byJenny Sánchez Cruz
- Syllabus data analysis course for sociologyUploaded byThe_bespelled
- Simulación de Eventos DiscretosUploaded byMarre
- Congestion Driven Placement ICM03 FinalUploaded byJagadeep Kumar
- Actividad-8Uploaded byAlexisVizuete
- International Journal of Network Security & Its Applications (IJNSA)Uploaded byAIRCC - IJNSA
- resumeUploaded byapi-227418960
- Data Set Selection (LaLoudouana, 2003)Uploaded byHugo
- Cálculo Analítico de Modos y frecuencias de vibrarUploaded byAlbertoSalgadoR
- Algoritmo de Productos MediosUploaded byCristhian P. Sanchez Galvez
- Risposta Libera e Risposta ForzataUploaded byMichele Schilardi
- Planificacion de Proyectos Metodo PERTUploaded byGuadalupe Maranto Vazquez
- Ejercicios Tema6 Uc3m Talf Sanchis Ledezma Iglesias Garcia AlonsoUploaded byj0aki
- systems in building security is door access control.pdfUploaded byvabs
- AN-18_0_TRAZADOR_CUBICOUploaded byiborella999
- Safe Multi Agent Reforcement Learning for Autonomous DrivingUploaded byChangsong yu
- The Secure Watermarking of Digital Color Images by Using a Combination of Chaotic MappingUploaded byIJSTR Research Publication
- KakuroUploaded byRafael Acosta
- 2-3Trees (1)Uploaded byGanesh Kumar
- EXPOSICION CATEDRA BOLIVARIANA II.pptxUploaded byEdulais Rodriguez
- Problem Set Fd ExplicitUploaded byUna Si Ndéso
- Hardware Implementation of Aes Encryption and Decryption for Low Area & Power ConsumptionUploaded byesatjournals
- Section 8.9.2 Both Fluids MixedUploaded bydrdoak123
- PosterUploaded byakg299
- TSM CrptographyUploaded bymeenalsaxena4
- Programacion LinealUploaded byPedro Castro Retamales
- Money & Sustainability: Appendix D Complex Flow NetworksUploaded byTriarchy Press
- 05Uploaded bymab800k
- UninfSearchspring07Uploaded byYing Yang
- Informe - Programación Dinámica 2.1Uploaded bynathalia