Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

gevd_float_operators Class Reference

#include <gevd_float_operators.h>

List of all members.


Detailed Description

Definition at line 42 of file gevd_float_operators.h.

Static Public Member Functions

static float Convolve (const gevd_bufferxy &from, const gevd_bufferxy &kernel, gevd_bufferxy *&to)
 Convolves from image with 2D filter and stores values in to image.
static gevd_bufferxyRead2dKernel (const char *filename)
 Read 2D kernel from a file: width height k_x_y .
static float Convolve (const gevd_bufferxy &from, gevd_bufferxy *&to, const float *xkernel, const int xradius, const bool xevenp, const float *ykernel, const int yradius, const bool yevenp, const bool xwrap=false, const bool ywrap=false)
 Convolves from image with two separable filters, along directions x and y, and stores values in to image.
static float Convolve (const gevd_bufferxy &from, gevd_bufferxy *&to, const float *xkernel, const int xradius, const bool xevenp, const int yradius, const bool xwrap=false, const bool ywrap=false)
 Convolves from image with a filter along x, and a running sum along y-axis, then stores values in to image.
static float Convolve (const float *from, float *&to, const int len, const float *kernel, const int radius, const bool evenp, const bool wrap=false)
 Convolve a linear array of data, wrapping at the 2 ends.
static float RunningSum (float *from, float *&to, const int len, const int radius, const bool wrap=false)
 For large smoothing sigma, use running sum to avoid floating multiplications.
static bool Read1dKernel (const char *filename, float *&kernel, int &radius, bool &evenp)
 Read 1d odd/even kernel from a file: width k_i .
static float Gaussian (gevd_bufferxy &img, gevd_bufferxy *&smooth, const float sigma=1.0, const bool xwrap=false, const bool ywrap=false)
 Convolves the from image with a 2D Gaussian filter with standard deviation sigma.
static bool Find1dGaussianKernel (const float sigma, float *&kernel, int &radius, const float fuzz=0.02)
 Returns the kernel array for Gaussian with given standard deviation sigma [pixel], and cutoff at min/max = fuzz.
static float Gradient (const gevd_bufferxy &smooth, gevd_bufferxy *&mag, gevd_bufferxy *&dirx, gevd_bufferxy *&diry, const bool xwrap=false, const bool ywrap=false)
 Compute the gradient of the intensity surface.
static float Slope (float *from, float *&to, const int len, const bool wrap=false)
 Compute slope or first-difference, in linear/circular array.
static float Hessian (const gevd_bufferxy &smooth, gevd_bufferxy *&mag, gevd_bufferxy *&dirx, gevd_bufferxy *&diry, const bool xwrap=false, const bool ywrap=false)
 Compute the Hessian of the intensity surface.
static float Laplacian (const gevd_bufferxy &smooth, gevd_bufferxy *&mag, gevd_bufferxy *&dirx, gevd_bufferxy *&diry, const bool xwrap=false, const bool ywrap=false)
 Compute the Laplacian of the intensity surface.
static float Curvature (float *from, float *&to, const int len, const bool wrap=false)
 Compute curvature, or 2nd-difference in linear/circular array.
static float Orientation (const gevd_bufferxy &smooth, gevd_bufferxy *&theta, gevd_bufferxy *&coherence, const int frame=1)
 Compute the local orientation at each pixel in the image, and returns 2 images: twice the angle, and coherence measure (0,1).
static void NonMaximumSuppression (const gevd_bufferxy &magnitude, const gevd_bufferxy &directionx, const gevd_bufferxy &directiony, const float threshold, gevd_bufferxy *&contour, gevd_bufferxy *&direction, gevd_bufferxy *&locationx, gevd_bufferxy *&locationy, const bool xwrap=false, const bool ywrap=false)
 Detect contour pixels as strict local maxima, and interpolate the strength/location with a parabola through 3 points.
static int NonMaximumSuppression (const float *from, const int len, const float threshold, int *&index, float *&mag, float *&locs, const bool wrap=false)
 Detect local maxima in linear/circular array.
static float InterpolateParabola (float y1, float y0, float y2, float &y)
 Fit a parabola through 3 points with strict local max/min.
static float BilinearInterpolate (const gevd_bufferxy &img, float x, float y)
 Return the float value of pixel (x, y) in float buffer, using bilinear interpolation.
