# Harris affine region detector

﻿
Harris affine region detector

In the fields of computer vision and image analysis, the Harris-affine region detector belongs to the category of feature detection. Feature detection is a preprocessing step of several algorithms that rely on identifying characteristic points or interest points so to make correspondences between images, recognize textures, categorize objects or build panoramas.

Overview

The Harris-affine detector can identify similar regions between images that are related through affine transformations and have different illuminations. These "affine-invariant" detectors should be capable of identifying similar regions in images taken from different viewpoints that are related by a simple geometric transformation: scaling, rotation and shearing. These detected regions have been called both "invariant" and "covariant". On one hand, the regions are detected "invariant" of the image transformation but the regions "covariantly" change with image transformation . Do not dwell too much on these two naming conventions; the important thing to understand is that the design of these interest points will make them compatible across images taken from several viewpoints. Other detectors that are affine-invariant include Hessian-Affine regions, Maximally Stable Extremal Regions, Kadir brady saliency detector, edge-based regions (EBR) and intensity extrema-based (IBR) regions. Mikolajczyk and Schmid (2002) first described the Harris-Affine detector as it is used today in [http://vasc.ri.cmu.edu/~hebert/04AP/mikolajc_ECCV2002.pdf "An Affine Invariant Interest Point Detector"] [http://vasc.ri.cmu.edu/~hebert/04AP/mikolajc_ECCV2002.pdf Mikolajcyk, K. and Schmid, C. 2002. An affine invariant interest point detector. In "Proceedings of the 8th International Conference on Computer Vision", Vancouver, Canada.] ] . Earlier works in this direction include use of affine adapted feature points for matching by Baumberg [ [http://citeseer.ist.psu.edu/baumberg00reliable.html A. Baumberg (2000). "Reliable feature matching across widely separated views". Proceedings of IEEE Conference on Computer Vision and Pattern Recognition: pages I:1774--1781.] ] and the first use of scale invariant feature points by Lindeberg [http://www.nada.kth.se/cvap/abstracts/cvap198.html T. Lindeberg (1998). "Feature detection with automatic scale selection". International Journal of Computer Vision 30 (2): pp 77--116.] ] . The Harris-Affine detector relies on the combination of corner points detected thorough Harris corner detection, multi-scale analysis through Gaussian scale-space and affine normalization using an iterative affine shape adaptation algorithm. The recursive and iterative algorithm follows an iterative approach to detecting these regions:
# Identify initial region points using scale-invariant Harris-Laplace Detector.
# For each initial point, normalize the region to be affine invariant using affine shape adaptation.
# Iteratively estimate the affine region: selection of proper integration scale, differentiation scale and spatially localize interest points..
# Update the affine region using these scales and spatial localizations.
# Repeat step 3 if the stopping criterion is not met.

Algorithm description

Harris-Laplace detector (initial region points)

The Harris-Affine detector relies heavily on both the Harris measure and a Gaussian scale-space representation. Therefore, a brief examination of both follow. For a more exhaustive derivations see corner detection and Gaussian scale-space or their associated papers. [http://www.csse.uwa.edu.au/~pk/research/matlabfns/Spatial/Docs/Harris/A_Combined_Corner_and_Edge_Detector.pdf C. Harris and M. Stephens (1988). "A combined corner and edge detector". Proceedings of the 4th Alvey Vision Conference: pages 147--151.] ]

Harris corner measure

The Harris corner detector algorithm relies on a central principle: at a corner, the image intensity will change largely in multiple directions. This can alternatively be formulated by examining the changes of intensity due to shifts in a local window. Around a corner point, the image intensity will change greatly when the window is shifted in an arbitrary direction. Following this intuition and through a clever decomposition, the Harris detector uses the second moment matrix as the basis of its corner decisions. (See corner detection for more complete derivation). The matrix $A$, has also been called the autocorrelation matrix and has values closely related to the derivatives of image intensity.

: where $I_\left\{x\right\}$ and $I_\left\{y\right\}$ are the respective derivatives (of pixel intensity) in the $x$ and $y$ direction. The off-diagonal entries are the product of $I_\left\{x\right\}$ and $I_\left\{y\right\}$, while the diagonal entries are squares of the respective derivatives. The weighting function $w\left(x,y\right)$ can be uniform, but is more typically an isotropic, circular Gaussian,

: $w\left(x,y\right) = g\left(x,y,sigma\right) = frac\left\{1\right\}\left\{2pi sigma\right\} e^\left\{ left \left(-frac\left\{ x^2 + y^2\right\}\left\{2sigma\right\} ight \right)\right\}$

that acts to average in a local region while weighting those values near the center more heavily.

As it turns out, this $A$ matrix describes the shape of the autocorrelation measure as due to shifts in window location. Thus, if we let $lambda_1$ and $lambda_2$ be the eigenvalues of $A$, then these values will provide a quantitative description of the how the autocorrelation measure changes in space: its principal curvatures. As Harris and Stephens (1988) point out, the $A$ matrix centered on corner points will have two large, positive eigenvalues. Rather than extracting these eigenvalues using methods like singular value decomposition, the Harris measure based on the trace and determinant is used:

: $R = det\left(A\right) - alpha operatorname\left\{trace\right\}^2\left(A\right) = lambda_1 lambda_2 - alpha \left(lambda_1 + lambda_2\right)^2$

where $alpha$ is a constant. Corner points have large, positive eigenvalues and would thus have a large Harris measure. Thus, corner points are identified as local maxima of the Harris measure that are above a specified threshold.

:

where $\left\{x_c\right\}$ are the set of all corner points, $R\left(x\right)$ is the Harris measure calculated at $x$, $W\left(x_c\right)$ is an 8-neighbor set centered around $x_c$ and $t_\left\{threshold\right\}$ is a specified threshold.

Gaussian scale-space

A Gaussian scale-space representation of an image is the set of images that result from convoluting a Gaussian kernel of various sizes with the original image. In general, the representation can be formulated as:

: $L\left(mathbf\left\{x\right\},s\right) = G\left(s\right) otimes I\left(mathbf\left\{x\right\}\right)$

where $G\left(s\right)$ is an isotropic, circular Gaussian kernel as defined above. The convolution with a Gaussian kernel smooths the image using a window the size of the kernel. A larger scale, $s$, corresponds to a smoother resultant image. Mikolajczyk and Schmid (2001) point out that derivatives and other measurements must be normalized across scales [http://robotics.caltech.edu/readinggroup/vision/mikolajcICCV2001.pdf K. Mikola jczyk and C. Schmid. Indexing based on scale invariant interest points. In Proceedings of the 8th International Conference on Computer Vision, Vancouver, Canada, pages 525-531, 2001.] ] . A derivative of order $m$, $D_\left\{i_1, ... i_m\right\}$, must be normalized by a factor $s^m$ in the following manner:

: $D_\left\{i_1, dots, i_m\right\}\left(mathbf\left\{x\right\},s\right) = s^m L_\left\{i_1, dots, i_m\right\}\left(mathbf\left\{x\right\},s\right)$

These derivatives, or any arbitrary measure, can be adapted to a scale-space representation by calculating this measure using a set of scales recursively where the $nth$ scale is $s_n = k^n s_0$. See scale space for a more complete description.

Combining Harris detector across Gaussian scale-space

The Harris-Laplace detector combines the traditional 2D Harris corner detector with the idea of a Gaussian scale-space representation in order to create a scale-invariant detector. Harris-corner points are good starting points because they have been shown to have good rotational and illumination invariance in addition to identifying the interesting points of the image [Schmid, C., Mohr, R., and Bauckhage, C. 2000. Evaluation of interest point detectors. International Journal of Computer Vision, 37(2):151-172.] . However, the points are not scale invariant and thus the second-moment matrix must be modified to reflect a scale-invariant property. Let us denote, $M = mu\left(mathbf\left\{x\right\}, sigma_\left\{mathit\left\{I, sigma_\left\{mathit\left\{D\right)$ as the scale adapted second-moment matrix used in the Harris-Laplace detector. : [http://www.robots.ox.ac.uk/~vgg/research/affine/det_eval_files/mikolajczyk_ijcv2004.pdf Mikolajczykm K. and Schmid, C. 2004. Scale & affine invariant interest point detectors. "International Journal on Computer Vision" 60(1):63-86.] ]

where $g\left(sigma_I\right)$ is the Gaussian kernel of scale $sigma_I$ and $mathbf\left\{x\right\} = \left(x,y\right)$. Similar to the Gaussian-scale space, $L\left(mathbf\left\{x\right\}\right)$ is the Gaussian-smoothed image. The $mathbf\left\{otimes\right\}$ operator denotes convolution. $L_\left\{x\right\}\left(mathbf\left\{x\right\},sigma_\left\{D\right\}\right)$ and $L_\left\{y\right\}\left(mathbf\left\{x\right\}, sigma_\left\{D\right\}\right)$ are the derivatives in their respective direction applied to the smoothed image and calculated using a Gaussian kernel with scale $sigma_D$. In terms of our Gaussian scale-space framework, the $sigma_I$ parameter determines the current scale at which the Harris corner points are detected.

Building upon this scale-adapted second-moment matrix, the Harris-Laplace detector is a twofold process: applying the Harris corner detector at multiple scales and automatically choosing the "characteristic scale".

Multi-scale Harris corner points

The algorithm searches over a fixed number of predefined scales. This set of scales is defined as:

: $\left\{sigma_1 dots sigma_n\right\} = \left\{sigma_0 dots k^\left\{n\right\}sigma_0\right\}$

Mikolajczyk and Schmid (2004) use $k = 1.4$. For each integration scale, $sigma_I$, chosen from this set, the appropriate differentiation scale is chosen to be a constant factor of the integration scale: $sigma_D = ssigma_I$. Mikolajczyk and Schmid (2004) used $s = 0.7$ . Using these scales, the interest points are detected using a Harris measure on the $mu\left(mathbf\left\{x\right\}, sigma_\left\{mathit\left\{I, sigma_\left\{mathit\left\{D\right)$ matrix. The "cornerness," like the typical Harris measure, is defined as:

:$mathit\left\{cornerness\right\} = det\left(mu\left(mathbf\left\{x\right\}, sigma_\left\{mathit\left\{I, sigma_\left\{mathit\left\{D\right)\right) - alpha operatorname\left\{trace\right\}^2\left(mu\left(mathbf\left\{x\right\}, sigma_\left\{mathit\left\{I, sigma_\left\{mathit\left\{D\right)\right)$

Like the traditional Harris detector, corner points are those local (8 point neighborhood) maxima of the "cornerness" that are above a specified threshold.

Characteristic scale identification

An iterative algorithm based on Lindeberg (1998) both spatially localizes the corner points and selects the "characteristic scale" . The iterative search has three key steps, that are carried for each point $mathbf\left\{x\right\}$ that were initially detected at scale $sigma_I$ by the multi-scale Harris detector ($k$ indicates the $kth$ iteration):

1. Choose the scale $sigma_I^\left\{\left(k+1\right)\right\}$ that maximizes the Laplacian-of-Gaussians (LoG) over a predefined range of neighboring scales. The neighboring scales are typically chosen from a range that is within a "two scale-space" neighborhood. That is, if the original points were detected using a scaling factor of $1.4$ between successive scales, a "two scale-space" neighborhood is the range $t in \left[0.7, dots, 1.4\right]$. Thus the Gaussian scales examined are: $sigma_I^\left\{\left(k+1\right)\right\} = t sigma_I^k$. The LoG measurement is defined as:

: $det\left(LoG\left(mathbf\left\{x\right\}, sigma_I\right)\right) = sigma_I^2 det\left(L_\left\{xx\right\}\left(mathbf\left\{x\right\}, sigma_I\right) + L_\left\{yy\right\}\left(mathbf\left\{x\right\},sigma_I\right)\right)$

where $L_\left\{xx\right\}$ and $L_\left\{yy\right\}$ are the second derivatives in their respective directions [ [http://www.cee.hw.ac.uk/hipr/html/log.html Spatial Filters: Laplacian/Laplacian of Gaussian] ] . The $sigma_I^2$ factor (as discussed above in Gaussian scale-space) is used to normalize the LoG across scales and make these measures comparable, thus making a maximum relevant. Mikolajczyk and Schmid (2001) demonstrate that the LoG measure attains the highest percentage of correctly detected corner points in comparison to other scale-selection measures . The scale which maximizes this LoG measure in the "two scale-space" neighborhood is deemed the "characteristic scale," $sigma_I^\left\{\left(k+1\right)\right\}$, and used in subsequent iterations. If no extrema, or maxima of the LoG is found, this point is discarded from future searches.

2. Using the characteristic scale, the points are spatially localized. That is to say, the point $mathbf\left\{x\right\}^\left\{\left(k+1\right)\right\}$ is chosen such that it maximizes the Harris corner measure ("cornerness" as defined above) within an 8&times;8 local neighborhood.
3. Stopping criterion: $sigma_I^\left\{\left(k+1\right)\right\} = sigma_I^\left\{\left(k\right)\right\}$ and $mathbf\left\{x\right\}^\left\{\left(k+1\right)\right\} = mathbf\left\{x\right\}^\left\{\left(k\right)\right\}$.

If the stopping criterion is not met, then the algorithm repeats from step 1 using the new $k+1$ points and scale. When the stopping criterion is met, the found points represent those that maximize the LoG across scales (scale selection) and maximize the Harris corner measure in a local neighborhood (spatial selection).

It's important to note that although, Harris points may not be localized across scales, they ultimately all converge to the same scale-invariant point. That is to say, a corner point that might be detected at multiple scales may not be at the same coordinates at each scale. However, through the selection of characteristic scale and spatial localization, the points will converge . ----

Affine invariant points

Mathematical theory

The Harris-Laplace detected points are scale invariant and work well for isotropic Wiktionarypar|isotropy regions that are viewed from the same viewing angle. In order to be invariant to arbitrary affine transformations (and viewpoints), the mathematical framework must be revisited. The second-moment matrix $mathbf\left\{mu\right\}$ is defined more generally for anisotropic regions:

: $mu \left(mathbf\left\{x\right\}, Sigma_I, Sigma_D\right) = det\left(Sigma_D\right) g\left(Sigma_I\right) * \left( abla L\left(mathbf\left\{x\right\}, Sigma_D\right) abla L\left(mathbf\left\{x\right\}, Sigma_D\right)^T\right)$ where $Sigma_I$ and $Sigma_D$ are covariance matrices defining the differentiation and the integration Gaussian kernel scales. Although this make look significantly different than the second-moment matrix in the Harris-Laplace detector; it is in fact, identical. The earlier $mu$ matrix was the 2D-isotropic version in which the covariance matrices $Sigma_I$ and $Sigma_D$ were 2x2 identity matrices multiplied by factors $sigma_I$ and $sigma_D$, respectively. In the new formulation, one can think of Gaussian kernels as a multivariate Gaussian distributions as opposed to a uniform Gaussian kernel. A uniform Gaussian kernel can be thought of as an isotropic, circular region. Simiarly, a more general Gaussian kernel defines an ellipsoid. In fact, the eigenvectors and eigenvalues of the covariance matrix define the rotation and size of the ellipsoid. Thus we can easily see that this representation allows us to completely define an arbitrary elliptical affine region over which we want to integrate or differentiate.

The goal of the affine invariant detector is to identify regions in images that are related through affine transformations. We thus consider a point $mathbf\left\{x\right\}_L$ and the transformed point $mathbf\left\{x\right\}_R = Amathbf\left\{x\right\}_L$, where A is an affine transformation. In the case of images, both $mathbf\left\{x\right\}_R$ and $mathbf\left\{x\right\}_L$ live in $R^2$ space. The second-moment matrices are related in the following manner [ [http://www.nada.kth.se/~tony/abstracts/LG94-ECCV.html T. Lindeberg and J. Garding (1997). "Shape-adapted smoothing in estimation of 3-{D} depth cues from affine distortions of local 2-{D} structure". Image and Vision Computing 15: pp 415--434.] ] :

:

where $Sigma_\left\{I,b\right\}$ and $Sigma_\left\{D,b\right\}$ are the covariance matrices for the $b$ reference frame. If we continue with this formulation and enforce that

:

where $sigma_I$ and $sigma_D$ are scalar factors, one can show that the covariance matrices for the related point are similarly related:

:

By requiring the covariance matrices to satisfy these conditions, several nice properties arise. One of these properties is that the square root of the second-moment matrix, $M^\left\{ frac\left\{1\right\}\left\{2$ will transform the original anisotropic region into isotropic regions that are related simply through a pure rotation matrix $R$. These new isotropic regions can be thought of as a normalized reference frame. The following equations formulate the relation between the normalized points $x_R^\text{'}$ and $x_L^\text{'}$:

:

The rotation matrix can be recovered using gradient methods likes those in the SIFT descriptor. As discussed with the Harris detector, the eigenvalues and eigenvectors of the second-moment matrix, $M = mu\left(mathbf\left\{x\right\}, Sigma_I, Sigma_D\right)$ characterize the curvature and shape of the pixel intensities. That is, the eigenvector associated with the largest eigenvalue indicates the direction of largest change and the eigenvector associated with the smallest eigenvalue defines the direction of least change. In the 2D case, the eigenvectors and eigenvalues define an ellipse. For an isotropic region, the region should be circular in shape and not elliptical. This is the case when the eigenvalues have the same magnitude. Thus a measure of the isotropy around a local region is defined as the following:

: $mathcal\left\{Q\right\} = frac\left\{lambda_min\left(M\right)\right\}\left\{lambda_max\left(M\right)\right\}$

where $lambda$ denote eigenvalues. This measure has the range $\left[0 dots 1\right]$. A value of $1$ corresponds to perfect isotropy.

Iterative algorithm

Using this mathematical framework, the Harris-Affine detector algorithm iteratively discovers the second-moment matrix that transforms the anisotropic Wiktionarypar|anisotropy region into a normalized region in which the isotropic measure is sufficiently close to one. The algorithm uses this "shape adaptation matrix", $U$, to transform the image into a normalized reference frame. In this normalized space, the interest points' parameters (spatial location, integration scale and differentiation scale) are refined using methods similar to the Harris-Laplace detector. The second-moment matrix is computed in this normalized reference frame and should have an isotropic measure close to one at the final iteration. At every $k$th iteration, each interest region is defined by several parameters that the algorithm must discover: the $U^\left\{\left(k\right)\right\}$ matrix, position $mathbf\left\{x\right\}^\left\{\left(k\right)\right\}$, integration scale $sigma_I^\left\{\left(k\right)\right\}$ and differentiation scale $sigma_D^\left\{\left(k\right)\right\}$. Because the detector computes the second-moment matrix in the transformed domain, it's convenient to denote this transformed position as $mathbf\left\{x\right\}_w^\left\{\left(k\right)\right\}$ where $U^\left\{\left(k\right)\right\}mathbf\left\{x\right\}_w^\left\{\left(k\right)\right\} = mathbf\left\{x^\left\{\left(k\right)$.

1. The detector initializes the search space with points detected by the Harris-Laplace detector.
$U^\left\{\left(0\right)\right\} = mathit\left\{identity\right\}$ and $mathbf\left\{x\right\}^\left\{\left(0\right)\right\}$, $sigma_D^\left\{\left(0\right)\right\}$, and $sigma_I^\left\{\left(0\right)\right\}$ are those from the Harris-Laplace detector.
2. Apply the previous iteration "shape adaptation matrix", $U^\left\{\left(k-1\right)\right\}$ to generate the normalized reference frame, $U^\left\{\left(k-1\right)\right\}mathbf\left\{x\right\}_w^\left\{\left(k-1\right)\right\} = mathbf\left\{x\right\}^\left\{\left(k-1\right)\right\}$. For the first iteration, you apply $U^\left\{\left(0\right)\right\}$.
3. Select the integration scale, $sigma_I^\left\{\left(k\right)\right\}$, using a method similar to the Harris-Laplace detector. The scale is chosen as the scale that maximizes the Laplacian of Gaussian (LoG). The search space of the scales are those within two scale-spaces of the previous iterations scale.

: $sigma_I^\left\{\left(k\right)\right\} = underset$sigma_I = tsigma_I^{(k-1)}atop t in [0.7, dots, 1.4] {operatorname{argmax , sigma_I^2 det(L_{xx}(mathbf{x}, sigma_I) + L_{yy}(mathbf{x},sigma_I))

It's important to note that the integration scale in the $U-normalized$ space differs significantly than the non-normalized space. Therefore, it is necessary to search for the integration scale as opposed to using the scale in the non-normalized space.

4. Select the differentiation scale, $sigma_D^\left\{\left(k\right)\right\}$. In order to reduce the search space and degrees of freedom, the differentiation scale is taken to be related to the integration scale through a constant factor: $sigma_D^\left\{k\right\} = s sigma_I^\left\{k\right\}$. For obvious reasons, the constant factor is less than one. Mikolajczyk and Schmid (2001) note that a too small factor will make smoothing (integration) too significant in comparison to differentiation and a factor that's too large will not allow for the integration to average the covariance matrix . It is common to choose $s in \left[0.5,0.75\right]$. From this set, the chosen scale will maximize the isotropic measure $mathcal\left\{Q\right\} = frac\left\{lambda_\left\{min\right\}\left(mu\right)\right\}\left\{lambda_\left\{max\right\}\left(mu\right)\right\}$.

: $sigma_D^\left\{\left(k\right)\right\} = underset\left\{sigma_D = ssigma_I^\left\{\left(k\right)\right\},; s in \left[0.5, dots, 0.75\right] \right\}\left\{operatorname\left\{argmax , frac\left\{lambda_min\left(mu\left(mathbf\left\{x\right\}_w^\left\{\left(k\right)\right\}, sigma_I^\left\{k\right\}, sigma_D\right)\right)\right\}\left\{lambda_max\left(mu\left(mathbf\left\{x\right\}_w^\left\{\left(k\right)\right\}, sigma_I^\left\{k\right\}, sigma_D\right)\right)\right\}$

where $mu\left(mathbf\left\{x\right\}_w^\left\{\left(k\right)\right\}, sigma_I^\left\{k\right\}, sigma_D\right)$ is the second-moment matrix evaluated in the normalized reference frame. This maximization processes causes the eigenvalues to converge to the same value.

5. Spatial Localization: Select the point $mathbf\left\{x\right\}_w^\left\{\left(k\right)\right\}$ that maximizes the Harris corner measure ($mathit\left\{cornerness\right\}$) within an 8-point neighborhood around the previous $mathbf\left\{x\right\}_w^\left\{\left(k-1\right)\right\}$ point.

: $mathbf\left\{x\right\}_w^\left\{\left(k\right)\right\} = underset\left\{mathbf\left\{x\right\}_w in W\left(mathbf\left\{x\right\}_w^\left\{\left(k-1\right)\right\}\right)\right\}\left\{operatorname\left\{argmax ,det\left(mu\left(mathbf\left\{x\right\}_w, sigma_I^\left\{k\right\}, sigma_D^\left\{\left(k\right)\right\}\right)\right) - alpha operatorname\left\{trace\right\}^2\left(mu\left(mathbf\left\{x\right\}_w, sigma_I^\left\{k\right\}, sigma_D^\left\{\left(k\right)\right\}\right)\right)$

where $mu$ is the second-moment matrix as defined above. The window $W\left(mathbf\left\{x\right\}_w^\left\{\left(k-1\right)\right\}\right)$ is the set of 8-nearest neighbors of the previous iteration's point in the normalized reference frame.

Because our spatial localization was done in the $U$-normalized reference frame, the newly chosen point must be transformed back to the original reference frame. This is achieved by transforming a displacement vector and adding this to the previous point:

: $mathbf\left\{x\right\}^\left\{\left(k\right)\right\} = mathbf\left\{x\right\}^\left\{\left(k-1\right)\right\} + U^\left\{\left(k-1\right)\right\}cdot \left(mathbf\left\{x\right\}_w^\left\{\left(k\right)\right\} - mathbf\left\{x\right\}_w^\left\{\left(k-1\right)\right\}\right)$

6. As mentioned above, the square-root of the second-moment matrix defines the transformation matrix that generates the normalized reference frame. We thus need to save this matrix: $mu_i^\left\{\left(k\right)\right\} = mu^\left\{- frac\left\{1\right\}\left\{2\left(mathbf\left\{x\right\}_w^\left\{\left(k\right)\right\}, sigma_I^\left\{\left(k\right)\right\}, sigma_D^\left\{\left(k\right)\right\}\right)$. The transformation matrix $U$ is updated: $U^\left\{\left(k\right)\right\} = mu_i^\left\{\left(k\right)\right\}cdot U^\left\{\left(k-1\right)\right\}$. In order to ensure that the image gets sampled correctly and we are expanding the image in the direction of the least change (smallest eigenvalue), we fix the maximium eigenvalue: $lambda_\left\{max\right\}\left(U^\left\{\left(k\right)\right\}\right) = 1$. Using this updating method, one can easily see that the final $U$ matrix takes the following form:

: $U = prod_\left\{k\right\} mu_i^\left\{\left(k\right)\right\} cdot U^\left\{\left(0\right)\right\} = prod_\left\{k\right\} \left(mu^\left\{- frac\left\{1\right\}\left\{2\right)^\left\{\left(k\right)\right\} cdot U^\left\{\left(0\right)\right\}$

7. If the stopping criterion is not met, continue to the next iteration at step 2. Because the algorithm iteratively solves for the $U-normalization$ matrix that transforms an anisotropic region into an isotropic region, it makes sense to stop when the isotropic measure, $mathcal\left\{Q\right\} = frac\left\{lambda_max\left(mu\right)\right\}\left\{lambda_max\left(mu\right)\right\}$, is sufficiently close to its maximum value 1. "Sufficiently close" implies the following stopping condition:

: $1 - frac\left\{lambda_max\left(mu_i^\left\{\left(k\right)\right\}\right)\right\}\left\{lambda_max\left(mu_i^\left\{\left(k\right)\right\}\right)\right\} < varepsilon_C$

Mikolajczyk and Schmid (2004) had good success with $epsilon_C = 0.05$.

-----

Computation and implementation

The computational complexity of the Harris-Affine detector is broken into two parts: initial point detection and affine region normalization. The initial point detection algorithm, Harris-Laplace, has complexity $mathcal\left\{O\right\}\left(n\right)$ where $n$ is the number of pixels in the image. The affine region normalization algorithm automatically detects the scale and estimates the "shape adaptation matrix", $U$. This process has complexity $mathcal\left\{O\right\}\left(\left(m+k\right)p\right)$, where $p$ is the number of initial points, $m$ is the size of the search space for the automatic scale selection and $k$ is the number of iterations required to compute the $U$ matrix .

Some methods exist to reduce the complexity of the algorithm at the expense of accuracy. One method is to eliminate the search in the differentiation scale step. Rather than choose a factor $s$ from a set of factors, the sped-up algorithm chooses the scale to be constant across iterations and points: $sigma_D = s sigma_I,; s = constant$. Although this reduction in search space might decrease the complexity, this change can severely effect the convergence of the $U$ matrix.

Analysis

Convergence

One can imagine that this algorithm might identify duplicate interest points at multiple scales. Because the Harris-affine algorithm looks at each initial point given by the Harris-Laplace detector independently, there is no discrimination between identical points. In practice, it has been shown that these points will ultimately all converge to the same interest point. After finishing identifying all interest points, the algorithm accounts for duplicates by comparing the spatial coordinates ($mathbf\left\{x\right\}$), the integration scale $sigma_I$, the isotropic measure $frac\left\{lambda_min\left(U\right)\right\}\left\{lambda_max\left(U\right)\right\}$ and skew . If these interest point parameters are similar within a specified threshold, then they are labeled duplicates. The algorithm discards all these duplicate points except for the interest point that's closest to the average of the duplicates. Typically 30% of the Harris-Affine points are distinct and dissimilar enough to not be discarded .

Mikolajczyk and Schmid (2004) showed that often the initial points (40%) do not coverage. The algorithm detects this divergence by stopping the iterative algorithm if the inverse of the isotropic measure is larger than a specified threshold: $frac\left\{lambda_max\left(U\right)\right\}\left\{lambda_min\left(U\right)\right\} > t_ ext\left\{diverge\right\}$. Mikolajczyk and Schmid (2004) use $t_\left\{diverge\right\} = 6$. Of those that did converge, the typical number of required iterations was 10 .

Quantitative measure

Quantitative analysis of affine region detectors take into account both the accuracy of point locations and the overlap of regions across two images. Mioklajcyzk and Schmid (2004) extend the repeatability measure of Schmid et al. (1998) as the ratio of point correspondences to minimum detected points of the two imagesC. Schmid, R. Mohr, and C. Bauckhage. Comparing and evaluating interest points. In "International Conference on Computer Vision", pp. 230-135, 1998.] .

: $R_ ext\left\{score\right\} = frac\left\{C\left(A,B\right)\right\}\left\{min\left(n_A, n_B\right)\right\}$

where $C\left(A,B\right)$ are the number of corresponding points in images $A$ and $B$. $n_B$ and $n_A$ are the number of detected points in the respective images. Because each image represents 3D space, it might be the case that the one image contains objects that are not in the second image and thus whose interest points have no chance of corresponding. In order to make the repeatability measure valid, one remove these points and must only consider points that lie in both images; $n_A$ and $n_B$ only count those points such that $x_A = H cdot x_B$. For a pair of two images related through a

1. Error in pixel location is less than 1.5 pixels: $| mathbf\left\{x_a\right\} - Hcdot mathbf\left\{x_b\right\} | < 1.5$
2. The overlap error of the two affine points ($epsilon_S$) must be less than a specified threshold (typically 40%). For affine regions, this overlap error is the following:

: $epsilon_S = 1 - frac\left\{mu_a cap \left(H^T mu_b H\right)\right\}\left\{mu_a cup \left(H^T mu_b H\right)\right\}$

where $mu_a$ and $mu_b$ are the recovered elliptical regions whose points satisfy: $mu^T mathbf\left\{x\right\} mu = 1$. Basically, this measure takes a ratio of areas: the area of overlap (intersection) and the total area (union). Perfect overlap would have a ratio of one and have an $epsilon_S = 0$. Different scales effect the region of overlap and thus must be taken into account by normalizing the area of each region of interest. Regions with an overlap error as high as 50% are viable detectors to be matched with a good descriptor .

A second measure, a matching score, more practically assesses the detector's ability to identify matching points between images. Mikolajczyk and Schmid (2005) use a SIFT descriptor to identify matching points. In addition to being the closest points in SIFT-space, two matched points must also have a sufficiently small overlap error (as defined in the repeatability measure). The matching score is the ratio of the number of matched points and the minimum of the total detected points in each

: $M_\left\{score\right\} = frac\left\{M\left(A,B\right)\right\}\left\{min\left(n_A,n_B\right)\right\}$ ,

where $M\left(A,B\right)$ are the number of matching points and $n_B$ and $n_A$ are the number of detected regions in the respective images.

Robustness to affine and other transformations

Mikolajczyk et al. (2005) have done a thorough analysis of several state-of-the-art affine region detectors: Harris-Affine, Hessian-Affine, MSER [ [http://www.robots.ox.ac.uk/~vgg/research/affine/det_eval_files/matas_bmvc2002.pdf J.Matas, O. Chum, M. Urban, and T. Pajdla, Robust wide baseline stereo from maximally stable extremal regions. In BMVC p. 384-393, 2002.] ] , IBR & EBR [ [http://www.robots.ox.ac.uk/~vgg/research/affine/det_eval_files/tuytelaars_ijcv2004.pdf T.Tuytelaars and L. Van Gool, Matching widely separated views based on affine invariant regions . In IJCV 59(1):61-85, 2004.] ] and salient [ [http://www.robots.ox.ac.uk/~vgg/research/affine/det_eval_files/kadir04.pdf T. Kadir, A. Zisserman, and M. Brady, An affine invariant salient region detector. In ECCV p. 404-416, 2004.] ] detectors [http://www.robots.ox.ac.uk/~vgg/research/affine/det_eval_files/vibes_ijcv2004.pdf K. Mikolajczyk, T. Tuytelaars, C. Schmid, A. Zisserman, J. Matas, F. Schaffalitzky, T. Kadir and L. Van Gool, A comparison of affine region detectors. In IJCV 65(1/2):43-72, 2005] ] . Mikolajczyk et al. analyzed both structured images and textured images in their evaluation. Linux binaries of the detectors and their test images are freely available at their [http://www.robots.ox.ac.uk/~vgg/research/affine/index.html webpage] . A brief summary of the results of Mikolajczyk et al (2005) follow; see [http://www.robots.ox.ac.uk/~vgg/research/affine/det_eval_files/vibes_ijcv2004.pdf "A comparison of affine region detectors"] for a more quantitative analysis.

* Viewpoint Angle Change: The Harris-Affine detector has reasonable (average) robustness to these types of changes. The detector maintains a repeatability score of above 50% up until a viewpoint angle of above 40 degrees. The detector tends to detect a high number of repeatable and matchable regions even under a large viewpoint change.
* Scale Change: The Harris-Affine detector remains very consistent under scale changes. Although the number of points declines considerably at large scale changes (above 2.8), the repeatability (50-60%) and matching scores (25-30%) remain very constant especially with textured images. This is consistent with the high-performance of the automatic scale selection iterative algorithm.
* Blurred
The Harris-Affine detector remains very stable under image blurring. Because the detector does not rely on image segmentation or region boundaries, the repeatability and matching scores remain constant.
* JPEG Artifacts: The Harris-Affine detector degrades similar to other affine detectors: repeatability and matching scores drop significantly above 80% compression.
* Illumination Changes: The Harris-Affine detector, like other affine detectors, is very robust to illumination changes: repeatability and matching scores remain constant under decreasing light. This should be expected because the detectors rely heavily on relative intensities (derivatives) and not absolute intensities.

General trends

* Harris-affine region points tend to be small and numerous. Both the Harris-Affine detector and Hessian-Affine consistently identify double the number repeatable points as other affine detectors: ~1000 regions for a 800x640 image . Small regions are less likely to be occluded but have a smaller chance of overlapping neighboring regions.
* The Harris-Affine detector responds well to textured scenes in which there are a lot of corner-like parts. However, for some structured scenes, like buildings, the Harris-Affine detector performs very well. This is complementary to MSER that tends to do better with well structured (segmentable) scenes.
* Overall the Harris-Affine detector performs very well, but still behind MSER and Hessian-Affine in all cases but blurred images.
* Harris-Affine and Hessian-Affine detectors are less accurate than others: their repeatability score increases as the overlap threshold is increased.
* The detected affine-invariant regions may still differ in their rotation and illumination. Any descriptor that uses these regions must account for the invariance when using the regions for matching or other comparisons.

Applications

* Content-based image retrieval [http://staff.science.uva.nl/~gevers/pub/overview.pdf] [ [http://www.liacs.nl/home/mlew/mir.survey16b.pdf R. Datta, J. Li, and J. Z. Wang, “Content-based image retrieval - Approaches and trends of the new age,” In Proc. Int. Workshop on Multimedia Information Retrieval, pp. 253-262, 2005.IEEE Transactions on Multimedia, vol. 7, no. 1, pp. 127-142, 2005.] ]
* Model-based recognition
* Object retrieval in video [ [http://www.robots.ox.ac.uk/~vgg/publications/papers/sivic03.pdf J. Sivic and A. Zisserman. Video google: A text retrieval approach to object matching in videos. In Proceedings of the International Conference on Computer Vision, Nice, France, 2003.] ]
* Visual data mining: identifying important objects, characters and scenes in videos [ [http://www.robots.ox.ac.uk/~vgg/publications/papers/sivic04b.pdf J. Sivic and A. Zisserman. Video data mining using configurations of viewpoint invariant regions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Washington DC, USA, pp. 488-495, 2004.] ]
* Object recognition and categorization [ [http://lear.inrialpes.fr/people/triggs/events/iccv03/cdrom/iccv03/0634_dorko.pdf G. Dorko and C. Schmid. "Selection of scale invariant neighborhoods for object class recognition." In Proceedings of International Conference on Computer Vision, Nice, France, pp. 634-640, 2003.] ]

Software packages

* [http://www.robots.ox.ac.uk/~vgg/research/affine/ Affine Covariant Features] : K. Mikolajczyk maintains a web page that contains Linux binaries of the Harris-Affine detector in addition to other detectors and descriptors. Matlab code is also available that can be used to illustrate and compute the repeatability of various detectors. Code and images are also available to duplicate the results found in the Mikolajczyk et al. (2005) paper.

[http://vasc.ri.cmu.edu/~hebert/04workshop/presentations/schmid_sicily04.ppt] - Presentation slides from Mikolajczyk et al. on their 2005 paper.

[http://lear.inrialpes.fr/software] - Cordelia Schmid's Computer Vision Lab

[http://www.robots.ox.ac.uk/~vgg/research/affine/] - Code, test Images, bibliography of Affine Covariant Features maintained by Krystian Mikolajczyk and the [http://www.robots.ox.ac.uk/~vgg/ Visual Geometry Group] from the Robotics group at the University of Oxford.

[http://iris.usc.edu/Vision-Notes/bibliography/twod275.html] - Bibliography of feature (and blob) detectors maintained by USC Institute for Robotics and Intelligent Systems [http://homepages.inf.ed.ac.uk/rbf/HIPR2/log.htm] - Digital implementation of Laplacian of Gaussian

*Hessian-affine
*MSER
*Scale-space
*Isotropy
*Corner detection
*Interest point detection
*Computer vision

References

Wikimedia Foundation. 2010.

### Look at other dictionaries:

• Hessian Affine region detector — The Hessian Affine region detector is a feature detector used in the fields of computer vision and image analysis. Like other feature detectors, the Hessian Affine detector is typically used as a preprocessing step to algorithms that rely on… …   Wikipedia

• Affine shape adaptation — is a methodology for iteratively adapting the shape of the smoothing kernels in an affine group of smoothing kernels to the local image structure in neighbourhood region of a specific image point. Equivalently, affine shape adaptation can be… …   Wikipedia

• Kadir Brady saliency detector — The Kadir Brady saliency detector is designed to detect representative region in images. It performs well in the context of object class recognition. It was invented by http://www.robots.ox.ac.uk/ timork/ Timor Kadir] and [http://www.robots.ox.ac …   Wikipedia

• 3D single object recognition — In computer vision, 3D single object recognition involves recognizing and determining the pose of user chosen 3D object in a photograph or range scan. Typically, an example of the object to be recognized is presented to a vision system in a… …   Wikipedia

• Corner detection — Feature detection Output of a typical corner detection algorithm …   Wikipedia

• Blob detection — Feature detection Output of a typical corner detection algorithm …   Wikipedia

• Scale-invariant feature transform — Feature detection Output of a typical corner detection algorithm …   Wikipedia

• Maximally stable extremal regions — Feature detection Output of a typical corner detection algorithm …   Wikipedia

• Scale-invariant feature transform — Exemple de résultat de la comparaison de deux images par la méthode SIFT (Fantasia ou Jeu de la poudre, devant la porte d’entrée de la ville de Méquinez, par Eug …   Wikipédia en Français

• Bag of words model in computer vision — This is an article introducing the Bag of words model (BoW) in computer vision, especially for object categorization. From now, the BoW model refers to the BoW model in computer vision unless explicitly declared.Before introducing the BoW model,… …   Wikipedia