Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Member Functions
brip_vil_float_ops Class Reference

#include <brip_vil_float_ops.h>

List of all members.

Public Member Functions

 ~brip_vil_float_ops ()
static vil_image_view< float > fast_extrema_rotational (vil_image_view< float > const &input, float lambda0, float lambda1, float theta_interval, bool bright=false, bool mag_only=false, bool signed_response=true, bool scale_invariant=true, bool non_max_suppress=false, float cutoff=0.01f)
template<class T_inp , class T_out >
void normalize_to_interval (const vil_image_view< T_inp > &img_inp, vil_image_view< T_out > &img_out, float min, float max)

Static Public Member Functions

static vil_image_view< float > convolve (vil_image_view< float > const &input, vbl_array_2d< float > const &kernel)
 convolves with the specified kernel.
static unsigned gaussian_radius (const double sigma, const double fuzz=0.02)
 helper to determine processing border required by Gaussian smoothing.
static vil_image_view< float > gaussian (vil_image_view< float > const &input, float sigma, float fill=0.0f)
 convolves with a Gaussian kernel.
static vil_image_view< float > absolute_value (vil_image_view< float > const &input)
 computes absolute value.
static void non_maximum_suppression (vil_image_view< float > const &input, int n, float thresh, vcl_vector< float > &x_pos, vcl_vector< float > &y_pos, vcl_vector< float > &value)
 non-maximum suppression on a NxN neighborhood, with sub-pixel location.
static vil_image_view< float > half_resolution (vil_image_view< float > const &input, float filter_coef=0.359375f)
 downsamples the input using the Bert-Adelson algorithm.
static vil_image_view< float > double_resolution (vil_image_view< float > const &input, float filter_coef=0.6f)
 interpolates the input using the Bert-Adelson algorithm.
static vil_image_view< float > threshold (vil_image_view< float > const &image, const float thresh, const float level=255.0f)
 sets values greater than thresh to specified level and the rest to zero.
template<class T_from , class T_to >
static void normalize_to_interval (const vil_image_view< T_from > &img_inp, vil_image_view< T_to > &img_out, float min, float max)
static vil_image_view< float > abs_clip_to_level (vil_image_view< float > const &image, const float thresh, const float level=0.0f)
 sets absolute values greater than thresh to specified level.
static void gradient_3x3 (vil_image_view< float > const &input, vil_image_view< float > &grad_x, vil_image_view< float > &grad_y)
 Returns the gradient using a 3x3 kernel.
static void gradient_mag_3x3 (vil_image_view< float > const &input, vil_image_view< float > &mag)
 Returns the gradient magnitude using a 3x3 kernel.
static void gradient_mag_comp_3x3 (vil_image_view< float > const &input, vil_image_view< float > &mag, vil_image_view< float > &grad_x, vil_image_view< float > &grad_y)
 Returns the gradient and its magnitude, using a 3x3 kernel.
static void hessian_3x3 (vil_image_view< float > const &input, vil_image_view< float > &Ixx, vil_image_view< float > &Ixy, vil_image_view< float > &Iyy)
 Returns the Hessian using a 3x3 kernel.
static vil_image_view< float > beaudet (vil_image_view< float > const &Ixx, vil_image_view< float > const &Ixy, vil_image_view< float > const &Iyy, bool determinant=true)
static void extrema_kernel_mask (float lambda0, float lambda1, float theta, vbl_array_2d< float > &kernel, vbl_array_2d< bool > &mask, float cutoff_percentage=0.01f, bool scale_invariant=false)
 theta must be given in degrees.
static vil_image_view< float > std_dev_operator (vil_image_view< float > const &sd_image, vbl_array_2d< float > const &kernel)
 Compute the standard deviation of an operator response, given the image intensity standard deviation at each pixel.
static vil_image_view< float > std_dev_operator_method2 (vil_image_view< float > const &sd_image, vbl_array_2d< float > const &kernel)
 Compute the standard deviation of an operator response, given the image intensity standard deviation at each pixel.
static float extrema_revert_angle (float angle)
 a helper function for the extrema method: reverts angle to the range [-90, 90].
static vil_image_view< float > extrema (vil_image_view< float > const &input, float lambda0, float lambda1, float theta, bool bright=true, bool mag_only=false, bool output_response_mask=true, bool signed_response=false, bool scale_invariant=false, bool non_max_suppress=true, float cutoff_per=0.01f)
 Find anisotropic intensity extrema (Gaussian 2nd derivative). Theta is in degrees.
static vil_image_view< float > extrema_rotational (vil_image_view< float > const &input, float lambda0, float lambda1, float theta_interval, bool bright=true, bool mag_only=false, bool signed_response=false, bool scale_invariant=false, bool non_max_suppress=true, float cutoff_per=0.01f)
 Find anisotropic intensity extrema at a range of orientations and return the maximal response at the best orientation.
static void max_inscribed_rect (float lambda0, float lambda1, float theta, float &u_rect, float &v_rect)
 Compute the inscribed rectangle in an ellipse with largest $(1+h)(1+w)$.
static vil_image_view< float > fast_extrema (vil_image_view< float > const &input, float lambda0, float lambda1, float theta, bool bright=true, bool mag_only=false, bool output_response_mask=true, bool signed_response=false, bool scale_invariant=false, bool non_max_suppress=true, float cutoff=0.01f)
 Find intensity extrema using kernel decomposition.
static void grad_matrix_NxN (vil_image_view< float > const &input, unsigned n, vil_image_view< float > &IxIx, vil_image_view< float > &IxIy, vil_image_view< float > &IyIy)
 Ix.Ix-transpose gradient matrix elements for an NxN region ($N = 2n+1$).
static vil_image_view< float > trace_grad_matrix_NxN (vil_image_view< float > const &input, unsigned n)
 Tr(IxIx.transpose) for a NxN region ($N = 2n+1$).
static vil_image_view< float > harris (vil_image_view< float > const &IxIx, vil_image_view< float > const &IxIy, vil_image_view< float > const &IyIy, double scale=0.04)
 Computes the Harris corner measure.
static vil_image_view< float > sqrt_grad_singular_values (vil_image_view< float > &input, int n)
 Computes the conditioning of the $2n+1 ~~ 2n+1$ gradient neighborhood.
static vil_image_view< float > max_scale_trace (vil_image_view< float > input, float min_scale, float max_scale, float scale_inc)
 Returns the image with max scale values.
static vil_image_view< float > max_scale_trace_value (vil_image_view< float > input, float min_scale, float max_scale, float scale_inc)
 Exactly same as max_scale_trace, only return the image with actual trace values at max scales instead of the image with max scale values.
static void Lucas_KanadeMotion (vil_image_view< float > &current_frame, vil_image_view< float > &previous_frame, int n, double thresh, vil_image_view< float > &vx, vil_image_view< float > &vy)
 computes Lucas-Kanade optical flow on a $2n+1$ neighborhood.
static void lucas_kanade_motion_on_view (vil_image_view< float > const &curr_frame, vil_image_view< float > const &prev_frame, const double thresh, float &vx, float &vy)
 computes velocity of a region(view) using Lucas Kanade.
static void velocity_by_correlation (vil_image_view< float > const &curr_image, vil_image_view< float > const &prev_region, const unsigned start_i, const unsigned end_i, const unsigned start_j, const unsigned end_j, const unsigned zero_i, const unsigned zero_j, float &vx, float &vy)
 computes velocity of a region(view) using correlation.
