1 / 16

Feature Extraction using Harris Algorithm

This article provides a description and implementation of the Harris Algorithm for feature extraction in images and videos. It explains the mathematical principles behind the algorithm and showcases the results obtained through its implementation.

scalvin
Download Presentation

Feature Extraction using Harris Algorithm

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Extração de Feições Carlos Oliveira coliveira@inf.puc-rio.br

  2. Sumário • Descrição e Objetivo • Algoritmo de Harris • Implementação • Resultados obtidos

  3. Descrição e Objetivo • Capturar um vídeo de uma Webcam ou lê-lo a partir de um arquivo de vídeo • Processamento frame a frame, detectando cantos utilizando o algoritmo de Harris

  4. Window function Shifted intensity Intensity Window function w(x,y) = or 1 in window, 0 outside Gaussian Algoritmo de Harris: Mathematics Change of intensity for the shift [u,v]:

  5. Harris Detector: Mathematics For small shifts [u,v] we have a bilinear approximation: where M is a 22 matrix computed from image derivatives:

  6. Harris Detector: Geometric Interpretation 1, 2 – eigenvalues of M (max)-1/2 (min)-1/2

  7. Harris Detector: Mathematics “Edge” 2 >> 1 2 Classification of image points using eigenvalues of M: “Corner”1 and 2 are large,1 ~ 2;E increases in all directions 1 and 2 are small;E is almost constant in all directions “Edge” 1 >> 2 “Flat” region 1

  8. Harris Detector: Mathematics Measure of corner response: (k – empirical constant, k = 0.04-0.06)

  9. “Edge” “Corner” R < 0 R > 0 “Flat” “Edge” |R| small R < 0 1 Harris Detector: Mathematics 2 • R depends only on eigenvalues of M • R is large for a corner • R is negative with large magnitude for an edge • |R| is small for a flat region

  10. Algoritmo • Comparação dos gráficos 2 “Edge” “Corner” R < 0 R > 0 “Flat” “Edge” |R| small R < 0 1

  11. Algoritmo • Comparação dos gráficos 2 “Edge” “Corner” R < 0 R > 0 “Flat” “Edge” |R| small R < 0 1

  12. Algoritmo • Comparação dos gráficos 2 “Edge” “Corner” R < 0 R > 0 “Flat” “Edge” |R| small R < 0 1

  13. Harris Detector • The Algorithm: • Find points with large corner response function R (R > threshold) • Take the points of local maxima of R

  14. Harris Detector: Summary • Average intensity change in direction [u,v] can be expressed as a bilinear form: • Describe a point in terms of eigenvalues of M:measure of corner response • A good (corner) point should have a large intensity change in all directions, i.e. R should be large positive

  15. Implementação • Foi utilizada a biblioteca OpenCV • No loop principal os frames são capturados • Cada frame lido/capturado é convertido para uma imagem grayscale • Após isso a função cvGoodFeaturesToTrack é chamada passando por parâmetro um flag indicando que ela deve fazer a detecção usando o algoritmo de Harris • Na interface também há a opção de ajustar a qualidade e a quantidade de cantos a detectar

  16. Resultados Obtidos

More Related