Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

strk_art_info_model.h

Go to the documentation of this file.
00001 // This is brl/bseg/strk/strk_art_info_model.h
00002 #ifndef strk_art_info_model_h_
00003 #define strk_art_info_model_h_
00004 //:
00005 // \file
00006 // \brief an articulated model to support information-based tracking
00007 //
00008 //  The model has three regions:
00009 //   - a body region
00010 //   - a long tip region
00011 //   - a short tip region
00012 //
00013 //  The model has a number of degrees of freedom
00014 //   - global translation and rotation about the center of the body
00015 //   - Each tip region can pivot around the body center at a fixed radius
00016 //   - Each tip region can rotate about its own center
00017 //
00018 //  The regions are instances of strk_tracking_face and so can
00019 //  compute mutual information based on both intensity and
00020 //  gradient statistics.
00021 //
00022 // \author
00023 //    Joseph L. Mundy - November 05, 2003
00024 //    Brown University
00025 //
00026 // \verbatim
00027 //  Modifications
00028 //   10-sep-2004 Peter Vanroose Added copy ctor with explicit vbl_ref_count init
00029 // \endverbatim
00030 //
00031 //-----------------------------------------------------------------------------
00032 #include<vcl_vector.h>
00033 #include<vbl/vbl_ref_count.h>
00034 #include<vsol/vsol_point_2d_sptr.h>
00035 #include<vtol/vtol_face_2d_sptr.h>
00036 #include<vil1/vil1_memory_image_of.h>
00037 #include<strk/strk_tracking_face_2d_sptr.h>
00038 #include<strk/strk_art_info_model_sptr.h>
00039 
00040 class strk_art_info_model : public vbl_ref_count
00041 {
00042  public:
00043   enum model_part_id{STEM=0, LONG_TIP, SHORT_TIP};
00044   //:constructors/destructors
00045   strk_art_info_model(vcl_vector<vtol_face_2d_sptr> const& faces,
00046                       vsol_point_2d_sptr const stem_pivot,
00047                       vil1_memory_image_of<float> & image);
00048 
00049   strk_art_info_model(vcl_vector<vtol_face_2d_sptr> const& face,
00050                       vsol_point_2d_sptr const stem_pivot,
00051                       vil1_memory_image_of<float>& image,
00052                       vil1_memory_image_of<float>& Ix,
00053                       vil1_memory_image_of<float>& Iy);
00054 
00055   strk_art_info_model(strk_art_info_model_sptr const& im);
00056 
00057   strk_art_info_model(strk_art_info_model const& im);
00058 
00059   ~strk_art_info_model();
00060 
00061   // accessors
00062   unsigned int n_faces() const { return faces_.size(); }
00063   strk_tracking_face_2d_sptr face(int i) const;
00064   strk_tracking_face_2d_sptr stem() const;
00065   strk_tracking_face_2d_sptr left_tip() const;
00066   strk_tracking_face_2d_sptr right_tip() const;
00067   vsol_point_2d_sptr stem_pivot() const;
00068   vcl_vector<vtol_face_2d_sptr> vtol_faces() const;
00069   // information
00070   double total_model_info() const { return total_model_info_; }
00071   // utility methods
00072   bool transform(const double stem_tx, const double stem_ty,
00073                  const double stem_angle,
00074                  const double long_arm_pivot_angle,
00075                  const double short_arm_pivot_angle,
00076                  const double long_tip_angle,
00077                  const double short_tip_angle);
00078 
00079   bool compute_mutual_information(vil1_memory_image_of<float> const& image);
00080 
00081   bool compute_mutual_information(vil1_memory_image_of<float> const& image,
00082                                   vil1_memory_image_of<float> const& Ix,
00083                                   vil1_memory_image_of<float> const& Iy);
00084  private:
00085   // methods
00086   strk_art_info_model();
00087   double arm_radius(strk_tracking_face_2d_sptr const& face);
00088   bool pivot_tip_face(strk_tracking_face_2d_sptr const& face,
00089                       const double angle, const double radius);
00090 
00091   // members
00092   double total_model_info_;
00093   double long_arm_radius_; //these are invariant
00094   double short_arm_radius_;
00095   vsol_point_2d_sptr stem_pivot_;
00096   vcl_vector<strk_tracking_face_2d_sptr> faces_;
00097 };
00098 
00099 #endif // strk_art_info_model_h_

Generated on Thu Jan 10 14:53:19 2008 for contrib/brl/bseg/strk by  doxygen 1.4.4