static int Horn_SchunckMotion (vil_image_view< float > const &current_frame, vil_image_view< float > const &previous_frame, vil_image_view< float > &vx, vil_image_view< float > &vy, const float alpha_coef=10000.0f, const int no_of_iterations=5)
 computes optical flow using Horn and Schunck's method.
static void fill_x_border (vil_image_view< float > &image, unsigned w, float value)
 fills a border of width w on left and right of image with value.
static void fill_y_border (vil_image_view< float > &image, unsigned h, float value)
 fills a border of height h on top and bottom of image with value.
static vil_image_view< vxl_byte > convert_to_byte (vil_image_view< float > const &image)
 converts a float image to a byte value range.
static vil_image_view< vxl_byte > convert_to_byte (vil_image_view< float > const &image, float min_val, float max_val)
 converts a float image to a byte value range within a specified range.
static vil_image_view< vxl_byte > convert_to_byte (vil_image_view< vxl_uint_16 > const &image, vxl_uint_16 min_val, vxl_uint_16 max_val)
 converts an unsigned short (16-bit) image to a byte value range within a specified range.
static vil_image_view< vxl_byte > convert_to_byte (vil_image_resource_sptr const &image)
 converts a generic image to a byte image.
static vil_image_view
< vxl_uint_16 > 
convert_to_short (vil_image_view< float > const &image, float min_val, float max_val)
 converts a float image to an unsigned short (16-bit) image within a range.
static vil_image_view
< vxl_uint_16 > 
convert_to_short (vil_image_view< float > const &image)
 converts a float image to an unsigned short (16-bit) image.
static vil_image_view
< vxl_uint_16 > 
convert_to_short (vil_image_resource_sptr const &image)
 converts a generic image to an unsigned short (16-bit) image.
static vil_image_view< float > convert_to_float (vil_image_resource const &image)
 converts a vil_image_resource to a float image.
static vil_image_view< float > convert_to_float (vil_image_resource_sptr const &image)
 converts a vil_image_resource to a float image (preferred interface).
static vil_image_view< float > convert_to_float (vil_image_view< vxl_byte > const &image)
static vil_image_view< float > convert_to_float (vil_image_view< vxl_uint_16 > const &image)
static vil_image_view< bool > convert_to_bool (vil_image_view< vxl_byte > const &image)
 converts a byte image to a bool image.
static vil_image_view< float > convert_to_float (vil_image_view< vil_rgb< vxl_byte > > const &image)
 converts an RGB image to a float image.
static void rgb_to_ihs (vil_rgb< vxl_byte > const &rgb, float &i, float &h, float &s)
 convert a single RGB pixel to (I,H,S).
static void ihs_to_rgb (vil_rgb< vxl_byte > &rgb, const float i, const float h, const float s)
 convert a single (I,H,S) pixel to RGB.
static void convert_to_IHS (vil_image_view< vil_rgb< vxl_byte > > const &image, vil_image_view< float > &I, vil_image_view< float > &H, vil_image_view< float > &S)
 converts a byte-pixel color image to float (I,H,S) image triple.
static void convert_to_IHS (vil_image_view< vxl_byte > const &image, vil_image_view< float > &I, vil_image_view< float > &H, vil_image_view< float > &S)
 converts a byte-pixel image to float (I,H,S) image triple.
static void display_IHS_as_RGB (vil_image_view< float > const &I, vil_image_view< float > const &H, vil_image_view< float > const &S, vil_image_view< vil_rgb< vxl_byte > > &image)
 display (I,H,S) image triple as RGB (no conversion from IHS to RGB!).
static vil_image_view< vil_rgb
< vxl_byte > > 
combine_color_planes (vil_image_view< vxl_byte > const &R, vil_image_view< vxl_byte > const &G, vil_image_view< vxl_byte > const &B)
 Create a byte-pixel color image from multiple view channels (R,G,B).
static vil_image_view< vil_rgb
< vxl_byte > > 
combine_color_planes (vil_image_resource_sptr const &R, vil_image_resource_sptr const &G, vil_image_resource_sptr const &B)
 Create a byte-pixel color image from multiple resource channels (R,G,B).
static vil_image_view< vxl_byte > convert_to_grey (vil_image_resource const &img)
 converts a generic (byte-pixel RGB) image to greyscale.
static vbl_array_2d< float > load_kernel (vcl_string const &file)
 loads a $2n+1 ~~ 2n+1$ convolution kernel.
static void basis_images (vcl_vector< vil_image_view< float > > const &input_images, vcl_vector< vil_image_view< float > > &basis)
 compute basis images for a set of input images.
static bool fourier_transform (vil_image_view< float > const &input, vil_image_view< float > &mag, vil_image_view< float > &phase)
 compute the Fourier transform using the vnl FFT algorithm.
static bool inverse_fourier_transform (vil_image_view< float > const &mag, vil_image_view< float > const &phase, vil_image_view< float > &output)
 compute the inverse Fourier transform using the vnl FFT algorithm.
static void resize (vil_image_view< float > const &input, unsigned width, unsigned height, vil_image_view< float > &output)
 resize to specified dimensions.
static bool resize_to_power_of_two (vil_image_view< float > const &input, vil_image_view< float > &output)
 resize to closest power of two larger dimensions than the input.
static bool spatial_frequency_filter (vil_image_view< float > const &input, float dir_fx, float dir_fy, float f0, float radius, bool output_fourier_mag, vil_image_view< float > &output)
 filter the input image with a Gaussian blocking filter.
static double bilinear_interpolation (vil_image_view< float > const &input, double x, double y)
 2x2 bilinear interpolation of image at specified location.
static bool homography (vil_image_view< float > const &input, vgl_h_matrix_2d< double > const &H, vil_image_view< float > &output, bool output_size_fixed=false, float output_fill_value=0.0f)
 map the input to the output by a homography.
static vil_image_view< float > rotate (vil_image_view< float > const &input, double theta_deg)
 rotate the input image counter-clockwise about the image origin.
static bool chip (vil_image_view< float > const &input, vsol_box_2d_sptr const &roi, vil_image_view< float > &chip)
 extract a region of interest.
static bool chip (vil_image_resource_sptr const &image, brip_roi_sptr const &roi, vil_image_resource_sptr &chip)
 convert image resource to a chip of equivalent pixel type.
static bool chip (vcl_vector< vil_image_resource_sptr > const &images, brip_roi_sptr const &roi, vcl_vector< vil_image_resource_sptr > &chips)
 chip multiple images.
static float average_in_box (vil_image_view< float > const &v, vgl_box_2d< double > const &box)
 compute the average of the image intensity within the specified region.
static vcl_vector< float > scan_region (vil_image_resource_sptr img, vgl_polygon< double > poly, float &min, float &max)
 scan a polygon and return the pixel values as well as max min.
static float cross_correlate (vil_image_view< float > const &image1, vil_image_view< float > const &image2, float x, float y, int radius=5, float intensity_thresh=25.0f)
 cross-correlate two images at a given sub-pixel location.
static bool cross_correlate (vil_image_view< float > const &image1, vil_image_view< float > const &image2, vil_image_view< float > &out, int radius=5, float intensity_thresh=25.0f)
 cross_correlate two images using running sums.
static float entropy_i (const unsigned i, const unsigned j, const unsigned i_radius, const unsigned j_radius, vil_image_view< float > const &intensity, const float range=255.0f, const unsigned bins=16)
 Compute the intensity entropy of a region about the specified pixel.
