Function to trace 4-connected boundary around region in bool image. More...
#include "vil_trace_4con_boundary.h"Go to the source code of this file.
Functions | |
| void | vil_next_4con_boundary_point (int &i, int &j, int &dir, const bool *&p, int ni1, int nj1, vcl_ptrdiff_t istep, vcl_ptrdiff_t jstep) |
| Move (i,j) to next boundary point. | |
| void | vil_trace_4con_boundary (vcl_vector< int > &bi, vcl_vector< int > &bj, const vil_image_view< bool > &image, int i0, int j0) |
| Trace 4-connected boundary around region in boolean image. | |
Function to trace 4-connected boundary around region in bool image.
Definition in file vil_trace_4con_boundary.cxx.
| void vil_next_4con_boundary_point | ( | int & | i, |
| int & | j, | ||
| int & | dir, | ||
| const bool *& | p, | ||
| int | ni1, | ||
| int | nj1, | ||
| vcl_ptrdiff_t | istep, | ||
| vcl_ptrdiff_t | jstep | ||
| ) | [inline] |
Move (i,j) to next boundary point.
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 12 of file vil_trace_4con_boundary.cxx.
| void vil_trace_4con_boundary | ( | vcl_vector< int > & | bi, |
| vcl_vector< int > & | bj, | ||
| const vil_image_view< bool > & | image, | ||
| int | i0, | ||
| int | j0 | ||
| ) |
Trace 4-connected boundary around region in boolean image.
Assumes that (i0,j0) is a boundary point. Searches for the boundary pixels and runs around until it gets back to beginning. On exit the boundary points are given by (bi[k],bj[k])
Assumes that (i0,j0) is a boundary point. Searches for the boundary pixels and runs around until it gets back to beginning. On exit the boundary points are given by (bi[k],bj[k])
Point to note: If (i0,j0) is in the middle of a 1 pixel wide line connecting two regions, then the point will occur twice in the list, once as the first point, then once in the middle of the list as we trace through it to get to the other side of the blob.
Definition at line 52 of file vil_trace_4con_boundary.cxx.
1.7.5.1