static void SupportAngle (const gevd_bufferxy &dirx, const gevd_bufferxy &diry, const gevd_bufferxy &magnitude, gevd_bufferxy *&angle)
 Find angle of the line of support, in degrees.
static void SurfaceNormal (const gevd_bufferxy &range, gevd_bufferxy *&normal)
 Find local surface normal at all pixels in the range z(x,y) image.
static void SurfaceCurvature (const gevd_bufferxy &normal, gevd_bufferxy *&curvature)
 Find local gaussian curvature at all pixels from the local surface normals, previously computed from the range z(x,y) image.
static void SurfaceNormalD (const gevd_bufferxy &range, gevd_bufferxy *&normal, float no_value, float pixel_distance=1.0)
 Same as gevd_float_operators::SurfaceNormal with two exceptions.
static void SurfaceCurvatureD (const gevd_bufferxy &normal, const gevd_bufferxy &surface, gevd_bufferxy *&curvature, float dflt, float pixel_distance=1.0)
 Estimate the maximum curvature at all pixels from the local surface normals, previously computed from the range z(x,y) image.
static float ShrinkBy2 (const gevd_bufferxy &cfrom, gevd_bufferxy *&to, const float burt_ka=0.359375)
 Shrinks the from image by 2 and stores into to image, using Burt-Adelson reduction algorithm.
static float ExpandBy2 (const gevd_bufferxy &cfrom, gevd_bufferxy *&to, const float burt_ka=0.359375)
 Expands the from image by 2 and store into to image, using Burt-Adelson expansion algorithm.
static void ShrinkBy2_D (const gevd_bufferxy &from, gevd_bufferxy *&to, float no_value, float burt_ka=0.359375)
 Shrinks the from image by 2 and stores into to image.
static int Pyramid (const float *from, const int length, float *&to, int &nlevels, int trim=0, const float burt_ka=0.359375)
 Compute the pyramid by shrinking data sequence by 2, nlevels-1 times, and return final shrunk length, and reset number of levels in pyramid.
static int ShrinkBy2 (const float *from, const int length, float *&to, const float burt_ka=0.359375)
static bool WaveletTransform (float *array, const int n, const bool forwardp, int nlevels, const int waveletno=4)
 Compute the forward/inverse wavelet transform of a 1d array of data.
static bool WaveletTransformByBlock (float *array, const int *dims, const int ndim, const bool forwardp, int nlevels, const int waveletno=4)
 n-dimensional wavelet transform of an n-dimensional array.
static bool WaveletTransformByIndex (float *array, const int *dims, const int ndim, const bool forwardp, int nlevels, const int waveletno=4)
 n-dimensional wavelet transform of an n-dimensional array.
static bool FindWavelet (const int waveletno, float *&cc, float *&cr, int &ncof)
 Looks up and stores the wavelet pair in (lo_filter, hi_filter).
static void LowHighPyramid (float *highPass, float *lowPass, int n, int nlevels, const float *lo_filter, const float *hi_filter, int ncof, float *wksp)
 Find pyramid of low/high pass components, using wavelet transform.
static bool WaveletTransformByBlock (const gevd_bufferxy &cfrom, gevd_bufferxy *&to, const bool forwardp, int nlevels, const int waveletno=4)
 Compute the Fast Wavelet Transform of the image.
static bool WaveletTransformByIndex (const gevd_bufferxy &cfrom, gevd_bufferxy *&to, const bool forwardp, int nlevels, const int waveletno=4)
 Compute the Fast Wavelet Transform of the 2d array.
static int DeleteMixedComponents (gevd_bufferxy &wave, const int nlevels)
 Delete all wavelet components, which have high frequency along both x- and y- axes.
static int TruncateHighFrequencies (gevd_bufferxy &wave, const int nlevels, const float threshold=0.1)
 Truncate to 0, all wavelet components with high frequency along either x- or y- axes only, not both.
static int TruncateLowestFrequency (gevd_bufferxy &wave, const int nlevels)
 Truncate to average value, the lowest frequency component.
static int DeleteBoundaryArtifacts (float *wave, const int n, const int nlevels)
 Delete boundary artifacts in 1d-array, because its length is not a power of 2, and so wrapping will skip the last odd element.