static float entropy_g (const unsigned i, const unsigned j, const unsigned i_radius, const unsigned j_radius, vil_image_view< float > const &gradx, vil_image_view< float > const &grady, const float range=360.0f, const unsigned bins=8)
 Compute the gradient entropy of a region about the specified pixel.
static float entropy_hs (const unsigned i, const unsigned j, const unsigned i_radius, const unsigned j_radius, vil_image_view< float > const &hue, vil_image_view< float > const &sat, const float range=360.0f, const unsigned bins=8)
 Compute the hue and saturation entropy of a region about the specified pixel.
static vil_image_view< float > entropy (const unsigned i_radius, const unsigned j_radius, const unsigned step, vil_image_resource_sptr const &img, const float sigma=1.0f, const bool intensity=true, const bool gradient=true, const bool ihs=false)
 Compute the entropy of the specified region about each pixel.
static float minfo_i (const unsigned i0, const unsigned j0, const unsigned i1, const unsigned j1, const unsigned i_radius, const unsigned j_radius, vil_image_view< float > const &intensity0, vil_image_view< float > const &intensity1, const float range=255.0f, const unsigned bins=16)
 Compute the intensity minfo of a region about the specified pixel.
static float minfo_g (const unsigned i0, const unsigned j0, const unsigned i1, const unsigned j1, const unsigned i_radius, const unsigned j_radius, vil_image_view< float > const &gradx0, vil_image_view< float > const &grady0, vil_image_view< float > const &gradx1, vil_image_view< float > const &grady1, const float range=360.0f, const unsigned bins=8)
 Compute the gradient minfo of a region about the specified pixel.
static float minfo_hs (const unsigned i0, const unsigned j0, const unsigned i1, const unsigned j1, const unsigned i_radius, const unsigned j_radius, vil_image_view< float > const &hue0, vil_image_view< float > const &sat0, vil_image_view< float > const &hue1, vil_image_view< float > const &sat1, const float range=360.0f, const unsigned bins=8)
 Compute the hue and saturation minfo of a region about the specified pixel.
static bool minfo (const unsigned i_radius, const unsigned j_radius, const unsigned step, vil_image_resource_sptr const &img0, vil_image_resource_sptr const &img1, vil_image_view< float > &MI0, vil_image_view< float > &MI1, const float sigma=1.0f, const bool intensity=true, const bool gradient=true, const bool ihs=false)
 Compute the minfo of the specified region about each pixel.
static vil_image_view< float > average_NxN (vil_image_view< float > const &img, int N)
 Blur the image with an NxN averaging filter.
static vil_image_resource_sptr sum (vil_image_resource_sptr const &img0, vil_image_resource_sptr const &img1)
 Add two images from a general resource (forces types to be the same).
static vil_image_view< float > difference (vil_image_view< float > const &image_1, vil_image_view< float > const &image_2)
 subtracts image_1 from image_2.
static vil_image_resource_sptr difference (vil_image_resource_sptr const &img0, vil_image_resource_sptr const &img1)
 subtract two generic images, return img0-img1 (forces types to the same).
static vil_image_resource_sptr negate (vil_image_resource_sptr const &imgr)
 negate an image returning the same pixel type (only greyscale).
static vil_image_view< vxl_byte > color_order (vil_image_view< float > const &color_image, float eq_tol)
 Color order operator, output an index based on RGB intensity order.

Static Public Attributes

static vil_image_view< float > & resp

Private Member Functions

 brip_vil_float_ops ()
 Default constructor is private.

Static Private Member Functions

static bool local_maximum (vbl_array_2d< float > const &nighborhood, int n, float &value)
 find if the center pixel of a neighborhood is the maximum value.
static void interpolate_center (vbl_array_2d< float > const &neighborhood, float &dx, float &dy)
 find the sub-pixel offset to the maximum using a 3x3 quad interpolation.
static void half_resolution_1d (const float *input, unsigned n, float k0, float k1, float k2, float *output)
 sub-sample a 1-d array using the Bert-Adelson algorithm.
static void double_resolution_1d (const float *input, const unsigned n_input, const float k0, const float k1, const float k2, float *output)
 interpolate a 1-d array using the Bert-Adelson algorithm.
static bool fft_1d (int dir, int m, double *x, double *y)
 One-dimensional fft.
static bool fft_2d (vnl_matrix< vcl_complex< double > > &c, int nx, int ny, int dir)
 Two-dimensional fft.
static void ftt_fourier_2d_reorder (vnl_matrix< vcl_complex< double > > const &F1, vnl_matrix< vcl_complex< double > > &F2)
 Transform the fft coefficients from/to fft/frequency order(self inverse).
static float gaussian_blocking_filter (float dir_fx, float dir_fy, float f0, float radius, float fx, float fy)
 Blocking filter function.
static float elu (float phi, float lamda0, float lambda1, float theta)
 u-coordinate of an ellipse defined by lambda0, lambda1 and theta, vs. phi.
static float elv (float phi, float lamda0, float lambda1, float theta)
 v-coordinate of an ellipse defined by lambda0, lambda1 and theta, vs. phi.

Detailed Description

Definition at line 40 of file brip_vil_float_ops.h.


Constructor & Destructor Documentation

brip_vil_float_ops::~brip_vil_float_ops ( ) [inline]

Definition at line 43 of file brip_vil_float_ops.h.

brip_vil_float_ops::brip_vil_float_ops ( ) [inline, private]

Default constructor is private.

Definition at line 722 of file brip_vil_float_ops.h.


Member Function Documentation

vil_image_view< float > brip_vil_float_ops::abs_clip_to_level ( vil_image_view< float > const &  image,
const float  thresh,
const float  level = 0.0f 
) [static]

sets absolute values greater than thresh to specified level.

Definition at line 608 of file brip_vil_float_ops.cxx.

vil_image_view< float > brip_vil_float_ops::absolute_value ( vil_image_view< float > const &  input) [static]

computes absolute value.

Definition at line 360 of file brip_vil_float_ops.cxx.

float brip_vil_float_ops::average_in_box ( vil_image_view< float > const &  v,
vgl_box_2d< double > const &  box 
) [static]

compute the average of the image intensity within the specified region.

Definition at line 3487 of file brip_vil_float_ops.cxx.

vil_image_view< float > brip_vil_float_ops::average_NxN ( vil_image_view< float > const &  img,
int  N 
) [static]

Blur the image with an NxN averaging filter.

Definition at line 625 of file brip_vil_float_ops.cxx.

void brip_vil_float_ops::basis_images ( vcl_vector< vil_image_view< float > > const &  input_images,
vcl_vector< vil_image_view< float > > &  basis 
) [static]

compute basis images for a set of input images.

Definition at line 2118 of file brip_vil_float_ops.cxx.

vil_image_view< float > brip_vil_float_ops::beaudet ( vil_image_view< float > const &  Ixx,
vil_image_view< float > const &  Ixy,
vil_image_view< float > const &  Iyy,
bool  determinant = true 
) [static]

Definition at line 761 of file brip_vil_float_ops.cxx.

double brip_vil_float_ops::bilinear_interpolation ( vil_image_view< float > const &  input,
double  x,
double  y 
) [static]

2x2 bilinear interpolation of image at specified location.

Bi-linear interpolation on the neighborhood below.

Neighborhood:

        xr
     yr 0  x
        x  x
   
        xr
     yr 0  x
        x  x
   

Definition at line 2563 of file brip_vil_float_ops.cxx.

