Functions
contrib/gel/mrc/vpgl/algo/vpgl_vsol_lens_warp.cxx File Reference
#include "vpgl_vsol_lens_warp.h"
#include <vgl/vgl_point_2d.h>
#include <vgl/vgl_homg_point_2d.h>
#include <vgl/vgl_distance.h>
#include <vsol/vsol_point_2d.h>
#include <vsol/vsol_line_2d.h>
#include <vsol/vsol_polyline_2d.h>
#include <vsol/vsol_digital_curve_2d.h>
#include <vsol/vsol_polygon_2d.h>
#include <vcl_list.h>
#include <vcl_iostream.h>

Go to the source code of this file.

Functions

vsol_spatial_object_2d_sptr vpgl_vsol_lens_warp (const vsol_spatial_object_2d_sptr &obj, const vpgl_lens_distortion< double > &lens, bool invert, double midpt_thresh)
 Apply lens distortion to this vsol_spatial_object_2d and produce a new spatial object.
vsol_point_2d_sptr vpgl_vsol_lens_warp (const vsol_point_2d_sptr &pt, const vpgl_lens_distortion< double > &lens, bool invert, double midpt_thresh)
 Apply lens distortion to this vsol_point_2d and produce a new point.
vsol_curve_2d_sptr vpgl_vsol_lens_warp (const vsol_line_2d_sptr &ln, const vpgl_lens_distortion< double > &lens, bool invert, double midpt_thresh)
 Apply lens distortion to this vsol_line_2d and produce a new line.
vsol_polyline_2d_sptr vpgl_vsol_lens_warp (const vsol_polyline_2d_sptr &pln, const vpgl_lens_distortion< double > &lens, bool invert, double midpt_thresh)
 Apply lens distortion to this vsol_polyline_2d and produce a new polyline.
vsol_digital_curve_2d_sptr vpgl_vsol_lens_warp (const vsol_digital_curve_2d_sptr &dc, const vpgl_lens_distortion< double > &lens, bool invert, double midpt_thresh)
 Apply lens distortion to this vsol_digital_curve_2d and produce a new digital curve.
vsol_polygon_2d_sptr vpgl_vsol_lens_warp (const vsol_polygon_2d_sptr &pg, const vpgl_lens_distortion< double > &lens, bool invert, double midpt_thresh)
 Apply lens distortion to this vsol_polygon_2d and produce a new polygon.
bool vpgl_vsol_lens_warp (vsol_spatial_object_2d_sptr &obj, const vpgl_lens_distortion< double > &lens, bool invert)
 Apply lens distortion to this vsol_spatial_object_2d in place.
bool vpgl_vsol_lens_warp (vsol_point_2d_sptr &pt, const vpgl_lens_distortion< double > &lens, bool invert)
 Apply lens distortion to this vsol_point_2d in place.
bool vpgl_vsol_lens_warp (vsol_line_2d_sptr &ln, const vpgl_lens_distortion< double > &lens, bool invert)
 Apply lens distortion to this vsol_line_2d in place.
bool vpgl_vsol_lens_warp (vsol_polyline_2d_sptr &pln, const vpgl_lens_distortion< double > &lens, bool invert)
 Apply lens distortion to this vsol_polyline_2d in place.
bool vpgl_vsol_lens_warp (vsol_digital_curve_2d_sptr &dc, const vpgl_lens_distortion< double > &lens, bool invert)
 Apply lens distortion to this vsol_digital_curve_2d in place.
bool vpgl_vsol_lens_warp (vsol_polygon_2d_sptr &pg, const vpgl_lens_distortion< double > &lens, bool invert)
 Apply lens distortion to this vsol_polygon_2d in place.

Detailed Description

Definition in file vpgl_vsol_lens_warp.cxx.


Function Documentation

vsol_spatial_object_2d_sptr vpgl_vsol_lens_warp ( const vsol_spatial_object_2d_sptr &  obj,
const vpgl_lens_distortion< double > &  lens,
bool  invert = false,
double  midpt_thresh = -1.0 
)

Apply lens distortion to this vsol_spatial_object_2d and produce a new spatial object.

Parameters:
undistortapplies the inverse of the distortion
midpt_threshis the threshold in the error of midpoints of line segments
Note:
if midpt_thresh is negative it is ignored