static int DeleteBoundaryArtifacts (gevd_bufferxy &wave, const int nlevels)
 Delete boundary artifacts because the dimension of the image is not a power of 2, and so wrapping will skip the last odd element.
static void ProjectWaveOntoX (const gevd_bufferxy &buf, float *&proj, const int nlevels=0)
 Project wavelet components onto the axes.
static void ProjectWaveOntoY (const gevd_bufferxy &buf, float *&proj, const int nlevels=0)
static void ProjectOntoX (const gevd_bufferxy &buf, float *&proj, int sizeX=0, int sizeY=0, int origX=0, int origY=0)
 Project the image data in ROI onto the x- and y- axes.
static void ProjectOntoY (const gevd_bufferxy &buf, float *&proj, int sizeX=0, int sizeY=0, int origX=0, int origY=0)
static float Correlation (const gevd_bufferxy &from, const gevd_bufferxy &kernel, gevd_bufferxy *&to)
 Correlate from image with 2D filter and stores values in to image.
static float CorrelationAlongAxis (const gevd_bufferxy &from, const gevd_bufferxy &kernel, gevd_bufferxy *&to)
 Correlate from image with 2D filter and stores values in to image.
static float Correlation (const float *data, const int length, const float *pattern, const int radius, const int index)
 Find correlation of given pattern to data, matching pattern[radius+i] with data[index+i].
static float * Correlations (const float *data, const int length, const float *pattern, const int radius, const int index, const int search)
 Find correlations of given pattern to data, given maximum search from index.
static float BestCorrelation (const float *data, const int length, const float *pattern, const int radius, int &shift, const int search)
 Find correlation, and return correlation and shift values.
static float CoarseFineCorrelation (const float *dataPyr, const int dlength, const float *patternPyr, const int plength, float &shift, const int coarse, const int fine, const float cutoff=0, const float overlap=0.75, float *matches=0)
 Search for best correlation, from coarse to fine, starting at a priori shift, and requiring minimum overlap.
static void Apply (gevd_bufferxy &buf, float(*func)(float))
 Apply function to all elements in buffer.
static gevd_bufferxyAbsoluteDifference (const gevd_bufferxy &buf1, const gevd_bufferxy &buf2)
static gevd_bufferxyAllocate (gevd_bufferxy *space, const gevd_bufferxy &model, int bits_per_pixel=0, int sizeX=0, int sizeY=0)
 Allocate new space if desired depth and sizes are not the same.
static gevd_bufferxySimilarBuffer (const gevd_bufferxy &buffer, int bits_per_pixel=0, int sizeX=0, int sizeY=0)
 Creates a new buffer similar to buf, unless dimension and precision are given.
static bool IsSimilarBuffer (const gevd_bufferxy &buf1, const gevd_bufferxy &buf2)
 Two buffers are similar if they have the same dimensions, and precision (bits_per_pixel).
static gevd_bufferxyExtract (const gevd_bufferxy &buf, int sizeX=0, int sizeY=0, int origX=0, int origY=0)
 Extract from buf, a float sub-buffer with dimensions (sizeX, sizeY), from top-left corner (origX, origY).
static void Update (gevd_bufferxy &old_buf, const gevd_bufferxy &new_buf, int origX=0, int origY=0)
 Update a float sub-buffer of buf, from top-left corner (origX, origY), with values in sub.
static gevd_bufferxyTransposeExtract (const gevd_bufferxy &buf, int sizeX, int sizeY, int origX, int origY)
static void TransposeUpdate (gevd_bufferxy &buf, const gevd_bufferxy &sub, int origX, int origY)
static void Fill (gevd_bufferxy &buf, const float value, int sizeX=0, int sizeY=0, int origX=0, int origY=0)
 Set all pixels in ROI to value.
static void FillFrameX (gevd_bufferxy &buf, const float value, const int width=1)
 Sets all pixels in the frame region to value (default = 0).
static void FillFrameY (gevd_bufferxy &buf, const float value, const int width=1)
static void DrawFrame (gevd_bufferxy &buf, const int loc, const float value=0)
 Sets all pixels on frame contour, such as buf(loc, i), to value.
static gevd_bufferxyPadToPowerOf2 (gevd_bufferxy &buf)
 Pad the buffer by repeating values at the border, so that the new buffer has dimensions being powers of 2.
static gevd_bufferxyUnpadFromPowerOf2 (gevd_bufferxy &padded, int sizeX, int sizeY)
 Inverse of the above operation.
