Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
sdet_adjust_lsqr Class Reference

Class to fit a 2-d Gaussian to small peaks in a polygon drawn on image. More...

#include <sdet_gauss_fit.h>

Inheritance diagram for sdet_adjust_lsqr:
Inheritance graph
[legend]

List of all members.

Public Types

enum  UseGradient

Public Member Functions

 sdet_adjust_lsqr (vcl_vector< vgl_point_3d< double > > const &img_pts, unsigned int num_unknowns, unsigned int num_residuals, int n_peaks)
 Constructor.
virtual ~sdet_adjust_lsqr ()
virtual void f (vnl_vector< double > const &x, vnl_vector< double > &fx)
 The main function.
void throw_failure ()
void clear_failure ()
virtual void gradf (vnl_vector< double > const &x, vnl_matrix< double > &jacobian)
void fdgradf (vnl_vector< double > const &x, vnl_matrix< double > &jacobian, double stepsize)
void ffdgradf (vnl_vector< double > const &x, vnl_matrix< double > &jacobian, double stepsize)
virtual void trace (int iteration, vnl_vector< double > const &x, vnl_vector< double > const &fx)
double rms (vnl_vector< double > const &x)
unsigned int get_number_of_unknowns () const
unsigned int get_number_of_residuals () const
bool has_gradient () const
bool vnl_discrete_diff_fwd (vnl_least_squares_function *lsf, double h, vnl_vector< double > const &x, vnl_matrix< double > &J)
bool vnl_discrete_diff_fwd (vnl_least_squares_function *lsf, vnl_vector< double > const &h, vnl_vector< double > const &x, vnl_matrix< double > &J)
bool vnl_discrete_diff_fwd (vnl_least_squares_function *lsf, vnl_vector< double > const &h, vnl_vector< double > const &x, vnl_vector< double > const &y, vnl_matrix< double > &J)
bool vnl_discrete_diff_sym (vnl_least_squares_function *lsf, double h, vnl_vector< double > const &x, vnl_matrix< double > &J)
bool vnl_discrete_diff_sym (vnl_least_squares_function *lsf, vnl_vector< double > const &h, vnl_vector< double > const &x, vnl_matrix< double > &J)

Public Attributes

 no_gradient
 use_gradient
bool failure

Protected Member Functions

void init (unsigned int number_of_unknowns, unsigned int number_of_residuals)

Protected Attributes

vcl_vector< vgl_point_3d
< double > > 
img_pts_
unsigned num_pixels_
int n_peaks_
unsigned int p_
unsigned int n_
bool use_gradient_

Detailed Description

Class to fit a 2-d Gaussian to small peaks in a polygon drawn on image.

This class started out to fit one peak in a polygon area, but has been expanded to fit up to 4 peaks. The approximate locations of the peaks (1-4) are picked using the pick_point_set() method that was added to the bgui_picker_tableau class.

Definition at line 24 of file sdet_gauss_fit.h.


Constructor & Destructor Documentation

sdet_adjust_lsqr::sdet_adjust_lsqr ( vcl_vector< vgl_point_3d< double > > const &  img_pts,
unsigned int  num_unknowns,
unsigned int  num_residuals,
int  n_peaks 
)

Constructor.

Definition at line 23 of file sdet_gauss_fit.cxx.

virtual sdet_adjust_lsqr::~sdet_adjust_lsqr ( ) [inline, virtual]

Definition at line 33 of file sdet_gauss_fit.h.


Member Function Documentation

void sdet_adjust_lsqr::f ( vnl_vector< double > const &  x,
vnl_vector< double > &  fx 
) [virtual]

The main function.

Given the parameter vector x, compute the vector of residuals fx.

Implements vnl_least_squares_function.

Definition at line 53 of file sdet_gauss_fit.cxx.


Member Data Documentation

vcl_vector<vgl_point_3d<double> > sdet_adjust_lsqr::img_pts_ [protected]

Definition at line 47 of file sdet_gauss_fit.h.

int sdet_adjust_lsqr::n_peaks_ [protected]

Definition at line 49 of file sdet_gauss_fit.h.

unsigned sdet_adjust_lsqr::num_pixels_ [protected]

Definition at line 48 of file sdet_gauss_fit.h.


The documentation for this class was generated from the following files: