contrib/brl/bseg/brip/brip_vil_float_ops.h
Go to the documentation of this file.
00001 // This is brl/bseg/brip/brip_vil_float_ops.h
00002 #ifndef brip_vil_float_ops_h_
00003 #define brip_vil_float_ops_h_
00004 //-----------------------------------------------------------------------------
00005 //:
00006 // \file
00007 // \author J.L. Mundy
00008 // \brief operations on image_view<float> operands
00009 //
00010 // These methods are similar to the VanDuc gevd_float_ops methods. However,
00011 // they use vil_image_view<float> buffers rather than the old bufferxy
00012 // structure. The purpose is to provide efficient foundational
00013 // segmentation routines. They are not meant to be generic.
00014 //
00015 // \verbatim
00016 //  Modifications
00017 //   Feb 15 2003 Initial version
00018 //   Jan 24 2004 Renamed to brip_vil_float_ops, to support moving from vil1 to vil
00019 // \endverbatim
00020 //
00021 //-----------------------------------------------------------------------------
00022 #include <vcl_vector.h>
00023 #include <vcl_complex.h>
00024 #include <vnl/vnl_matrix.h>
00025 #include <vbl/vbl_array_2d.h>
00026 #include <vgl/vgl_box_2d.h>
00027 #include <vgl/vgl_polygon.h>
00028 #include <vgl/algo/vgl_h_matrix_2d.h>
00029 #include <vil/vil_image_resource.h>
00030 #include <vil/vil_image_view.h>
00031 #include <vil/vil_rgb.h>
00032 #include <vsol/vsol_box_2d_sptr.h>
00033 #include <brip/brip_roi_sptr.h>
00034 
00035 class brip_vil_float_ops
00036 {
00037  public:
00038   ~brip_vil_float_ops() {}
00039 
00040   //: convolves with the specified kernel
00041   static vil_image_view<float>
00042     convolve(vil_image_view<float> const& input,
00043              vbl_array_2d<float> const& kernel);
00044 
00045   //: helper to determine processing border required by Gaussian smoothing
00046   static unsigned gaussian_radius(const double sigma, const double fuzz=0.02);
00047 
00048   //: convolves with a Gaussian kernel
00049   static vil_image_view<float> gaussian(vil_image_view<float> const& input,
00050                                         float sigma,
00051                                         float fill = 0.0f);
00052 
00053 #ifdef VIL_CONVOLVE_WITH_MASK_EXISTS // TODO
00054   //: convolves with a Gaussian kernel and for a given mask
00055   static vil_image_view<float> gaussian(vil_image_view<float> const& input,
00056                                         float sigma,
00057                                         vil_image_view<float> mask);
00058 #endif
00059 
00060   //: non-maximum suppression on a NxN neighborhood, with sub-pixel location
00061   static void non_maximum_suppression(vil_image_view<float> const& input,
00062                                       int n, float thresh,
00063                                       vcl_vector<float>& x_pos,
00064                                       vcl_vector<float>& y_pos,
00065                                       vcl_vector<float>& value);
00066 
00067   //: downsamples the input using the Bert-Adelson algorithm
00068   static vil_image_view<float>
00069     half_resolution(vil_image_view<float> const& input,
00070                     float filter_coef=0.359375f);
00071 
00072   //: interpolates the input using the Bert-Adelson algorithm
00073   static vil_image_view<float>
00074     double_resolution(vil_image_view<float> const& input,
00075                       float filter_coef=0.6f);
00076 
00077   //: subtracts image_1 from image_2
00078   static vil_image_view<float>
00079     difference(vil_image_view<float> const& image_1,
00080                vil_image_view<float> const& image_2);
00081 
00082   //: sets values greater than thresh to specified level and the rest to zero
00083   static vil_image_view<float>
00084     threshold(vil_image_view<float> const & image,
00085               const float thresh, const float level = 255.0);
00086 
00087   //: sets absolute values greater than thresh to specified level
00088   static vil_image_view<float>
00089     abs_clip_to_level(vil_image_view<float> const & image,
00090                       const float thresh, const float level = 0.0);
00091 
00092   static vil_image_view<float>
00093     average_NxN(vil_image_view<float> const & img, int N);
00094 
00095   //: The gradient using a 3x3 kernel
00096   static void gradient_3x3(vil_image_view<float> const& input,
00097                            vil_image_view<float>& grad_x,
00098                            vil_image_view<float>& grad_y);
00099 
00100   static void gradient_mag_3x3(vil_image_view<float> const& input,
00101                                vil_image_view<float>& mag);
00102 
00103   static void hessian_3x3(vil_image_view<float> const& input,
00104                           vil_image_view<float>& Ixx,
00105                           vil_image_view<float>& Ixy,
00106                           vil_image_view<float>& Iyy);
00107 
00108   static vil_image_view<float>
00109     beaudet(vil_image_view<float> const& Ixx,
00110             vil_image_view<float> const& Ixy,
00111             vil_image_view<float> const& Iyy,
00112             bool determinant = true);
00113 
00114   static void extrema_kernel_mask(float lambda0, float lambda1, float theta,
00115                                   vbl_array_2d<float>& kernel, 
00116                                   vbl_array_2d<bool>& mask,
00117                                   float cutoff_percentage = 0.01f);
00118 
00119 
00120   //: Compute the standard deviation of an operator response, given the image intensity standard deviation at each pixel
00121   static  vil_image_view<float> 
00122     std_dev_operator(vil_image_view<float> const& sd_image,
00123                      vbl_array_2d<float> const& kernel);
00124 
00125   //: Compute the standard deviation of an operator response, given the image intensity standard deviation at each pixel
00126   //  Uses a modified formula to compute std_dev
00127   static vil_image_view<float> 
00128     std_dev_operator_method2(vil_image_view<float> const& sd_image,
00129                              vbl_array_2d<float> const& kernel);
00130 
00131   //: a helper function for the extrema method, revert angle to the range [-90, 90]
00132   static float extrema_revert_angle(float angle);
00133 
00134   //: Find ansiotropic intensity extrema. Theta is in degrees
00135   static vil_image_view<float> extrema(vil_image_view<float> const& input,
00136                                        float lambda0, float lambda1,
00137                                        float theta, bool bright = true,
00138                                        bool output_response_mask = true,
00139                                        bool unclipped_response = false);
00140 
00141   //: Find ansiotropic intensity extrema at a range of orientations and return the maximal response at the best orientation.
00142   //  Theta interval is in degrees
00143   //  If lambda0 == lambda1 then reduces to the normal extrema operator
00144   static vil_image_view<float> extrema_rotational(vil_image_view<float> const& input,
00145                                                   float lambda0, float lambda1,
00146                                                   float theta_interval, bool bright = true);
00147 
00148   //: compute the inscribed rectangle in an ellipse with largest (1+h)(1+w). Needed for fast non-maximal suppression. Theta is in degrees.
00149   static void max_inscribed_rect(float lambda0, float lambda1, float theta,
00150                                  float& u_rect, float& v_rect);
00151 
00152   //: Find intensity extrema using kernel decomposition.
00153   // Theta is in degrees. Image rotation is applied then separated u, v kernels produce the response.
00154   static vil_image_view<float> fast_extrema(vil_image_view<float> const& input,
00155                                             float lambda0, float lambda1,
00156                                             float theta, bool bright = true,
00157                                             bool output_response_mask = true,
00158                                             bool unclipped_response = false,
00159                                             float cutoff_percentage = 0.01f);
00160 
00161   //: IxIx.transpose gradient matrix elements for a NxN region(N = 2n+1)
00162   static void grad_matrix_NxN(vil_image_view<float> const& input, unsigned n,
00163                               vil_image_view<float>& IxIx,
00164                               vil_image_view<float>& IxIy,
00165                               vil_image_view<float>& IyIy);
00166 
00167   //: Tr(IxIx.transpose) for a NxN region, N = 2n+1)
00168   static  vil_image_view<float>
00169     trace_grad_matrix_NxN(vil_image_view<float> const& input, unsigned n);
00170 
00171   //: Computes the Harris corner measure
00172   static vil_image_view<float> harris(vil_image_view<float> const& IxIx,
00173                                       vil_image_view<float> const& IxIy,
00174                                       vil_image_view<float> const& IyIy,
00175                                       double scale=0.04);
00176 
00177   //: computes the conditioning of the 2n+1 x 2n+1 gradient neigborhood
00178   static vil_image_view<float>
00179     sqrt_grad_singular_values(vil_image_view<float>& input, int n);
00180 
00181   static vil_image_view<float> max_scale_trace(vil_image_view<float> input,
00182                                                float min_scale,
00183                                                float max_scale,
00184                                                float scale_inc);
00185   //: 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
00186   static vil_image_view<float> max_scale_trace_value(vil_image_view<float> input,
00187                                                      float min_scale,
00188                                                      float max_scale,
00189                                                      float scale_inc);
00190 
00191   //: computes Lucas-Kanade optical flow on a 2n+1 neighborhood
00192   static void Lucas_KanadeMotion(vil_image_view<float>& current_frame,
00193                                  vil_image_view<float>& previous_frame,
00194                                  int n, double thresh,
00195                                  vil_image_view<float>& vx,
00196                                  vil_image_view<float>& vy);
00197 
00198   //: computes velocity of a region(view) using Lucas Kanade
00199   static void
00200     lucas_kanade_motion_on_view(vil_image_view<float> const& curr_frame,
00201                                 vil_image_view<float> const& prev_frame,
00202                                 const double thresh,
00203                                 float& vx,
00204                                 float& vy);
00205 
00206   //: computes velocity of a region(view) using correlation
00207   static void
00208     velocity_by_correlation(vil_image_view<float> const& curr_image,
00209                             vil_image_view<float> const& prev_region,
00210                             const unsigned start_i, const unsigned end_i,
00211                             const unsigned start_j, const unsigned end_j,
00212                             const unsigned zero_i, const unsigned zero_j,
00213                             float& vx,
00214                             float& vy);
00215 
00216   //: computes optical flow using Horn & Schunck's method
00217   static int Horn_SchunckMotion(vil_image_view<float> const & current_frame,
00218                                 vil_image_view<float> const& previous_frame,
00219                                 vil_image_view<float>& vx,
00220                                 vil_image_view<float>& vy,
00221                                 const float alpha_coef=10000.0f,
00222                                 const int no_of_iterations=5);
00223 
00224   //: fills a border of width w on left and right of image with value
00225   static void fill_x_border(vil_image_view<float>& image, unsigned w, float value);
00226 
00227   //: fills a border of width h on top and bottom of image with value
00228   static void fill_y_border(vil_image_view<float>& image, unsigned h, float value);
00229 
00230   //: converts a float image to a byte value range
00231   static vil_image_view<unsigned char>
00232     convert_to_byte(vil_image_view<float> const& image);
00233 
00234   //: converts a float image to a byte value range within a specified range
00235   static vil_image_view<unsigned char>
00236     convert_to_byte(vil_image_view<float> const& image,
00237                     float min_val, float max_val);
00238 
00239   //: converts an unsigned short image to a byte value range within a specified range
00240   static vil_image_view<unsigned char>
00241     convert_to_byte(vil_image_view<unsigned short> const& image,
00242                     unsigned short min_val, unsigned short max_val);
00243 
00244   //: converts a generic image to a byte image. Use this instead of convert_to_grey
00245   static vil_image_view<unsigned char>
00246     convert_to_byte(vil_image_resource_sptr const& image);
00247 
00248   //: converts a float image to an unsigned short image within a range
00249   static vil_image_view<unsigned short>
00250     convert_to_short(vil_image_view<float> const& image,
00251                      float min_val, float max_val);
00252   //: converts a float image to an unsigned short image.
00253   // range determined automatically
00254   static vil_image_view<unsigned short>
00255     convert_to_short(vil_image_view<float> const& image);
00256 
00257   //: converts a generic image to an unsigned short image
00258   static vil_image_view<unsigned short>
00259     convert_to_short(vil_image_resource_sptr const& image);
00260 
00261   //: converts a vil_image_resource to a float image
00262   static vil_image_view<float>
00263     convert_to_float(vil_image_resource const& image);
00264 
00265   //: converts a vil_image_resource to a float image (preferred interface)
00266   static vil_image_view<float>
00267     convert_to_float(vil_image_resource_sptr const& image)
00268   { return brip_vil_float_ops::convert_to_float(*image); }
00269 
00270   static vil_image_view<float>
00271     convert_to_float(vil_image_view<unsigned char> const& image);
00272 
00273   static vil_image_view<float>
00274     convert_to_float(vil_image_view<unsigned short> const& image);
00275 
00276   //: converts a byte image to a bool image
00277   static vil_image_view<bool>
00278     convert_to_bool(vil_image_view<unsigned char> const& image);
00279 
00280   //: converts an RGB image to a float image
00281   static vil_image_view<float>
00282     convert_to_float(vil_image_view<vil_rgb<vxl_byte> > const& image);
00283 
00284   //: convert a color image to float IHS images
00285   static void
00286     convert_to_IHS(vil_image_view<vil_rgb<vxl_byte> > const& image,
00287                    vil_image_view<float>& I,
00288                    vil_image_view<float>& H,
00289                    vil_image_view<float>& S);
00290   static void
00291     convert_to_IHS(vil_image_view<unsigned char> const& image,
00292                    vil_image_view<float>& I,
00293                    vil_image_view<float>& H,
00294                    vil_image_view<float>& S);
00295 
00296   //: display IHS images as RGB (not conversion from IHS to RGB)
00297   static void
00298     display_IHS_as_RGB(vil_image_view<float> const& I,
00299                        vil_image_view<float> const& H,
00300                        vil_image_view<float> const& S,
00301                        vil_image_view<vil_rgb<vxl_byte> >& image);
00302 
00303   //: Create a color image from multiple view channels
00304   // All views have to have the same array dimensions
00305   static vil_image_view<vil_rgb<vxl_byte> >
00306     combine_color_planes(vil_image_view<unsigned char> const& R,
00307                          vil_image_view<unsigned char> const& G,
00308                          vil_image_view<unsigned char> const& B);
00309 
00310   //: Create a unsigned char color image from multiple resource channels
00311   // Images do not have to be the same size arraysp
00312   static vil_image_view<vil_rgb<vxl_byte> >
00313     combine_color_planes(vil_image_resource_sptr const& R,
00314                          vil_image_resource_sptr const& G,
00315                          vil_image_resource_sptr const& B);
00316 
00317   //: converts a generic image to greyscale (RGB<unsigned char>)
00318   static vil_image_view<unsigned char>
00319     convert_to_grey(vil_image_resource const& img);
00320 
00321   //: loads a 2n+1 x 2n+1 convolution kernel (see .cxx for file format)
00322   static vbl_array_2d<float> load_kernel(vcl_string const& file);
00323 
00324   //: compute basis images for a set of input images
00325   static void basis_images(vcl_vector<vil_image_view<float> > const& input_images,
00326                            vcl_vector<vil_image_view<float> >& basis);
00327 
00328   //: compute the Fourier transform using the vnl FFT algorithm
00329   static bool fourier_transform(vil_image_view<float> const& input,
00330                                 vil_image_view<float>& mag,
00331                                 vil_image_view<float>& phase);
00332 
00333   //: compute the inverse Fourier transform using the vnl FFT algorithm
00334   static bool inverse_fourier_transform(vil_image_view<float> const& mag,
00335                                         vil_image_view<float> const& phase,
00336                                         vil_image_view<float>& output);
00337 
00338   //: resize to specified dimensions, fill with zeros if output is larger
00339   static void resize(vil_image_view<float> const& input,
00340                      unsigned width, unsigned height,
00341                      vil_image_view<float>& output);
00342 
00343   //: resize to closest power of two larger dimensions than the input
00344   static bool
00345     resize_to_power_of_two(vil_image_view<float> const& input,
00346                            vil_image_view<float>& output);
00347 
00348   //: filter the input image with a Gaussian blocking filter
00349   static bool
00350     spatial_frequency_filter(vil_image_view<float> const& input,
00351                              float dir_fx, float dir_fy,
00352                              float f0, float radius,
00353                              bool output_fourier_mag,
00354                              vil_image_view<float>& output);
00355 
00356   //: 2x2 bilinear interpolation of image at specified location
00357   static double
00358     bilinear_interpolation(vil_image_view<float> const& input,
00359                            double x, double y);
00360 
00361   //: map the input to the output by a homography.
00362   // \note if the output size is fixed then only the corresponding
00363   // input image space is transformed.
00364   static bool homography(vil_image_view<float> const& input,
00365                          vgl_h_matrix_2d<double>const& H,
00366                          vil_image_view<float>& output,
00367                          bool output_size_fixed = false,
00368                          float output_fill_value = 0.0f);
00369 
00370   //: rotate the input image counter-clockwise about the image origin
00371   static vil_image_view<float> rotate(vil_image_view<float> const& input,
00372                                       double theta_deg);
00373 
00374   //: extract a region of interest. If roi does not overlap input, return false
00375   static bool chip(vil_image_view<float> const& input,
00376                    vsol_box_2d_sptr const& roi, vil_image_view<float>& chip);
00377 
00378   //: convert image resource to a chip of equivalent pixel type
00379   static bool chip(vil_image_resource_sptr const& image,
00380                    brip_roi_sptr const& roi,
00381                    vil_image_resource_sptr & chip);
00382 
00383   //: compute the average of the image intensity within the specified region
00384   static float average_in_box(vil_image_view<float> const& v,
00385                               vgl_box_2d<double> const& box);
00386 
00387   //: scan a polygon and return the pixel values as well as max min
00388   static vcl_vector<float> scan_region(vil_image_resource_sptr img,
00389                                        vgl_polygon<double> poly,
00390                                        float& min,
00391                                        float& max);
00392   //: cross-correlate two images at a given sub-pixel location
00393   static float cross_correlate(vil_image_view<float> const& image1,
00394                                vil_image_view<float> const& image2,
00395                                float x, float y, int radius = 5,
00396                                float intensity_thresh=25.0f);
00397 
00398   //: cross_correlate two images using running sums
00399   static bool cross_correlate(vil_image_view<float> const& image1,
00400                               vil_image_view<float> const& image2,
00401                               vil_image_view<float>& out,
00402                               int radius = 5, float intensity_thresh=25.0f);
00403 
00404   //: convert a single i,h,s  pixel to rgb
00405   static void ihs_to_rgb(vil_rgb<vxl_byte>& rgb,
00406                          const float i, const float h, const float s);
00407 
00408   //: convert a single rgb pixel to ihs
00409   static void rgb_to_ihs(vil_rgb<vxl_byte> const& rgb,
00410                          float& i, float& h, float& s);
00411 
00412   //: Compute the intensity entropy of a region about the specified pixel
00413   //  No bounds check
00414   static float entropy_i(const unsigned i, const unsigned j,
00415                          const unsigned i_radius,
00416                          const unsigned j_radius,
00417                          vil_image_view<float> const& intensity,
00418                          const float range = 255.0, const unsigned bins = 16);
00419 
00420   //: Compute the gradient entropy of a region about the specified pixel
00421   //  No bounds check
00422   static float entropy_g(const unsigned i, const unsigned j,
00423                          const unsigned i_radius,
00424                          const unsigned j_radius,
00425                          vil_image_view<float> const& gradx,
00426                          vil_image_view<float> const& grady,
00427                          const float range = 360.0, const unsigned bins = 8);
00428 
00429   //: Compute the hue and saturation entropy of a region about the specified pixel
00430   //  No bounds check
00431   static float entropy_hs(const unsigned i, const unsigned j,
00432                           const unsigned i_radius,
00433                           const unsigned j_radius,
00434                           vil_image_view<float> const& hue,
00435                           vil_image_view<float> const& sat,
00436                           const float range = 360.0, const unsigned bins = 8);
00437 
00438   //: Compute the entropy of the specified region about each pixel
00439   static vil_image_view<float> entropy(const unsigned i_radius,
00440                                        const unsigned j_radius,
00441                                        const unsigned step,
00442                                        vil_image_resource_sptr const& img,
00443                                        const float sigma = 1.0f,
00444                                        const bool intensity = true,
00445                                        const bool gradient = true,
00446                                        const bool ihs = false);
00447 
00448   //no bounds check
00449   static float minfo_i(const unsigned i0, const unsigned j0,
00450                        const unsigned i1, const unsigned j1,
00451                        const unsigned i_radius,
00452                        const unsigned j_radius,
00453                        vil_image_view<float> const& intensity0,
00454                        vil_image_view<float> const& intensity1,
00455                        const float range = 255.0, const unsigned bins = 16);
00456 
00457   //:Compute the gradient minfo of a region about the specified pixel
00458   // No bounds check
00459   static float minfo_g(const unsigned i0, const unsigned j0,
00460                        const unsigned i1, const unsigned j1,
00461                        const unsigned i_radius,
00462                        const unsigned j_radius,
00463                        vil_image_view<float> const& gradx0,
00464                        vil_image_view<float> const& grady0,
00465                        vil_image_view<float> const& gradx1,
00466                        vil_image_view<float> const& grady1,
00467                        const float range = 360.0, const unsigned bins = 8);
00468 
00469   //:Compute the hue and saturation minfo of a region about the specified pixel
00470   // No bounds check
00471   static float minfo_hs(const unsigned i0, const unsigned j0,
00472                         const unsigned i1, const unsigned j1,
00473                         const unsigned i_radius,
00474                         const unsigned j_radius,
00475                         vil_image_view<float> const& hue0,
00476                         vil_image_view<float> const& sat0,
00477                         vil_image_view<float> const& hue1,
00478                         vil_image_view<float> const& sat1,
00479                         const float range = 360.0, const unsigned bins = 8);
00480 
00481   //:compute the minfo of the specified region about each pixel
00482   static bool minfo(const unsigned i_radius,
00483                     const unsigned j_radius,
00484                     const unsigned step,
00485                     vil_image_resource_sptr const& img0,
00486                     vil_image_resource_sptr const& img1,
00487                     vil_image_view<float>& MI0,
00488                     vil_image_view<float>& MI1,
00489                     const float sigma = 1.0f,
00490                     const bool intensity = true,
00491                     const bool gradient = true,
00492                     const bool ihs = false);
00493 
00494   //  ===  Arithmetic operations  ===
00495 
00496   //: Add two images from a general resource (forces types to be the same)
00497   static vil_image_resource_sptr sum(vil_image_resource_sptr const& img0,
00498                                      vil_image_resource_sptr const& img1);
00499 
00500   //: subtract two generic images, return img0-img1 (forces types to the same)
00501   static vil_image_resource_sptr difference(vil_image_resource_sptr const& img0,
00502                                             vil_image_resource_sptr const& img1);
00503 
00504   //: negate an image returning the same pixel type (only greyscale)
00505   static vil_image_resource_sptr negate(vil_image_resource_sptr const& imgr);
00506 
00507   //: Color order operator, output an index based on RGB intensity order
00508   static vil_image_view<unsigned char>
00509     color_order(vil_image_view<float> const& color_image, float eq_tol);
00510 
00511  private:
00512 
00513   //: find if the center pixel of a neighborhood is the maximum value
00514   static bool local_maximum(vbl_array_2d<float> const& nighborhood,
00515                             int n, float& value);
00516 
00517   //: find the sub-pixel offset to the maximum using a 3x3 quad interpolation
00518   static void interpolate_center(vbl_array_2d<float> const& neighborhood,
00519                                  float& dx, float& dy);
00520 
00521   //: sub-sample a 1-d array using the Bert-Adelson algorithm
00522   static void half_resolution_1d(const float* input, unsigned n,
00523                                  float k0, float k1, float k2, float* output);
00524 
00525   //: interpolate a 1-d array using the Bert-Adelson algorithm
00526   static void double_resolution_1d(const float* input, const unsigned n_input,
00527                                    const float k0, const float k1, const float k2,
00528                                    float* output);
00529 
00530   //: One dimensional fft
00531   static bool fft_1d(int dir, int m, double* x, double* y);
00532 
00533   //: Two dimensonal fft
00534   static bool fft_2d(vnl_matrix<vcl_complex<double> >& c, int nx,int ny,int dir);
00535 
00536   //: Transform the fft coefficients from/to fft/frequency order(self inverse).
00537   static void ftt_fourier_2d_reorder(vnl_matrix<vcl_complex<double> > const& F1,
00538                                      vnl_matrix<vcl_complex<double> >& F2);
00539 
00540   //: Blocking filter function
00541   static float gaussian_blocking_filter(float dir_fx, float dir_fy,
00542                                         float f0, float radius,
00543                                         float fx, float fy);
00544 
00545 #if 0 // TODO ?
00546   //: converting IHS to RGB
00547   static void
00548     convert_IHS_as_RGB(vil_image_view<float> const& I,
00549                        vil_image_view<float> const& H,
00550                        vil_image_view<float> const& S,
00551                        vil_image_view<vil_rgb<vxl_byte> >& image);
00552 #endif // 0
00553 
00554   //: u-coordinate of an ellipse defined by lambda0, lambda1 and theta, vs. phi
00555   static float elu(float phi, float lamda0, float lambda1, float theta);
00556   //: v-coordinate of an ellipse defined by lambda0, lambda1 and theta, vs. phi
00557   static float elv(float phi, float lamda0, float lambda1, float theta);
00558 
00559   //: Default constructor is private
00560   brip_vil_float_ops() {}
00561 };
00562 
00563 #endif // brip_vil_float_ops_h_