Classes | Typedefs | Functions
Map.hpp File Reference
#include <map>
#include <vector>
#include "File.hpp"
#include "Location.hpp"
#include "Arc.hpp"
#include "Fiducials.hpp"
Include dependency graph for Map.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Map__Struct
 A *Map__Struct* represents the fiducial location map. More...

Typedefs

typedef struct Map__StructMap
 *Map* is the representation of a fiducial marker map.

Functions

void Map__arc_announce (Map map, Arc *arc, CV_Image image, unsigned int sequence_number)
 Causes an arc announce callback routine to be called.
void Map__arc_append (Map map, Arc *arc)
 Appends *arc* to *map*.
ArcMap__arc_lookup (Map map, Tag *from, Tag *to)
 Returns the *Arc* that contains *from_tag* and *to_tag*.
unsigned int Map__arc_update (Map map, CameraTag *camera_from, CameraTag *camera_to, CV_Image image, unsigned int sequence_number)
 Makes sure the *Arc* connecting *from* to *to* is up to date.
Map Map__create (String_Const map_path, String_Const map_base, void *announce_object, Fiducials_Arc_Announce_Routine arc_announce_routine, Fiducials_Tag_Announce_Routine tag_announce_routine, String_Const tag_heights_file_name, String_Const from)
 Returns a new *Map*.
bool Map__equals (Map map1, Map map2)
 Returns -1, 0, 1 depending upon the sort order of *map1* and *map2*.
void Map__free (Map map)
 Releases storage associated with *map*.
void Map__image_log (Map map, CV_Image image, unsigned int sequence_number)
void Map__restore (Map map, File in_file)
 Restore the contents of *Map* from *in_file*.
void Map__save (Map map)
 Save *map* out to the file named *file_name*.
void Map__sort (Map map)
 Sort the contents of *map* to be in a consistent order.
void Map__svg_write (Map map, String_Const svg_base_name, std::vector< Location * > &locations)
 Writes *map* out to a file called *svg_base_name*.svg.
void Map__tag_announce (Map map, Tag *tag, bool visible, CV_Image image, unsigned int sequence_number)
 Causes an arc announce callback routine to be called.
TagHeightMap__tag_height_lookup (Map map, unsigned int id)
 Returns the distance per pixel for *id*.
void Map__tag_heights_xml_read (Map map, String_Const tag_heights_file_name)
 Reads the tag heights .xml file.
TagMap__tag_lookup (Map map, unsigned int tag_id)
 Return the *Tag* associated with *tag_id* from *map*.
void Map__update (Map map, CV_Image image, unsigned int sequence_number)
 Updates the location of each *tag* in *map*.
void Map__write (Map map, File out_file)
 Writes *map* out to *out_file*.

Typedef Documentation

typedef struct Map__Struct* Map

*Map* is the representation of a fiducial marker map.

Definition at line 13 of file Map.hpp.


Function Documentation

void Map__arc_announce ( Map  map,
Arc arc,
CV_Image  image,
unsigned int  sequence_number 
)

Causes an arc announce callback routine to be called.

Parameters:
mapis the parent *Map* object.
arcis the *Arc* object that has just been changed.
imageis the image associated with the arc.
sequence_numberis the sequence number associated with announce.

Map__arc_announce*() will cause the arc announde call back routine to be called for *arc*.

Definition at line 34 of file Map.cpp.

void Map__arc_append ( Map  map,
Arc arc 
)

Appends *arc* to *map*.

Parameters:
mapto append to.
arcto append

Map__arc_append*() will append *arc* to *map*.

Definition at line 51 of file Map.cpp.

Arc* Map__arc_lookup ( Map  map,
Tag from_tag,
Tag to_tag 
)

Returns the *Arc* that contains *from_tag* and *to_tag*.

Parameters:
mapthat has the *Arc* table.
from_tagis the from *Tag*.
to_tagis the to *Tag*.
Returns:
the corresponding *Arc* object.

Map__arc_lookup*() will return the *Arc* that contains *from_tag* and *to_tag*. If no such *Arc* exists yet, it is created.

Definition at line 67 of file Map.cpp.

unsigned int Map__arc_update ( Map  map,
CameraTag camera_from,
CameraTag camera_to,
CV_Image  image,
unsigned int  sequence_number 
)

Makes sure the *Arc* connecting *from* to *to* is up to date.

Parameters:
mapto use for *Arc* updating.
camera_fromis the *Camera_Tag* to for one end of the *Arc*.
camera_tois the *Camera_Tag* to the other end of the *Arc*.
imageis the image that the *Camera_Tag*'s came from.
sequence_numberis the image sequence number.
Returns:
the number of *Arc*'s updated (1 or 0).

Map__arc_update*() will create or update the *Arc* in *map* associated with *from* and *to*. *image* used to determine the frame size.

Definition at line 99 of file Map.cpp.

Map Map__create ( String_Const  file_path,
String_Const  file_base,
void *  announce_object,
Fiducials_Arc_Announce_Routine  arc_announce_routine,
Fiducials_Tag_Announce_Routine  tag_announce_routine,
String_Const  tag_heights_file_name,
String_Const  from 
)

Returns a new *Map*.

