Solar
Public Member Functions | List of all members
SolAR::MODULES::OPENGV::Triangulation Class Reference

Triangulates set of corresponding 2D-2D points correspondances with known respective camera poses based on opengv. UUID: bb7dac37-499a-4bc4-9b57-3e010a94ed30 More...

#include <Triangulation.h>

Inheritance diagram for SolAR::MODULES::OPENGV::Triangulation:
Inheritance graph
[legend]
Collaboration diagram for SolAR::MODULES::OPENGV::Triangulation:
Collaboration graph
[legend]

Public Member Functions

 Triangulation ()
 Triangulation constructor.
 
 ~Triangulation ()
 Triangulation destructor.
 
void setCameraParameters (const datastructure::CamCalibration &intrinsicParams, const datastructure::CamDistortion &distorsionParams) override
 this method is used to set intrinsic parameters and distorsion of the camera More...
 
double triangulate (const std::vector< datastructure::Point2Df > &pt2d_1, const std::vector< datastructure::Point2Df > &pt2d_2, const std::vector< datastructure::DescriptorMatch > &matches, const std::pair< unsigned int, unsigned int > &working_views, const datastructure::Transform3Df &poseView1, const datastructure::Transform3Df &poseView2, std::vector< SRef< datastructure::CloudPoint > > &pcloud) override
 triangulate pairs of points 2d captured from two views with differents poses (with respect to the camera instrinsic parameters). More...
 
double triangulate (const std::vector< datastructure::Keypoint > &keypointsView1, const std::vector< datastructure::Keypoint > &keypointsView2, const std::vector< datastructure::DescriptorMatch > &matches, const std::pair< unsigned int, unsigned int > &working_views, const datastructure::Transform3Df &poseView1, const datastructure::Transform3Df &poseView2, std::vector< SRef< datastructure::CloudPoint > > &pcloud) override
 triangulate pairs of points 2d captured from two views with differents poses (with respect to the camera instrinsic parameters). More...
 
double triangulate (const std::vector< datastructure::Keypoint > &keypointsView1, const std::vector< datastructure::Keypoint > &keypointsView2, const SRef< datastructure::DescriptorBuffer > &descriptor1, const SRef< datastructure::DescriptorBuffer > &descriptor2, const std::vector< datastructure::DescriptorMatch > &matches, const std::pair< unsigned int, unsigned int > &working_views, const datastructure::Transform3Df &poseView1, const datastructure::Transform3Df &poseView2, std::vector< SRef< datastructure::CloudPoint > > &pcloud) override
 triangulate pairs of points 2d captured from two views with differents poses (with respect to the camera instrinsic parameters). More...
 
double triangulate (SRef< SolAR::datastructure::Frame > frame1, SRef< SolAR::datastructure::Frame > frame2, const std::vector< SolAR::datastructure::DescriptorMatch > &matches, const std::pair< uint32_t, uint32_t > &working_views, std::vector< SRef< SolAR::datastructure::CloudPoint > > &pcloud, const bool &onlyDepth=false) override
 calculating 3D cloud points by triangulating pairs of matched features or using depth information of keypoints. More...
 
void unloadComponent () override final
 

Detailed Description

Triangulates set of corresponding 2D-2D points correspondances with known respective camera poses based on opengv. UUID: bb7dac37-499a-4bc4-9b57-3e010a94ed30

Member Function Documentation

◆ setCameraParameters()

void SolAR::MODULES::OPENGV::Triangulation::setCameraParameters ( const datastructure::CamCalibration &  intrinsicParams,
const datastructure::CamDistortion &  distorsionParams 
)
override

this method is used to set intrinsic parameters and distorsion of the camera

Parameters
[in]Cameracalibration matrix parameters.
[in]Cameradistorsion parameters.

◆ triangulate() [1/4]

double SolAR::MODULES::OPENGV::Triangulation::triangulate ( const std::vector< datastructure::Keypoint > &  keypointsView1,
const std::vector< datastructure::Keypoint > &  keypointsView2,
const SRef< datastructure::DescriptorBuffer > &  descriptor1,
const SRef< datastructure::DescriptorBuffer > &  descriptor2,
const std::vector< datastructure::DescriptorMatch > &  matches,
const std::pair< unsigned int, unsigned int > &  working_views,
const datastructure::Transform3Df &  poseView1,
const datastructure::Transform3Df &  poseView2,
std::vector< SRef< datastructure::CloudPoint > > &  pcloud 
)
override

