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 
94  CStereoGrabber_SVS(const CStereoGrabber_SVS&) = delete;
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
A class for grabing stereo images from a STOC camera of Videre Design NOTE:
int m_NDisp
number of STOC&#39;s disparities (Default: 64 )
Contains classes for various device interfaces.
double framerate
STOC camera frame rate (Default: 30 fps)
bool m_bInitialized
If this has been correctly initiated.
CStereoGrabber_SVS(int cameraIndex=0, const TCaptureOptions_SVS &options=TCaptureOptions_SVS())
Constructor:
int frame_width
Capture resolution (Default: 640x480)
Observation class for either a pair of left+right or left+disparity images from a stereo camera...
CStereoGrabber_SVS & operator=(const CStereoGrabber_SVS &)=delete
Options used when creating a STOC Videre Design camera capture object.
bool getRectified
Indicates if the STOC camera must capture rectified images (Default: true -> rectified) ...
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)
bool getStereoObservation(mrpt::obs::CObservationStereoImages &out_observation)
Grab stereo images, and return the pair of rectified images.



Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020