Go to the documentation of this file.
32 #include <unordered_map>
35 #include <opencv2/core/mat.hpp>
38 #include <Image/ByteImage.h>
39 #include <Image/FloatImage.h>
47 #include <RobotAPI/interface/units/UnitInterface.h>
49 #include <VisionX/interface/core/CompressedImageProviderInterface.h>
50 #include <VisionX/interface/core/DataTypes.h>
51 #include <VisionX/interface/core/ImageProcessorInterface.h>
68 virtual public CompressedImageProviderInterface
77 armarx::Blob
getImages(
const Ice::Current&
c = Ice::emptyCurrent)
override;
85 ImageFormatInfo
getImageFormat(
const Ice::Current&
c = Ice::emptyCurrent)
override;
145 ImageDimension imageDimension,
147 BayerPatternType bayerPatternType = visionx::eBayerPatternRg);
193 void init(
const Ice::Current&
c)
override { }
195 void start(
const Ice::Current&
c)
override { }
197 void stop(
const Ice::Current&
c)
override { }
201 return armarx::eUndefinedUnitExecutionState;
264 ImageFormatInfo imageFormat;
276 struct CompressionData
278 armarx::Blob compressedImage;
281 using CompressionDataMap = std::map<std::pair<CompressionType, int>, CompressionData>;
282 CompressionDataMap compressionDataMap;
283 std::mutex compressionDataMapMutex;
285 struct RecordingProperties
287 std::mutex callMutex;
288 imrec::Config config;
290 std::unordered_map<int, visionx::imrec::Recording> channelRecordings;
291 std::mutex statusMutex;
293 std::condition_variable
cv;
294 std::mutex bufferMutex;
295 std::deque<std::tuple<std::chrono::microseconds, std::unordered_map<int, CByteImage*>>> buffer;
298 RecordingProperties rec;
virtual void onExitImageProvider()=0
This is called when the Component::onExitComponent() setup is called.
SharedMemoryScopedWriteLockPtr getScopedWriteLock() const
Retrieve scoped lock for writing to the memory.
bool stopImageRecording(const Ice::Current &) override
bool startImageRecording(const imrec::Config &cfg, const Ice::Current &) override
void onExitComponent() override
std::vector< std::unique_ptr< CByteImage > > CByteImageUPtrVec
int getNumberImages(const Ice::Current &c=Ice::emptyCurrent) override
Retrieve number of images handled by this provider.
std::shared_ptr< SharedMemoryScopedWriteLock > SharedMemoryScopedWriteLockPtr
void setImageFormat(ImageDimension imageDimension, ImageType imageType, BayerPatternType bayerPatternType=visionx::eBayerPatternRg)
Sets the image basic format data.
armarx::Blob getImagesAndMetaInfo(armarx::MetaInfoSizeBasePtr &, const Ice::Current &) override
armarx::Blob getCompressedImagesAndMetaInfo(CompressionType, Ice::Int compressionQuality, armarx::MetaInfoSizeBasePtr &info, const Ice::Current &) override
ImageFormatInfo getImageFormat(const Ice::Current &c=Ice::emptyCurrent) override
Returns the entire image format info struct via Ice.
void start(const Ice::Current &c) override
void updateTimestamp(Ice::Long timestamp, bool threadSafe=true)
Updates the timestamp of the currently captured image.
armarx::IceSharedMemoryProvider< unsigned char >::pointer_type sharedMemoryProvider
shared memory provider
void onDisconnectComponent() override
Hook for subclass.
void ** imageBuffers
Image buffer memory.
std::vector< imrec::ChannelPreferences > getImageRecordingChannelPreferences(const Ice::Current &) override
std::unique_ptr< CByteImage > CByteImageUPtr
void stop(const Ice::Current &c) override
void imageRecordingRunningTask()
void request(const Ice::Current &c) override
virtual void onInitImageProvider()=0
This is called when the Component::onInitComponent() is called.
void recordImages(const IceUtil::Time &image_timestamp)
armarx::UnitExecutionState getExecutionState(const Ice::Current &c) override
virtual void onConnectImageProvider()
This is called when the Component::onConnectComponent() setup is called.
void release(const Ice::Current &c) override
imrec::Status getImageRecordingStatus(const Ice::Current &) override
void provideImages(void **inputBuffers, const IceUtil::Time &imageTimestamp=IceUtil::Time())
send images raw.
armarx::core::time::DateTime Time
ImageProcessorInterfacePrx imageProcessorProxy
Ice proxy of the image processor interface.
Baseclass for all ArmarX ManagedIceObjects requiring properties.
bool hasSharedMemorySupport(const Ice::Current &c=Ice::emptyCurrent) override
void setNumberImages(int numberImages)
Sets the number of images on each capture.
Represents a point in time.
armarx::Blob getImages(const Ice::Current &c=Ice::emptyCurrent) override
Retrieve images via Ice.
ImageProvider abstract class defines a component which provide images via ice or shared memory.
void onConnectComponent() override
void onInitComponent() override
armarx::SharedMemoryScopedWriteLockPtr getScopedWriteLock()
Retrieve scoped lock for writing to the memory.
void init(const Ice::Current &c) override
bool isExiting()
Retrieve whether provider is exiting.
virtual void onDisconnectImageProvider()