29#include <Ice/Properties.h>
44#include <Calibration/Calibration.h>
73 if (!calibrationFileName.empty())
75 std::string fullCalibrationFileName;
79 ARMARX_ERROR <<
"Could not find camera calibration file in ArmarXDataPath: "
80 << calibrationFileName;
83 if (!ivtStereoCalibration.LoadCameraParameters(fullCalibrationFileName.c_str(),
true))
85 ARMARX_ERROR <<
"Error loading camera calibration file: "
86 << fullCalibrationFileName;
119 "Opening bitmap sequence \"" +
filePathLeft +
"\" failed.");
124 currentRepeatCount = repeatImageCount - 1;
137 bool succeeded =
true;
147 ++currentRepeatCount;
148 if (currentRepeatCount == repeatImageCount)
151 currentRepeatCount = 0;
169 memcpy(ppImageBuffers[i],
184 return stereoCalibration;
195 const std::string& imageFilePathRight,
196 const Ice::Current&
c)
211 std::string fullFilePathLeft, fullFilePathRight;
215 ARMARX_ERROR <<
"Could not find left image sequence file in ArmarXDataPath: "
221 ARMARX_ERROR <<
"Could not find right image sequence file in ArmarXDataPath: "
231 fullFilePathLeft.c_str(), (isStereoMode ? fullFilePathRight.c_str() : NULL));
270 images[i] =
new CByteImage(width, height, CByteImage::eRGB24);
294 return "ImageSequenceProvider";
#define ARMARX_REGISTER_COMPONENT_EXECUTABLE(ComponentT, applicationName)
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.
Image sequence provider loads images from a device and broadcasts notifications after loading at a sp...
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
static std::string GetDefaultName()
void onInitCapturingImageProvider() override
bool loadNewImageAtNextCapture
std::string getDefaultName() const override
Retrieve default name of component.
#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