cgv
Loading...
Searching...
No Matches
cgv::math::camera< T > Class Template Reference

extend distorted pinhole with external calibration stored as a pose matrix More...

#include <camera.h>

Inheritance diagram for cgv::math::camera< T >:
cgv::math::distorted_pinhole< T > cgv::math::pinhole< T > cgv::math::distorted_pinhole_types

Public Member Functions

 camera ()
 standard constructor
 
template<typename S >
 camera (const camera< S > &cam)
 copy constructor
 
- Public Member Functions inherited from cgv::math::distorted_pinhole< T >
 distorted_pinhole ()
 standard constructor initializes to no distortion
 
template<typename S >
 distorted_pinhole (const distorted_pinhole< S > &dp)
 copy constructor
 
distortion_result apply_distortion_model (const fvec< T, 2 > &xd, fvec< T, 2 > &xu, fmat< T, 2, 2 > *J_ptr=0, T epsilon=distortion_inversion_epsilon< T >()) const
 apply distortion model from distorted to undistorted image coordinates used in projection direction and return whether successful
 
distortion_inversion_result invert_distortion_model (const fvec< T, 2 > &xu, fvec< T, 2 > &xd, bool use_xd_as_initial_guess=false, unsigned *iteration_ptr=0, T epsilon=distortion_inversion_epsilon< T >(), unsigned max_nr_iterations=get_standard_max_nr_iterations(), T slow_down=get_standard_slow_down()) const
 invert model for image coordinate inversion
 
template<typename S >
void compute_distortion_map (std::vector< cgv::math::fvec< S, 2 > > &map, unsigned sub_sample=1, const cgv::math::fvec< S, 2 > &invalid_point=cgv::math::fvec< S, 2 >(S(-10000)), T epsilon=distortion_inversion_epsilon< T >(), unsigned max_nr_iterations=get_standard_max_nr_iterations(), T slow_down=get_standard_slow_down()) const
 compute for all pixels the distorted image coordinates with the invert_distortion_model() function and store it in a distortion map
 
- Public Member Functions inherited from cgv::math::pinhole< T >
 pinhole ()
 standard constructor
 
template<typename S >
 pinhole (const pinhole< S > &ph)
 copy constructor
 
fmat< T, 2, 3 > get_camera_matrix () const
 
fmat< T, 3, 3 > get_squared_camera_matrix () const
 
fmat< T, 4, 4 > get_homogeneous_camera_matrix () const
 
fvec< T, 2 > image_to_pixel_coordinates (const fvec< T, 2 > &x) const
 
fvec< T, 2 > pixel_to_image_coordinates (const fvec< T, 2 > &p) const
 
bool estimate_parameters (const std::vector< fmat< T, 3, 3 > > &Hs, bool quadratic_pixels=true, bool no_skew=true)
 

Public Attributes

fmat< T, 3, 4 > pose
 external calibration
 
- Public Attributes inherited from cgv::math::distorted_pinhole< T >
fvec< T, 2 > dc
 
k [6]
 
p [2]
 
max_radius_for_projection = T(10)
 
- Public Attributes inherited from cgv::math::pinhole< T >
unsigned w
 
unsigned h
 
fvec< T, 2 > s
 
fvec< T, 2 > c
 
skew = 0.0f
 

Additional Inherited Members

- Public Types inherited from cgv::math::distorted_pinhole_types
enum class  distortion_result { success , out_of_bounds , division_by_zero }
 possible results of applying distortion model More...
 
enum class  distortion_inversion_result {
  convergence , max_iterations_reached , divergence , out_of_bounds ,
  division_by_zero
}
 possible results of inverting distortion model More...
 
- Static Public Member Functions inherited from cgv::math::distorted_pinhole< T >
static T get_standard_slow_down ()
 slow down factor [0,1] to decrease step size during inverse Jacobian stepping
 
- Static Public Member Functions inherited from cgv::math::distorted_pinhole_types
static unsigned get_standard_max_nr_iterations ()
 default maximum number of iterations used for inversion of distortion models
 

Detailed Description

template<typename T>
class cgv::math::camera< T >

extend distorted pinhole with external calibration stored as a pose matrix

Definition at line 553 of file camera.h.

Constructor & Destructor Documentation

◆ camera() [1/2]

template<typename T >
cgv::math::camera< T >::camera ( )
inline

standard constructor

Definition at line 559 of file camera.h.

References cgv::math::camera< T >::pose, and cgv::math::pose_construct().

◆ camera() [2/2]

template<typename T >
template<typename S >
cgv::math::camera< T >::camera ( const camera< S > &  cam)
inline

copy constructor

Definition at line 564 of file camera.h.

References cgv::math::camera< T >::pose.

Member Data Documentation

◆ pose

template<typename T >
fmat<T,3,4> cgv::math::camera< T >::pose

external calibration

Definition at line 557 of file camera.h.

Referenced by cgv::math::camera< T >::camera(), and cgv::math::camera< T >::camera().


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