Parameters:
file_pathis the directory/folder that the map fileis stored in.
file_baseis the base name of the map file.
announce_objectis an opaque object that is passed into announce routines.
arc_announce_routineis the arc callback routine.
tag_announce_routineis the tag callback routine.
tag_heights_file_nameis the tag ceiling heights .xml file.
fromis used for memory leak checking.
Returns:
a new *Map*.

Map__create*() creates and returns an empty initialized *Map* object.

Definition at line 276 of file Map.cpp.

bool Map__equals ( Map  map1,
Map  map2 
)

Returns -1, 0, 1 depending upon the sort order of *map1* and *map2*.

Parameters:
map1is the first *Map* to compare.
map2is the second *Map* to compare.
Returns:
sort order.

Map__compare*() will compare *map1* to *map2* and return -1 if *map1* sorts before *map2*, 0 if they are equal, and -1 if *map1* would sort after *map2*. Realistically, this routine is only used for testing equality.

Definition at line 228 of file Map.cpp.

void Map__free ( Map  map)

Releases storage associated with *map*.

Parameters:
mapto release storage for.

Map__free*() will release the storage associaed with *map*.

Definition at line 328 of file Map.cpp.

void Map__image_log ( Map  map,
CV_Image  image,
unsigned int  sequence_number 
)

Definition at line 362 of file Map.cpp.

void Map__restore ( Map  map,
File  in_file 
)

Restore the contents of *Map* from *in_file*.

Parameters:
mapis the *Map* to restore into
in_fileis the *File* to read from.

Map__restore*() will read in an XML map file from *in_file* and store it into *map*.

Definition at line 379 of file Map.cpp.

void Map__save ( Map  map)

Save *map* out to the file named *file_name*.

Parameters:
mapto save out.

Map__save*() will save *map* to the *file_name* file in XML format.

Definition at line 417 of file Map.cpp.

void Map__sort ( Map  map)

Sort the contents of *map* to be in a consistent order.

Parameters:
mapto reorder.

Map__sort*() will reorder all of the tags and neihbgors in *map* to be in a consitent order.

Definition at line 437 of file Map.cpp.

void Map__svg_write ( Map  map,
String_Const  svg_base_name,
std::vector< Location * > &  locations 
)

Writes *map* out to a file called *svg_base_name*.svg.

Parameters:
mapis the *Map* to write out.
svg_base_nameis the base name of the .svg file to write out.
locationsis the list of locations that the robot path took.

Map__svg_write*() will write out *map* out *svg_base_name*.svg.

Definition at line 449 of file Map.cpp.

void Map__tag_announce ( Map  map,
Tag tag,
bool  visible,
CV_Image  image,
unsigned int  sequence_number 
)

Causes an arc announce callback routine to be called.

Parameters:
mapis the parent *Map* object.
tagis the *Tag* object that has just been changed.
visibleis True if the tag is in the current field of view.
imageis the current image being processed.
sequence_numberis the sequence number.

Map__arc_announce*() will cause the arc announde call back routine to be called for *arc*.

Definition at line 537 of file Map.cpp.

TagHeight* Map__tag_height_lookup ( Map  map,
unsigned int  id 
)

Returns the distance per pixel for *id*.

Parameters:
mapis the *Map* object that contains the distance per pixel table.
idis the *Tag* identifier to look up.
Returns:
the distance per pixel for *Tag* id.

Map__distance_per_pixel*() will return the distance per pixel for Tag* *id*. The distance can be in any consistent distance (e.g. (millimeters, centimeters, meters, kilometers, inches, feet, miles, light seconds, etc.)

Definition at line 558 of file Map.cpp.

void Map__tag_heights_xml_read ( Map  map,
String_Const  tag_heights_file_name 
)

Reads the tag heights .xml file.

Parameters:
mapto to store tag heights into.
tag_heights_file_nameis the file to read from.

Map__tag_heights_xml_read*() will read the *tag_heights_file_name* .xml file and the the tag heights into *map*.

Definition at line 581 of file Map.cpp.

Tag* Map__tag_lookup ( Map  map,
unsigned int  tag_id 
)

Return the *Tag* associated with *tag_id* from *map*.

Parameters:
mapto use for lookup.
tag_idto lookup.
Returns:
*Tag* associated with *tag_id*.

Map__tag_lookup*() will lookup and return the *Tag* associaed with tag_id* using *map. If no previous instance of *tag_id* has been encountered, a new *Tag* is created and add to the association in *map*.

Definition at line 622 of file Map.cpp.

void Map__update ( Map  map,
CV_Image  image,
unsigned int  sequence_number 
)

Updates the location of each *tag* in *map*.

Parameters:
mapto update.
imageis the current image.
sequence_numberis the image sequence number.

Map__update*() will update the location of all the *Tag*'s in *map*.

Definition at line 676 of file Map.cpp.

void Map__write ( Map  map,
File  out_file 
)

Writes *map* out to *out_file*.

Parameters:
mapto write out.
out_fileto write to.

Map__write*() will write *map* to *out_file* in XML format.

Definition at line 640 of file Map.cpp.



fiducial_lib
Author(s): Wayne Gramlich
autogenerated on Thu Jun 6 2019 18:08:04