Visual Servoing Platform  version 3.6.1 under development (2024-11-14)
vpProjectionDisplay.h
1 /*
2  * ViSP, open source Visual Servoing Platform software.
3  * Copyright (C) 2005 - 2024 by Inria. All rights reserved.
4  *
5  * This software is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  * See the file LICENSE.txt at the root directory of this source
10  * distribution for additional information about the GNU GPL.
11  *
12  * For using ViSP with software that can not be combined with the GNU
13  * GPL, please contact Inria about acquiring a ViSP Professional
14  * Edition License.
15  *
16  * See https://visp.inria.fr for more information.
17  *
18  * This software was developed at:
19  * Inria Rennes - Bretagne Atlantique
20  * Campus Universitaire de Beaulieu
21  * 35042 Rennes Cedex
22  * France
23  *
24  * If you have questions regarding the use of this file, please contact
25  * Inria at visp@inria.fr
26  *
27  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
28  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
29  *
30  * Description:
31  * Interface with the image for feature display.
32  */
33 
34 #ifndef VP_PROJECTION_DISPLAY_H
35 #define VP_PROJECTION_DISPLAY_H
36 
42 #include <visp3/core/vpConfig.h>
43 #if defined(VISP_HAVE_DISPLAY)
44 
45 #include <visp3/core/vpCameraParameters.h>
46 #include <visp3/core/vpColor.h>
47 #include <visp3/core/vpForwardProjection.h>
48 #include <visp3/core/vpImage.h>
49 #include <visp3/core/vpPoint.h>
50 #include <visp3/gui/vpDisplayD3D.h>
51 #include <visp3/gui/vpDisplayGDI.h>
52 #include <visp3/gui/vpDisplayGTK.h>
53 #include <visp3/gui/vpDisplayOpenCV.h>
54 #include <visp3/gui/vpDisplayX.h>
55 
56 #include <list>
57 
58 BEGIN_VISP_NAMESPACE
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  VP_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 
131 END_VISP_NAMESPACE
132 #endif
133 #endif
Generic class defining intrinsic camera parameters.
Class to define RGB colors available for display functionalities.
Definition: vpColor.h:157
Display for windows using Direct3D 3rd party. Thus to enable this class Direct3D should be installed....
Definition: vpDisplayD3D.h:106
Display for windows using GDI (available on any windows 32 platform).
Definition: vpDisplayGDI.h:130
The vpDisplayGTK allows to display image using the GTK 3rd party library. Thus to enable this class G...
Definition: vpDisplayGTK.h:133
The vpDisplayOpenCV allows to display image using the OpenCV library. Thus to enable this class OpenC...
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:169
Class that defines a 3D point in the object frame and allows forward projection of a 3D point in the ...
Definition: vpPoint.h:79
interface with the image for feature display
VP_EXPLICIT vpProjectionDisplay(int select)