Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
brip_para_cvrg Class Reference

#include <brip_para_cvrg.h>

Inheritance diagram for brip_para_cvrg:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 brip_para_cvrg (float sigma=1.0, float low=6, float gauss_tail=.05, int proj_width=7, int proj_height=1, int sup_radius=1, bool verbose=true)
 Constructor s.
 brip_para_cvrg (brip_para_cvrg_params &pdp)
 ~brip_para_cvrg ()
 Destructor.
void do_coverage (vil_image_resource_sptr const &image)
vil_image_view< float > get_float_detection_image (const float max=255)
 Get the float image of detections. Scale onto [0, max].
vil_image_view< unsigned char > get_detection_image ()
 Get the unsigned char image of detections.
vil_image_view< unsigned char > get_dir_image ()
 Get the direction image (unsigned char).
vil_image_view< vil_rgb
< unsigned char > > 
get_combined_image ()
 Get the combination of coverage and direction as a color image.
bool SanityCheck ()
 Checks that parameters are within acceptable bounds.

Public Attributes

float sigma_
 Standard deviation of the smoothing kernel.
float thresh_
 Low hysteresis threshold.
float gauss_tail_
 Used in determining the convolution kernel.
int proj_width_
 1/2 the projection region width
int proj_height_
 1/2 the projection region height
int sup_radius_
 The non_maximum suppression kernel width.
bool verbose_
 output debug messages

Private Member Functions

void init (vil_image_resource_sptr const &image)
 Image Initialization.
void init_variables ()
 Variable Initialization.
void set_kernel ()
void smooth_image ()
 Convolves the image with the smoothing kernel. Private.
void avg (int x, int y, vil_image_view< float > const &smooth, vil_image_view< float > &avg)
 Compute the average value in the 7x7 window.
void grad0 (int x, int y, vil_image_view< float > const &smooth, vil_image_view< float > &grad0)
 Compute a gradient operator at x,y along the x axis.
void grad45 (int x, int y, vil_image_view< float > const &smooth, vil_image_view< float > &grad45)
 Compute a gradient operator at x,y at 45 degrees.
void grad90 (int x, int y, vil_image_view< float > const &smooth, vil_image_view< float > &grad90)
 Compute a gradient operator at x,y at 90 degrees.
void grad135 (int x, int y, vil_image_view< float > const &smooth, vil_image_view< float > &grad135)
 Compute a gradient operator at x,y at 135 degrees.
void compute_gradients ()
 Convolves with the kernel in the x direction, to compute the local derivative in that direction.
float project (int x, int y, int dir, vcl_vector< float > &projection)
 Project the gradient magnitude along a given direction.
void remove_flat_peaks (int n, vcl_vector< float > &array)
 Prune any sequences of more than one maximum value.
void non_maximum_supress (vcl_vector< float > const &array, vcl_vector< float > &sup_array)
 Find locally maximum peaks in the input array.
float parallel_coverage (vcl_vector< float > const &sup_array)
 Find the amount of overlapping parallel coverage.
void compute_parallel_coverage ()
 Find the direction with maximum parallel coverage. Return the normalized coverage value.
void compute_image (vil_image_view< float > const &data, vil_image_view< unsigned char > &image)
 Compute a 8-bit image from the projected gradients.

Private Attributes

int proj_n_
int width_
int k_size_
vcl_vector< float > kernel_
int xstart_
int ystart_
int xsize_
int ysize_
vil_image_view< float > smooth_
vil_image_view< float > avg_
vil_image_view< float > grad0_
vil_image_view< float > grad45_
vil_image_view< float > grad90_
vil_image_view< float > grad135_
vil_image_view< float > det_
vil_image_view< float > dir_
vil_image_view< unsigned char > det_image_
vil_image_view< unsigned char > dir_image_
vil_image_view< float > image_
vcl_vector< float > sup_proj_
vcl_vector< float > proj_0_
vcl_vector< float > proj_45_
vcl_vector< float > proj_90_
vcl_vector< float > proj_135_

Detailed Description

Definition at line 39 of file brip_para_cvrg.h.


Constructor & Destructor Documentation

brip_para_cvrg::brip_para_cvrg ( float  sigma = 1.0,
float  low = 6,
float  gauss_tail = .05,
int  proj_width = 7,
int  proj_height = 1,
int  sup_radius = 1,
bool  verbose = true 
)

