MRPT  2.0.4
CStereoGrabber_SVS.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2020, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #pragma once
10 
12 
13 namespace mrpt::hwdrivers
14 {
15 /** Options used when creating a STOC Videre Design camera capture object
16  * \ingroup mrpt_hwdrivers_grp
17  */
19 {
21  int _frame_width = 640, int _frame_height = 480, double _framerate = 30,
22  int _NDisp = 64, int _Corrsize = 15, int _LR = false, int _Thresh = 10,
23  int _Unique = 13, int _Horopter = 0, int _SpeckleSize = 100,
24  bool _procesOnChip = true, bool _calDisparity = true);
25 
26  /** Capture resolution (Default: 640x480) */
28 
29  /** Indicates if the STOC camera must capture rectified images (Default:
30  * true -> rectified) */
32  /** STOC camera frame rate (Default: 30 fps) */
33  double framerate;
34  /** number of STOC's disparities (Default: 64 ) */
35  int m_NDisp;
36  int m_Corrsize; // correlation window size
37  int m_LR; // no left-right check, not available
38  int m_Thresh; // texture filter
39  int m_Unique; // uniqueness filter
44 };
45 
46 /** A class for grabing stereo images from a STOC camera of Videre Design
47  * NOTE:
48  * - Windows:
49  * - This class is not available.
50  *
51  * - Linux:
52  * - This class is only available when compiling MRPT with
53  *"MRPT_HAS_SVS".
54  * - You must have the videre design's library.
55  * - Capture will be made in grayscale.
56  * - The grabber must be launch in root.
57  *
58  * Once connected to a camera, you can call "getStereoObservation" to retrieve
59  *the Disparity images.
60  *
61  * \sa You'll probably want to use instead the most generic camera grabber in
62  *MRPT: mrpt::hwdrivers::CCameraSensor
63  * \ingroup mrpt_hwdrivers_grp
64  */
66 {
67  protected:
68  /** If this has been correctly initiated */
69  bool m_bInitialized{false};
70 
71  void* m_videoObject{nullptr}; // svsVideoImages*
72  void* m_stereoImage{nullptr}; // svsStereoImage*
73  void* m_disparityParams{nullptr}; // svsDisparityParams*
74  void* m_processObject; // svsStereoProcess
75  unsigned int m_resolutionX;
76  unsigned int m_resolutionY;
77 
78  unsigned char* m_ptrMat;
79 
80  bool m_status;
84 
85  private:
86  public:
88 
89  /** Constructor: */
91  int cameraIndex = 0,
92  const TCaptureOptions_SVS& options = TCaptureOptions_SVS());
93 
96 
97  /** Destructor */
98  virtual ~CStereoGrabber_SVS();
99 
100  /** Grab stereo images, and return the pair of rectified images.
101  * \param out_observation The object to be filled with sensed data.
102  *
103  * NOTICE: (1) That the member "CObservationStereoImages::refCameraPose"
104  * must be
105  * set on the return of this method, since we don't know here
106  * the robot physical structure.
107  * (2) The images are already rectified.
108  *
109  * \return false on any error, true if all go fine.
110  */
112  mrpt::obs::CObservationStereoImages& out_observation);
113 
114 }; // End of class
115 static_assert(
116  !std::is_copy_constructible_v<CStereoGrabber_SVS> &&
117  !std::is_copy_assignable_v<CStereoGrabber_SVS>,
118  "Copy Check");
119 } // namespace mrpt::hwdrivers
mrpt::hwdrivers::CStereoGrabber_SVS::m_calDisparity
bool m_calDisparity
Definition: CStereoGrabber_SVS.h:83
mrpt::hwdrivers::CStereoGrabber_SVS::operator=
CStereoGrabber_SVS & operator=(const CStereoGrabber_SVS &)=delete
mrpt::hwdrivers::CStereoGrabber_SVS::m_options
TCaptureOptions_SVS m_options
Definition: CStereoGrabber_SVS.h:87
mrpt::hwdrivers::TCaptureOptions_SVS
Options used when creating a STOC Videre Design camera capture object.
Definition: CStereoGrabber_SVS.h:19
mrpt::hwdrivers::TCaptureOptions_SVS::m_Unique
int m_Unique
Definition: CStereoGrabber_SVS.h:39
mrpt::hwdrivers::CStereoGrabber_SVS::m_resolutionY
unsigned int m_resolutionY
Definition: CStereoGrabber_SVS.h:76
mrpt::hwdrivers::CStereoGrabber_SVS::m_procesOnChip
bool m_procesOnChip
Definition: CStereoGrabber_SVS.h:82
mrpt::hwdrivers
Contains classes for various device interfaces.
Definition: C2DRangeFinderAbstract.h:20
mrpt::hwdrivers::CStereoGrabber_SVS::m_status
bool m_status
Definition: CStereoGrabber_SVS.h:80
mrpt::hwdrivers::TCaptureOptions_SVS::framerate
double framerate
STOC camera frame rate (Default: 30 fps)
Definition: CStereoGrabber_SVS.h:33
CObservationStereoImages.h
mrpt::hwdrivers::CStereoGrabber_SVS::getStereoObservation
bool getStereoObservation(mrpt::obs::CObservationStereoImages &out_observation)
Grab stereo images, and return the pair of rectified images.
Definition: CStereoGrabber_SVS.cpp:181
mrpt::hwdrivers::TCaptureOptions_SVS::m_SpeckleSize
int m_SpeckleSize
Definition: CStereoGrabber_SVS.h:41
mrpt::hwdrivers::TCaptureOptions_SVS::frame_width
int frame_width
Capture resolution (Default: 640x480)
Definition: CStereoGrabber_SVS.h:27
mrpt::hwdrivers::CStereoGrabber_SVS
A class for grabing stereo images from a STOC camera of Videre Design NOTE:
Definition: CStereoGrabber_SVS.h:66
mrpt::hwdrivers::TCaptureOptions_SVS::m_Corrsize
int m_Corrsize
Definition: CStereoGrabber_SVS.h:36
mrpt::hwdrivers::CStereoGrabber_SVS::m_resolutionX
unsigned int m_resolutionX
Definition: CStereoGrabber_SVS.h:75
mrpt::hwdrivers::CStereoGrabber_SVS::m_ptrMat
unsigned char * m_ptrMat
Definition: CStereoGrabber_SVS.h:78
mrpt::hwdrivers::CStereoGrabber_SVS::m_disparityParams
void * m_disparityParams
Definition: CStereoGrabber_SVS.h:73
mrpt::hwdrivers::CStereoGrabber_SVS::CStereoGrabber_SVS
CStereoGrabber_SVS(const CStereoGrabber_SVS &)=delete
mrpt::hwdrivers::TCaptureOptions_SVS::m_Horopter
int m_Horopter
Definition: CStereoGrabber_SVS.h:40
mrpt::hwdrivers::TCaptureOptions_SVS::getRectified
bool getRectified
Indicates if the STOC camera must capture rectified images (Default: true -> rectified)
Definition: CStereoGrabber_SVS.h:31
mrpt::hwdrivers::TCaptureOptions_SVS::m_Thresh
int m_Thresh
Definition: CStereoGrabber_SVS.h:38
mrpt::hwdrivers::CStereoGrabber_SVS::m_initialized
bool m_initialized
Definition: CStereoGrabber_SVS.h:81
mrpt::hwdrivers::CStereoGrabber_SVS::m_videoObject
void * m_videoObject
Definition: CStereoGrabber_SVS.h:71
mrpt::hwdrivers::CStereoGrabber_SVS::~CStereoGrabber_SVS
virtual ~CStereoGrabber_SVS()
Destructor.
Definition: CStereoGrabber_SVS.cpp:170
mrpt::hwdrivers::TCaptureOptions_SVS::m_procesOnChip
bool m_procesOnChip
Definition: CStereoGrabber_SVS.h:42
mrpt::hwdrivers::CStereoGrabber_SVS::m_stereoImage
void * m_stereoImage
Definition: CStereoGrabber_SVS.h:72
mrpt::hwdrivers::CStereoGrabber_SVS::m_bInitialized
bool m_bInitialized
If this has been correctly initiated.
Definition: CStereoGrabber_SVS.h:69
mrpt::hwdrivers::TCaptureOptions_SVS::frame_height
int frame_height
Definition: CStereoGrabber_SVS.h:27
mrpt::hwdrivers::TCaptureOptions_SVS::TCaptureOptions_SVS
TCaptureOptions_SVS(int _frame_width=640, int _frame_height=480, double _framerate=30, int _NDisp=64, int _Corrsize=15, int _LR=false, int _Thresh=10, int _Unique=13, int _Horopter=0, int _SpeckleSize=100, bool _procesOnChip=true, bool _calDisparity=true)
Definition: CStereoGrabber_SVS.cpp:320
mrpt::hwdrivers::TCaptureOptions_SVS::m_calDisparity
bool m_calDisparity
Definition: CStereoGrabber_SVS.h:43
mrpt::hwdrivers::TCaptureOptions_SVS::m_LR
int m_LR
Definition: CStereoGrabber_SVS.h:37
mrpt::hwdrivers::TCaptureOptions_SVS::m_NDisp
int m_NDisp
number of STOC's disparities (Default: 64 )
Definition: CStereoGrabber_SVS.h:35
mrpt::hwdrivers::CStereoGrabber_SVS::m_processObject
void * m_processObject
Definition: CStereoGrabber_SVS.h:74
mrpt::hwdrivers::CStereoGrabber_SVS::CStereoGrabber_SVS
CStereoGrabber_SVS(int cameraIndex=0, const TCaptureOptions_SVS &options=TCaptureOptions_SVS())
Constructor:
mrpt::obs::CObservationStereoImages
Observation class for either a pair of left+right or left+disparity images from a stereo camera.
Definition: CObservationStereoImages.h:39



Page generated by Doxygen 1.8.18 for MRPT 2.0.4 at Thu Sep 24 07:14:18 UTC 2020