Functions
core/vil/algo/vil_orientations.h File Reference

Functions to compute orientations and gradient magnitude. More...

#include <vil/vil_image_view.h>
#include <vxl_config.h>
#include <vil/algo/vil_sobel_3x3.h>

Go to the source code of this file.

Functions

void vil_orientations (const vil_image_view< float > &grad_i, const vil_image_view< float > &grad_j, vil_image_view< float > &orient_im, vil_image_view< float > &grad_mag)
 Compute orientation (in radians) and gradient magnitude at each pixel.
void vil_orientations (const vil_image_view< float > &grad_i, const vil_image_view< float > &grad_j, vil_image_view< vxl_byte > &orient_im, vil_image_view< float > &grad_mag, unsigned n_orientations=256)
 Compute discrete orientation and gradient magnitude at each pixel.
void vil_orientations_at_edges (const vil_image_view< float > &grad_i, const vil_image_view< float > &grad_j, vil_image_view< vxl_byte > &orient_im, vil_image_view< float > &grad_mag, float grad_threshold, unsigned n_orientations=255)
 Compute discrete orientation and gradient magnitude at edge pixels.
template<class T >
void vil_orientations_from_sobel (const vil_image_view< T > &src_image, vil_image_view< float > &orient_im, vil_image_view< float > &grad_mag)
 Compute orientation and gradient magnitude using sobel to get gradients.
template<class T >
void vil_orientations_from_sobel (const vil_image_view< T > &src_image, vil_image_view< vxl_byte > &orient_im, vil_image_view< float > &grad_mag, unsigned n_orientations=256)
 Compute discrete orientation and gradient using sobel operations.

Detailed Description

Functions to compute orientations and gradient magnitude.

Author:
Tim Cootes

Definition in file vil_orientations.h.


Function Documentation

void vil_orientations ( const vil_image_view< float > &  grad_i,
const vil_image_view< float > &  grad_j,
vil_image_view< float > &  orient_im,
vil_image_view< float > &  grad_mag 
)

Compute orientation (in radians) and gradient magnitude at each pixel.

Images assumed to be single plane

Definition at line 11 of file vil_orientations.cxx.

void vil_orientations ( const vil_image_view< float > &  grad_i,
const vil_image_view< float > &  grad_j,
vil_image_view< vxl_byte > &  orient_im,
vil_image_view< float > &  grad_mag,
unsigned  n_orientations = 256 
)

Compute discrete orientation and gradient magnitude at each pixel.

Computes orientation at each pixel and scales to range [0,n_orientations-1].

Orientation of i corresponds to angles in range [(i-0.5)dA,(i+0.5)dA] where dA=2*pi/n_orientations.

Images assumed to be single plane

Definition at line 53 of file vil_orientations.cxx.

void vil_orientations_at_edges ( const vil_image_view< float > &  grad_i,
const vil_image_view< float > &  grad_j,
vil_image_view< vxl_byte > &  orient_im,
vil_image_view< float > &  grad_mag,
float  grad_threshold,
unsigned  n_orientations = 255 
)

Compute discrete orientation and gradient magnitude at edge pixels.

Computes orientation at each pixel and scales to range [0,n_orientations]. If gradient magnitude is less than grad_threshold, then orientation of zero is set, meaning undefined orientation.

Orientation of i>0 corresponds to angles in range [(i-1.5)dA,(i-0.5)dA] where dA=2*pi/n_orientations.

Images assumed to be single plane

Definition at line 106 of file vil_orientations.cxx.

template<class T >
void vil_orientations_from_sobel ( const vil_image_view< T > &  src_image,
vil_image_view< float > &  orient_im,
vil_image_view< float > &  grad_mag 
) [inline]

Compute orientation and gradient magnitude using sobel to get gradients.

Definition at line 54 of file vil_orientations.h.

template<class T >
void vil_orientations_from_sobel ( const vil_image_view< T > &  src_image,
vil_image_view< vxl_byte > &  orient_im,
vil_image_view< float > &  grad_mag,
unsigned  n_orientations = 256 
) [inline]

Compute discrete orientation and gradient using sobel operations.

Computes orientation at each pixel and scales to range [0,n_orientations-1].

Orientation of i corresponds to angles in range [(i-0.5)dA,(i+0.5)dA] where dA=2*pi/n_orientations.

Images assumed to be single plane

Definition at line 72 of file vil_orientations.h.