Visual Servoing Platform version 3.7.0
Loading...
Searching...
No Matches
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
46
47
60struct VISP_EXPORT vpRBRenderData
61{
67 double zNear, zFar; // clipping values
68 double objectDiameter; // Object diameter
73
74 vpRBRenderData() : zNear(0.0), zFar(0.0), boundingBox() { }
75
77 {
78 *this = other;
79 }
80
82 {
83 *this = std::move(other);
84 }
85
87 {
88 normals = o.normals;
89 depth = o.depth;
90 color = o.color;
95 zNear = o.zNear;
96 zFar = o.zFar;
98 cMo = o.cMo;
99 return *this;
100 }
101
103 {
104 normals = std::move(o.normals);
105 depth = std::move(o.depth);
106 color = std::move(o.color);
107 silhouetteCanny = std::move(o.silhouetteCanny);
108 isSilhouette = std::move(o.isSilhouette);
109 objectDiameter = std::move(o.objectDiameter);
110 objectCenter = std::move(o.objectCenter);
111 zNear = std::move(o.zNear);
112 zFar = std::move(o.zFar);
113 boundingBox = std::move(o.boundingBox);
114 cMo = std::move(o.cMo);
115 return *this;
116 }
117};
118
125class VISP_EXPORT vpRBFeatureTrackerInput
126{
127public:
132 std::vector<vpRBSilhouettePoint> silhouettePoints;
135
136 bool hasDepth() const { return depth.getSize() > 0; }
137 bool hasMask() const { return mask.getSize() > 0; }
138 bool hasColorImage() const { return IRGB.getSize() > 0; }
139
141
143 {
144 I = o.I;
145 IRGB = o.IRGB;
146 depth = o.depth;
147 mask = o.mask;
149 cam = o.cam;
150 renders = o.renders;
151 return *this;
152 }
153
155 {
156 *this = other;
157 }
158
160 {
161 I = std::move(o.I);
162 IRGB = std::move(o.IRGB);
163 depth = std::move(o.depth);
164 mask = std::move(o.mask);
165 silhouettePoints = std::move(o.silhouettePoints);
166 cam = std::move(o.cam);
167 renders = std::move(o.renders);
168 return *this;
169 }
170
172 {
173 *this = std::move(other);
174 }
175};
176
177END_VISP_NAMESPACE
178
179#endif
Generic class defining intrinsic camera parameters.
Implementation of an homogeneous matrix and operations on such kind of matrices.
Definition of the vpImage class member functions.
Definition vpImage.h:131
vpRBFeatureTrackerInput(vpRBFeatureTrackerInput &&other)
vpImage< vpRGBa > IRGB
Image luminance.
vpImage< unsigned char > I
vpRBFeatureTrackerInput & operator=(const vpRBFeatureTrackerInput &o)
std::vector< vpRBSilhouettePoint > silhouettePoints
vpRBFeatureTrackerInput & operator=(vpRBFeatureTrackerInput &&o)
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
Class that consider the case of a translation vector.
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)
vpImage< float > depth
Image containing the per-pixel normal vector (RGB, in object space).
vpRBRenderData & operator=(const vpRBRenderData &o)
vpHomogeneousMatrix cMo
vpImage< vpRGBa > color
vpImage< vpRGBf > normals
vpImage< unsigned char > isSilhouette
Image containing the orientation of the gradients.
vpImage< float > silhouetteCanny
vpRBRenderData & operator=(vpRBRenderData &&o)
vpTranslationVector objectCenter
Center of the 3D bounding box of the object. Expressed in the object frame.