#include <vsrl_image_correlation.h>
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_ |
| 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.
| void vsrl_image_correlation::set_window_width | ( | int | width | ) |
| void vsrl_image_correlation::set_window_height | ( | int | height | ) |
| void vsrl_image_correlation::set_correlation_range | ( | int | range | ) |
| int vsrl_image_correlation::get_correlation_range | ( | ) |
| void vsrl_image_correlation::initial_calculations | ( | ) |
| 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 | |||
| ) |
| 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.
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] |
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.
Definition at line 100 of file vsrl_image_correlation.h.
1.5.1