| 
									
										
										
										
											2010-10-15 10:16:21 +08:00
										 |  |  | #ifndef FEATURE2D_H
 | 
					
						
							|  |  |  | #define FEATURE2D_H
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include "gtsam/geometry/Point2.h"
 | 
					
						
							|  |  |  | #include <iostream>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class Feature2D | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  |     gtsam::Point2 m_p; | 
					
						
							| 
									
										
										
										
											2010-10-22 06:49:37 +08:00
										 |  |  |     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
 | 
					
						
							| 
									
										
										
										
											2010-10-15 10:16:21 +08:00
										 |  |  | public: | 
					
						
							| 
									
										
										
										
											2010-10-22 06:49:37 +08:00
										 |  |  |     Feature2D(int idCamera, int idLandmark, gtsam::Point2 p) | 
					
						
							| 
									
										
										
										
											2010-10-22 08:17:08 +08:00
										 |  |  |             :m_p(p), | 
					
						
							|  |  |  |             m_idCamera(idCamera), | 
					
						
							|  |  |  |             m_idLandmark(idLandmark) | 
					
						
							| 
									
										
										
										
											2010-10-22 06:49:37 +08:00
										 |  |  |     {}; | 
					
						
							| 
									
										
										
										
											2010-10-15 10:16:21 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |     void print(const std::string& s = "") const | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         std::cout << s << std::endl; | 
					
						
							| 
									
										
										
										
											2010-10-22 06:49:37 +08:00
										 |  |  |         std::cout << "Pose id: " << m_idCamera << " -- Landmark id: "  << m_idLandmark << std::endl; | 
					
						
							|  |  |  |         m_p.print("\tMeasurement: "); | 
					
						
							| 
									
										
										
										
											2010-10-15 10:16:21 +08:00
										 |  |  |     } | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif // FEATURE2D_H
 |