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

static void Impala::Core::Array::f_iir_derivative_filter ( DSTTYPE *  src,
DSTTYPE *  dest,
int  sx,
int  sy,
double  phi,
int  order 
) [static]

Definition at line 444 of file AniGauss.h.

References DSTTYPE.

Referenced by anigauss().

00446 {
00447    int                          i, j;
00448    DSTTYPE   *prev, *center, *next;
00449    DSTTYPE   *buf, *pstore;
00450    double  pn, pc, pp;
00451    double  cn, cc, cp;
00452    double  nn, nc, np;
00453    double  cosp, sinp;
00454 
00455    buf = (DSTTYPE*) malloc(sx*sizeof(*buf));
00456 
00457    sinp = 0.5*sin(phi); cosp = 0.5*cos(phi);
00458 
00459    center = src; prev = src; next = src+sx;
00460    for (i = 0; i < sy; i++) {
00461         pstore = buf;
00462         pn = *prev++; cn = *center++; nn = *next++;
00463         pp = pn; pc = pn;
00464         cp = cn; cc = cn;
00465         np = pn; nc = nn;
00466         *pstore++ = cc;
00467         for (j = 1; j < sx; j++) {
00468             pn = *prev++;
00469             cn = *center++;
00470             nn = *next++;
00471             *dest++ = sinp*(pc-nc)+cosp*(cn-cp);
00472             pp = pc; pc = pn;
00473             cp = cc; cc = cn;
00474             np = pc; nc = nn;
00475             *pstore++ = cc;
00476         }
00477         *dest++ = sinp*(pc-nc)+cosp*(cn-cp);
00478         prev = buf;
00479         if (i==sy-2)
00480             next -= sx;
00481     }
00482 
00483    free(buf);
00484 }


Generated on Fri Mar 19 10:56:04 2010 for ImpalaSrc by  doxygen 1.5.1