static float Maximum (const gevd_bufferxy &buf, int sizeX=0, int sizeY=0, int origX=0, int origY=0)
 Returns the maximum value in float buffer.
static float Minimum (const gevd_bufferxy &buf, int sizeX=0, int sizeY=0, int origX=0, int origY=0)
 Returns the minimum value in float buffer.
static bool Maximum (const float *data, const int length, int &index, float &value)
 Detect maximum in 1d-array of values.
static float Sum (const gevd_bufferxy &buf, int sizeX=0, int sizeY=0, int origX=0, int origY=0)
 Returns the sum of all values in float buffer.
static int Threshold (gevd_bufferxy &buf, float noise, int sizeX=0, int sizeY=0, int origX=0, int origY=0)
 Truncate all values in ROI to 0, if below noise.
static float TruncateToPositive (gevd_bufferxy &buf)
 Zeros out all negative values.
static float TruncateToCeiling (gevd_bufferxy &buf, float ceil)
static void Absolute (gevd_bufferxy &buf)
 Replace with absolute values.
static void Negate (gevd_bufferxy &buf)
 Negate all values.
static void Scale (gevd_bufferxy &buf, float factor)
 Scale all values by factor.
static void ShiftToPositive (gevd_bufferxy &buf)
 Shift to positive values, by adding 30.0000, and truncate all values to 0-60.000.
static void Normalize (gevd_bufferxy &buf, const float lo, const float hi)
 Normalizes a float buffer so that the pixel values range from lo to hi, inclusive.
static bool BufferToFloat (const gevd_bufferxy &from, gevd_bufferxy &floatto)
 Converts from a unsigned char (8-bit) or a short (16-bit) buffer to a float buffer to avoid overflow/underflow and conversion for subsequent math computations.
static bool FloatToBuffer (const gevd_bufferxy &floatfrom, gevd_bufferxy &to)

Static Protected Member Functions

static int SetupPipeline (const float *data, const int len, const int kradius, const bool wrap, float *&cache, float *&pipeline)
 Setup the cache for reflection/wrapping at the borders, and the center pipeline.
static gevd_bufferxyWrapAlongX (const gevd_bufferxy &img)
 Create a buffer that wraps rows/columns.
static gevd_bufferxyWrapAlongY (const gevd_bufferxy &img)
static float Gaussian (const float x, const float sigma)
static float ShrinkBy2AlongX (const gevd_bufferxy &cfrom, const int y, float *yline, const int len, const float ka, const float kb, const float kc)
 Shrinks the yline by 2 along the x-axis.
static void ShrinkBy2AlongX_D (const gevd_bufferxy &from, int from_sizeX, int sizeX, int y, float kernel[], float no_value, float *yline, float *wline)
 Create a smoothed and subsampled array of x values in the given row.
static float ExpandBy2AlongX (const gevd_bufferxy &cfrom, const int y, float *yline, const int len, const float ka, const float kb, const float kc)
 Expands the yline by 2 along the x-axis.
static void WaveletTransformStep (float *array, const int n, const bool forwardp, const float *lo_filter, const float *hi_filter, const int ncof, float *wksp)
 Convolution with wavelets (lo_filter, hi_filter) and gather results into consecutive blocks, with convolution of lo_filter (resp.
static void WaveletTransformStep (float *array, const int *dims, const int ndim, const bool forwardp, const float *lo_filter, const float *hi_filter, const int ncof, float *buffer, float *wksp)
static void CopyNdRecursive (const float *from_array, const int from_size, const int *from_dims, float *to_array, const int to_size, const int *to_dims, const int ndim, const bool fullp=true)
 Recursively copies elements of n-dimensional arrays.
static void TestWavelets ()

Private Member Functions

 gevd_float_operators ()


Constructor & Destructor Documentation

gevd_float_operators::gevd_float_operators  )  [private]
 


Member Function Documentation

void gevd_float_operators::Absolute gevd_bufferxy buf  )  [static]
 

Replace with absolute values.

Definition at line 3809 of file gevd_float_operators.cxx.

gevd_bufferxy * gevd_float_operators::AbsoluteDifference const gevd_bufferxy buf1,
const gevd_bufferxy buf2
[static]
 

Definition at line 4083 of file gevd_float_operators.cxx.

