Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | Friends
gevd_fold Class Reference

#include <gevd_fold.h>

List of all members.

Public Member Functions

 gevd_fold (float smooth_sigma=1, float noise_sigma=-0.5, float contour_factor=1.0, float junction_factor=1.5)
 Save parameters and create workspace for detecting fold profiles.
 ~gevd_fold ()
 Free space allocated for detecting fold profiles. Does nothing.
bool DetectEdgels (const gevd_bufferxy &image, gevd_bufferxy *&edgels, gevd_bufferxy *&direction, gevd_bufferxy *&locationx, gevd_bufferxy *&locationy, bool peaks_only=false, bool valleys_only=false, bool transfer=false, gevd_bufferxy *&mag=null_bufferxy, gevd_bufferxy *&angle=null_bufferxy)
 Detect fold profiles with ddG edge detector.
int RecoverJunctions (const gevd_bufferxy &image, gevd_bufferxy &edgels, gevd_bufferxy &direction, gevd_bufferxy &locationx, gevd_bufferxy &locationy, int *&junctionx, int *&junctiony)
 Find junctions by searching for extensions of contours from their dangling end points.
float NoiseSigma () const
 query stored/estimated noise sigma.
float NoiseResponse () const
 response of noise sigma to filter ddG.
float NoiseThreshold (bool shortp=false) const
 elongated/directional?.

Static Public Member Functions

static float NoiseResponseToFilter (float noiseSigma, float smoothSigma, float filterFactor)
 Compute response of white noise through the filter ddG, or second-derivative of the Gaussian.

Static Public Attributes

static gevd_bufferxynull_bufferxy = 0

Protected Attributes

float smoothSigma
 spatial smoothing
float noiseSigma
 sensor/texture noise
float contourFactor
float junctionFactor
 threshold factor for edgels
float filterFactor
 factor in convolution filter

Friends

vcl_ostream & operator<< (vcl_ostream &os, const gevd_fold &st)
 Output a snapshot of current control parameters.
vcl_ostream & operator<< (vcl_ostream &os, gevd_fold &st)
 Output a snapshot of current control parameters.

Detailed Description

Definition at line 65 of file gevd_fold.h.


Constructor & Destructor Documentation

gevd_fold::gevd_fold ( float  smooth_sigma = 1,
float  noise_sigma = -0.5,
float  contour_factor = 1.0,
float  junction_factor = 1.5 
)

Save parameters and create workspace for detecting fold profiles.

High frequency features are smoothed away by smooth_sigma. Texture or white noise less than noise_sigma are not detected. smooth_sigma = 0.5-2.0, 1.0 insures separation of independent folds >= 2. noise_sigma = is standard deviation of intensity, in a uniform region. Optionally estimate sensor/texture sigma, if given noise sigma is a negative factor -k between -[0 1]. In this case, noise_sigma = (1-k)*sensor_sigma + k*texture_sigma. Response of white noise to the filter ddG is computed, and then multiplied by contour_factor/junction_factor to obtain thresholds for detecting contour/junction edges. threshold factor for junction edgels

Parameters:
smooth_sigmaspatial smoothing [0.5 2.0]
noise_sigmasensor/texture intensity noise -[0 1]
contour_factorthreshold factor for contour edgels

Definition at line 34 of file gevd_fold.cxx.

gevd_fold::~gevd_fold ( ) [inline]

Free space allocated for detecting fold profiles. Does nothing.

Definition at line 86 of file gevd_fold.h.


Member Function Documentation

bool gevd_fold::DetectEdgels ( const gevd_bufferxy image,
gevd_bufferxy *&  edgels,
gevd_bufferxy *&  direction,
gevd_bufferxy *&  locationx,
gevd_bufferxy *&  locationy,
bool  peaks_only = false,
bool  valleys_only = false,
bool  transfer = false,
gevd_bufferxy *&  mag = null_bufferxy,
gevd_bufferxy *&  angle = null_bufferxy 
)

Detect fold profiles with ddG edge detector.

