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

See namespace IPSpatFilterN (or IPSpatFilterC for now) for parameter // typedefs. class IPSpatDiffC : public DPProcessC,NumImageC > { public: IPSpatDiffC(); //: Default constructor. // Creates an invalid handle. IPSpatDiffC (UIntT Order, DirnT H_V, 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: H_V - difference direction: Horizontal, Vertical //!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