Visual Servoing Platform  version 3.6.1 under development (2025-02-14)
vpRBFeatureTrackerInput.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 
35 #ifndef VP_RB_FEATURE_TRACKER_INPUT_H
36 #define VP_RB_FEATURE_TRACKER_INPUT_H
37 
38 #include <visp3/core/vpConfig.h>
39 #include <visp3/core/vpImage.h>
40 #include <visp3/core/vpCameraParameters.h>
41 #include <visp3/core/vpRect.h>
42 
43 #include <visp3/rbt/vpRBSilhouettePoint.h>
44 
45 BEGIN_VISP_NAMESPACE
46 
47 
53 struct VISP_EXPORT vpRBRenderData
54 {
60  double zNear, zFar; // clipping values
63 
64  vpRBRenderData() : zNear(0.0), zFar(0.0), boundingBox() { }
65 
67  {
68  *this = other;
69  }
70 
72  {
73  *this = std::move(other);
74  }
75 
77  {
78  normals = o.normals;
79  depth = o.depth;
80  color = o.color;
81  silhouetteCanny = o.silhouetteCanny;
82  isSilhouette = o.isSilhouette;
83  zNear = o.zNear;
84  zFar = o.zFar;
85  boundingBox = o.boundingBox;
86  cMo = o.cMo;
87  return *this;
88  }
89 
91  {
92  normals = std::move(o.normals);
93  depth = std::move(o.depth);
94  color = std::move(o.color);
95  silhouetteCanny = std::move(o.silhouetteCanny);
96  isSilhouette = std::move(o.isSilhouette);
97  zNear = std::move(o.zNear);
98  zFar = std::move(o.zFar);
99  boundingBox = std::move(o.boundingBox);
100  cMo = std::move(o.cMo);
101  return *this;
102  }
103 };
104 
111 class VISP_EXPORT vpRBFeatureTrackerInput
112 {
113 public:
118  std::vector<vpRBSilhouettePoint> silhouettePoints;
121 
122  bool hasDepth() const { return depth.getSize() > 0; }
123  bool hasMask() const { return mask.getSize() > 0; }
124  bool hasColorImage() const { return IRGB.getSize() > 0; }
125 
127 
129  {
130  I = o.I;
131  IRGB = o.IRGB;
132  depth = o.depth;
133  mask = o.mask;
134  silhouettePoints = o.silhouettePoints;
135  cam = o.cam;
136  renders = o.renders;
137  return *this;
138  }
139 
141  {
142  *this = other;
143  }
144 
146  {
147  I = std::move(o.I);
148  IRGB = std::move(o.IRGB);
149  depth = std::move(o.depth);
150  mask = std::move(o.mask);
151  silhouettePoints = std::move(o.silhouettePoints);
152  cam = std::move(o.cam);
153  renders = std::move(o.renders);
154  return *this;
155  }
156 
158  {
159  *this = std::move(other);
160  }
161 };
162 
163 END_VISP_NAMESPACE
164 
165 #endif
Generic class defining intrinsic camera parameters.
Implementation of an homogeneous matrix and operations on such kind of matrices.
unsigned int getSize() const
Definition: vpImage.h:221
All the data related to a single tracking frame. This contains both the input data (from a real camer...
vpRBFeatureTrackerInput(vpRBFeatureTrackerInput &&other)
vpRBFeatureTrackerInput & operator=(const vpRBFeatureTrackerInput &o)
vpImage< vpRGBa > IRGB
Image luminance.
vpImage< unsigned char > I
vpRBFeatureTrackerInput & operator=(vpRBFeatureTrackerInput &&o)
std::vector< vpRBSilhouettePoint > silhouettePoints
vpImage< float > mask
depth image, 0 sized if depth is not available
vpRBFeatureTrackerInput(const vpRBFeatureTrackerInput &other)
vpRBFeatureTrackerInput()=default
vpImage< float > depth
RGB image, 0 sized if RGB is not available.
vpRBRenderData renders
camera parameters
Defines a rectangle in the plane.
Definition: vpRect.h:79
Render data storage.
vpRBRenderData()
Pose of the object in the camera frame for which the renders were generated.
double zNear
Binary image indicating whether a given pixel is part of the silhouette.
vpRBRenderData(vpRBRenderData &&other)
vpRBRenderData(const vpRBRenderData &other)
vpRBRenderData & operator=(vpRBRenderData &&o)
vpImage< float > depth
Image containing the per-pixel normal vector (RGB, in object space)
vpImage< vpRGBf > silhouetteCanny
vpHomogeneousMatrix cMo
vpRBRenderData & operator=(const vpRBRenderData &o)
vpImage< vpRGBa > color
vpImage< vpRGBf > normals
vpImage< unsigned char > isSilhouette
Image containing the orientation of the gradients.