Constructor s.

Definition at line 56 of file brip_para_cvrg.cxx.

brip_para_cvrg::brip_para_cvrg ( brip_para_cvrg_params pdp)

Definition at line 66 of file brip_para_cvrg.cxx.

brip_para_cvrg::~brip_para_cvrg ( )

Destructor.

Definition at line 74 of file brip_para_cvrg.cxx.


Member Function Documentation

void brip_para_cvrg::avg ( int  x,
int  y,
vil_image_view< float > const &  smooth,
vil_image_view< float > &  avg 
) [private]

Compute the average value in the 7x7 window.

Definition at line 91 of file brip_para_cvrg.cxx.

void brip_para_cvrg::compute_gradients ( ) [private]

Convolves with the kernel in the x direction, to compute the local derivative in that direction.

Private.

Definition at line 162 of file brip_para_cvrg.cxx.

void brip_para_cvrg::compute_image ( vil_image_view< float > const &  data,
vil_image_view< unsigned char > &  image 
) [private]

Compute a 8-bit image from the projected gradients.

Definition at line 426 of file brip_para_cvrg.cxx.

void brip_para_cvrg::compute_parallel_coverage ( ) [private]

Find the direction with maximum parallel coverage. Return the normalized coverage value.

Definition at line 364 of file brip_para_cvrg.cxx.

void brip_para_cvrg::do_coverage ( vil_image_resource_sptr const &  image)

Definition at line 450 of file brip_para_cvrg.cxx.

vil_image_view< vil_rgb< unsigned char > > brip_para_cvrg::get_combined_image ( )

Get the combination of coverage and direction as a color image.

Definition at line 508 of file brip_para_cvrg.cxx.

vil_image_view< unsigned char > brip_para_cvrg::get_detection_image ( )

Get the unsigned char image of detections.

Definition at line 484 of file brip_para_cvrg.cxx.

vil_image_view< unsigned char > brip_para_cvrg::get_dir_image ( )

Get the direction image (unsigned char).

Definition at line 494 of file brip_para_cvrg.cxx.

vil_image_view< float > brip_para_cvrg::get_float_detection_image ( const float  max = 255)

Get the float image of detections. Scale onto [0, max].

Definition at line 462 of file brip_para_cvrg.cxx.

void brip_para_cvrg::grad0 ( int  x,
int  y,
vil_image_view< float > const &  smooth,
vil_image_view< float > &  grad0 
) [private]

Compute a gradient operator at x,y along the x axis.

Definition at line 106 of file brip_para_cvrg.cxx.

void brip_para_cvrg::grad135 ( int  x,
int  y,
vil_image_view< float > const &  smooth,
vil_image_view< float > &  grad135 
) [private]

Compute a gradient operator at x,y at 135 degrees.

Definition at line 147 of file brip_para_cvrg.cxx.

void brip_para_cvrg::grad45 ( int  x,
int  y,
vil_image_view< float > const &  smooth,
vil_image_view< float > &  grad45 
) [private]

Compute a gradient operator at x,y at 45 degrees.

Definition at line 120 of file brip_para_cvrg.cxx.

void brip_para_cvrg::grad90 ( int  x,
int  y,
vil_image_view< float > const &  smooth,
vil_image_view< float > &  grad90 
) [private]

Compute a gradient operator at x,y at 90 degrees.

Definition at line 134 of file brip_para_cvrg.cxx.

void brip_para_cvrg::init ( vil_image_resource_sptr const &  image) [private]

Image Initialization.

Definition at line 27 of file brip_para_cvrg.cxx.

void brip_para_cvrg::init_variables ( ) [private]

Variable Initialization.

Definition at line 13 of file brip_para_cvrg.cxx.

void brip_para_cvrg::non_maximum_supress ( vcl_vector< float > const &  array,
vcl_vector< float > &  sup_array 
) [private]

Find locally maximum peaks in the input array.

Definition at line 311 of file brip_para_cvrg.cxx.

float brip_para_cvrg::parallel_coverage ( vcl_vector< float > const &  sup_array) [private]

Find the amount of overlapping parallel coverage.

Definition at line 344 of file brip_para_cvrg.cxx.

float brip_para_cvrg::project ( int  x,
int  y,
int  dir,
vcl_vector< float > &  projection 
) [private]