bool brip_vil_float_ops::chip ( vil_image_view< float > const &  input,
vsol_box_2d_sptr const &  roi,
vil_image_view< float > &  chip 
) [static]

extract a region of interest.

If roi does not overlap input, return false

< changed < to <= to include the boundary points too

Definition at line 2749 of file brip_vil_float_ops.cxx.

bool brip_vil_float_ops::chip ( vil_image_resource_sptr const &  image,
brip_roi_sptr const &  roi,
vil_image_resource_sptr chip 
) [static]

convert image resource to a chip of equivalent pixel type.

convert image resource to cropped view according to a roi.

If roi does not overlap input, return false

Definition at line 2778 of file brip_vil_float_ops.cxx.

bool brip_vil_float_ops::chip ( vcl_vector< vil_image_resource_sptr > const &  images,
brip_roi_sptr const &  roi,
vcl_vector< vil_image_resource_sptr > &  chips 
) [static]

chip multiple images.

Must be all the same dimensions If roi does not overlap input, return false

Definition at line 2838 of file brip_vil_float_ops.cxx.

vil_image_view< vxl_byte > brip_vil_float_ops::color_order ( vil_image_view< float > const &  color_image,
float  eq_tol 
) [static]

Color order operator, output an index based on RGB intensity order.

It has been observed that color order is somewhat invariant to illumination The tolerance determines if two color bands are too close to determine order, i.e. they should be considered equal instead the two relations being considered are <, > and =, so the relationship graph looks like:

           G
         /   \.
     > < =   > < =
      /         \.
    R  - > < = -  B
   

Thus, there are three graph edges with each of three possible labels or 9 possible order codes. An easy coding scheme is to use the top 6 bits of the byte output pixel. The relationship is encoded as states of bit pairs

   Color relations  R*G  R*B  G*B    * indicates > < = (1,2,3)
   Bit indices      7,6  5,4  3,2
   

Definition at line 3664 of file brip_vil_float_ops.cxx.

vil_image_view< vil_rgb< vxl_byte > > brip_vil_float_ops::combine_color_planes ( vil_image_view< vxl_byte > const &  R,
vil_image_view< vxl_byte > const &  G,
vil_image_view< vxl_byte > const &  B 
) [static]

Create a byte-pixel color image from multiple view channels (R,G,B).

All views have to have the same array dimensions

Definition at line 1898 of file brip_vil_float_ops.cxx.

vil_image_view< vil_rgb< vxl_byte > > brip_vil_float_ops::combine_color_planes ( vil_image_resource_sptr const &  R,
vil_image_resource_sptr const &  G,
vil_image_resource_sptr const &  B 
) [static]

Create a byte-pixel color image from multiple resource channels (R,G,B).

Images do not have to be the same size arrays

Definition at line 1915 of file brip_vil_float_ops.cxx.

vil_image_view< bool > brip_vil_float_ops::convert_to_bool ( vil_image_view< vxl_byte > const &  image) [static]

converts a byte image to a bool image.

Definition at line 1688 of file brip_vil_float_ops.cxx.

vil_image_view< vxl_byte > brip_vil_float_ops::convert_to_byte ( vil_image_view< float > const &  image) [static]

converts a float image to a byte value range.

Definition at line 1452 of file brip_vil_float_ops.cxx.

vil_image_view< vxl_byte > brip_vil_float_ops::convert_to_byte ( vil_image_view< float > const &  image,
float  min_val,
float  max_val 
) [static]

converts a float image to a byte value range within a specified range.

Convert the range between min_val and max_val to 255.

Definition at line 1483 of file brip_vil_float_ops.cxx.

vil_image_view< vxl_byte > brip_vil_float_ops::convert_to_byte ( vil_image_view< vxl_uint_16 > const &  image,
vxl_uint_16  min_val,
vxl_uint_16  max_val 
) [static]

converts an unsigned short (16-bit) image to a byte value range within a specified range.

Definition at line 1509 of file brip_vil_float_ops.cxx.

vil_image_view< vxl_byte > brip_vil_float_ops::convert_to_byte ( vil_image_resource_sptr const &  image) [static]

converts a generic image to a byte image.

Use this instead of convert_to_grey

Definition at line 1535 of file brip_vil_float_ops.cxx.

vil_image_view< float > brip_vil_float_ops::convert_to_float ( vil_image_resource const &  image) [static]

converts a vil_image_resource to a float image.

Definition at line 1955 of file brip_vil_float_ops.cxx.

static vil_image_view<float> brip_vil_float_ops::convert_to_float ( vil_image_resource_sptr const &  image) [inline, static]

converts a vil_image_resource to a float image (preferred interface).

Definition at line 372 of file brip_vil_float_ops.h.

vil_image_view< float > brip_vil_float_ops::convert_to_float ( vil_image_view< vxl_byte > const &  image) [static]

Definition at line 1663 of file brip_vil_float_ops.cxx.

vil_image_view< float > brip_vil_float_ops::convert_to_float ( vil_image_view< vxl_uint_16 > const &  image) [static]

Definition at line 1676 of file brip_vil_float_ops.cxx.

vil_image_view< float > brip_vil_float_ops::convert_to_float ( vil_image_view< vil_rgb< vxl_byte > > const &  image) [static]

converts an RGB image to a float image.

Definition at line 1703 of file brip_vil_float_ops.cxx.

vil_image_view< vxl_byte > brip_vil_float_ops::convert_to_grey ( vil_image_resource const &  img) [static]

converts a generic (byte-pixel RGB) image to greyscale.

Convert any image to an unsigned_char image.

Definition at line 1990 of file brip_vil_float_ops.cxx.

void brip_vil_float_ops::convert_to_IHS ( vil_image_view< vil_rgb< vxl_byte > > const &  image,
vil_image_view< float > &  I,
vil_image_view< float > &  H,
vil_image_view< float > &  S 
) [static]

converts a byte-pixel color image to float (I,H,S) image triple.

Definition at line 1792 of file brip_vil_float_ops.cxx.

void brip_vil_float_ops::convert_to_IHS ( vil_image_view< vxl_byte > const &  image,
vil_image_view< float > &  I,
vil_image_view< float > &  H,
vil_image_view< float > &  S 
) [static]

converts a byte-pixel image to float (I,H,S) image triple.

Definition at line 1813 of file brip_vil_float_ops.cxx.

vil_image_view< vxl_uint_16 > brip_vil_float_ops::convert_to_short ( vil_image_view< float > const &  image,
float  min_val,
float  max_val 
) [static]

converts a float image to an unsigned short (16-bit) image within a range.

Use this instead of convert_to_grey

Definition at line 1541 of file brip_vil_float_ops.cxx.

vil_image_view< vxl_uint_16 > brip_vil_float_ops::convert_to_short ( vil_image_view< float > const &  image) [static]

converts a float image to an unsigned short (16-bit) image.

Range is determined automatically

range determined automatically

Definition at line 1569 of file brip_vil_float_ops.cxx.

vil_image_view< vxl_uint_16 > brip_vil_float_ops::convert_to_short ( vil_image_resource_sptr const &  image) [static]

converts a generic image to an unsigned short (16-bit) image.

Use this instead of convert_to_grey

Definition at line 1587 of file brip_vil_float_ops.cxx.

vil_image_view< float > brip_vil_float_ops::convolve ( vil_image_view< float > const &  input,
vbl_array_2d< float > const &  kernel 
) [static]

convolves with the specified kernel.

Convolve with a kernel.

