SRBA: Sparser Relative Bundle Adjustment
srba/models/observations_MonocularCamera.h
00001 /* +---------------------------------------------------------------------------+
00002    |                     Mobile Robot Programming Toolkit (MRPT)               |
00003    |                          http://www.mrpt.org/                             |
00004    |                                                                           |
00005    | Copyright (c) 2005-2015, Individual contributors, see AUTHORS file        |
00006    | See: http://www.mrpt.org/Authors - All rights reserved.                   |
00007    | Released under BSD License. See details in http://www.mrpt.org/License    |
00008    +---------------------------------------------------------------------------+ */
00009 
00010 #pragma once
00011 
00012 #include <mrpt/utils/TCamera.h>
00013 #include <mrpt/tfest.h>  // for use in landmark_matcher<>
00014 
00015 namespace srba {
00016 namespace observations {
00021     struct MonocularCamera
00022     {
00023         static const size_t  OBS_DIMS = 2; 
00024         
00026         struct obs_data_t
00027         {
00028             mrpt::utils::TPixelCoordf  px;
00029 
00031             template <class ARRAY>
00032             inline void getAsArray(ARRAY &obs) const {
00033                 obs[0] = px.x;
00034                 obs[1] = px.y;
00035             }
00036         };
00037 
00040         struct TObservationParams
00041         {
00042             mrpt::utils::TCamera  camera_calib;
00043         };
00044     };
00045 
00047     template <> struct landmark_matcher<MonocularCamera>
00048     {
00049         template <class POSE>
00050         static bool find_relative_pose(
00051             const mrpt::aligned_containers<MonocularCamera::obs_data_t>::vector_t & new_kf_obs,
00052             const mrpt::aligned_containers<MonocularCamera::obs_data_t>::vector_t & old_kf_obs,
00053             const MonocularCamera::TObservationParams &params,
00054             POSE &pose_new_kf_wrt_old_kf)
00055         {
00056             return false; // We cannot find any absolute relative pose only from 2 sets of monocular features, right?
00057         }
00058     };
00059 
00061 }
00062 } // end NS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends