710 likes | 842 Views
Extração de Características. cap 4 – Trucco e Verri. Características de uma imagem. Globais : histograma, conteúdo de freqüências, etc... Locais : regiões com determinada propriedade, arestas, cantos, curvas, etc. Arestas e cantos. Locais de mudanças significativas na intensidade da imagem.
E N D
Extração de Características cap 4 – Trucco e Verri
Características de uma imagem • Globais: histograma, conteúdo de freqüências, etc... • Locais: regiões com determinada propriedade, arestas, cantos, curvas, etc...
Arestas e cantos • Locais de mudanças significativas na intensidade da imagem
Tipos de arestas degrau(step) rampa(ramp) cume(roof) impulso(spike)
Derivadas e arestas f(x) f(x)+n(x) | f'(x)+n'(x) | f"(x)+n"(x)
Série de Taylor Com x=1, f(x)=fi e f(x+x)=fi+1 (a) Com x=-1, f(x)=fi e f(x+x)=fi-1 (b)
f(x) fi fi+1 fi-1 i-1 i+1 i x Aproximações para derivadas (a-b) (a+b)
Em 2D Gradiente Convolution Kernels Laplaciano
Laplaciano • Sometimes we are interested only in changing magnitude without regard to the changing orientation. • A linear differential operator called the Laplacian may be used. • The Laplacian has the same properties in all directions and is therefore invariant to rotation in the image. http://www.cee.hw.ac.uk/hipr/html/log.html http://ct.radiology.uiowa.edu/~jiangm/courses/dip/html/node83.html
Finite differences Khurram Hassan-Shafique
Classical Operators Prewitt’s Operator Differentiate Smooth Khurram Hassan-Shafique
Classical Operators Sobel’s Operator Differentiate Smooth Khurram Hassan-Shafique
Detecting Edges in Image • Sobel Edge Detector Edges Threshold Image I Khurram Hassan-Shafique
Sobel Edge Detector Khurram Hassan-Shafique
Sobel Edge Detector Khurram Hassan-Shafique
Marr and Hildreth Edge Operator • Smooth by Gaussian • Use Laplacian to find derivatives Khurram Hassan-Shafique
Marr and Hildreth Edge Operator Khurram Hassan-Shafique
Marr and Hildreth Edge Operator Y X Khurram Hassan-Shafique
Marr and Hildreth Edge Operator Edge Image Zero Crossings Detection Zero Crossings Khurram Hassan-Shafique
Quality of an Edge Detector • Robustness to Noise • Localization • Too Many/Too less Responses True Edge Poor localization Too many responses Poor robustness to noise Khurram Hassan-Shafique
Canny Edge Detector • Criterion 1: Good Detection: The optimal detector must minimize the probability of false positives as well as false negatives. • Criterion 2: Good Localization: The edges detected must be as close as possible to the true edges. • Single Response Constraint: The detector must return one point only for each edge point. Khurram Hassan-Shafique
The result • General form of the filter (N.B. the filter is odd so h(x) = -h(-x) the following expression is for x < 0 only) Camillo J. Taylor
Approximation • Canny’s filter can be approximated by the derivative of a Gaussian Canny Derivative of Gaussian Camillo J. Taylor
Canny Edge Detector • Convolution with derivative of Gaussian • Non-maximum Suppression • Hysteresis Thresholding Khurram Hassan-Shafique
Algorithm Canny_Enhancer • Smooth by Gaussian • Compute x and y derivatives • Compute gradient magnitude and orientation Khurram Hassan-Shafique
Canny Edge Operator Khurram Hassan-Shafique
Canny Edge Detector Khurram Hassan-Shafique
Canny Edge Detector Khurram Hassan-Shafique
Algorithm Non-Maximum Suppression We wish to mark points along the curve where the magnitude is biggest. We can do this by looking for a maximum along a slice normal to the curve (non-maximum suppression). These points should form a curve. There are then two algorithmic issues: at which point is the maximum, and where is the next one? Khurram Hassan-Shafique
Non-Maximum Suppression • Suppress the pixels in ‘Gradient Magnitude Image’ which are not local maximum Khurram Hassan-Shafique
Non-Maximum Suppression Khurram Hassan-Shafique
Non-Maximum Suppression Khurram Hassan-Shafique
Hysteresis Thresholding Khurram Hassan-Shafique
Hysteresis Thresholding • If the gradient at a pixel is above ‘High’, declare it an ‘edge pixel’ • If the gradient at a pixel is below ‘Low’, declare it a ‘non-edge-pixel’ • If the gradient at a pixel is between ‘Low’ and ‘High’ then declare it an ‘edge pixel’ if and only if it is connected to an ‘edge pixel’ directly or via pixels between ‘Low’ and ‘ High’ Khurram Hassan-Shafique
Hysteresis Thresholding Khurram Hassan-Shafique
Subpixel Localization • One can try to further localize the position of the edge within a pixel by analyzing the response to the edge enhancement filter • One common approach is to fit a quadratic polynomial to the filter response in the region of a maxima and compute the true maximum. -1 0 1
Derivadas direcionais f(x,y) y x
Detecting corners • If Ex and Ey denote the gradients of the intensity image, E(x,y), in the x and y directions then the behavior of the gradients in a region around a point can be obtained by considering the following matrix Camillo J. Taylor
Examining the matrix • One way to decide on the presence of a corner is to look at the eigenvalues of the 2 by 2 matrix C. • If the area is a region of constant intensity we would expect both eigenvalues to be small • If it contains a edge we expect one large eigenvalue and one small one • If it contains edges at two or more orientations we expect 2 large eigenvalues Camillo J. Taylor
Finding corners • One approach to finding corners is to find locations where the smaller eigenvalue is greater than some threshold • We could also imagine considering the ratio of the two eigenvalues
The ellipses indicate the eignvalues and eigenvectors of the C matrices Corner Analysis
Juiz Virtual Tese de Flávio Szenberg
Modelos • Os modelos utilizados na tese: Modelo de um campo de futebol Modelo sem simetria
Filtragem para realce de linhas • O filtro Laplaciano da Gaussiana (LoG) é aplicado à imagem, baseado na luminância. filtro gaussiano filtro laplaciano