It's assumed that the kernel is square with odd dimensions

Definition at line 71 of file brip_vil_float_ops.cxx.

float brip_vil_float_ops::cross_correlate ( vil_image_view< float > const &  image1,
vil_image_view< float > const &  image2,
float  x,
float  y,
int  radius = 5,
float  intensity_thresh = 25.0f 
) [static]

cross-correlate two images at a given sub-pixel location.

perform normalized cross-correlation at a sub-pixel location.

Thus all the pixel values are interpolated.

Definition at line 2854 of file brip_vil_float_ops.cxx.

bool brip_vil_float_ops::cross_correlate ( vil_image_view< float > const &  image1,
vil_image_view< float > const &  image2,
vil_image_view< float > &  out,
int  radius = 5,
float  intensity_thresh = 25.0f 
) [static]

cross_correlate two images using running sums.

Definition at line 3021 of file brip_vil_float_ops.cxx.

vil_image_view< float > brip_vil_float_ops::difference ( vil_image_view< float > const &  image_1,
vil_image_view< float > const &  image_2 
) [static]

subtracts image_1 from image_2.

Subtract image_1 from image_2.

Will not operate unless the two input images are the same dimensions

Definition at line 539 of file brip_vil_float_ops.cxx.

vil_image_resource_sptr brip_vil_float_ops::difference ( vil_image_resource_sptr const &  img0,
vil_image_resource_sptr const &  img1 
) [static]

subtract two generic images, return img0-img1 (forces types to the same).

Definition at line 3132 of file brip_vil_float_ops.cxx.

void brip_vil_float_ops::display_IHS_as_RGB ( vil_image_view< float > const &  I,
vil_image_view< float > const &  H,
vil_image_view< float > const &  S,
vil_image_view< vil_rgb< vxl_byte > > &  image 
) [static]

display (I,H,S) image triple as RGB (no conversion from IHS to RGB!).

Definition at line 1865 of file brip_vil_float_ops.cxx.

vil_image_view< float > brip_vil_float_ops::double_resolution ( vil_image_view< float > const &  input,
float  filter_coef = 0.6f 
) [static]

interpolates the input using the Bert-Adelson algorithm.

Definition at line 223 of file brip_vil_float_ops.cxx.

void brip_vil_float_ops::double_resolution_1d ( const float *  input,
const unsigned  n_input,
const float  k0,
const float  k1,
const float  k2,
float *  output 
) [static, private]

interpolate a 1-d array using the Bert-Adelson algorithm.

Definition at line 200 of file brip_vil_float_ops.cxx.

float brip_vil_float_ops::elu ( float  phi,
float  lamda0,
float  lambda1,
float  theta 
) [static, private]

u-coordinate of an ellipse defined by lambda0, lambda1 and theta, vs. phi.

theta and phi are in radians.

Definition at line 4155 of file brip_vil_float_ops.cxx.

float brip_vil_float_ops::elv ( float  phi,
float  lamda0,
float  lambda1,
float  theta 
) [static, private]

v-coordinate of an ellipse defined by lambda0, lambda1 and theta, vs. phi.

theta and phi are in radians.

Definition at line 4165 of file brip_vil_float_ops.cxx.

vil_image_view< float > brip_vil_float_ops::entropy ( const unsigned  i_radius,
const unsigned  j_radius,
const unsigned  step,
vil_image_resource_sptr const &  img,
const float  sigma = 1.0f,
const bool  intensity = true,
const bool  gradient = true,
const bool  ihs = false 
) [static]

Compute the entropy of the specified region about each pixel.

Definition at line 3230 of file brip_vil_float_ops.cxx.

float brip_vil_float_ops::entropy_g ( const unsigned  i,
const unsigned  j,
const unsigned  i_radius,
const unsigned  j_radius,
vil_image_view< float > const &  gradx,
vil_image_view< float > const &  grady,
const float  range = 360.0f,
const unsigned  bins = 8 
) [static]

Compute the gradient entropy of a region about the specified pixel.

Compute the entropy of the gradient direction of a region.

No bounds check

Note no bounds checking!

Definition at line 3188 of file brip_vil_float_ops.cxx.

float brip_vil_float_ops::entropy_hs ( const unsigned  i,
const unsigned  j,
const unsigned  i_radius,
const unsigned  j_radius,
vil_image_view< float > const &  hue,
vil_image_view< float > const &  sat,
const float  range = 360.0f,
const unsigned  bins = 8 
) [static]

Compute the hue and saturation entropy of a region about the specified pixel.

No bounds check

Note no bounds checking!

Definition at line 3211 of file brip_vil_float_ops.cxx.

float brip_vil_float_ops::entropy_i ( const unsigned  i,
const unsigned  j,
const unsigned  i_radius,
const unsigned  j_radius,
vil_image_view< float > const &  intensity,
const float  range = 255.0f,
const unsigned  bins = 16 
) [static]

Compute the intensity entropy of a region about the specified pixel.

Compute the entropy of the intensity of a region.

No bounds check

Note no bounds checking!

Definition at line 3169 of file brip_vil_float_ops.cxx.

vil_image_view< float > brip_vil_float_ops::extrema ( vil_image_view< float > const &  input,
float  lambda0,
float  lambda1,
float  theta,
bool  bright = true,
bool  mag_only = false,
bool  output_response_mask = true,
bool  signed_response = false,
bool  scale_invariant = false,
bool  non_max_suppress = true,
float  cutoff_per = 0.01f 
) [static]

Find anisotropic intensity extrema (Gaussian 2nd derivative). Theta is in degrees.

The effect of bright, mag_only and signed response are as follows: bright mag_only signed_response result ------------------------------------------------ false false false dark extrema response false false true signed output(full range) false true false absolute mag output false true true invalid true false false bright extrema output true false true signed output(full range) true true false absolute mag output true true true invalid

Definition at line 3865 of file brip_vil_float_ops.cxx.

void brip_vil_float_ops::extrema_kernel_mask ( float  lambda0,
float  lambda1,
float  theta,
vbl_array_2d< float > &  kernel,
vbl_array_2d< bool > &  mask,
float  cutoff_percentage = 0.01f,
bool  scale_invariant = false 
) [static]

theta must be given in degrees.

Scale invariant means that the response is independent of the sigma_y of the unrotated derivative operator, i.e. the direction of the derivative

Definition at line 3738 of file brip_vil_float_ops.cxx.

float brip_vil_float_ops::extrema_revert_angle ( float  angle) [static]

a helper function for the extrema method: reverts angle to the range [-90, 90].

Definition at line 3720 of file brip_vil_float_ops.cxx.

vil_image_view< float > brip_vil_float_ops::extrema_rotational ( vil_image_view< float > const &  input,
float  lambda0,
float  lambda1,
float  theta_interval,
bool  bright = true,
bool  mag_only = false,
bool  signed_response = false,
bool  scale_invariant = false,
bool  non_max_suppress = true,
float  cutoff_per = 0.01f 
) [static]

Find anisotropic intensity extrema at a range of orientations and return the maximal response at the best orientation.

Find anisotropic intensity extrema at a range of orientations and return the maximal response at the best orientation. Theta interval is in degrees.

theta_interval is in degrees If lambda0 == lambda1 then reduces to the normal extrema operator

if lambda0 == lambda1 then reduces to the normal extrema operator

Definition at line 3990 of file brip_vil_float_ops.cxx.

