Visual Servoing Platform  version 3.5.1 under development (2023-03-14)
vpProjectionDisplay.h
1 /****************************************************************************
2  *
3  * ViSP, open source Visual Servoing Platform software.
4  * Copyright (C) 2005 - 2019 by Inria. All rights reserved.
5  *
6  * This software is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  * See the file LICENSE.txt at the root directory of this source
11  * distribution for additional information about the GNU GPL.
12  *
13  * For using ViSP with software that can not be combined with the GNU
14  * GPL, please contact Inria about acquiring a ViSP Professional
15  * Edition License.
16  *
17  * See http://visp.inria.fr for more information.
18  *
19  * This software was developed at:
20  * Inria Rennes - Bretagne Atlantique
21  * Campus Universitaire de Beaulieu
22  * 35042 Rennes Cedex
23  * France
24  *
25  * If you have questions regarding the use of this file, please contact
26  * Inria at visp@inria.fr
27  *
28  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
29  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
30  *
31  * Description:
32  * Interface with the image for feature display.
33  *
34  * Authors:
35  * Eric Marchand
36  *
37  *****************************************************************************/
38 
39 #ifndef vpProjectionDisplay_H
40 #define vpProjectionDisplay_H
41 
47 #include <visp3/core/vpConfig.h>
48 #if defined(VISP_HAVE_DISPLAY)
49 
50 #include <visp3/core/vpCameraParameters.h>
51 #include <visp3/core/vpColor.h>
52 #include <visp3/core/vpForwardProjection.h>
53 #include <visp3/core/vpImage.h>
54 #include <visp3/core/vpPoint.h>
55 #include <visp3/gui/vpDisplayD3D.h>
56 #include <visp3/gui/vpDisplayGDI.h>
57 #include <visp3/gui/vpDisplayGTK.h>
58 #include <visp3/gui/vpDisplayOpenCV.h>
59 #include <visp3/gui/vpDisplayX.h>
60 
61 #include <list>
62 
68 class VISP_EXPORT vpProjectionDisplay
69 {
70 private:
73 
74 #if defined VISP_HAVE_X11
75  vpDisplayX dIcam;
76  vpDisplayX dIext;
77 #elif defined VISP_HAVE_GTK
78  vpDisplayGTK dIcam;
79  vpDisplayGTK dIext;
80 #elif defined VISP_HAVE_GDI
81  vpDisplayGDI dIcam;
82  vpDisplayGDI dIext;
83 #elif defined VISP_HAVE_OPENCV
84  vpDisplayOpenCV dIcam;
85  vpDisplayOpenCV dIext;
86 #elif defined(VISP_HAVE_D3D9)
87  vpDisplayD3D dIcam;
88  vpDisplayD3D dIext;
89 #endif
90 public:
91  void init();
92  void init(int select);
93  void close();
94  static int internalView() { return 0x01; }
95  static int externalView() { return 0x02; }
96 
99  : Icam(), Iext(),
100 #if defined(VISP_HAVE_DISPLAY)
101  dIcam(), dIext(),
102 #endif
103  listFp(), o(), x(), y(), z(), traj()
104  {
105  init();
106  }
107  explicit vpProjectionDisplay(int select)
108  : Icam(), Iext(),
109 #if defined(VISP_HAVE_DISPLAY)
110  dIcam(), dIext(),
111 #endif
112  listFp(), o(), x(), y(), z(), traj()
113  {
114  init(select);
115  }
116 
117  void insert(vpForwardProjection &fp);
118  void display(vpImage<unsigned char> &I, const vpHomogeneousMatrix &cextMo, const vpHomogeneousMatrix &cMo,
119  const vpCameraParameters &cam, const vpColor &color, const bool &displayTraj = false,
120  unsigned int thickness = 1);
121  void displayCamera(vpImage<unsigned char> &I, const vpHomogeneousMatrix &cextMo, const vpHomogeneousMatrix &cMo,
122  const vpCameraParameters &cam, unsigned int thickness = 1);
123 
124 private:
125  std::list<vpForwardProjection *> listFp;
126  vpPoint o;
127  vpPoint x;
128  vpPoint y;
129  vpPoint z;
130  vpMatrix traj;
131 };
132 
133 #endif
134 #endif
135 
136 /*
137  * Local variables:
138  * c-basic-offset: 2
139  * End:
140  */
Generic class defining intrinsic camera parameters.
Class to define RGB colors available for display functionnalities.
Definition: vpColor.h:158
Display for windows using Direct3D 3rd party. Thus to enable this class Direct3D should be installed....
Definition: vpDisplayD3D.h:107
Display for windows using GDI (available on any windows 32 platform).
Definition: vpDisplayGDI.h:129
The vpDisplayGTK allows to display image using the GTK 3rd party library. Thus to enable this class G...
Definition: vpDisplayGTK.h:135
The vpDisplayOpenCV allows to display image using the OpenCV library. Thus to enable this class OpenC...
Use the X11 console to display images on unix-like OS. Thus to enable this class X11 should be instal...
Definition: vpDisplayX.h:135
Class that defines what is a generic geometric feature.
Implementation of an homogeneous matrix and operations on such kind of matrices.
Implementation of a matrix and operations on matrices.
Definition: vpMatrix.h:154
Class that defines a 3D point in the object frame and allows forward projection of a 3D point in the ...
Definition: vpPoint.h:82
interface with the image for feature display