9 #include <BayesFilters/EstimatesExtraction.h> 10 #include <BayesFilters/VisualParticleFilter.h> 11 #include <Eigen/Dense> 12 #include <iCub/iKin/iKinFwd.h> 13 #include <opencv2/cudaobjdetect.hpp> 14 #include <thrift/VisualSISParticleFilterIDL.h> 15 #include <yarp/dev/PolyDriver.h> 16 #include <yarp/dev/IAnalogSensor.h> 17 #include <yarp/os/Bottle.h> 18 #include <yarp/os/BufferedPort.h> 19 #include <yarp/os/ConstString.h> 20 #include <yarp/os/Port.h> 21 #include <yarp/sig/Image.h> 22 #include <yarp/sig/Matrix.h> 23 #include <yarp/sig/Vector.h> 30 VisualSIS(
const yarp::os::ConstString& cam_sel,
31 const int img_width,
const int img_height,
32 const int num_particles,
33 const double resample_ratio);
61 yarp::os::BufferedPort<yarp::sig::ImageOf<yarp::sig::PixelRgb>>
port_image_in_;
65 bool attach(yarp::os::Port &source);
75 bool skip_step(
const std::string& what_step,
const bool status)
override;
79 std::vector<std::string>
get_info()
override;
100 yarp::sig::ImageOf<yarp::sig::PixelRgb>
img_in_;
Eigen::MatrixXf pred_particle_
bool skip_step(const std::string &what_step, const bool status) override
Enable/Disable skipping the filtering step specified in what_step.
bool reset_filter() override
Reset the visual SIR particle filter.
Eigen::VectorXf pred_weight_
bool run_filter() override
Initialize and run the visual SIR particle filter.
cv::Ptr< cv::cuda::HOG > cuda_hog_
void getResult() override
yarp::os::ConstString cam_sel_
bool use_analogs(const bool status) override
Use/Don't use the analog values from the right hand to correct the finger poses.
void filteringStep() override
std::vector< std::string > get_info() override
Get information about recursive Bayesian filter, like it's status, the available methods, and the current one in use, to extract the state estimate from the particle set.
bool runCondition() override
yarp::os::Port port_rpc_command_
bool quit() override
Gently close the application, deallocating resources.
VisualSIS(const yarp::os::ConstString &cam_sel, const int img_width, const int img_height, const int num_particles, const double resample_ratio)
yarp::sig::ImageOf< yarp::sig::PixelRgb > img_in_
bool attach(yarp::os::Port &source)
bfl::EstimatesExtraction estimate_extraction_
Eigen::VectorXf cor_weight_
Eigen::MatrixXf cor_particle_
bool set_estimates_extraction_method(const std::string &method) override
Change the current method to extract the state estimates from the particle set.
yarp::os::BufferedPort< yarp::sig::Vector > port_estimates_out_
bool set_mobile_average_window(const int16_t window) override
Change the window size of mobile averages for estimates extraction.
unsigned int descriptor_length_
yarp::os::BufferedPort< yarp::sig::ImageOf< yarp::sig::PixelRgb > > port_image_in_
void initialization() override
bool stop_filter() override
Stop and reset the SIR particle filter.
VisualSISParticleFilterIDL IDL Interface to VisualSIRParticleFilter options.