vsrl_image_correlation Class Reference

#include <vsrl_image_correlation.h>

List of all members.


Detailed Description

this class will determine the correlation between two images for a pair of regions

Definition at line 19 of file vsrl_image_correlation.h.


Public Member Functions

 vsrl_image_correlation (const vil1_image &im1, const vil1_image &im2)
 ~vsrl_image_correlation ()
void set_window_width (int width)
 set the correlation window width.
void set_window_height (int height)
 set the correlation window height.
void set_correlation_range (int range)
 the number of correlations used.
int get_correlation_range ()
 the number of correlations used.
void initial_calculations ()
 perform a set of initial calculations.
double get_correlation (int x1, int y1, int delta_x)
 get the correlation using the initial calculations.
void get_correlation_stats (int x, int y, double &mean, double &std)
 we want to know how the correlation function behaves around the point x1 y1.
double get_sub_pixel_delta (int x1, int y1, int delta_x)
 interpolate to get subpixel accuracy for delta_x.
double get_correlation (int x1, int y1, int x2, int y2)
 get the correlation directly.
int get_image1_width ()
int get_image1_height ()
int get_image2_width ()
int get_image2_height ()
double get_image_value1 (int x, int y)
double get_image_value2 (int x, int y)
double get_mean_1 (int x, int y)
double get_mean_2 (int x, int y)
double get_std_1 (int x, int y)
double get_std_2 (int x, int y)

Private Member Functions

void compute_local_stats (vnl_matrix< double > &im, vnl_matrix< double > &mean, vnl_matrix< double > &std)
 get a matrix of means and stds for a given image.
void compute_correlation (int x_offset, vnl_matrix< double > &X, vnl_matrix< double > &Y, vnl_matrix< double > &mean_x, vnl_matrix< double > &mean_y, vnl_matrix< double > &std_x, vnl_matrix< double > &std_y, vnl_matrix< double > &corr_matrix)
 compute the correlation for a given x offset.
void shift_multiply_matrix (int offset, vnl_matrix< double > &X, vnl_matrix< double > &Y, vnl_matrix< double > &XY)
void compute_local_stats (vil1_byte_buffer &buf, int x, int y, double &mean, double &std)
 compute the local stats using the slow method.
bool check_range (vil1_byte_buffer &buf, int x, int y)
 make sure that x and y are in the bounds of buf.

Private Attributes

int window_width_
int window_height_
int correlation_range_
vnl_matrix< double > ** image_correlations_
 the results of initial correlations.
vnl_matrix< double > * std_x_
vnl_matrix< double > * std_y_
vnl_matrix< double > * mean_x_
vnl_matrix< double > * mean_y_
vil1_byte_buffer buffer1_
 memory images of the data.
vil1_byte_buffer buffer2_

Constructor & Destructor Documentation

vsrl_image_correlation::vsrl_image_correlation ( const vil1_image im1,
const vil1_image im2 
)

Definition at line 13 of file vsrl_image_correlation.cxx.

vsrl_image_correlation::~vsrl_image_correlation (  ) 

Definition at line 31 of file vsrl_image_correlation.cxx.


Member Function Documentation

void vsrl_image_correlation::set_window_width ( int  width  ) 

set the correlation window width.

Definition at line 49 of file vsrl_image_correlation.cxx.

void vsrl_image_correlation::set_window_height ( int  height  ) 

set the correlation window height.

Definition at line 54 of file vsrl_image_correlation.cxx.

void vsrl_image_correlation::set_correlation_range ( int  range  ) 

the number of correlations used.

Definition at line 59 of file vsrl_image_correlation.cxx.

int vsrl_image_correlation::get_correlation_range (  ) 

the number of correlations used.

Definition at line 65 of file vsrl_image_correlation.cxx.

void vsrl_image_correlation::initial_calculations (  ) 

perform a set of initial calculations.

Definition at line 216 of file vsrl_image_correlation.cxx.

double vsrl_image_correlation::get_correlation ( int  x1,
int  y1,
int  delta_x 
)

get the correlation using the initial calculations.

Definition at line 303 of file vsrl_image_correlation.cxx.

void vsrl_image_correlation::get_correlation_stats ( int  x,
int  y,
double &  mean,
double &  std 
)

we want to know how the correlation function behaves around the point x1 y1.

Definition at line 561 of file vsrl_image_correlation.cxx.

double vsrl_image_correlation::get_sub_pixel_delta ( int  x1,
int  y1,
int  delta_x 
)

interpolate to get subpixel accuracy for delta_x.

Definition at line 490 of file vsrl_image_correlation.cxx.