gevd_bufferxy * gevd_float_operators::Allocate gevd_bufferxy space,
const gevd_bufferxy model,
int  bits_per_pixel = 0,
int  sizeX = 0,
int  sizeY = 0
[static]
 

Allocate new space if desired depth and sizes are not the same.

Definition at line 3495 of file gevd_float_operators.cxx.

void gevd_float_operators::Apply gevd_bufferxy buf,
float(*)(float)  func
[static]
 

Apply function to all elements in buffer.

Definition at line 3483 of file gevd_float_operators.cxx.

float gevd_float_operators::BestCorrelation const float *  data,
const int  length,
const float *  pattern,
const int  radius,
int &  shift,
const int  search
[static]
 

Find correlation, and return correlation and shift values.

Definition at line 3340 of file gevd_float_operators.cxx.

float gevd_float_operators::BilinearInterpolate const gevd_bufferxy img,
float  x,
float  y
[static]
 

Return the float value of pixel (x, y) in float buffer, using bilinear interpolation.

Definition at line 1441 of file gevd_float_operators.cxx.

bool gevd_float_operators::BufferToFloat const gevd_bufferxy from,
gevd_bufferxy to
[static]
 

Converts from a unsigned char (8-bit) or a short (16-bit) buffer to a float buffer to avoid overflow/underflow and conversion for subsequent math computations.

O(n*m).

Definition at line 3854 of file gevd_float_operators.cxx.

float gevd_float_operators::CoarseFineCorrelation const float *  dataPyr,
const int  dlength,
const float *  patternPyr,
const int  plength,
float &  shift,
const int  coarse,
const int  fine,
const float  cutoff = 0,
const float  overlap = 0.75,
float *  matches = 0
[static]
 

Search for best correlation, from coarse to fine, starting at a priori shift, and requiring minimum overlap.

O(n) time. Return last best correlation, and its corresponding shift. The search is cutoff early, if no maximum is found, or maximum correlation <= cutoff. Accumulate match values if matches non null. Assumes data and pattern are pyramids. Compile with -DDEBUG to trace the coarse-to-fine search of the best correlation,

Definition at line 3372 of file gevd_float_operators.cxx.

float gevd_float_operators::Convolve const float *  from,
float *&  to,
const int  len,
const float *  kernel,
const int  kradius,
const bool  evenp,
const bool  wrap = false
[static]
 

Convolve a linear array of data, wrapping at the 2 ends.

Special care is taken when to and from are identical - Peter Vanroose.

Definition at line 493 of file gevd_float_operators.cxx.

float gevd_float_operators::Convolve const gevd_bufferxy from,
gevd_bufferxy *&  to,
const float *  xkernel,
const int  xradius,
const bool  xevenp,
const int  yradius,
const bool  xwrap = false,
const bool  ywrap = false
[static]
 

Convolves from image with a filter along x, and a running sum along y-axis, then stores values in to image.

O(m*n*k).

Definition at line 379 of file gevd_float_operators.cxx.

float gevd_float_operators::Convolve const gevd_bufferxy from,
gevd_bufferxy *&  to,
const float *  xkernel,
const int  xradius,
const bool  xevenp,
const float *  ykernel,
const int  yradius,
const bool  yevenp,
const bool  xwrap = false,
const bool  ywrap = false
[static]
 

Convolves from image with two separable filters, along directions x and y, and stores values in to image.

O(m*n*k). The filter kernel has length 2*radius + 1, and is either even or odd. Assume image data is in row-major order.

Special care is taken when to and from are identical - Peter Vanroose.

Definition at line 229 of file gevd_float_operators.cxx.

float gevd_float_operators::Convolve const gevd_bufferxy from,
const gevd_bufferxy kernel,
gevd_bufferxy *&  to
[static]
 

Convolves from image with 2D filter and stores values in to image.

O(m*n*k). The filter kernel has odd width and height, and is either even or odd along x- or y-axis. Assume image data is in row-major order.

Special care is taken when to and from are identical - Peter Vanroose.

Definition at line 48 of file gevd_float_operators.cxx.

void gevd_float_operators::CopyNdRecursive const float *  from_array,
const int  from_size,
const int *  from_dims,
float *  to_array,
const int  to_size,
const int *  to_dims,
const int  ndim,
const bool  fullp = true
[static, protected]
 

