Static Public Member Functions
bmdl_mesh Class Reference

#include <bmdl_mesh.h>

List of all members.

Static Public Member Functions

static bool next_trace_point (unsigned int &i, unsigned int &j, int &dir, const unsigned int *&p, unsigned int value, unsigned int ni, unsigned int nj, vcl_ptrdiff_t istep, vcl_ptrdiff_t jstep)
 find the next trace point and direction.
static bool trace_boundary (vcl_vector< vgl_point_2d< double > > &pts, unsigned int value, const vil_image_view< unsigned int > &labels, vil_image_view< bool > &visited, unsigned int i, unsigned int j)
 trace a single boundary starting and location (i,j).
static vcl_vector< vgl_polygon
< double > > 
trace_boundaries (const vil_image_view< unsigned int > &labels, bool drop_clipped=true)
 trace the boundaries of the building labels into polygons.
static unsigned int link_boundary_edges (const vil_image_view< unsigned int > &labels, const vcl_vector< vgl_polygon< double > > &polygons, vcl_vector< bmdl_edge > &edges, vcl_vector< bmdl_region > &regions)
 extract shared boundary edges from the polygon boundaries.
static bool is_clipped (const vcl_vector< vgl_point_2d< double > > &poly, unsigned ni, unsigned nj)
 test if a boundary is clipped by the image of size ni by nj.
static void simplify_polygon (vcl_vector< vgl_point_2d< double > > &polygon, double tol)
 simplify a polygon by fitting lines.
static void simplify_boundaries (vcl_vector< vgl_polygon< double > > &boundaries)
 simplify the boundaries by fitting lines.
static void simplify_edge (vcl_vector< vgl_point_2d< double > > &pts, double tol)
 simplify an edge by fitting lines.
static void simplify_edges (vcl_vector< bmdl_edge > &edges)
 simplify the linked edges by fitting lines.
static void roof_subtract_hole (const imesh_vertex_array< 3 > &verts, vcl_vector< unsigned int > &face, const vcl_vector< unsigned int > &hole)
 Subtract a hole from an existing face in a mesh.
static void mesh_lidar (const vcl_vector< vgl_polygon< double > > &boundaries, const vil_image_view< unsigned int > &labels, const vil_image_view< double > &heights, const vil_image_view< double > &ground, imesh_mesh &mesh)
 construct a mesh out of data and labels.
static void mesh_lidar (const vcl_vector< bmdl_edge > &edges, const vcl_vector< bmdl_region > &regions, unsigned int num_joints, const vil_image_view< unsigned int > &labels, const vil_image_view< double > &heights, const vil_image_view< double > &ground, imesh_mesh &mesh)
 construct a mesh out of data and labels using linked edges.

Detailed Description

Definition at line 36 of file bmdl_mesh.h.


Member Function Documentation

bool bmdl_mesh::is_clipped ( const vcl_vector< vgl_point_2d< double > > &  poly,
unsigned  ni,
unsigned  nj 
) [static]

test if a boundary is clipped by the image of size ni by nj.

Definition at line 149 of file bmdl_mesh.cxx.

unsigned int bmdl_mesh::link_boundary_edges ( const vil_image_view< unsigned int > &  labels,
const vcl_vector< vgl_polygon< double > > &  polygons,
vcl_vector< bmdl_edge > &  edges,
vcl_vector< bmdl_region > &  regions 
) [static]

extract shared boundary edges from the polygon boundaries.

Returns:
the number of joints linking the edges

Definition at line 190 of file bmdl_mesh.cxx.

void bmdl_mesh::mesh_lidar ( const vcl_vector< vgl_polygon< double > > &  boundaries,
const vil_image_view< unsigned int > &  labels,
const vil_image_view< double > &  heights,
const vil_image_view< double > &  ground,
imesh_mesh mesh 
) [static]

construct a mesh out of data and labels.

The coordinate system is flipped over the x-axis to make it right handed i.e. (x,y) -> (x,-y)

Definition at line 506 of file bmdl_mesh.cxx.

void bmdl_mesh::mesh_lidar ( const vcl_vector< bmdl_edge > &  edges,
const vcl_vector< bmdl_region > &  regions,
unsigned int  num_joints,
const vil_image_view< unsigned int > &  labels,
const vil_image_view< double > &  heights,
const vil_image_view< double > &  ground,
imesh_mesh mesh 
) [static]

construct a mesh out of data and labels using linked edges.

The coordinate system is flipped over the x-axis to make it right handed i.e. (x,y) -> (x,-y)

Definition at line 602 of file bmdl_mesh.cxx.

bool bmdl_mesh::next_trace_point ( unsigned int &  i,
unsigned int &  j,
int &  dir,
const unsigned int *&  p,
unsigned int  value,
unsigned int  ni,
unsigned int  nj,
vcl_ptrdiff_t  istep,
vcl_ptrdiff_t  jstep 
) [static]

find the next trace point and direction.

Definition at line 18 of file bmdl_mesh.cxx.

void bmdl_mesh::roof_subtract_hole ( const imesh_vertex_array< 3 > &  verts,
vcl_vector< unsigned int > &  face,
const vcl_vector< unsigned int > &  hole 
) [static]

Subtract a hole from an existing face in a mesh.

Definition at line 907 of file bmdl_mesh.cxx.

void bmdl_mesh::simplify_boundaries ( vcl_vector< vgl_polygon< double > > &  boundaries) [static]

simplify the boundaries by fitting lines.

Definition at line 397 of file bmdl_mesh.cxx.

void bmdl_mesh::simplify_edge ( vcl_vector< vgl_point_2d< double > > &  pts,
double  tol 
) [static]

simplify an edge by fitting lines.

tol is the tolerance for line fitting

Definition at line 422 of file bmdl_mesh.cxx.

void bmdl_mesh::simplify_edges ( vcl_vector< bmdl_edge > &  edges) [static]

simplify the linked edges by fitting lines.

Definition at line 481 of file bmdl_mesh.cxx.

void bmdl_mesh::simplify_polygon ( vcl_vector< vgl_point_2d< double > > &  pts,
double  tol 
) [static]

simplify a polygon by fitting lines.

tol is the tolerance for line fitting

Definition at line 347 of file bmdl_mesh.cxx.

vcl_vector< vgl_polygon< double > > bmdl_mesh::trace_boundaries ( const vil_image_view< unsigned int > &  labels,
bool  drop_clipped = true 
) [static]

trace the boundaries of the building labels into polygons.

If dropped_clipped is true then buildings clipped by the image boundaries are not traced

Definition at line 109 of file bmdl_mesh.cxx.

bool bmdl_mesh::trace_boundary ( vcl_vector< vgl_point_2d< double > > &  pts,
unsigned int  value,
const vil_image_view< unsigned int > &  labels,
vil_image_view< bool > &  visited,
unsigned int  i,
unsigned int  j 
) [static]

trace a single boundary starting and location (i,j).

Definition at line 70 of file bmdl_mesh.cxx.


The documentation for this class was generated from the following files: