Estimate corner positions using Forstner/Harris approach. More...
#include "vil_corners.h"
#include <vil/vil_fill.h>
#include <vcl_cassert.h>
#include <vil/algo/vil_gauss_filter.h>
#include <vil/vil_math.h>
Go to the source code of this file.
Functions | |
void | vil_corners (const vil_image_view< float > &grad_i, const vil_image_view< float > &grad_j, vil_image_view< float > &dest, double k) |
Compute Forstner/Harris corner strength function given gradient images. | |
void | vil_corners (const vil_image_view< double > &grad_i, const vil_image_view< double > &grad_j, vil_image_view< double > &dest, double k) |
void | vil_corners_rohr (const vil_image_view< float > &gx, const vil_image_view< float > &gy, vil_image_view< float > &corner_im) |
Compute corner strength using Rohr's recommended method. |
Estimate corner positions using Forstner/Harris approach.
Definition in file vil_corners.cxx.
void vil_corners | ( | const vil_image_view< float > & | grad_i, |
const vil_image_view< float > & | grad_j, | ||
vil_image_view< float > & | dest, | ||
double | k | ||
) |
Compute Forstner/Harris corner strength function given gradient images.
Compute Harris corner strength function given gradient images.
grad_i and grad_j are assumed to be the i and j gradient images (single plane), such as produced by vil_sobel_3x3(). At each pixel compute the Forstner/Harris corner function: det(H)-k*sqr(trace(H)), where H is the 2x2 matrix of second derivatives, generated by applying a Sobel operator to the gradient images.
The local peaks of the output image correspond to corner candidates.
grad_i and grad_j are assumed to be the i and j gradient images (single plane), such as produced by vil_sobel_3x3(). At each pixel compute the Harris corner function: det(H)-k*sqr(trace(H)), where H is the 2x2 matrix of second derivatives, generated by applying a Sobel operator to the gradient images.
The local peaks of the output image correspond to corner candidates.
Definition at line 21 of file vil_corners.cxx.
void vil_corners | ( | const vil_image_view< double > & | grad_i, |
const vil_image_view< double > & | grad_j, | ||
vil_image_view< double > & | dest, | ||
double | k | ||
) |
Definition at line 98 of file vil_corners.cxx.
void vil_corners_rohr | ( | const vil_image_view< float > & | gx, |
const vil_image_view< float > & | gy, | ||
vil_image_view< float > & | corner_im | ||
) |
Compute corner strength using Rohr's recommended method.
This computes the determinant of the matrix C=g.g' after the elements of C have been smoothed. g is the vector of first derivatives (gx,gy)' It relies only on first derivatives.
Currently uses somewhat inefficient multi-pass method. Could be improved.
This computes the determinant of the matrix C=g.g' after the elements of C have been smoothed. g is the vector of first derivatives (gx,gy)' It relies only on first derivatives.
Definition at line 183 of file vil_corners.cxx.