triangulate pairs of points 2d captured from two views with differents poses (with respect to the camera instrinsic parameters).

Parameters
[in]pointsView1,setof keypoints seen in view_1.
[in]pointsView2,setof keypoints seen in view_2.
[in]descriptor1,setof descriptors in view_1.
[in]descriptor2,setof descriptors in view_2.
[in]matches,thematches between the keypoints of the view1 and the keypoints of the view 2.
[in]working_views,apair representing the id of the two views
[in]poseView1,Camerapose in the world coordinates system of the view_1 expressed as a Transform3D.
[in]poseView2,Camerapose in the world coordinates system of the view_2 expressed as a Transform3D..
[out]pcloud,Setof triangulated 3d_points.
Returns
the mean re-projection error (mean distance in pixels between the original 2D points and the projection of the reconstructed 3D points)

◆ triangulate() [2/4]

double SolAR::MODULES::OPENGV::Triangulation::triangulate ( const std::vector< datastructure::Keypoint > &  keypointsView1,
const std::vector< datastructure::Keypoint > &  keypointsView2,
const std::vector< datastructure::DescriptorMatch > &  matches,
const std::pair< unsigned int, unsigned int > &  working_views,
const datastructure::Transform3Df &  poseView1,
const datastructure::Transform3Df &  poseView2,
std::vector< SRef< datastructure::CloudPoint > > &  pcloud 
)
override

triangulate pairs of points 2d captured from two views with differents poses (with respect to the camera instrinsic parameters).

Parameters
[in]pointsView1,setof keypoints seen in view_1.
[in]pointsView2,setof keypoints seen in view_2.
[in]matches,thematches between the keypoints of the view1 and the keypoints of the view 2.
[in]working_views,apair representing the id of the two views
[in]poseView1,Camerapose in the world coordinates system of the view_1 expressed as a Transform3D.
[in]poseView2,Camerapose in the world coordinates system of the view_2 expressed as a Transform3D..
[out]pcloud,Setof triangulated 3d_points.
Returns
the mean re-projection error (mean distance in pixels between the original 2D points and the projection of the reconstructed 3D points)

◆ triangulate() [3/4]

double SolAR::MODULES::OPENGV::Triangulation::triangulate ( const std::vector< datastructure::Point2Df > &  pt2d_1,
const std::vector< datastructure::Point2Df > &  pt2d_2,
const std::vector< datastructure::DescriptorMatch > &  matches,
const std::pair< unsigned int, unsigned int > &  working_views,
const datastructure::Transform3Df &  poseView1,
const datastructure::Transform3Df &  poseView2,
std::vector< SRef< datastructure::CloudPoint > > &  pcloud 
)
override

triangulate pairs of points 2d captured from two views with differents poses (with respect to the camera instrinsic parameters).

Parameters
[in]pointsView1,setof 2D points seen in view_1.
[in]pointsView2,setof 2D points seen in view_2.
[in]matches,thematches between the keypoints of the view1 and the keypoints of the view 2.
[in]working_views,apair representing the id of the two views
[in]poseView1,camerapose in the world coordinates system of the view_1 expressed as a Transform3D.
[in]poseView2,camerapose in the world coordinates system of the view_2 expressed as a Transform3D..
[out]pcloud,setof triangulated 3d_points.
Returns
the mean re-projection error (mean distance in pixels between the original 2D points and the projection of the reconstructed 3D points)

◆ triangulate() [4/4]

double SolAR::MODULES::OPENGV::Triangulation::triangulate ( SRef< SolAR::datastructure::Frame >  frame1,
SRef< SolAR::datastructure::Frame >  frame2,
const std::vector< SolAR::datastructure::DescriptorMatch > &  matches,
const std::pair< uint32_t, uint32_t > &  working_views,
std::vector< SRef< SolAR::datastructure::CloudPoint > > &  pcloud,
const bool &  onlyDepth = false 
)
override

calculating 3D cloud points by triangulating pairs of matched features or using depth information of keypoints.

Parameters
[in]frame1the first frame.
[in]frame2the second frame.
[in]matchesthe matches between these two frames.
[in]working_viewsa pair representing the id of the two views
[out]pcloudSet of triangulated 3d_points.
[in]onlyDepthif it is true, using only depth information of keypoints for computing 3D cloud points.
Returns
the mean re-projection error (mean distance in pixels between the original 2D points and the projection of the reconstructed 3D points)

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