#include <vpgl_geo_camera.h>

Public Member Functions | |
| vpgl_geo_camera () | |
| creates identity matrix and all zero tiepoints. More... | |
| vpgl_geo_camera (vnl_matrix< double > trans_matrix, vpgl_lvcs_sptr lvcs) | |
| if scale tag is false be sure that trans_matrix[0][0] and trans_matrix[1][1] is 1.0 otherwise set it to true. More... | |
| vpgl_geo_camera (vpgl_geo_camera const &rhs) | |
| vpgl_geo_camera (vpgl_camera< double > const &rhs) | |
| ~vpgl_geo_camera () override=default | |
| std::string | type_name () const override |
| class identity functions for casting. More... | |
| void | set_utm (int utm_zone, unsigned northing) |
| void | set_lvcs (vpgl_lvcs_sptr lvcs) |
| void | set_scale_format (bool scale_tag) |
| vpgl_lvcs_sptr const | lvcs () |
| void | project (const double x, const double y, const double z, double &u, double &v) const override |
| Implementing the generic camera interface of vpgl_camera. More... | |
| void | backproject (const double u, const double v, double &x, double &y, double &z) |
| backprojects an image point into local coordinates (based on lvcs_). More... | |
| void | translate (double tx, double ty, double z) |
| double | pixel_spacing () |
| the lidar pixel size in meters assumes square pixels. More... | |
| bool | operator== (vpgl_geo_camera const &rhs) const |
| virtual std::string | is_a () const |
| Return a platform independent string identifying the class. More... | |
| virtual bool | is_class (std::string const &cls) const |
| Return true if the argument matches the string identifying the class or any parent class. More... | |
| void | save_as_tfw (std::string const &tfw_filename) |
| save the camera as tfw. More... | |
| void | img_to_global (const double i, const double j, double &lon, double &lat) const |
| returns the corresponding geographical coordinates for a given pixel position (i,j). More... | |
| void | global_to_img (const double lon, const double lat, const double elev, double &u, double &v) const |
| returns the corresponding pixel position for given geographical coordinates. More... | |
| void | img_to_global_utm (const double i, const double j, double &x, double &y) const |
| returns the corresponding geographical coordinates for a given pixel position (i,j). More... | |
| void | global_utm_to_img (const double x, const double y, int zone, double elev, double &u, double &v) const |
| returns the corresponding pixel position for given geographical coordinates. More... | |
| void | local_to_utm (const double x, const double y, const double z, double &e, double &n, int &utm_zone) |
| returns the corresponding utm location for the given local position. More... | |
| int | utm_zone () |
| bool | img_four_corners_in_utm (const unsigned ni, const unsigned nj, double elev, double &e1, double &n1, double &e2, double &n2) |
| void | img_to_wgs (unsigned i, unsigned j, unsigned k, double &lon, double &lat, double &elev) |
| returns the corresponding geographical coordinate (lon, lat, elev) for a given pixel position (i,j,k). More... | |
| vnl_matrix< double > | trans_matrix () |
| void | b_write (vsl_b_ostream &os) const |
| Binary save self to stream. More... | |
| void | b_read (vsl_b_istream &is) |
| Binary load self from stream. More... | |
| short | version () const |
| Return IO version number;. More... | |
| void | ref () |
| void | unref () |
| long | get_references () const |
| bool | is_referenced () const |
Static Public Member Functions | |
| static bool | init_geo_camera (vil_image_resource_sptr const &geotiff_img, const vpgl_lvcs_sptr &lvcs, vpgl_geo_camera *&camera) |
| uses lvcs to convert local x-y to global longitude and latitude. More... | |
| static bool | init_geo_camera (vil_image_resource_sptr const geotiff_img, vpgl_geo_camera *&camera) |
| Assumes geographic coordinates are global. More... | |
| static bool | init_geo_camera (const std::string &img_name, unsigned ni, unsigned nj, const vpgl_lvcs_sptr &lvcs, vpgl_geo_camera *&camera) |
| warning, use this camera cautiously, the output of img_to_global method needs to be adjusted sign wise. More... | |
| static bool | init_geo_camera_from_filename (const std::string &img_name, unsigned ni, unsigned nj, const vpgl_lvcs_sptr &lvcs, vpgl_geo_camera *&camera) |
| static bool | init_geo_camera (const std::string &tfw_name, const vpgl_lvcs_sptr &lvcs, int utm_zone, unsigned northing, vpgl_geo_camera *&camera) |
| init using a tfw file, reads the transformation matrix from the tfw. More... | |
| static bool | init_geo_camera (std::string tfw_name, int utm_zone, unsigned northing, vpgl_geo_camera *&camera) |
| init without lvcs. Assumes geographic coordinates are global. More... | |
| static bool | comp_trans_matrix (double sx1, double sy1, double sz1, std::vector< std::vector< double > > tiepoints, vnl_matrix< double > &trans_matrix, bool scale_tag=false) |
Private Attributes | |
| vnl_matrix< double > | trans_matrix_ |
| vpgl_lvcs_sptr | lvcs_ |
| lvcs of world parameters. More... | |
| bool | is_utm |
| int | utm_zone_ |
| int | northing_ |
| bool | scale_tag_ |
Friends | |
| std::ostream & | operator<< (std::ostream &s, vpgl_geo_camera const &p) |
| Write camera to stream. More... | |
| std::istream & | operator>> (std::istream &s, vpgl_geo_camera &p) |
| Read camera from stream. More... | |
Definition at line 29 of file vpgl_geo_camera.h.
| vpgl_geo_camera::vpgl_geo_camera | ( | ) |
creates identity matrix and all zero tiepoints.
Definition at line 23 of file vpgl_geo_camera.cxx.
|
inline |
if scale tag is false be sure that trans_matrix[0][0] and trans_matrix[1][1] is 1.0 otherwise set it to true.
Definition at line 36 of file vpgl_geo_camera.h.
| vpgl_geo_camera::vpgl_geo_camera | ( | vpgl_geo_camera const & | rhs | ) |
Definition at line 32 of file vpgl_geo_camera.cxx.
| vpgl_geo_camera::vpgl_geo_camera | ( | vpgl_camera< double > const & | rhs | ) |
|
overridedefault |
| void vpgl_geo_camera::b_read | ( | vsl_b_istream & | is | ) |
Binary load self from stream.
Definition at line 640 of file vpgl_geo_camera.cxx.
| void vpgl_geo_camera::b_write | ( | vsl_b_ostream & | os | ) | const |
Binary save self to stream.
Definition at line 622 of file vpgl_geo_camera.cxx.
| void vpgl_geo_camera::backproject | ( | const double | u, |
| const double | v, | ||
| double & | x, | ||
| double & | y, | ||
| double & | z | ||
| ) |
backprojects an image point into local coordinates (based on lvcs_).
Definition at line 322 of file vpgl_geo_camera.cxx.
|
static |
Definition at line 567 of file vpgl_geo_camera.cxx.
| void vpgl_geo_camera::global_to_img | ( | const double | lon, |
| const double | lat, | ||
| const double | gz, | ||
| double & | u, | ||
| double & | v | ||
| ) | const |
returns the corresponding pixel position for given geographical coordinates.
the input global coord is wgs84
The input global coord is wgs84
Definition at line 402 of file vpgl_geo_camera.cxx.
| void vpgl_geo_camera::global_utm_to_img | ( | const double | x, |
| const double | y, | ||
| int | zone, | ||
| double | elev, | ||
| double & | u, | ||
| double & | v | ||
| ) | const |
returns the corresponding pixel position for given geographical coordinates.
the input global coord is UTM: x east, for y north
The input global coord is UTM: x east, for y north
Definition at line 462 of file vpgl_geo_camera.cxx.
| bool vpgl_geo_camera::img_four_corners_in_utm | ( | const unsigned | ni, |
| const unsigned | nj, | ||
| double | elev, | ||
| double & | e1, | ||
| double & | n1, | ||
| double & | e2, | ||
| double & | n2 | ||
| ) |
Definition at line 520 of file vpgl_geo_camera.cxx.
| void vpgl_geo_camera::img_to_global | ( | const double | i, |
| const double | j, | ||
| double & | lon, | ||
| double & | lat | ||
| ) | const |
returns the corresponding geographical coordinates for a given pixel position (i,j).
the output global coord is wgs84
The output global coord is wgs84
Definition at line 376 of file vpgl_geo_camera.cxx.
| void vpgl_geo_camera::img_to_global_utm | ( | const double | i, |
| const double | j, | ||
| double & | x, | ||
| double & | y | ||
| ) | const |
returns the corresponding geographical coordinates for a given pixel position (i,j).
the output global coord is UTM: x east, y north
The output global coord is UTM: x east, y north
Definition at line 437 of file vpgl_geo_camera.cxx.
| void vpgl_geo_camera::img_to_wgs | ( | unsigned | i, |
| unsigned | j, | ||
| unsigned | k, | ||
| double & | lon, | ||
| double & | lat, | ||
| double & | elev | ||
| ) |
returns the corresponding geographical coordinate (lon, lat, elev) for a given pixel position (i,j,k).
Note: not yet implemented – PVr, 16 aug 2012
Definition at line 616 of file vpgl_geo_camera.cxx.
|
static |
uses lvcs to convert local x-y to global longitude and latitude.
Definition at line 41 of file vpgl_geo_camera.cxx.
|
inlinestatic |
Assumes geographic coordinates are global.
Definition at line 51 of file vpgl_geo_camera.h.
|
static |
warning, use this camera cautiously, the output of img_to_global method needs to be adjusted sign wise.
define a geo_camera by the image file name (filename should have format such as xxx_N35W73_S0.6x0.6_xxx.tif).
for 'S' use -lat and for 'W' -lon
Definition at line 111 of file vpgl_geo_camera.cxx.
|
static |
init using a tfw file, reads the transformation matrix from the tfw.
Definition at line 265 of file vpgl_geo_camera.cxx.
|
inlinestatic |
init without lvcs. Assumes geographic coordinates are global.
Definition at line 69 of file vpgl_geo_camera.h.
|
static |
Definition at line 205 of file vpgl_geo_camera.cxx.
|
inlinevirtual |
Return a platform independent string identifying the class.
Definition at line 108 of file vpgl_geo_camera.h.
|
inlinevirtual |
Return true if the argument matches the string identifying the class or any parent class.
Definition at line 111 of file vpgl_geo_camera.h.
| void vpgl_geo_camera::local_to_utm | ( | const double | x, |
| const double | y, | ||
| const double | z, | ||
| double & | e, | ||
| double & | n, | ||
| int & | utm_zone | ||
| ) |
returns the corresponding utm location for the given local position.
Definition at line 497 of file vpgl_geo_camera.cxx.
|
inline |
Definition at line 84 of file vpgl_geo_camera.h.
| bool vpgl_geo_camera::operator== | ( | vpgl_geo_camera const & | rhs | ) | const |
Definition at line 536 of file vpgl_geo_camera.cxx.
|
inline |
the lidar pixel size in meters assumes square pixels.
Definition at line 97 of file vpgl_geo_camera.h.
|
overridevirtual |
Implementing the generic camera interface of vpgl_camera.
transforms a given local 3d world point to image plane.
x,y,z are in local coordinates, u represents image column, v image row
Implements vpgl_camera< double >.
Definition at line 294 of file vpgl_geo_camera.cxx.
| void vpgl_geo_camera::save_as_tfw | ( | std::string const & | tfw_filename | ) |
save the camera as tfw.
Definition at line 507 of file vpgl_geo_camera.cxx.
|
inline |
Definition at line 80 of file vpgl_geo_camera.h.
|
inline |
Definition at line 82 of file vpgl_geo_camera.h.
|
inline |
Definition at line 78 of file vpgl_geo_camera.h.
|
inline |
Definition at line 154 of file vpgl_geo_camera.h.
| void vpgl_geo_camera::translate | ( | double | tx, |
| double | ty, | ||
| double | z | ||
| ) |
Definition at line 360 of file vpgl_geo_camera.cxx.
|
inlineoverridevirtual |
class identity functions for casting.
Reimplemented from vpgl_camera< double >.
Definition at line 75 of file vpgl_geo_camera.h.
|
inline |
Definition at line 146 of file vpgl_geo_camera.h.
|
inline |
Return IO version number;.
Definition at line 169 of file vpgl_geo_camera.h.
|
friend |
Write camera to stream.
Definition at line 543 of file vpgl_geo_camera.cxx.
|
friend |
Read camera from stream.
Definition at line 556 of file vpgl_geo_camera.cxx.
|
private |
Definition at line 176 of file vpgl_geo_camera.h.
|
private |
lvcs of world parameters.
Definition at line 175 of file vpgl_geo_camera.h.
|
private |
Definition at line 178 of file vpgl_geo_camera.h.
|
private |
Definition at line 179 of file vpgl_geo_camera.h.
|
private |
Definition at line 173 of file vpgl_geo_camera.h.
|
private |
Definition at line 177 of file vpgl_geo_camera.h.
1.8.15