Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

template<class DstArrayT, class SrcArrayT, class KerArrayT, class PixOpT, class RedOpT>
void Impala::Core::Array::Pattern::FuncGenConv2d_NaiIncRect ( DstArrayT *  dst,
SrcArrayT *  src,
KerArrayT *  ker,
PixOpT &  pixOp,
RedOpT &  redOp,
const Geometry::Rectangle &  rect 
)

Definition at line 117 of file FuncGenConv2d.h.

References ArrayCH(), ArrayCPB(), ArrayCW(), Impala::Core::Geometry::Rectangle::mBottom, Impala::Core::Geometry::Rectangle::mLeft, Impala::Core::Geometry::Rectangle::mRight, and Impala::Core::Geometry::Rectangle::mTop.

00119 {
00120     typedef typename DstArrayT::StorType DstStorT;
00121     typedef typename DstArrayT::ArithType DstArithT;
00122     typedef typename SrcArrayT::StorType SrcStorT;
00123     typedef typename SrcArrayT::ArithType SrcArithT;
00124     typedef typename KerArrayT::StorType KerStorT;
00125     typedef typename KerArrayT::ArithType KerArithT;
00126 
00127     int imgWidth = ArrayCW(dst);
00128     int imgHeight = ArrayCH(dst);
00129     int kerWidth = ArrayCW(ker);
00130     int kerHeight = ArrayCH(ker);
00131     int kerBW = ArrayCW(ker) / 2;
00132     int kerBH = ArrayCH(ker) / 2;
00133 
00134     DstStorT* temp = new DstStorT[DstArrayT::ElemSize()];
00135 
00136     for (int y=rect.mTop ; y<rect.mBottom ; y++) 
00137     {
00138         DstStorT* dPtr = ArrayCPB(dst, rect.mLeft, y);
00139         for (int x=rect.mLeft ; x<rect.mRight ; x++) 
00140         {
00141             RedOpT::NeutralElement(dPtr);
00142             for (int j=0 ; j<kerHeight ; j++) 
00143             {
00144                 SrcStorT* sPtr = ArrayCPB(src, -kerBW + x, -kerBH + y + j);
00145                 KerStorT* kPtr = ArrayCPB(ker, 0, j);
00146                 for (int i=0 ; i<kerWidth ; i++) 
00147                 {
00148                     pixOp.DoIt(temp, sPtr, kPtr);
00149                     redOp.DoIt(dPtr, temp);
00150                     sPtr += SrcArrayT::ElemSize();
00151                     kPtr += KerArrayT::ElemSize();
00152                 }
00153             }
00154             dPtr += DstArrayT::ElemSize();
00155         }
00156     }
00157 
00158     delete temp;
00159 }

Here is the call graph for this function:


Generated on Fri Mar 19 11:01:02 2010 for ImpalaSrc by  doxygen 1.5.1