#include <InterpolatingImageComposer.hpp>
Public Member Functions | |
void | compose (const cv_bridge::CvImagePtr &target, const std::string &encoding) |
InterpolatingImageComposer (const RealCameraPtrListPtr &realCameras) | |
void | refreshCache (uint rows, uint cols) |
Private Member Functions | |
void | prepareRealCameraImages (const std::string &encoding) |
Private Attributes | |
uint | cacheSize |
std::vector < cv_bridge::CvImageConstPtr > | camsImg |
std::vector< bool > | camsNeeded |
std::vector< TableP2ConstPtr > | camsPos |
RealCameraPtrListPtr | realCameras |
boost::shared_array< float > | weightCache |
Image composer that uses linear interpolation to combine points from the RealCameras based on their weight.
Definition at line 24 of file InterpolatingImageComposer.hpp.
virtual_camera::InterpolatingImageComposer::InterpolatingImageComposer | ( | const RealCameraPtrListPtr & | realCameras | ) |
Constructs the object with list containing the realCameras. The list can be modified but, after each modification it is safe to call refreshCache()
const | cv_bridge::CvImagePtr & realCameras |
Definition at line 7 of file InterpolatingImageComposer.cpp.
void virtual_camera::InterpolatingImageComposer::compose | ( | const cv_bridge::CvImagePtr & | target, |
const std::string & | encoding | ||
) | [virtual] |
Fills the data of the target. Each of the subclasses can choose different method to do it. Precondition is that the cache is up to date.
const | cv_bridge::CvImagePtr & target |
const | std::string & encoding encoding of the camera image |
Implements virtual_camera::ImageComposer.
Definition at line 56 of file InterpolatingImageComposer.cpp.
void virtual_camera::InterpolatingImageComposer::prepareRealCameraImages | ( | const std::string & | encoding | ) | [private] |
Definition at line 85 of file InterpolatingImageComposer.cpp.
void virtual_camera::InterpolatingImageComposer::refreshCache | ( | uint | rows, |
uint | cols | ||
) | [virtual] |
If the class caches some information, this call tells it to refresh the cache. Needs to be called when configuration of the cameras changes, number of cameras changes or position of cameras to each other changes.
uint | rows number of rows in the generated image |
uint | cols number of cols in the generated image |
Implements virtual_camera::ImageComposer.
Definition at line 14 of file InterpolatingImageComposer.cpp.
Definition at line 28 of file InterpolatingImageComposer.hpp.
std::vector<cv_bridge::CvImageConstPtr> virtual_camera::InterpolatingImageComposer::camsImg [private] |
Definition at line 30 of file InterpolatingImageComposer.hpp.
std::vector<bool> virtual_camera::InterpolatingImageComposer::camsNeeded [private] |
Definition at line 29 of file InterpolatingImageComposer.hpp.
std::vector<TableP2ConstPtr> virtual_camera::InterpolatingImageComposer::camsPos [private] |
Definition at line 31 of file InterpolatingImageComposer.hpp.
Definition at line 26 of file InterpolatingImageComposer.hpp.
boost::shared_array<float> virtual_camera::InterpolatingImageComposer::weightCache [private] |
Definition at line 27 of file InterpolatingImageComposer.hpp.