1 // This is brl/bseg/boxm2/cpp/algo/boxm2_gauss_grey_processor.h 2 #ifndef boxm2_gauss_grey_processor_h_ 3 #define boxm2_gauss_grey_processor_h_ 4 //: 5 // \file 6 // \brief A class for a grey-scale-gaussian processor 7 // 8 // \author Ozge C. Ozcanli 9 // \date June 15, 2011 10 // \verbatim 11 // Modifications 12 // <none yet> 13 // \endverbatim 14 15 #include <iostream> 16 #include <vector> 17 #include <vnl/vnl_vector_fixed.h> 18 #ifdef _MSC_VER 19 # include <vcl_msvc_warnings.h> 20 #endif 21 22 #include <bsta/algo/bsta_sigma_normalizer.h> 23 24 class boxm2_gauss_grey_processor 25 { 26 public: 27 static float expected_color( vnl_vector_fixed<unsigned char, 2> apm); 28 static float prob_density( const vnl_vector_fixed<unsigned char, 2> & apm, float x); 29 static float gauss_prob_density(float x, float mu, float sigma); 30 static void update_app_model(vnl_vector_fixed<unsigned char, 2> & apm, 31 vnl_vector_fixed<float, 4> & nobs, 32 float x, float w, float init_sigma,float min_sigma); 33 34 static void compute_app_model(vnl_vector_fixed<unsigned char, 2> & apm, 35 std::vector<float> const& obs, 36 std::vector<float> const& obs_weights, 37 const bsta_sigma_normalizer_sptr& n_table, 38 float min_sigma = 0.01f); 39 40 static void compute_app_model(vnl_vector_fixed<unsigned char, 2> & apm, 41 std::vector<float> const& obs, 42 std::vector<float> const& pre, 43 std::vector<float> const& vis, 44 const bsta_sigma_normalizer_sptr& n_table, 45 float min_sigma=0.01f); 46 }; 47 48 #endif // boxm2_gauss_grey_processor_h_ 49