| 
									
										
										
										
											2010-10-26 23:01:34 +08:00
										 |  |  | /* ----------------------------------------------------------------------------
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |  * GTSAM Copyright 2010, Georgia Tech Research Corporation, | 
					
						
							|  |  |  |  * Atlanta, Georgia 30332-0415 | 
					
						
							|  |  |  |  * All Rights Reserved | 
					
						
							|  |  |  |  * Authors: Frank Dellaert, et al. (see THANKS for the full author list) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |  * See LICENSE for the license information | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |  * -------------------------------------------------------------------------- */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							|  |  |  |  * @file Feature2D.h | 
					
						
							|  |  |  |  * @brief | 
					
						
							| 
									
										
										
										
											2010-10-27 05:12:44 +08:00
										 |  |  |  * @author Duy-Nguyen Ta | 
					
						
							| 
									
										
										
										
											2010-10-26 23:01:34 +08:00
										 |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #pragma once
 | 
					
						
							| 
									
										
										
										
											2010-10-15 10:16:21 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | #include "gtsam/geometry/Point2.h"
 | 
					
						
							|  |  |  | #include <iostream>
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-10-26 23:01:34 +08:00
										 |  |  | struct Feature2D | 
					
						
							| 
									
										
										
										
											2010-10-15 10:16:21 +08:00
										 |  |  | { | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-10-26 23:01:34 +08:00
										 |  |  |   gtsam::Point2 m_p; | 
					
						
							|  |  |  |   int m_idCamera;            // id of the camera pose that makes this measurement
 | 
					
						
							|  |  |  |   int m_idLandmark;       // id of the 3D landmark that it is associated with
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   Feature2D(int idCamera, int idLandmark, gtsam::Point2 p) : | 
					
						
							|  |  |  |     m_p(p), | 
					
						
							|  |  |  |     m_idCamera(idCamera), | 
					
						
							|  |  |  |     m_idLandmark(idLandmark) {} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   void print(const std::string& s = "") const { | 
					
						
							|  |  |  |     std::cout << s << std::endl; | 
					
						
							|  |  |  |     std::cout << "Pose id: " << m_idCamera << " -- Landmark id: "  << m_idLandmark << std::endl; | 
					
						
							|  |  |  |     m_p.print("\tMeasurement: "); | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | }; |