The image is convolved with a Gaussian to smooth away high frequency noise, and insure separation of fold responses. Then the largest absolute eigenvalue, and corresponding eigenvector of the local Hessian are computed using second difference [+1 -2 +1]. Optionally estimate sensor/texture sigma and set threshold. Finally, non maximum suppression is done to find strict local maxima of curvature. The edge detector finds elongated contours only. These contours are typically broken at junctions because non maximum suppression is done along only the strongest direction. Return contour (float), direction (byte), location (float) images. Return true if no exception. J. Canny, A Computational Approach to Edge Detection, IEEE Trans on PAMI, vol 8, no 6, Nov 1986.

Parameters:
imagefloat image
edgelsstrength = dG * I
directiondirection % PI/4
locationxsubpixel loc

Definition at line 58 of file gevd_fold.cxx.

float gevd_fold::NoiseResponse ( ) const

response of noise sigma to filter ddG.

Compute response of white noise through the filter ddG, or second-derivative of the Gaussian. Using a threshold of 3 times this noise response would eliminate 99% of the noise edges.

Definition at line 395 of file gevd_fold.cxx.

float gevd_fold::NoiseResponseToFilter ( float  noiseSigma,
float  smoothSigma,
float  filterFactor 
) [static]

Compute response of white noise through the filter ddG, or second-derivative of the Gaussian.

Using a threshold of 3 times this noise response would eliminate 99% of the noise edges.

Definition at line 413 of file gevd_fold.cxx.

float gevd_fold::NoiseSigma ( ) const

query stored/estimated noise sigma.

Return the standard deviation of raw noise, in the original image, either estimated or given by the user. If the noise has not been estimated, return 0.

Definition at line 388 of file gevd_fold.cxx.

float gevd_fold::NoiseThreshold ( bool  shortp = false) const

elongated/directional?.

Return threshold for detecting contour or junction, which is response of white gaussian noise, noise_sigma, to fold edge detector, i.e. second-order derivative of Gaussian, smooth_sigma. noise_sigma can be estimated by finding the standard deviation in a region of constant intensity, and no texture patterns. Use short_factor*noise_sigma and smooth_sigma/2, when detecting junctions, to account for multiple responses to fold edge detector.

Definition at line 403 of file gevd_fold.cxx.

int gevd_fold::RecoverJunctions ( const gevd_bufferxy image,
gevd_bufferxy edgels,
gevd_bufferxy direction,
gevd_bufferxy locationx,
gevd_bufferxy locationy,
int *&  junctionx,
int *&  junctiony 
)

Find junctions by searching for extensions of contours from their dangling end points.

Non maximum suppression insures that contours have width < 2, and so we can find the left/right neighbors, and deduce end points. By using a minimally smoothed image, we find fold profiles up to joining with a stronger contour, thus recovering the missing junction caused by NMS along only 1 direction. The junctions are returned but are not set in the contour image, to prevent incorrect tracing of stronger contours first.

Parameters:
imageiterative extension
edgelsfrom end points of contours

Definition at line 272 of file gevd_fold.cxx.


Friends And Related Function Documentation

vcl_ostream& operator<< ( vcl_ostream &  os,
const gevd_fold st 
) [friend]

Output a snapshot of current control parameters.

Definition at line 425 of file gevd_fold.cxx.

vcl_ostream& operator<< ( vcl_ostream &  os,
gevd_fold st 
) [friend]

Output a snapshot of current control parameters.

Definition at line 438 of file gevd_fold.cxx.


Member Data Documentation

float gevd_fold::contourFactor [protected]

Definition at line 169 of file gevd_fold.h.

float gevd_fold::filterFactor [protected]

factor in convolution filter

Definition at line 170 of file gevd_fold.h.

float gevd_fold::junctionFactor [protected]

threshold factor for edgels

Definition at line 169 of file gevd_fold.h.

float gevd_fold::noiseSigma [protected]

sensor/texture noise

Definition at line 168 of file gevd_fold.h.

Definition at line 88 of file gevd_fold.h.

float gevd_fold::smoothSigma [protected]

spatial smoothing

Definition at line 167 of file gevd_fold.h.


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