Recursively copies elements of n-dimensional arrays.

Extra elements that can not fit in both arrays are not read or written. A flag fullp (default = true) is used to copy from/to a full n-dimensional array or only a sub-block of the array.

Definition at line 2794 of file gevd_float_operators.cxx.

float gevd_float_operators::Correlation const float *  data,
const int  length,
const float *  pattern,
const int  radius,
const int  index
[static]
 

Find correlation of given pattern to data, matching pattern[radius+i] with data[index+i].

The linear correlation coefficient, also called Pearson r, is computed, O(|pattern|). Assumed pattern has length = 2*radius + 1.

Definition at line 3273 of file gevd_float_operators.cxx.

float gevd_float_operators::Correlation const gevd_bufferxy from,
const gevd_bufferxy kernel,
gevd_bufferxy *&  to
[static]
 

Correlate from image with 2D filter and stores values in to image.

O(m*n*k). The filter kernel has odd width and height, and is either even or odd along x- or y-axis. Assume image data is in row-major order.

Special care is taken when to and from are identical - Peter Vanroose.

Definition at line 90 of file gevd_float_operators.cxx.

float gevd_float_operators::CorrelationAlongAxis const gevd_bufferxy from,
const gevd_bufferxy kernel,
gevd_bufferxy *&  to
[static]
 

Correlate from image with 2D filter and stores values in to image.

Special care is taken when to and from are identical - Peter Vanroose.

Definition at line 140 of file gevd_float_operators.cxx.

float * gevd_float_operators::Correlations const float *  data,
const int  length,
const float *  pattern,
const int  radius,
const int  index,
const int  search
[static]
 

Find correlations of given pattern to data, given maximum search from index.

O(|pattern|*shift). Returns the array of correlation values, with positive translation starting from result[search+1], and negative translation starting from result[search-1].

Definition at line 3310 of file gevd_float_operators.cxx.

float gevd_float_operators::Curvature float *  from,
float *&  to,
const int  len,
const bool  wrap = false
[static]
 

Compute curvature, or 2nd-difference in linear/circular array.

Special care is taken when to and from are identical - Peter Vanroose.

Definition at line 1137 of file gevd_float_operators.cxx.

int gevd_float_operators::DeleteBoundaryArtifacts gevd_bufferxy wave,
const int  nlevels
[static]
 

Delete boundary artifacts because the dimension of the image is not a power of 2, and so wrapping will skip the last odd element.

Definition at line 3159 of file gevd_float_operators.cxx.

int gevd_float_operators::DeleteBoundaryArtifacts float *  wave,
const int  n,
const int  nlevels
[static]
 

Delete boundary artifacts in 1d-array, because its length is not a power of 2, and so wrapping will skip the last odd element.

Definition at line 3134 of file gevd_float_operators.cxx.

int gevd_float_operators::DeleteMixedComponents gevd_bufferxy wave,
const int  nlevels
[static]
 

Delete all wavelet components, which have high frequency along both x- and y- axes.

They are diagonal blocks, except the lowest frequency block. This will throw away high frequency point-like features. Return the number of coefficients deleted.

Definition at line 3057 of file gevd_float_operators.cxx.

void gevd_float_operators::DrawFrame gevd_bufferxy buf,
const int  loc,
const float  value = 0
[static]
 

Sets all pixels on frame contour, such as buf(loc, i), to value.

O(n+m).

Definition at line 3630 of file gevd_float_operators.cxx.

float gevd_float_operators::ExpandBy2 const gevd_bufferxy from,
gevd_bufferxy *&  to,
const float  burt_ka = 0.359375
[static]
 

Expands the from image by 2 and store into to image, using Burt-Adelson expansion algorithm.

Convolution with a 5-point kernel [(0.5-ka), 0.5, 2*ka, 0.5, (0.5-ka)] ka = 0.6 maximum decorrelation, low-pass filter for image compression. ka = 0.5 linear interpolation, ka = 0.4 Gaussian filter, smoothing at tail. ka = 0.3 wider than Gaussian, for more smoothing. The image indexes are mapped with: to.ij = from.ij * 2 The image sizes are related by: to.size = from.size * 2.

Special care is taken when to and from are identical - Peter Vanroose.

Definition at line 2140 of file gevd_float_operators.cxx.