vil_image_view< float > brip_vil_float_ops::fast_extrema ( vil_image_view< float > const &  input,
float  lambda0,
float  lambda1,
float  theta,
bool  bright = true,
bool  mag_only = false,
bool  output_response_mask = true,
bool  signed_response = false,
bool  scale_invariant = false,
bool  non_max_suppress = true,
float  cutoff = 0.01f 
) [static]

Find intensity extrema using kernel decomposition.

theta is in degrees. Image rotation is applied then separated u, v kernels produce the response.

Definition at line 4304 of file brip_vil_float_ops.cxx.

vil_image_view< float > brip_vil_float_ops::fast_extrema_rotational ( vil_image_view< float > const &  input,
float  lambda0,
float  lambda1,
float  theta_interval,
bool  bright = false,
bool  mag_only = false,
bool  signed_response = true,
bool  scale_invariant = true,
bool  non_max_suppress = false,
float  cutoff = 0.01f 
)

Definition at line 4464 of file brip_vil_float_ops.cxx.

bool brip_vil_float_ops::fft_1d ( int  dir,
int  m,
double *  x,
double *  y 
) [static, private]

One-dimensional fft.

1d fourier transform.

This computes an in-place complex-to-complex FFT x and y are the real and imaginary arrays of 2^m points. dir = 1 gives forward transform dir = -1 gives reverse transform

Formula: forward

                  N-1
                  ---
              1   \          - j k 2 pi n / N
      X(n) = ---   >   x(k) e                    = forward transform
              N   /                                n=0..N-1
                  ---
                  k=0
   

Formula: reverse

                  N-1
                  ---
                  \          j k 2 pi n / N
      X(n) =       >   x(k) e                    = forward transform
                  /                                n=0..N-1
                  ---
                  k=0
   

Definition at line 2210 of file brip_vil_float_ops.cxx.

bool brip_vil_float_ops::fft_2d ( vnl_matrix< vcl_complex< double > > &  c,
int  nx,
int  ny,
int  dir 
) [static, private]

Two-dimensional fft.

Perform a 2D FFT inplace given a complex 2D array.

The direction dir, 1 for forward, -1 for reverse The size of the array (nx,ny) Return false if there are memory problems or the dimensions are not powers of 2

Definition at line 2287 of file brip_vil_float_ops.cxx.

void brip_vil_float_ops::fill_x_border ( vil_image_view< float > &  image,
unsigned  w,
float  value 
) [static]

fills a border of width w on left and right of image with value.

Definition at line 1415 of file brip_vil_float_ops.cxx.

void brip_vil_float_ops::fill_y_border ( vil_image_view< float > &  image,
unsigned  h,
float  value 
) [static]

fills a border of height h on top and bottom of image with value.

Definition at line 1433 of file brip_vil_float_ops.cxx.

bool brip_vil_float_ops::fourier_transform ( vil_image_view< float > const &  input,
vil_image_view< float > &  mag,
vil_image_view< float > &  phase 
) [static]

compute the Fourier transform using the vnl FFT algorithm.

Compute the fourier transform.

If the image dimensions are not a power of 2 then the operation fails.

Definition at line 2364 of file brip_vil_float_ops.cxx.

void brip_vil_float_ops::ftt_fourier_2d_reorder ( vnl_matrix< vcl_complex< double > > const &  F1,
vnl_matrix< vcl_complex< double > > &  F2 
) [static, private]

Transform the fft coefficients from/to fft/frequency order(self inverse).

reorder the transform values to sequential frequencies as in conventional Fourier transforms.

The transformation is its self-inverse.

Definition at line 2338 of file brip_vil_float_ops.cxx.

vil_image_view< float > brip_vil_float_ops::gaussian ( vil_image_view< float > const &  input,
float  sigma,
float  fill = 0.0f 
) [static]

convolves with a Gaussian kernel.

Definition at line 316 of file brip_vil_float_ops.cxx.

float brip_vil_float_ops::gaussian_blocking_filter ( float  dir_fx,
float  dir_fy,
float  f0,
float  radius,
float  fx,
float  fy 
) [static, private]

Blocking filter function.

block a periodic signal by suppressing two Gaussian lobes in the frequency domain.

The lobes are on the line defined by dir_fx and dir_fy through the dc origin, assumed (0, 0). The center frequency, f0, is the distance along the line to the center of each blocking lobe (+- f0). radius is the standard deviation of each lobe. Later we can define a "filter" class.

Definition at line 2486 of file brip_vil_float_ops.cxx.

unsigned brip_vil_float_ops::gaussian_radius ( const double  sigma,
const double  fuzz = 0.02 
) [static]

helper to determine processing border required by Gaussian smoothing.

Definition at line 286 of file brip_vil_float_ops.cxx.

void brip_vil_float_ops::grad_matrix_NxN ( vil_image_view< float > const &  input,
unsigned  n,
vil_image_view< float > &  IxIx,
vil_image_view< float > &  IxIy,
vil_image_view< float > &  IyIy 
) [static]

Ix.Ix-transpose gradient matrix elements for an NxN region ($N = 2n+1$).

$Ix Ix^t$ gradient matrix elements.

That is,

                          _                           _
                         | (dI/dx)^2    (dI/dx)(dI/dy) |
                         |                             |
    A = Sum(neighborhood)|                             |
                         |(dI/dx)(dI/dy)   (dI/dx)^2   |
                         |_                           _|
   

over a $2n+1 ~\times~ 2n+1$ neighborhood.

That is,

                          _                           _
                         | (dI/dx)^2    (dI/dx)(dI/dy) |
                         |                             |
    A = Sum(neighborhood)|                             |
                         |(dI/dx)(dI/dy)   (dI/dx)^2   |
                         |_                           _|
   

over a 2n+1 x 2n+1 neighborhood

Definition at line 805 of file brip_vil_float_ops.cxx.

void brip_vil_float_ops::gradient_3x3 ( vil_image_view< float > const &  input,
vil_image_view< float > &  grad_x,
vil_image_view< float > &  grad_y 
) [static]

Returns the gradient using a 3x3 kernel.

Compute the gradient of the input, use a 3x3 mask.

           1  |-1  0  1|         1  |-1 -1 -1|
     Ix = --- |-1  0  1|   Iy = --- | 0  0  0|
           6  |-1  0  1|         6  | 1  1  1|
   

Larger masks are computed by pre-convolving with a Gaussian

Definition at line 646 of file brip_vil_float_ops.cxx.

void brip_vil_float_ops::gradient_mag_3x3 ( vil_image_view< float > const &  input,
vil_image_view< float > &  mag 
) [static]

Returns the gradient magnitude using a 3x3 kernel.

Definition at line 672 of file brip_vil_float_ops.cxx.

void brip_vil_float_ops::gradient_mag_comp_3x3 ( vil_image_view< float > const &  input,
vil_image_view< float > &  mag,
vil_image_view< float > &  grad_x,
vil_image_view< float > &  grad_y 
) [static]

Returns the gradient and its magnitude, using a 3x3 kernel.

Definition at line 691 of file brip_vil_float_ops.cxx.

vil_image_view< float > brip_vil_float_ops::half_resolution ( vil_image_view< float > const &  input,
float  filter_coef = 0.359375f 
) [static]

downsamples the input using the Bert-Adelson algorithm.

Downsamples the image by 2 using the Burt-Adelson reduction algorithm.

Convolution with a 5-point kernel [(0.5-ka)/2, 0.25, ka, 0.25, (0.5-ka)/2] ka = 0.6 maximum decorrelation, wavelet for image compression. ka = 0.5 linear interpolation, ka = 0.4 Gaussian filter ka = 0.359375 min aliasing, wider than Gaussian The image sizes are related by: output_dimension = (input_dimension +1)/2.

