#ifndef IPGRADIENT_HEADER #define IPGRADIENT_HEADER 1 //////////////////////////////////////////////////////////////////////////// //! lib=IPLinear //! docentry="Image.Image Processing.Spatial_Filters" //! file="amma/Image/IPStream/IPLinear/IPGradient.hh" //! rcsid="$Id: IPGradient.hh,v 1.3 2000/07/07 12:57:54 ees1cg Exp $" //! author="Bill Christmas" //! date="02/12/99" #include "amma/DP/Process.hh" #include "amma/NumImage.hh" #include "amma/Image/IPSpatDiff.hh" #include "amma/Vector2d.hh" using namespace IPSpatFilterN; //! userlevel=Develop //: Body class for spatial gradient filter // // Estimates horizontal and vertical spatial derivatives, using central // differences of order 1..3. You should not use this class directly, but // rather the handle class IPGradientC. // class IPGradientBodyC : public DPProcessBodyC,NumImageC >, private IPSpatFilterC { public: IPGradientBodyC (UIntT Order, ResizeT Resize, PadT Pad); //: Constructor // (See handle class IPGradientC) virtual NumImageC Apply (const NumImageC &im); //: For each pixel im image "im", computes horizontal and vertical // differences. }; //! userlevel=Normal //: Spatial gradient filter // // Estimates horizontal and vertical spatial derivatives, using central // differences of order 1..3. // //

See namespace IPSpatFilterN (or IPSpatFilterC for now) for parameter // typedefs. class IPGradientC : public DPProcessC,NumImageC > { public: IPGradientC(); //: Default constructor. // Creates an invalid handle. IPGradientC (UIntT Order, ResizeT Resize = Erode, PadT Pad = PadBlack); //: Constructor with mask size and optional border processing and shifting // //!param: Order - difference order: implemented for values in range 1..3 //!param: Resize - o/p image size w.r.t i/p image: Erode, Original, Expand //!param: Pad - pad extended image: PadBlack, Repeat, Reflect //!param: Shift - if mask size is even, o/p is 1/2 pixel offset w.r.t. i/p, so 1/2 pixel shift is either: ShiftUL, ShiftDR // //

Notes:

    // //
  • Erode option means that no special border processing is // needed. // //
}; #endif