|
Ocean
|
This class implements a provider for stereo images which are extracted from two separate image sequences and poses/calibration file. More...
#include <ImageSequenceStereoImageProvider.h>
Public Types | |
| typedef SampleMap< HomogenousMatrixD4 > | TransformationMap |
| Definition of a sample map holding 6-DOF transformations. | |
Public Member Functions | |
| ImageSequenceStereoImageProvider () | |
| Creates an invalid provider object. | |
| ImageSequenceStereoImageProvider (ImageSequenceStereoImageProvider &&provider) | |
| Move constructor. | |
| ImageSequenceStereoImageProvider (const std::string &imageSequenceFilenameA, const std::string &imageSequenceFilenameB, const std::string &transformationsFilename, const double framesPerSecond=30.0) | |
| Creates a provider object for two image sequences and a poses/calibration file. | |
| bool | nextStereoImages (FisheyeCamera &fisheyeCameraA, FisheyeCamera &fisheyeCameraB, Frame &imageA, Frame &imageB, HomogenousMatrixD4 *world_T_device=nullptr, HomogenousMatrixD4 *device_T_cameraA=nullptr, HomogenousMatrixD4 *device_T_cameraB=nullptr, HomogenousMatricesD4 *world_T_leftHandJoints=nullptr, HomogenousMatricesD4 *world_T_rightHandJoints=nullptr, bool *abort=nullptr) override |
| Returns the next stereo images from the provider, further optional transformations between device and world, and between cameras and device will be provided. | |
| bool | restart () override |
| Restarts with the first pair of stereo images. | |
| bool | hasDeviceTransformations () const override |
| Returns whether the provider has access to the transformations between device and world (world_T_device). | |
| bool | hasCameraTransformations () const override |
| Returns whether the provider has access to the transformations between cameras and device (device_T_cameraA and device_T_cameraB). | |
| bool | isValid () const override |
| Returns whether this provider can provide valid stereo images (e.g., whether the underlying resources are initialized and whether the source exists). | |
| void | release () override |
| Releases all owned resources like e.g., the image sequence objects. | |
| ImageSequenceStereoImageProvider & | operator= (ImageSequenceStereoImageProvider &&provider) |
| Move operator. | |
Public Member Functions inherited from Ocean::Media::StereoImageProviderInterface | |
| virtual | ~StereoImageProviderInterface () |
| Destructs this interface. | |
Static Public Member Functions | |
| static bool | readTransformationsFile (const std::string &transformationsFilename, FisheyeCamera &fisheyeCameraA, FisheyeCamera &fisheyeCameraB, TransformationMap &map_world_T_device, TransformationMap &map_device_T_cameraA, TransformationMap &map_device_T_cameraB, const double framesPerSecond=30.0) |
| Extracts the camera calibrations, the device transformations, and the camera transformations from a transformations file. | |
Protected Member Functions | |
| ImageSequenceStereoImageProvider (const ImageSequenceStereoImageProvider &provider)=delete | |
| Disabled copy constructor. | |
| ImageSequenceStereoImageProvider & | operator= (const ImageSequenceStereoImageProvider &provider)=delete |
| Disabled assign operator. | |
Protected Member Functions inherited from Ocean::Media::StereoImageProviderInterface | |
| StereoImageProviderInterface () | |
| Protected default constructor. | |
Protected Attributes | |
| ImageSequenceRef | imageSequenceA_ |
| The first image sequence providing the images for the first stereo camera. | |
| ImageSequenceRef | imageSequenceB_ |
| The second image sequence providing the images for the first stereo camera. | |
| FisheyeCamera | fisheyeCameraA_ |
| The fisheye camera profile of the first camera. | |
| FisheyeCamera | fisheyeCameraB_ |
| The fisheye camera profile of the second camera. | |
| TransformationMap | map_world_T_device_ |
| The sample map transforming device to world. | |
| TransformationMap | map_device_T_cameraA_ |
| The sample map transforming the first camera to device. | |
| TransformationMap | map_device_T_cameraB_ |
| The sample map transforming the second camera to device. | |
| double | framesPerSecond_ |
| The number of frames per second, with range (0, infinity) | |
This class implements a provider for stereo images which are extracted from two separate image sequences and poses/calibration file.
| typedef SampleMap<HomogenousMatrixD4> Ocean::Media::ImageSequenceStereoImageProvider::TransformationMap |
Definition of a sample map holding 6-DOF transformations.
| Ocean::Media::ImageSequenceStereoImageProvider::ImageSequenceStereoImageProvider | ( | ) |
Creates an invalid provider object.
| Ocean::Media::ImageSequenceStereoImageProvider::ImageSequenceStereoImageProvider | ( | ImageSequenceStereoImageProvider && | provider | ) |
Move constructor.
| provider | The provider to be moved |
| Ocean::Media::ImageSequenceStereoImageProvider::ImageSequenceStereoImageProvider | ( | const std::string & | imageSequenceFilenameA, |
| const std::string & | imageSequenceFilenameB, | ||
| const std::string & | transformationsFilename, | ||
| const double | framesPerSecond = 30.0 |
||
| ) |
Creates a provider object for two image sequences and a poses/calibration file.
| imageSequenceFilenameA | The filename of the first image of the first image sequence (the image sequence of the first fisheye camera), must be valid |
| imageSequenceFilenameB | The filename of the first image of the second image sequence (the image sequence of the second fisheye camera), must be valid |
| transformationsFilename | The filename of the file containing the camera calibration of both fisheye cameras followed by the individual camera transformations |
| framesPerSecond | The number of frames per second, with range (0, infinity) |
|
protecteddelete |
Disabled copy constructor.
| provider | The provider which would have been copied |
|
overridevirtual |
Returns whether the provider has access to the transformations between cameras and device (device_T_cameraA and device_T_cameraB).
Implements Ocean::Media::StereoImageProviderInterface.
|
overridevirtual |
Returns whether the provider has access to the transformations between device and world (world_T_device).
Implements Ocean::Media::StereoImageProviderInterface.
|
overridevirtual |
Returns whether this provider can provide valid stereo images (e.g., whether the underlying resources are initialized and whether the source exists).
Implements Ocean::Media::StereoImageProviderInterface.
|
overridevirtual |
Returns the next stereo images from the provider, further optional transformations between device and world, and between cameras and device will be provided.
Implements Ocean::Media::StereoImageProviderInterface.
|
protecteddelete |
Disabled assign operator.
| provider | The provider which would have been assigned |
| ImageSequenceStereoImageProvider & Ocean::Media::ImageSequenceStereoImageProvider::operator= | ( | ImageSequenceStereoImageProvider && | provider | ) |
Move operator.
| provider | The provider to be moved |
|
static |
Extracts the camera calibrations, the device transformations, and the camera transformations from a transformations file.
The expected format can be outline as follows:
or, more verbosely,
where the first two rows contain the intrinsics of the two fisheye cameras, and starting with the third row each row stores three homogeneous 4-by-4 matrices which correspond to one frame. The matrix elements of each transformation are stored in column-major order, i.e.,
| transformationsFilename | The filename of the transformations file, must be valid |
| fisheyeCameraA | The resulting profile of the first fisheye camera |
| fisheyeCameraB | The resulting profile of the second fisheye camera |
| map_world_T_device | The resulting sample map transforming device to world |
| map_device_T_cameraA | The resulting sample map transforming the first camera to device |
| map_device_T_cameraB | The resulting sample map transforming the second camera to device |
| framesPerSecond | The number of frames per second, with range (0, infinity) |
|
overridevirtual |
Releases all owned resources like e.g., the image sequence objects.
Implements Ocean::Media::StereoImageProviderInterface.
|
overridevirtual |
Restarts with the first pair of stereo images.
Implements Ocean::Media::StereoImageProviderInterface.
|
protected |
The fisheye camera profile of the first camera.
|
protected |
The fisheye camera profile of the second camera.
|
protected |
The number of frames per second, with range (0, infinity)
|
protected |
The first image sequence providing the images for the first stereo camera.
|
protected |
The second image sequence providing the images for the first stereo camera.
|
protected |
The sample map transforming the first camera to device.
|
protected |
The sample map transforming the second camera to device.
|
protected |
The sample map transforming device to world.