Definition at line 137 of file brip_vil_float_ops.cxx.

void brip_vil_float_ops::half_resolution_1d ( const float *  input,
unsigned  n,
float  k0,
float  k1,
float  k2,
float *  output 
) [static, private]

sub-sample a 1-d array using the Bert-Adelson algorithm.

Downsamples the 1-d array by 2 using the Burt-Adelson reduction algorithm.

Definition at line 107 of file brip_vil_float_ops.cxx.

vil_image_view< float > brip_vil_float_ops::harris ( vil_image_view< float > const &  IxIx,
vil_image_view< float > const &  IxIy,
vil_image_view< float > const &  IyIy,
double  scale = 0.04 
) [static]

Computes the Harris corner measure.

Definition at line 863 of file brip_vil_float_ops.cxx.

void brip_vil_float_ops::hessian_3x3 ( vil_image_view< float > const &  input,
vil_image_view< float > &  Ixx,
vil_image_view< float > &  Ixy,
vil_image_view< float > &  Iyy 
) [static]

Returns the Hessian using a 3x3 kernel.

Compute the Hessian of the input, use a 3x3 mask.

            1 | 1  -2  1|          1 |  1  1  1|         1  | 1  0 -1|
     Ixx = ---| 1  -2  1|   Iyy = ---| -2 -2 -2|  Ixy = --- | 0  0  0|
            3 | 1  -2  1|          3 |  1  1  1|         4  |-1  0  1|
   

Larger masks are computed by pre-convolving with a Gaussian

Definition at line 724 of file brip_vil_float_ops.cxx.

bool brip_vil_float_ops::homography ( vil_image_view< float > const &  input,
vgl_h_matrix_2d< double > const &  H,
vil_image_view< float > &  output,
bool  output_size_fixed = false,
float  output_fill_value = 0.0f 
) [static]

map the input to the output by a homography.

Transform the input to the output by a homography.

Note:
if the output size is fixed then only the corresponding input image space is transformed.

If the output size is fixed then only the corresponding region of input image space is transformed.

Definition at line 2585 of file brip_vil_float_ops.cxx.

int brip_vil_float_ops::Horn_SchunckMotion ( vil_image_view< float > const &  current_frame,
vil_image_view< float > const &  previous_frame,
vil_image_view< float > &  vx,
vil_image_view< float > &  vy,
const float  alpha_coef = 10000.0f,
const int  no_of_iterations = 5 
) [static]

computes optical flow using Horn and Schunck's method.

Definition at line 1274 of file brip_vil_float_ops.cxx.

void brip_vil_float_ops::ihs_to_rgb ( vil_rgb< vxl_byte > &  rgb,
const float  i,
const float  h,
const float  s 
) [static]

convert a single (I,H,S) pixel to RGB.

Definition at line 1754 of file brip_vil_float_ops.cxx.

void brip_vil_float_ops::interpolate_center ( vbl_array_2d< float > const &  neighborhood,
float &  dx,
float &  dy 
) [static, private]

find the sub-pixel offset to the maximum using a 3x3 quad interpolation.

Definition at line 432 of file brip_vil_float_ops.cxx.

bool brip_vil_float_ops::inverse_fourier_transform ( vil_image_view< float > const &  mag,
vil_image_view< float > const &  phase,
vil_image_view< float > &  output 
) [static]

compute the inverse Fourier transform using the vnl FFT algorithm.

Definition at line 2409 of file brip_vil_float_ops.cxx.

vbl_array_2d< float > brip_vil_float_ops::load_kernel ( vcl_string const &  file) [static]

loads a $2n+1 ~~ 2n+1$ convolution kernel.

Read a convolution kernel from file.

Assumes a square kernel with odd dimensions, i.e., $w,h = 2n+1$ format:

       n
       scale
       k00  k01  ... k02n
             ...
       k2n0 k2n1 ... k2n2n
   

Assumes a square kernel with odd dimensions, i.e., w,h = 2n+1 format:

       n
       scale
       k00  k01  ... k02n
             ...
       k2n0 k2n1 ... k2n2n
   

Definition at line 2075 of file brip_vil_float_ops.cxx.

bool brip_vil_float_ops::local_maximum ( vbl_array_2d< float > const &  nighborhood,
int  n,
float &  value 
) [static, private]

find if the center pixel of a neighborhood is the maximum value.

Determine if the center of a (2n+1)x(2n+1) neighborhood is a local maximum.

Definition at line 411 of file brip_vil_float_ops.cxx.

void brip_vil_float_ops::lucas_kanade_motion_on_view ( vil_image_view< float > const &  curr_frame,
vil_image_view< float > const &  prev_frame,
const double  thresh,
float &  vx,
float &  vy 
) [static]

computes velocity of a region(view) using Lucas Kanade.

computes Lucas-Kanade optical flow on the complete input views.

Definition at line 1161 of file brip_vil_float_ops.cxx.

void brip_vil_float_ops::Lucas_KanadeMotion ( vil_image_view< float > &  current_frame,
vil_image_view< float > &  previous_frame,
int  n,
double  thresh,
vil_image_view< float > &  vx,
vil_image_view< float > &  vy 
) [static]

computes Lucas-Kanade optical flow on a $2n+1$ neighborhood.

Definition at line 1103 of file brip_vil_float_ops.cxx.

void brip_vil_float_ops::max_inscribed_rect ( float  lambda0,
float  lambda1,
float  theta,
float &  u_rect,
float &  v_rect 
) [static]

Compute the inscribed rectangle in an ellipse with largest $(1+h)(1+w)$.

theta and phi are in radians.

Needed for fast non-maximal suppression. theta is in degrees.

Definition at line 4176 of file brip_vil_float_ops.cxx.

vil_image_view< float > brip_vil_float_ops::max_scale_trace ( vil_image_view< float >  input,
float  min_scale,
float  max_scale,
float  scale_inc 
) [static]

Returns the image with max scale values.

Definition at line 932 of file brip_vil_float_ops.cxx.

vil_image_view< float > brip_vil_float_ops::max_scale_trace_value ( vil_image_view< float >  input,
float  min_scale,
float  max_scale,
float  scale_inc 
) [static]

Exactly same as max_scale_trace, only return the image with actual trace values at max scales instead of the image with max scale values.

exactly same as max_scale_trace, only return the image with actual trace values at max scales instead of the image with max scale values.

Definition at line 963 of file brip_vil_float_ops.cxx.

bool brip_vil_float_ops::minfo ( const unsigned  i_radius,
const unsigned  j_radius,
const unsigned  step,
vil_image_resource_sptr const &  img0,
vil_image_resource_sptr const &  img1,
vil_image_view< float > &  MI0,
vil_image_view< float > &  MI1,
const float  sigma = 1.0f,
const bool  intensity = true,
const bool  gradient = true,
const bool  ihs = false 
) [static]

Compute the minfo of the specified region about each pixel.

Definition at line 3390 of file brip_vil_float_ops.cxx.

float brip_vil_float_ops::minfo_g ( const unsigned  i0,
const unsigned  j0,
const unsigned  i1,
const unsigned  j1,
const unsigned  i_radius,
const unsigned  j_radius,
vil_image_view< float > const &  gradx0,
vil_image_view< float > const &  grady0,
vil_image_view< float > const &  gradx1,
vil_image_view< float > const &  grady1,
const float  range = 360.0f,
const unsigned  bins = 8 
) [static]

