27#include <Ice/Properties.h>
42#include <Calibration/Calibration.h>
71 if (!calibrationFileName.empty())
73 std::string fullCalibrationFileName;
77 ARMARX_ERROR <<
"Could not find camera calibration file in ArmarXDataPath: "
78 << calibrationFileName;
81 if (!ivtStereoCalibration.LoadCameraParameters(fullCalibrationFileName.c_str(),
true))
83 ARMARX_ERROR <<
"Error loading camera calibration file: "
84 << fullCalibrationFileName;
117 "Opening bitmap sequence \"" +
filePathLeft +
"\" failed.");
122 currentRepeatCount = repeatImageCount - 1;
135 bool succeeded =
true;
145 ++currentRepeatCount;
146 if (currentRepeatCount == repeatImageCount)
149 currentRepeatCount = 0;
167 memcpy(ppImageBuffers[i],
182 return stereoCalibration;
193 const std::string& imageFilePathRight,
194 const Ice::Current&
c)
209 std::string fullFilePathLeft, fullFilePathRight;
213 ARMARX_ERROR <<
"Could not find left image sequence file in ArmarXDataPath: "
219 ARMARX_ERROR <<
"Could not find right image sequence file in ArmarXDataPath: "
229 fullFilePathLeft.c_str(), (isStereoMode ? fullFilePathRight.c_str() : NULL));
268 images[i] =
new CByteImage(width, height, CByteImage::eRGB24);
static bool getAbsolutePath(const std::string &relativeFilename, std::string &storeAbsoluteFilename, const std::vector< std::string > &additionalSearchPaths={}, bool verbose=true)
Property< PropertyType > getProperty(const std::string &name)
float frameRate
Required frame rate.
void setImageSyncMode(ImageSyncMode imageSyncMode)
Sets the image synchronization mode.
armarx::SharedMemoryScopedWriteLockPtr getScopedWriteLock()
Retrieve scoped lock for writing to the memory.
void updateTimestamp(Ice::Long timestamp, bool threadSafe=true)
Updates the timestamp of the currently captured image.
ImageFormatInfo getImageFormat(const Ice::Current &c=Ice::emptyCurrent) override
Returns the entire image format info struct via Ice.
void setImageFormat(ImageDimension imageDimension, ImageType imageType, BayerPatternType bayerPatternType=visionx::eBayerPatternRg)
Sets the image basic format data.
int getNumberImages(const Ice::Current &c=Ice::emptyCurrent) override
Retrieve number of images handled by this provider.
void setNumberImages(int numberImages)
Sets the number of images on each capture.
CByteImage ** resizedImages
void loadNextImage(const Ice::Current &c=Ice::emptyCurrent) override
CBitmapSequenceCapture * bitmapSequenceCapture
void setImageFilePath(const std::string &imageFilePathLeft, const std::string &imageFilePathRight="", const Ice::Current &c=Ice::emptyCurrent) override
Set the paths for the image files.
void onStartCapture(float frameRate) override
std::string filePathRight
bool getImagesAreUndistorted(const Ice::Current &c=Ice::emptyCurrent) override
Returns whether images are undistorted.
visionx::StereoCalibration getStereoCalibration(const Ice::Current &c=Ice::emptyCurrent) override
Returns the StereoCalibration as provided in configuration.
void onStopCapture() override
void onExitCapturingImageProvider() override
void onInitCapturingImageProvider() override
bool loadNewImageAtNextCapture
#define ARMARX_ERROR
The logging level for unexpected behaviour, that must be fixed.
#define ARMARX_VERBOSE
The logging level for verbose information.
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::shared_ptr< SharedMemoryScopedWriteLock > SharedMemoryScopedWriteLockPtr