ViSP
 All Classes Functions Variables Enumerations Enumerator Friends Groups Pages
vpFeatureBuilder.h
1 /****************************************************************************
2  *
3  * $Id: vpFeatureBuilder.h 4056 2013-01-05 13:04:42Z fspindle $
4  *
5  * This file is part of the ViSP software.
6  * Copyright (C) 2005 - 2013 by INRIA. All rights reserved.
7  *
8  * This software is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * ("GPL") version 2 as published by the Free Software Foundation.
11  * See the file LICENSE.txt at the root directory of this source
12  * distribution for additional information about the GNU GPL.
13  *
14  * For using ViSP with software that can not be combined with the GNU
15  * GPL, please contact INRIA about acquiring a ViSP Professional
16  * Edition License.
17  *
18  * See http://www.irisa.fr/lagadic/visp/visp.html for more information.
19  *
20  * This software was developed at:
21  * INRIA Rennes - Bretagne Atlantique
22  * Campus Universitaire de Beaulieu
23  * 35042 Rennes Cedex
24  * France
25  * http://www.irisa.fr/lagadic
26  *
27  * If you have questions regarding the use of this file, please contact
28  * INRIA at visp@inria.fr
29  *
30  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
31  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
32  *
33  *
34  * Description:
35  * Conversion between tracker and visual feature.
36  *
37  * Authors:
38  * Eric Marchand
39  * Fabien Spindler
40  *
41  *****************************************************************************/
42 
43 #ifndef vpFeatureBuilder_H
44 #define vpFeatureBuilder_H
45 
50 #include <visp/vpConfig.h>
51 
52 // tracker
53 #include <visp/vpDot.h>
54 #include <visp/vpDot2.h>
55 #include <visp/vpMeLine.h>
56 #include <visp/vpMeEllipse.h>
57 
58 
59 // forward projection tracker
60 #include <visp/vpPoint.h>
61 #include <visp/vpLine.h>
62 #include <visp/vpSphere.h>
63 #include <visp/vpCircle.h>
64 #include <visp/vpCylinder.h>
65 
66 // visual feature
67 #include <visp/vpFeaturePoint.h>
68 #include <visp/vpFeaturePointPolar.h>
69 #include <visp/vpFeatureLine.h>
70 #include <visp/vpFeatureEllipse.h>
71 #include <visp/vpFeaturePoint3D.h>
72 #include <visp/vpFeatureThetaU.h>
73 #include <visp/vpFeatureTranslation.h>
74 #include <visp/vpFeatureVanishingPoint.h>
75 #include <visp/vpFeatureSegment.h>
76 
77 // others
78 #include <visp/vpImagePoint.h>
79 
80 //pixel / meter conversion
81 #include <visp/vpCameraParameters.h>
82 #include <visp/vpPixelMeterConversion.h>
83 #include <visp/vpMeterPixelConversion.h>
84 
85 
92 class VISP_EXPORT vpFeatureBuilder
93 {
94 public:
95  // create vpFeaturePoint feature
96  static void create(vpFeaturePoint &s, const vpCameraParameters &cam,
97  const vpDot &d) ;
98  static void create(vpFeaturePoint &s, const vpCameraParameters &cam,
99  const vpDot2 &d) ;
100  static void create(vpFeaturePoint &s, const vpCameraParameters &cam,
101  const vpImagePoint &t) ;
102  static void create(vpFeaturePoint &s, const vpPoint &p) ;
103  static void create(vpFeaturePoint &s,
104  const vpCameraParameters &goodCam,
105  const vpCameraParameters &wrongCam,
106  const vpPoint &p) ;
107 
108  static void create(vpFeatureSegment &s, const vpCameraParameters &cam, const vpDot &d1, const vpDot &d2 ) ;
109  static void create(vpFeatureSegment &s, const vpCameraParameters &cam, const vpDot2 &d1, const vpDot2 &d2) ;
110  static void create(vpFeatureSegment &s, const vpCameraParameters &cam,
111  const vpImagePoint &ip1, const vpImagePoint &ip2);
112  static void create(vpFeatureSegment &s, vpPoint& P1, vpPoint& P2);
113 
114  // create vpFeaturePointPolar feature
115  static void create(vpFeaturePointPolar &s,
116  const vpCameraParameters &cam,
117  const vpDot &dot) ;
118  static void create(vpFeaturePointPolar &s,
119  const vpCameraParameters &cam,
120  const vpDot2 &dot) ;
121  static void create(vpFeaturePointPolar &s,
122  const vpCameraParameters &cam,
123  const vpImagePoint &iP) ;
124  static void create(vpFeaturePointPolar &s, const vpPoint &p) ;
125  static void create(vpFeaturePointPolar &s,
126  const vpCameraParameters &goodCam,
127  const vpCameraParameters &wrongCam,
128  const vpPoint &p) ;
129 
130  // create vpFeaturePoint3D feature
131  static void create(vpFeaturePoint3D &s, const vpPoint &p ) ;
132 
133  // create vpFeatureLine feature
134  static void create(vpFeatureLine &s, const vpLine &l ) ;
135  static void create(vpFeatureLine &s, const vpCylinder &c, const int line) ;
136 
137  static void create(vpFeatureLine &s,
138  const vpCameraParameters &cam,
139  const vpMeLine &mel) ;
140 
142  static void create(vpFeatureEllipse &s, const vpCircle &c) ;
143  static void create(vpFeatureEllipse &s, const vpSphere &sphere) ;
144  static void create(vpFeatureEllipse &s,
145  const vpCameraParameters &cam,
146  const vpDot &d ) ;
147  static void create(vpFeatureEllipse &s,
148  const vpCameraParameters &cam,
149  const vpDot2 &d ) ;
150  static void create(vpFeatureEllipse &s,
151  const vpCameraParameters &cam,
152  const vpMeEllipse &d ) ;
153 
154 
159  static void create(vpFeatureVanishingPoint &s, const vpPoint &p);
164  static void create(vpFeatureVanishingPoint &s, const vpFeatureLine &l1, const vpFeatureLine &l2 );
169  static void create(vpFeatureVanishingPoint &s, const vpLine &l1, const vpLine &l2 );
170 
171 
172 
173 } ;
174 
175 #endif
176 
177 /*
178  * Local variables:
179  * c-basic-offset: 2
180  * End:
181  */