Visual Servoing Platform  version 3.6.1 under development (2024-02-13)
vpProjectionDisplay.h
1 /****************************************************************************
2  *
3  * ViSP, open source Visual Servoing Platform software.
4  * Copyright (C) 2005 - 2023 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 https://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 *****************************************************************************/
35 
36 #ifndef vpProjectionDisplay_H
37 #define vpProjectionDisplay_H
38 
44 #include <visp3/core/vpConfig.h>
45 #if defined(VISP_HAVE_DISPLAY)
46 
47 #include <visp3/core/vpCameraParameters.h>
48 #include <visp3/core/vpColor.h>
49 #include <visp3/core/vpForwardProjection.h>
50 #include <visp3/core/vpImage.h>
51 #include <visp3/core/vpPoint.h>
52 #include <visp3/gui/vpDisplayD3D.h>
53 #include <visp3/gui/vpDisplayGDI.h>
54 #include <visp3/gui/vpDisplayGTK.h>
55 #include <visp3/gui/vpDisplayOpenCV.h>
56 #include <visp3/gui/vpDisplayX.h>
57 
58 #include <list>
59 
65 class VISP_EXPORT vpProjectionDisplay
66 {
67 private:
70 
71 #if defined(VISP_HAVE_X11)
72  vpDisplayX dIcam;
73  vpDisplayX dIext;
74 #elif defined(VISP_HAVE_GTK)
75  vpDisplayGTK dIcam;
76  vpDisplayGTK dIext;
77 #elif defined(VISP_HAVE_GDI)
78  vpDisplayGDI dIcam;
79  vpDisplayGDI dIext;
80 #elif defined(HAVE_OPENCV_HIGHGUI)
81  vpDisplayOpenCV dIcam;
82  vpDisplayOpenCV dIext;
83 #elif defined(VISP_HAVE_D3D9)
84  vpDisplayD3D dIcam;
85  vpDisplayD3D dIext;
86 #endif
87 public:
88  void init();
89  void init(int select);
90  void close();
91  static int internalView() { return 0x01; }
92  static int externalView() { return 0x02; }
93 
96  : Icam(), Iext(),
97 #if defined(VISP_HAVE_DISPLAY)
98  dIcam(), dIext(),
99 #endif
100  listFp(), o(), x(), y(), z(), traj()
101  {
102  init();
103  }
104  explicit vpProjectionDisplay(int select)
105  : Icam(), Iext(),
106 #if defined(VISP_HAVE_DISPLAY)
107  dIcam(), dIext(),
108 #endif
109  listFp(), o(), x(), y(), z(), traj()
110  {
111  init(select);
112  }
113 
114  void insert(vpForwardProjection &fp);
115  void display(vpImage<unsigned char> &I, const vpHomogeneousMatrix &cextMo, const vpHomogeneousMatrix &cMo,
116  const vpCameraParameters &cam, const vpColor &color, const bool &displayTraj = false,
117  unsigned int thickness = 1);
118  void displayCamera(vpImage<unsigned char> &I, const vpHomogeneousMatrix &cextMo, const vpHomogeneousMatrix &cMo,
119  const vpCameraParameters &cam, unsigned int thickness = 1);
120 
121 private:
122  std::list<vpForwardProjection *> listFp;
123  vpPoint o;
124  vpPoint x;
125  vpPoint y;
126  vpPoint z;
127  vpMatrix traj;
128 };
129 
130 #endif
131 #endif
132 
133 /*
134  * Local variables:
135  * c-basic-offset: 2
136  * End:
137  */
Generic class defining intrinsic camera parameters.
Class to define RGB colors available for display functionalities.
Definition: vpColor.h:152
Display for windows using Direct3D 3rd party. Thus to enable this class Direct3D should be installed....
Definition: vpDisplayD3D.h:101
Display for windows using GDI (available on any windows 32 platform).
Definition: vpDisplayGDI.h:128
The vpDisplayGTK allows to display image using the GTK 3rd party library. Thus to enable this class G...
Definition: vpDisplayGTK.h:128
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:128
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:146
Class that defines a 3D point in the object frame and allows forward projection of a 3D point in the ...
Definition: vpPoint.h:77
interface with the image for feature display