double vsrl_image_correlation::get_correlation ( int  x1,
int  y1,
int  x2,
int  y2 
)

get the correlation directly.

Definition at line 402 of file vsrl_image_correlation.cxx.

int vsrl_image_correlation::get_image1_width (  ) 

Definition at line 317 of file vsrl_image_correlation.cxx.

int vsrl_image_correlation::get_image1_height (  ) 

Definition at line 327 of file vsrl_image_correlation.cxx.

int vsrl_image_correlation::get_image2_width (  ) 

Definition at line 322 of file vsrl_image_correlation.cxx.

int vsrl_image_correlation::get_image2_height (  ) 

Definition at line 332 of file vsrl_image_correlation.cxx.

double vsrl_image_correlation::get_image_value1 ( int  x,
int  y 
)

Definition at line 292 of file vsrl_image_correlation.cxx.

double vsrl_image_correlation::get_image_value2 ( int  x,
int  y 
)

Definition at line 298 of file vsrl_image_correlation.cxx.

double vsrl_image_correlation::get_mean_1 ( int  x,
int  y 
)

Definition at line 272 of file vsrl_image_correlation.cxx.

double vsrl_image_correlation::get_mean_2 ( int  x,
int  y 
)

Definition at line 277 of file vsrl_image_correlation.cxx.

double vsrl_image_correlation::get_std_1 ( int  x,
int  y 
)

Definition at line 282 of file vsrl_image_correlation.cxx.

double vsrl_image_correlation::get_std_2 ( int  x,
int  y 
)

Definition at line 287 of file vsrl_image_correlation.cxx.

void vsrl_image_correlation::compute_local_stats ( vnl_matrix< double > &  im,
vnl_matrix< double > &  mean,
vnl_matrix< double > &  std 
) [private]

get a matrix of means and stds for a given image.

Definition at line 83 of file vsrl_image_correlation.cxx.

void vsrl_image_correlation::compute_correlation ( int  x_offset,
vnl_matrix< double > &  X,
vnl_matrix< double > &  Y,
vnl_matrix< double > &  mean_x,
vnl_matrix< double > &  mean_y,
vnl_matrix< double > &  std_x,
vnl_matrix< double > &  std_y,
vnl_matrix< double > &  corr_matrix 
) [private]

compute the correlation for a given x offset.

Definition at line 150 of file vsrl_image_correlation.cxx.

void vsrl_image_correlation::shift_multiply_matrix ( int  offset,
vnl_matrix< double > &  X,
vnl_matrix< double > &  Y,
vnl_matrix< double > &  XY 
) [private]

Definition at line 124 of file vsrl_image_correlation.cxx.

void vsrl_image_correlation::compute_local_stats ( vil1_byte_buffer buf,
int  x,
int  y,
double &  mean,
double &  std 
) [private]

compute the local stats using the slow method.

Definition at line 345 of file vsrl_image_correlation.cxx.

bool vsrl_image_correlation::check_range ( vil1_byte_buffer buf,
int  x,
int  y 
) [private]

make sure that x and y are in the bounds of buf.

Definition at line 73 of file vsrl_image_correlation.cxx.


Member Data Documentation

int vsrl_image_correlation::window_width_ [private]

Definition at line 72 of file vsrl_image_correlation.h.

int vsrl_image_correlation::window_height_ [private]

Definition at line 73 of file vsrl_image_correlation.h.

int vsrl_image_correlation::correlation_range_ [private]

Definition at line 74 of file vsrl_image_correlation.h.

vnl_matrix<double>** vsrl_image_correlation::image_correlations_ [private]

the results of initial correlations.

Definition at line 77 of file vsrl_image_correlation.h.

vnl_matrix<double>* vsrl_image_correlation::std_x_ [private]

Definition at line 81 of file vsrl_image_correlation.h.

vnl_matrix<double>* vsrl_image_correlation::std_y_ [private]

Definition at line 82 of file vsrl_image_correlation.h.

vnl_matrix<double>* vsrl_image_correlation::mean_x_ [private]

Definition at line 83 of file vsrl_image_correlation.h.

vnl_matrix<double>* vsrl_image_correlation::mean_y_ [private]

Definition at line 84 of file vsrl_image_correlation.h.

vil1_byte_buffer vsrl_image_correlation::buffer1_ [private]

memory images of the data.

Definition at line 99 of file vsrl_image_correlation.h.

vil1_byte_buffer vsrl_image_correlation::buffer2_ [private]

Definition at line 100 of file vsrl_image_correlation.h.


The documentation for this class was generated from the following files:
Generated on Mon Mar 8 05:24:40 2010 for contrib/gel/vsrl by  doxygen 1.5.1