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

Function to find 4-connected boundary around thresholded region. More...

#include <vil/vil_image_view.h>
#include <vcl_cassert.h>
#include <vcl_vector.h>

Go to the source code of this file.

Functions

template<class T >
void vil_next_point_below_thresh4 (int &i, int &j, int &dir, const T *&p, int ni1, int nj1, vcl_ptrdiff_t istep, vcl_ptrdiff_t jstep, T threshold)
 Move (i,j) to next point below threshold.
template<class T >
void vil_next_point_above_thresh4 (int &i, int &j, int &dir, const T *&p, int ni1, int nj1, vcl_ptrdiff_t istep, vcl_ptrdiff_t jstep, T threshold)
 Move (i,j) to next point above threshold.
template<class T >
void vil_find_4con_boundary_below_threshold (vcl_vector< int > &bi, vcl_vector< int > &bj, const vil_image_view< T > &image, const T &threshold, int p0_i, int p0_j)
 Find 4-connected boundary around thresholded region containing point.
template<class T >
void vil_find_4con_boundary_above_threshold (vcl_vector< int > &bi, vcl_vector< int > &bj, const vil_image_view< T > &image, const T &threshold, int p0_i, int p0_j)
 Find 4-connected boundary around thresholded region containing point.

Detailed Description

Function to find 4-connected boundary around thresholded region.

Author:
Tim Cootes

Definition in file vil_find_4con_boundary.h.


Function Documentation

template<class T >
void vil_find_4con_boundary_above_threshold ( vcl_vector< int > &  bi,
vcl_vector< int > &  bj,
const vil_image_view< T > &  image,
const T &  threshold,
int  p0_i,
int  p0_j 
) [inline]

Find 4-connected boundary around thresholded region containing point.

Assumes that (p0_i,p0_j) is a point in the image which satisfies the threshold (ie image(p0_i,p0_j)>=threshold). Searches for the boundary pixels (ie points which satisfy threshold next to ones which don't) and runs around until it gets back to beginning. On exit the boundary points are given by (bi[k],bj[k])

Definition at line 119 of file vil_find_4con_boundary.h.

template<class T >
void vil_find_4con_boundary_below_threshold ( vcl_vector< int > &  bi,
vcl_vector< int > &  bj,
const vil_image_view< T > &  image,
const T &  threshold,
int  p0_i,
int  p0_j 
) [inline]

Find 4-connected boundary around thresholded region containing point.

Assumes that (p0_i,p0_j) is a point in the image which satisfies the threshold (ie image(p0_i,p0_j)<=threshold). Searches for the boundary pixels (ie points which satisfy threshold next to ones which don't) and runs around until it gets back to beginning. On exit the boundary points are given by (bi[k],bj[k])

Definition at line 76 of file vil_find_4con_boundary.h.

template<class T >
void vil_next_point_above_thresh4 ( int &  i,
int &  j,
int &  dir,
const T *&  p,
int  ni1,
int  nj1,
vcl_ptrdiff_t  istep,
vcl_ptrdiff_t  jstep,
threshold 
) [inline]

Move (i,j) to next point above threshold.

Start looking in direction dir (0=++x,1=++y,2=--x,3=--y) *p is current point (i,j). On exit (i,j) and p are updated to move to neighbour

Definition at line 46 of file vil_find_4con_boundary.h.

template<class T >
void vil_next_point_below_thresh4 ( int &  i,
int &  j,
int &  dir,
const T *&  p,
int  ni1,
int  nj1,
vcl_ptrdiff_t  istep,
vcl_ptrdiff_t  jstep,
threshold 
) [inline]

Move (i,j) to next point below threshold.

Start looking in direction dir (0=++x,1=++y,2=--x,3=--y) *p is current point (i,j). On exit (i,j) and p are updated to move to neighbour

Definition at line 18 of file vil_find_4con_boundary.h.