Fawkes API
Fawkes Development Version
stereo_processor.cpp
1
2
/***************************************************************************
3
* stereo_processor.cpp - Stereo processor interface
4
*
5
* Created: Fri May 18 16:02:08 2007
6
* Copyright 2007 Tim Niemueller [www.niemueller.de]
7
*
8
****************************************************************************/
9
10
/* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version. A runtime exception applies to
14
* this software (see LICENSE.GPL_WRE file mentioned below for details).
15
*
16
* This program is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU Library General Public License for more details.
20
*
21
* Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22
*/
23
24
#include <fvstereo/stereo_processor.h>
25
26
namespace
firevision
{
27
#if 0
/* just to make Emacs auto-indent happy */
28
}
29
#endif
30
31
/** @class StereoProcessor <fvstereo/stereo_processor.h>
32
* Stereo processor interface.
33
* This interface provides access to different stereo processing
34
* implementations.
35
*
36
* @author Tim Niemueller
37
*
38
* @fn virtual void StereoProcessor::get_xyz(unsigned int px, unsigned int py, float *x, float *y, float *z) = 0
39
* Get coordinates for pixel in camera coordinate system.
40
* This retrieves coordinates in the coordinate system of the stereo camera.
41
* Retrieving new positions may fail if no valid disparity information could
42
* be calculated for the given point. This is indicated with the return value.
43
* @param px x position of pixel in image
44
* @param py y position of pixel in image
45
* @param x upon successful return contains the x coordinate of the point in the camera coordinate sytem
46
* @param y upon successful return contains the y coordinate of the point in the camera coordinate sytem
47
* @param z upon successful return contains the z coordinate of the point in the camera coordinate sytem
48
* @return true, if valid information could be retrieved and was written to (x,y,z), false otherwise
49
*
50
* @fn virtual void StereoProcessor::get_world_xyz(unsigned int px, unsigned int py, float *x, float *y, float *z) = 0
51
* Get coordinates for pixel in robot coordinate system.
52
* This retrieves coordinates in the coordinate system of the robot holding
53
* the stereo camera. The robot coordinate system is a right-handed cardanic
54
* coordinate system with the X axis pointing forward, the Y axis pointing
55
* right and the Z axis pointing downwards.
56
* Retrieving new positions may fail if no valid disparity information could
57
* be calculated for the given point. This is indicated with the return value.
58
* @param px x position of pixel in image
59
* @param py y position of pixel in image
60
* @param x upon successful return contains the x coordinate of the point in the robot coordinate sytem
61
* @param y upon successful return contains the y coordinate of the point in the robot coordinate sytem
62
* @param z upon successful return contains the z coordinate of the point in the robot coordinate sytem
63
* @return true, if valid information could be retrieved and was written to (x,y,z), false otherwise
64
*
65
* @fn virtual void StereoProcessor::preprocess_stereo() = 0
66
* Do any pre-processing needed.
67
* Do all the preprocessing needed to calculate the disparity or the YUV images.
68
* This has been split out to be able to do only one thing.
69
*
70
* @fn virtual void StereoProcessor::calculate_disparity(ROI *roi = 0) = 0
71
* Caculate disparity images.
72
* Depending on the data the specific stereo processor needs the disparity image
73
* is calculated.
74
* If a region of interest (ROI) is supplied then only this region is processed.
75
* @param roi region of interest to process
76
*
77
* @fn virtual void StereoProcessor::calculate_yuv(bool both = false) = 0
78
* Caculate yuv images.
79
* This will calculate YUV images of the cameras. By default only the reference
80
* image is converted to YUV, as this is sufficient in most cases. If you need both
81
* images specify so as argument. A call to this method is valid only after calling
82
* calculate_disparity() as this may rely on data produced there.
83
* @param both if true, both YUV images are calculated for the left and right camera,
84
* if false only the YUV image of the reference camera is calculated (dependant on
85
* camera)
86
*
87
* @fn virtual unsigned char * StereoProcessor::disparity_buffer() = 0
88
* Get the disparity image buffer.
89
* This returns a buffer containing the disparity image. The buffer is not copied
90
* so do not change anything in the buffer or subsequent calls to get_xyz() and
91
* get_world_xyz() will return invalid results.
92
* @return disparity buffer
93
*
94
* @fn virtual size_t StereoProcessor::disparity_buffer_size() const = 0
95
* Get disparity buffer size.
96
* @return size in bytes of the disparity image buffer
97
*
98
* @fn virtual unsigned char * StereoProcessor::yuv_buffer_right() = 0
99
* Get YUV-formatted buffer of reference camera.
100
* This will return the YUV buffer of the reference image. This is only available
101
* after calling calculate_yuv().
102
* @return YUV buffer of the reference image
103
*
104
* @fn virtual unsigned char * StereoProcessor::yuv_buffer_left() = 0
105
* Get YUV-formatted buffer of left camera.
106
* This will return the YUV buffer of the auxiliary image. This is only available
107
* after calling calculate_yuv().
108
* @return YUV buffer of the auxiliary image
109
*
110
*/
111
112
/** Virtual empty destructor. */
113
StereoProcessor::~StereoProcessor
()
114
{
115
}
116
117
}
// end namespace firevision
firevision::StereoProcessor::~StereoProcessor
virtual ~StereoProcessor()
Virtual empty destructor.
Definition:
stereo_processor.cpp:113
firevision
Definition:
vision_master.h:32
src
libs
fvstereo
stereo_processor.cpp
Generated by
1.8.13