float gevd_float_operators::ExpandBy2AlongX const gevd_bufferxy from,
const int  y,
float *  yline,
const int  sizeX,
const float  ka,
const float  kb,
const float  kc
[static, protected]
 

Expands the yline by 2 along the x-axis.

Interpolation is done by convolution with pixels at integral indexes only.

Definition at line 2188 of file gevd_float_operators.cxx.

gevd_bufferxy * gevd_float_operators::Extract const gevd_bufferxy buf,
int  sizeX = 0,
int  sizeY = 0,
int  origX = 0,
int  origY = 0
[static]
 

Extract from buf, a float sub-buffer with dimensions (sizeX, sizeY), from top-left corner (origX, origY).

Faster copying can be done with read/write chunks of memory.

Definition at line 3548 of file gevd_float_operators.cxx.

void gevd_float_operators::Fill gevd_bufferxy buf,
const float  value,
int  sizeX = 0,
int  sizeY = 0,
int  origX = 0,
int  origY = 0
[static]
 

Set all pixels in ROI to value.

Definition at line 3578 of file gevd_float_operators.cxx.

void gevd_float_operators::FillFrameX gevd_bufferxy buf,
const float  value,
const int  width = 1
[static]
 

Sets all pixels in the frame region to value (default = 0).

O((n+m)*width). The frame region is a rectangular band with given width, framing at two ends of x/y axes.

Definition at line 3598 of file gevd_float_operators.cxx.

void gevd_float_operators::FillFrameY gevd_bufferxy buf,
const float  value,
const int  width = 1
[static]
 

Definition at line 3613 of file gevd_float_operators.cxx.

bool gevd_float_operators::Find1dGaussianKernel const float  sigma,
float *&  kernel,
int &  radius,
const float  fuzz = 0.02
[static]
 

Returns the kernel array for Gaussian with given standard deviation sigma [pixel], and cutoff at min/max = fuzz.

The area under the discrete Gaussian is normalized to 1.

Definition at line 689 of file gevd_float_operators.cxx.

bool gevd_float_operators::FindWavelet const int  waveletno,
float *&  lo_filter,
float *&  hi_filter,
int &  ncof
[static]
 

Looks up and stores the wavelet pair in (lo_filter, hi_filter).

The wavelet number is 2 for Haar wavelet, 4-20 even numbers for Daubechies wavelet, and 9-15 odd numbers for symmetric Coifman wavelets.

Definition at line 2438 of file gevd_float_operators.cxx.

bool gevd_float_operators::FloatToBuffer const gevd_bufferxy floatfrom,
gevd_bufferxy to
[static]
 

Definition at line 3899 of file gevd_float_operators.cxx.

float gevd_float_operators::Gaussian const float  x,
const float  sigma
[static, protected]
 

Definition at line 717 of file gevd_float_operators.cxx.

float gevd_float_operators::Gaussian gevd_bufferxy from,
gevd_bufferxy *&  to,
const float  sigma = 1.0,
const bool  xwrap = false,
const bool  ywrap = false
[static]
 

Convolves the from image with a 2D Gaussian filter with standard deviation sigma.

O(m*n*k). The 2D convolution is decomposed into 2 1D convolutions: Gxy * I = Gy * (Gx * I). The frame with width equal to the radius of the Gaussian kernel is filled with zero.

Definition at line 661 of file gevd_float_operators.cxx.

float gevd_float_operators::Gradient const gevd_bufferxy smooth,
gevd_bufferxy *&  magnitude,
gevd_bufferxy *&  gradx,
gevd_bufferxy *&  grady,
const bool  xwrap = false,
const bool  ywrap = false
[static]
 

Compute the gradient of the intensity surface.

O(m*n). The intensity surface is assumed smoothed by a Gaussian filter, or convolved with a low-pass filter. Return at each pixel, the magnitude, the vector (dG * I), and the multiplication factor to normalize the magnitude. The product of detection |dG * I| and localization |dddG * I| of the step relative to noise is invariant to filter-size for the ideal step edge, and depends only on the shape of the step edge. As the filter size (sigma) increases by k, detection or signal-to-noise ratio increases by sqrt(k), but localization decreases by 1/sqrt(k). This invariance is consistent with the uncertainty principle.

Definition at line 806 of file gevd_float_operators.cxx.

float gevd_float_operators::Hessian const