Project the gradient magnitude along a given direction.

The result is a 1-d projection plot.

                       .
                      *  .
                     ^  *  .
                   /   ^  *  .
                    \    ^  *  .
                           ^  *  \ .
     2*proj_width_+1   x     ^  x-----2*proj_height_+1
                          \ / \ .
   

Definition at line 198 of file brip_para_cvrg.cxx.

void brip_para_cvrg::remove_flat_peaks ( int  n,
vcl_vector< float > &  array 
) [private]

Prune any sequences of more than one maximum value.

That is, it is possible to have a "flat" top peak with an arbitrarily long sequence of equal, but maximum values.

Definition at line 241 of file brip_para_cvrg.cxx.

bool brip_para_cvrg_params::SanityCheck ( ) [inherited]

Checks that parameters are within acceptable bounds.

Definition at line 11 of file brip_para_cvrg_params.cxx.

void brip_para_cvrg::set_kernel ( ) [private]
void brip_para_cvrg::smooth_image ( ) [private]

Convolves the image with the smoothing kernel. Private.

Definition at line 80 of file brip_para_cvrg.cxx.


Member Data Documentation

Definition at line 95 of file brip_para_cvrg.h.

Definition at line 100 of file brip_para_cvrg.h.

vil_image_view<unsigned char> brip_para_cvrg::det_image_ [private]

Definition at line 103 of file brip_para_cvrg.h.

Definition at line 101 of file brip_para_cvrg.h.

vil_image_view<unsigned char> brip_para_cvrg::dir_image_ [private]

Definition at line 105 of file brip_para_cvrg.h.

Used in determining the convolution kernel.

Definition at line 39 of file brip_para_cvrg_params.h.

Definition at line 96 of file brip_para_cvrg.h.

Definition at line 99 of file brip_para_cvrg.h.

Definition at line 97 of file brip_para_cvrg.h.

Definition at line 98 of file brip_para_cvrg.h.

Definition at line 106 of file brip_para_cvrg.h.

int brip_para_cvrg::k_size_ [private]

Definition at line 89 of file brip_para_cvrg.h.

vcl_vector<float> brip_para_cvrg::kernel_ [private]

Definition at line 90 of file brip_para_cvrg.h.

vcl_vector<float> brip_para_cvrg::proj_0_ [private]

Definition at line 108 of file brip_para_cvrg.h.

vcl_vector<float> brip_para_cvrg::proj_135_ [private]

Definition at line 111 of file brip_para_cvrg.h.

vcl_vector<float> brip_para_cvrg::proj_45_ [private]

Definition at line 109 of file brip_para_cvrg.h.

vcl_vector<float> brip_para_cvrg::proj_90_ [private]

Definition at line 110 of file brip_para_cvrg.h.

1/2 the projection region height

Definition at line 41 of file brip_para_cvrg_params.h.

int brip_para_cvrg::proj_n_ [private]

Definition at line 87 of file brip_para_cvrg.h.

1/2 the projection region width

Definition at line 40 of file brip_para_cvrg_params.h.

float brip_para_cvrg_params::sigma_ [inherited]

Standard deviation of the smoothing kernel.

Definition at line 37 of file brip_para_cvrg_params.h.

Definition at line 94 of file brip_para_cvrg.h.

vcl_vector<float> brip_para_cvrg::sup_proj_ [private]

Definition at line 107 of file brip_para_cvrg.h.

The non_maximum suppression kernel width.

Definition at line 42 of file brip_para_cvrg_params.h.

float brip_para_cvrg_params::thresh_ [inherited]

Low hysteresis threshold.

Definition at line 38 of file brip_para_cvrg_params.h.

output debug messages

Definition at line 43 of file brip_para_cvrg_params.h.

int brip_para_cvrg::width_ [private]

Definition at line 88 of file brip_para_cvrg.h.

int brip_para_cvrg::xsize_ [private]

Definition at line 93 of file brip_para_cvrg.h.

int brip_para_cvrg::xstart_ [private]

Definition at line 92 of file brip_para_cvrg.h.

int brip_para_cvrg::ysize_ [private]

Definition at line 93 of file brip_para_cvrg.h.

int brip_para_cvrg::ystart_ [private]

Definition at line 92 of file brip_para_cvrg.h.


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