contrib/gel/vsrl/vsrl_stereo_dense_matcher.h

Go to the documentation of this file.
00001 #ifndef vsrl_stereo_dense_matcher_h
00002 #define vsrl_stereo_dense_matcher_h
00003 //:
00004 //  \file
00005 
00006 #include <vsrl/vsrl_raster_dp_setup.h>
00007 #include <vil1/vil1_image.h>
00008 #include <vsrl/vsrl_dense_matcher.h>
00009 #include <vsrl/vsrl_image_correlation.h>
00010 
00011 //:
00012 // This class will take a pair of stereo images
00013 // where each point on one raster matches a point
00014 // on the corresponding raster.
00015 // Once two images are inserted, dynamic programming on
00016 // each raster is performed. The user can then find the
00017 // point correspondences between each pixel in the image.
00018 
00019 class vsrl_stereo_dense_matcher : public vsrl_dense_matcher
00020 {
00021   vsrl_image_correlation image_correlation_;
00022   vsrl_raster_dp_setup **raster_array_;
00023   int num_raster_;
00024   int correlation_range_; // the correlation range of the data
00025 
00026  public:
00027 
00028   // constructor
00029   vsrl_stereo_dense_matcher(const vil1_image &im1, const vil1_image &im2);
00030 
00031   // destructor
00032   ~vsrl_stereo_dense_matcher();
00033 
00034   // There may be some initial calculalations that we want to
00035   // perform without computing all of the dense calculations
00036   void initial_calculations();
00037 
00038   // perform the dence matching
00039   void execute();
00040 
00041   // get the assigned coordinate
00042   virtual  int get_assignment(int x, int y);
00043 
00044   // get the disparity of pixel x,y
00045   virtual int get_disparity(int x, int y);
00046 
00047   // write an image of the disparity
00048   void write_disparity_image(char *filename);
00049 
00050   // print out the correlation costs for point x,y
00051   void print_correlation_cost(int x, int y);
00052 
00053  private:
00054 
00055   void evaluate_raster(int i); // performs the dynamic program on the raster
00056 };
00057 
00058 #endif

Generated on Mon Mar 8 05:24:39 2010 for contrib/gel/vsrl by  doxygen 1.5.1