Definition at line 20 of file vpgl_vsol_lens_warp.cxx.

vsol_point_2d_sptr vpgl_vsol_lens_warp ( const vsol_point_2d_sptr &  pt,
const vpgl_lens_distortion< double > &  lens,
bool  invert,
double  midpt_thresh 
)

Apply lens distortion to this vsol_point_2d and produce a new point.

Definition at line 56 of file vpgl_vsol_lens_warp.cxx.

vsol_curve_2d_sptr vpgl_vsol_lens_warp ( const vsol_line_2d_sptr &  ln,
const vpgl_lens_distortion< double > &  lens,
bool  invert,
double  midpt_thresh 
)

Apply lens distortion to this vsol_line_2d and produce a new line.

Apply lens distortion to this vsol_line_2d and produce a new curve (polyline).

Definition at line 104 of file vpgl_vsol_lens_warp.cxx.

vsol_polyline_2d_sptr vpgl_vsol_lens_warp ( const vsol_polyline_2d_sptr &  pln,
const vpgl_lens_distortion< double > &  lens,
bool  invert,
double  midpt_thresh 
)

Apply lens distortion to this vsol_polyline_2d and produce a new polyline.

Definition at line 130 of file vpgl_vsol_lens_warp.cxx.

vsol_digital_curve_2d_sptr vpgl_vsol_lens_warp ( const vsol_digital_curve_2d_sptr &  dc,
const vpgl_lens_distortion< double > &  lens,
bool  invert,
double  midpt_thresh 
)

Apply lens distortion to this vsol_digital_curve_2d and produce a new digital curve.

Definition at line 164 of file vpgl_vsol_lens_warp.cxx.

vsol_polygon_2d_sptr vpgl_vsol_lens_warp ( const vsol_polygon_2d_sptr &  pg,
const vpgl_lens_distortion< double > &  lens,
bool  invert,
double  midpt_thresh 
)

Apply lens distortion to this vsol_polygon_2d and produce a new polygon.

Definition at line 197 of file vpgl_vsol_lens_warp.cxx.

bool vpgl_vsol_lens_warp ( vsol_spatial_object_2d_sptr &  obj,
const vpgl_lens_distortion< double > &  lens,
bool  invert 
)

Apply lens distortion to this vsol_spatial_object_2d in place.

Returns:
true if successful

Definition at line 231 of file vpgl_vsol_lens_warp.cxx.

bool vpgl_vsol_lens_warp ( vsol_point_2d_sptr &  pt,
const vpgl_lens_distortion< double > &  lens,
bool  invert 
)

Apply lens distortion to this vsol_point_2d in place.

Returns:
true if successful

Definition at line 271 of file vpgl_vsol_lens_warp.cxx.

bool vpgl_vsol_lens_warp ( vsol_line_2d_sptr &  ln,
const vpgl_lens_distortion< double > &  lens,
bool  invert 
)

Apply lens distortion to this vsol_line_2d in place.

Returns:
true if successful
Note:
only the end points are warped

Definition at line 290 of file vpgl_vsol_lens_warp.cxx.

bool vpgl_vsol_lens_warp ( vsol_polyline_2d_sptr &  pln,
const vpgl_lens_distortion< double > &  lens,
bool  invert 
)

Apply lens distortion to this vsol_polyline_2d in place.

Returns:
true if successful
Note:
only the segment end points are warped

Definition at line 306 of file vpgl_vsol_lens_warp.cxx.

bool vpgl_vsol_lens_warp ( vsol_digital_curve_2d_sptr &  dc,
const vpgl_lens_distortion< double > &  lens,
bool  invert 
)

Apply lens distortion to this vsol_digital_curve_2d in place.

Returns:
true if successful
Note:
only the sample points are warped

Definition at line 326 of file vpgl_vsol_lens_warp.cxx.

bool vpgl_vsol_lens_warp ( vsol_polygon_2d_sptr &  pg,
const vpgl_lens_distortion< double > &  lens,
bool  invert 
)

Apply lens distortion to this vsol_polygon_2d in place.

Returns:
true if successful
Note:
only the segment end points are warped

Definition at line 346 of file vpgl_vsol_lens_warp.cxx.