Compute the gradient minfo of a region about the specified pixel.

No bounds check

Definition at line 3317 of file brip_vil_float_ops.cxx.

float brip_vil_float_ops::minfo_hs ( const unsigned  i0,
const unsigned  j0,
const unsigned  i1,
const unsigned  j1,
const unsigned  i_radius,
const unsigned  j_radius,
vil_image_view< float > const &  hue0,
vil_image_view< float > const &  sat0,
vil_image_view< float > const &  hue1,
vil_image_view< float > const &  sat1,
const float  range = 360.0f,
const unsigned  bins = 8 
) [static]

Compute the hue and saturation minfo of a region about the specified pixel.

No bounds check

Definition at line 3356 of file brip_vil_float_ops.cxx.

float brip_vil_float_ops::minfo_i ( const unsigned  i0,
const unsigned  j0,
const unsigned  i1,
const unsigned  j1,
const unsigned  i_radius,
const unsigned  j_radius,
vil_image_view< float > const &  intensity0,
vil_image_view< float > const &  intensity1,
const float  range = 255.0f,
const unsigned  bins = 16 
) [static]

Compute the intensity minfo of a region about the specified pixel.

No bounds check

Definition at line 3285 of file brip_vil_float_ops.cxx.

vil_image_resource_sptr brip_vil_float_ops::negate ( vil_image_resource_sptr const &  imgr) [static]

negate an image returning the same pixel type (only greyscale).

Definition at line 559 of file brip_vil_float_ops.cxx.

void brip_vil_float_ops::non_maximum_suppression ( vil_image_view< float > const &  input,
int  n,
float  thresh,
vcl_vector< float > &  x_pos,
vcl_vector< float > &  y_pos,
vcl_vector< float > &  value 
) [static]

non-maximum suppression on a NxN neighborhood, with sub-pixel location.

Definition at line 496 of file brip_vil_float_ops.cxx.

template<class T_from , class T_to >
static void brip_vil_float_ops::normalize_to_interval ( const vil_image_view< T_from > &  img_inp,
vil_image_view< T_to > &  img_out,
float  min,
float  max 
) [static]
template<class T_inp , class T_out >
void brip_vil_float_ops::normalize_to_interval ( const vil_image_view< T_inp > &  img_inp,
vil_image_view< T_out > &  img_out,
float  min,
float  max 
)

Definition at line 726 of file brip_vil_float_ops.h.

void brip_vil_float_ops::resize ( vil_image_view< float > const &  input,
unsigned  width,
unsigned  height,
vil_image_view< float > &  output 
) [static]

resize to specified dimensions.

Fill with zeros if output is larger

Definition at line 2435 of file brip_vil_float_ops.cxx.

bool brip_vil_float_ops::resize_to_power_of_two ( vil_image_view< float > const &  input,
vil_image_view< float > &  output 
) [static]

resize to closest power of two larger dimensions than the input.

resize the input to the closest power of two image dimensions.

Fill with zeros if output is larger

Definition at line 2451 of file brip_vil_float_ops.cxx.

void brip_vil_float_ops::rgb_to_ihs ( vil_rgb< vxl_byte > const &  rgb,
float &  i,
float &  h,
float &  s 
) [static]

convert a single RGB pixel to (I,H,S).

< (Hue is undefined)

< (between yellow and magenta)

< (between cyan and yellow)

< (between magenta and cyan)

< (convert Hue to degrees)

< (Hue must be positive)

< (Hue must be less than 360)

Definition at line 1717 of file brip_vil_float_ops.cxx.

vil_image_view< float > brip_vil_float_ops::rotate ( vil_image_view< float > const &  input,
double  theta_deg 
) [static]

rotate the input image counter-clockwise about the image origin.

Demonstrates the use of image homography

Definition at line 2724 of file brip_vil_float_ops.cxx.

vcl_vector< float > brip_vil_float_ops::scan_region ( vil_image_resource_sptr  img,
vgl_polygon< double >  poly,
float &  min,
float &  max 
) [static]

scan a polygon and return the pixel values as well as max min.

Definition at line 3548 of file brip_vil_float_ops.cxx.

bool brip_vil_float_ops::spatial_frequency_filter ( vil_image_view< float > const &  input,
float  dir_fx,
float  dir_fy,
float  f0,
float  radius,
bool  output_fourier_mag,
vil_image_view< float > &  output 
) [static]

filter the input image with a Gaussian blocking filter.

Definition at line 2515 of file brip_vil_float_ops.cxx.

vil_image_view< float > brip_vil_float_ops::sqrt_grad_singular_values ( vil_image_view< float > &  input,
int  n 
) [static]

Computes the conditioning of the $2n+1 ~~ 2n+1$ gradient neighborhood.

Compute the sqrt of the product of the eigenvalues of the gradient matrix over a 2n+1 x 2n+1 neighborhood That is,

                          _                           _
                         | (dI/dx)^2    (dI/dx)(dI/dy) |
                         |                             |
    A = Sum(neighborhood)|                             |
                         |(dI/dx)(dI/dy)   (dI/dx)^2   |
                         |_                           _|
   

The output image is sqrt(lamba_1*lambda_2) where lambda_i are the eigenvalues

Definition at line 897 of file brip_vil_float_ops.cxx.

vil_image_view< float > brip_vil_float_ops::std_dev_operator ( vil_image_view< float > const &  sd_image,
vbl_array_2d< float > const &  kernel 
) [static]

Compute the standard deviation of an operator response, given the image intensity standard deviation at each pixel.

Definition at line 3802 of file brip_vil_float_ops.cxx.

vil_image_view< float > brip_vil_float_ops::std_dev_operator_method2 ( vil_image_view< float > const &  sd_image,
vbl_array_2d< float > const &  kernel 
) [static]

Compute the standard deviation of an operator response, given the image intensity standard deviation at each pixel.

Uses a modified formula to compute std_dev

Definition at line 3838 of file brip_vil_float_ops.cxx.

vil_image_resource_sptr brip_vil_float_ops::sum ( vil_image_resource_sptr const &  img0,
vil_image_resource_sptr const &  img1 
) [static]

Add two images from a general resource (forces types to be the same).

Definition at line 3094 of file brip_vil_float_ops.cxx.

vil_image_view< float > brip_vil_float_ops::threshold ( vil_image_view< float > const &  image,
const float  thresh,
const float  level = 255.0f 
) [static]

sets values greater than thresh to specified level and the rest to zero.

Definition at line 590 of file brip_vil_float_ops.cxx.

vil_image_view< float > brip_vil_float_ops::trace_grad_matrix_NxN ( vil_image_view< float > const &  input,
unsigned  n 
) [static]

Tr(IxIx.transpose) for a NxN region ($N = 2n+1$).

Definition at line 848 of file brip_vil_float_ops.cxx.

void brip_vil_float_ops::velocity_by_correlation ( vil_image_view< float > const &  curr_image,
vil_image_view< float > const &  prev_region,
const unsigned  start_i,
const unsigned  end_i,
const unsigned  start_j,
const unsigned  end_j,
const unsigned  zero_i,
const unsigned  zero_j,
float &  vx,
float &  vy 
) [static]

computes velocity of a region(view) using correlation.

Definition at line 1214 of file brip_vil_float_ops.cxx.


Member Data Documentation

Definition at line 223 of file brip_vil_float_ops.h.


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