visual-tracking-control
|
#include <VisualSIS.h>
Public Member Functions | |
VisualSIS (const yarp::os::ConstString &cam_sel, const int img_width, const int img_height, const int num_particles, const double resample_ratio) | |
~VisualSIS () noexcept | |
virtual bool | read (yarp::os::ConnectionReader &connection) override |
virtual std::vector< std::string > | help (const std::string &functionName="--all") |
Protected Member Functions | |
void | initialization () override |
void | filteringStep () override |
void | getResult () override |
bool | runCondition () override |
bool | attach (yarp::os::Port &source) |
bool | setCommandPort () |
bool | run_filter () override |
Initialize and run the visual SIR particle filter. More... | |
bool | reset_filter () override |
Reset the visual SIR particle filter. More... | |
bool | stop_filter () override |
Stop and reset the SIR particle filter. More... | |
bool | skip_step (const std::string &what_step, const bool status) override |
Enable/Disable skipping the filtering step specified in what_step. More... | |
bool | use_analogs (const bool status) override |
Use/Don't use the analog values from the right hand to correct the finger poses. More... | |
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. More... | |
bool | quit () override |
Gently close the application, deallocating resources. More... | |
bool | set_estimates_extraction_method (const std::string &method) override |
Change the current method to extract the state estimates from the particle set. More... | |
bool | set_mobile_average_window (const int16_t window) override |
Change the window size of mobile averages for estimates extraction. More... | |
Protected Attributes | |
yarp::os::ConstString | cam_sel_ |
int | img_width_ |
int | img_height_ |
int | num_particles_ |
unsigned int | descriptor_length_ |
double | resample_ratio_ |
const int | block_size_ = 16 |
const int | bin_number_ = 9 |
cv::Ptr< cv::cuda::HOG > | cuda_hog_ |
yarp::os::BufferedPort< yarp::sig::Vector > | port_estimates_out_ |
yarp::os::BufferedPort< yarp::sig::ImageOf< yarp::sig::PixelRgb > > | port_image_in_ |
yarp::os::Port | port_rpc_command_ |
Private Attributes | |
Eigen::MatrixXf | pred_particle_ |
Eigen::VectorXf | pred_weight_ |
Eigen::MatrixXf | cor_particle_ |
Eigen::VectorXf | cor_weight_ |
bfl::EstimatesExtraction | estimate_extraction_ |
bool | init_img_in_ = false |
yarp::sig::ImageOf< yarp::sig::PixelRgb > | img_in_ |
Definition at line 26 of file VisualSIS.h.
VisualSIS::VisualSIS | ( | const yarp::os::ConstString & | cam_sel, |
const int | img_width, | ||
const int | img_height, | ||
const int | num_particles, | ||
const double | resample_ratio | ||
) |
Definition at line 32 of file VisualSIS.cpp.
References bin_number_, block_size_, cam_sel_, cuda_hog_, descriptor_length_, img_height_, img_in_, img_width_, port_estimates_out_, port_image_in_, and setCommandPort().
|
noexcept |
Definition at line 79 of file VisualSIS.cpp.
References port_estimates_out_, and port_image_in_.
|
protected |
Definition at line 209 of file VisualSIS.cpp.
Referenced by setCommandPort().
|
overrideprotected |
Definition at line 86 of file VisualSIS.cpp.
References cor_particle_, cor_weight_, cuda_hog_, descriptor_length_, estimate_extraction_, img_height_, img_in_, img_width_, init_img_in_, num_particles_, port_estimates_out_, port_image_in_, pred_particle_, pred_weight_, and resample_ratio_.
|
overrideprotectedvirtual |
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.
Reimplemented from VisualSISParticleFilterIDL.
Definition at line 273 of file VisualSIS.cpp.
References cam_sel_, estimate_extraction_, and num_particles_.
|
overrideprotected |
Definition at line 206 of file VisualSIS.cpp.
|
virtualinherited |
|
overrideprotected |
Definition at line 61 of file VisualSIS.cpp.
References cor_particle_, cor_weight_, estimate_extraction_, num_particles_, pred_particle_, and pred_weight_.
|
overrideprotectedvirtual |
Gently close the application, deallocating resources.
Reimplemented from VisualSISParticleFilterIDL.
Definition at line 355 of file VisualSIS.cpp.
|
overridevirtualinherited |
|
overrideprotectedvirtual |
Reset the visual SIR particle filter.
Returns upon successful or failure reset.
Reimplemented from VisualSISParticleFilterIDL.
Definition at line 242 of file VisualSIS.cpp.
|
overrideprotectedvirtual |
Initialize and run the visual SIR particle filter.
Returns upon successful or failure setup.
Reimplemented from VisualSISParticleFilterIDL.
Definition at line 234 of file VisualSIS.cpp.
|
inlineoverrideprotected |
Definition at line 44 of file VisualSIS.h.
References cam_sel_.
|
overrideprotectedvirtual |
Change the current method to extract the state estimates from the particle set.
status | a string with the state estimate extraction method to use; the string shall be one of the available methods returned by the get_info() method. |
Reimplemented from VisualSISParticleFilterIDL.
Definition at line 291 of file VisualSIS.cpp.
References estimate_extraction_.
|
overrideprotectedvirtual |
Change the window size of mobile averages for estimates extraction.
window | specifies the mobile window size. |
Reimplemented from VisualSISParticleFilterIDL.
Definition at line 346 of file VisualSIS.cpp.
References estimate_extraction_.
|
protected |
Definition at line 215 of file VisualSIS.cpp.
References attach(), cam_sel_, and port_rpc_command_.
Referenced by VisualSIS().
|
overrideprotectedvirtual |
Enable/Disable skipping the filtering step specified in what_step.
what_step can be one of the following: 1) prediction: skips the whole prediction step 2) state: skips the prediction step related to the state transition 3) exogenous: skips the prediction step related exogenous inputs 4) correction: skips the whole correction step
what_step | the step to skipping |
status | enable/disable skipping |
Reimplemented from VisualSISParticleFilterIDL.
Definition at line 258 of file VisualSIS.cpp.
|
overrideprotectedvirtual |
Stop and reset the SIR particle filter.
This method must be called when the SIR particle filter is no longer needed or a new filtering task need to be initialized.
Reimplemented from VisualSISParticleFilterIDL.
Definition at line 250 of file VisualSIS.cpp.
|
overrideprotectedvirtual |
Use/Don't use the analog values from the right hand to correct the finger poses.
status | true/false to use/don't use analog values. |
Reimplemented from VisualSISParticleFilterIDL.
Definition at line 264 of file VisualSIS.cpp.
|
protected |
Definition at line 55 of file VisualSIS.h.
Referenced by VisualSIS().
|
protected |
Definition at line 54 of file VisualSIS.h.
Referenced by VisualSIS().
|
protected |
Definition at line 44 of file VisualSIS.h.
Referenced by get_info(), runCondition(), setCommandPort(), and VisualSIS().
|
private |
Definition at line 92 of file VisualSIS.h.
Referenced by filteringStep(), and initialization().
|
private |
Definition at line 93 of file VisualSIS.h.
Referenced by filteringStep(), and initialization().
|
protected |
Definition at line 57 of file VisualSIS.h.
Referenced by filteringStep(), and VisualSIS().
|
protected |
Definition at line 51 of file VisualSIS.h.
Referenced by filteringStep(), and VisualSIS().
|
private |
Definition at line 96 of file VisualSIS.h.
Referenced by filteringStep(), get_info(), initialization(), set_estimates_extraction_method(), and set_mobile_average_window().
|
protected |
Definition at line 49 of file VisualSIS.h.
Referenced by filteringStep(), and VisualSIS().
|
private |
Definition at line 100 of file VisualSIS.h.
Referenced by filteringStep(), and VisualSIS().
|
protected |
Definition at line 48 of file VisualSIS.h.
Referenced by filteringStep(), and VisualSIS().
|
private |
Definition at line 99 of file VisualSIS.h.
Referenced by filteringStep().
|
protected |
Definition at line 50 of file VisualSIS.h.
Referenced by filteringStep(), get_info(), and initialization().
|
protected |
Definition at line 60 of file VisualSIS.h.
Referenced by filteringStep(), VisualSIS(), and ~VisualSIS().
|
protected |
Definition at line 61 of file VisualSIS.h.
Referenced by filteringStep(), VisualSIS(), and ~VisualSIS().
|
protected |
Definition at line 64 of file VisualSIS.h.
Referenced by setCommandPort().
|
private |
Definition at line 89 of file VisualSIS.h.
Referenced by filteringStep(), and initialization().
|
private |
Definition at line 90 of file VisualSIS.h.
Referenced by filteringStep(), and initialization().
|
protected |
Definition at line 52 of file VisualSIS.h.
Referenced by filteringStep().