亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? flwt.c

?? 大師寫的二代小波經典之作
?? C
?? 第 1 頁 / 共 4 頁
字號:
/* *  -*- Mode: ANSI C -*- *  $Id: flwt.c,v 1.18 1997/04/03 15:08:04 fernande Exp $ *  $Source: /sgi.acct/sweldens/cvs/liftpack/Lifting/flwt.c,v $ *  Author: Gabriel Fernandez, Senthil Periaswamy * *     >>> Fast Lifted Wavelet Transform on the Interval <<< * *                             .-.  *                            / | \ *                     .-.   / -+- \   .-. *                        `-'   |   `-' * *  Using the "Lifting Scheme" and the "Square 2D" method, the coefficients *  of a "Biorthogonal Wavelet" or "Second Generation Wavelet" are found for *  a two-dimensional data set. The same scheme is used to apply the inverse *  operation. *//* do not edit anything above this line *//* System header files */#include <math.h>#include <stdio.h>#include <stdlib.h>   /* exit() *//* FLWT header files */#include <constant.h>#include <flwterr.h>#include <filter.h>#include <flwt.h>#include <imgmem.h>#include <lift.h>#include <mallat.h>#include <mem.h>#include <util.h>/* Static Global Variables */static Vector filter = NULL;      /* Vector with filter coefficients */static Matrix liftingX = NULL;    /* Matrix with lifting coefficients in X */static Matrix liftingY = NULL;    /* Matrix with lifting coefficients in Y *//* code *//* CODE FOR THE FILTER AND LIFTING COEFFICIENTS *//* * GetDual function: Finds the N filter coefficients and allocates a global *                   vector with the values to be used in the transform. *                   Allocates the global lifting matrices and initialize the *                   integral-moments information to calculate the lifting *                   coefficients. *                   These filter coefficients are used to find the Dual *                   Wavelet function. */voidGetDual ( const int width, const int height, const int N, const int nTilde,          const boolean print, const int levels ){    int row, col, noGammas, nX, nY;    Flt maxN;    Vector filterPtr;    /* Calculate Filter Coefficients */    if ( (filter = GetFilter(N)) == NULL ) {        Error ("GetDual", NOT_EVEN, RETURN, "N");        Error ("GetDual", INVALID_RELATIONAL_INT, ABORT, "N", ">", 0);    } else {        if (print) {            int Nrows = (N>>1) + 1;            filterPtr = filter;            fprintf (stdout, "\nFilter Coefficients (N=%d)\n", N);            for (row = 0 ; row < Nrows ; row++) {                fprintf (stdout, "For %d in the left and %d in the right\n[ ",                         row, N-row);                for (col = 0 ; col < N ; col++)                    fprintf (stdout, "%.18g ", *(filterPtr++));                fprintf (stdout, "]\n");            }        }    }    /* Allocate lifting coefficient matrices */    maxN = (Flt)MAX(N, nTilde) - (Flt)1;   /* max vanishing moments */    noGammas = width >> 1;    /* number of Gammas in X direction */    if (noGammas > 0) {        nX = (int)logBaseN ( (Flt)(width-1)/maxN, (Flt)2 );   /* iterations in X */        nX = (nX < 0) ? 0 : MIN(levels, nX);   /* find lowest level */        liftingX = matrix( 0, (long)(nX-1), 0, (long)(noGammas*nTilde - 1) );        for ( row=0 ; row<nX ; row++ )            for ( col=0 ; col<noGammas*nTilde ; col++ )                liftingX[row][col] = (Flt)0;    }    noGammas = height >> 1;    /* number of Gammas in Y direction */    if (noGammas > 0) {        nY = (int)logBaseN ( (Flt)(height-1)/maxN, (Flt)2 );   /* iterations in Y */        nY = (nY < 0) ? 0 : MIN(levels, nY);   /* find lowest level */        liftingY = matrix( 0, (long)(nY-1), 0, (long)(noGammas*nTilde - 1) );        for ( row=0 ; row<nY ; row++ )            for ( col=0 ; col<noGammas*nTilde ; col++ )                liftingY[row][col] = (Flt)0;    }    /* Initialize Integral-Moments matrices */    if (!InitMoment (nTilde, width, height, print)) {        Error ("GetDual", NOT_EVEN, RETURN, "N");        Error ("GetDual", INVALID_RELATIONAL_INT, ABORT, "N", ">", 0);    }}/* * FreeCo function: Frees the memory allocated by the function GetDual(). */voidFreeCo ( const int width, const int height, const int N, const int nTilde,         const int levels ){    int noGammas, nRows, nX, nY;    Flt maxN;    /* Free Filter Coefficients Vector */    nRows = (N>>1) + 1;    free_vector( filter, 0, (long)(nRows*N - 1) );    /* Free Lifting Coefficient Matrices */    maxN = (Flt)MAX(N, nTilde) - (Flt)1;   /* max vanishing moments */    if (liftingX) {        noGammas = width >> 1;        nX = (int)logBaseN( (Flt)(width-1)/maxN, (Flt)2 );   /* iterations in X */        nX = (nX < 0) ? 0 : MIN(levels, nX);   /* find lowest level */        free_matrix( liftingX, 0, (long)(nX-1), 0, (long)(noGammas*nTilde - 1) );    }    if (liftingY) {        noGammas = height >> 1;        nY = (int)logBaseN ( (Flt)(height-1)/maxN, (Flt)2 );   /* Iterations in Y */        nY = (nY < 0) ? 0 : MIN(levels, nY);   /* find lowest level */        free_matrix( liftingY, 0, (long)(nY-1), 0, (long)(noGammas*nTilde - 1) );    }    /* Free Integral-Moments Matrices */    FreeMoment( width, height, nTilde );}/* * GetReal function: Calculates the moments and lifting coefficients *                   needed for the wavelet transform. *                   These coefficients preserve the moments of the Real *                   Wavelet function. */voidGetReal ( const int width, const int height, const int N, const int nTilde,          const boolean print, const int levels ){    int x, y, k, n, nX, nY, step, max_step, level;    Flt  maxN;    Vector liftPtr;    char buf[BUFSIZ];    /* Check for filter vector */    if (!filter) {        Error ("GetReal", NO_FILTER_VECTOR, ABORT);    }    /* Calculate number of iterations n. It is the maximum  */    /* value such that the following relation is satisfied. */    /*        (2^n)*(N-1) <= L < (2^(n+1))*(N-1) + 1        */    /* Where L = max (signal's length in X-Y direction).    */    /* and N = max (# dual vanish mom & # real vanish mom)  */    /* Hence, solving for n, we have the following equation */    /* for all the cases:  n = floor (log_2((L-1)/(N-1))    */    maxN = (Flt)MAX(N, nTilde) - (Flt)1;   /* max vanishing moments */    /* Iterations in X */    nX = (width == 1) ? 0 : (int)logBaseN ( (Flt)(width-1)/maxN, (Flt)2 );    nX = (nX < 0) ? 0 : MIN (levels, nX);   /* find lowest level */    /* Iterations in Y */    nY = (height == 1) ? 0 : (int)logBaseN ( (Flt)(height-1)/maxN, (Flt)2 );    nY = (nY < 0) ? 0 : MIN (levels, nY);   /* find lowest level */    /* Total number of iterations */    n = MAX(nX, nY);   /* find minimum number of iterations */    max_step = (n==0) ? 0 : 1<<n;   /* maximum step */    /* Find lifting coefficients for all levels */    level = 0;    for ( step = 1 ; step < max_step ; step <<= 1 ) {        if (nX-- > 0) {            /* Get lifting coefficients for rows */            GetLifting (liftingX[nX], filter, step, N, nTilde, width, FALSE, FALSE);            if (print) {                fprintf (stdout, "\nLifting Coefficients for Rows (Level=%d)\n",                         level);                liftPtr = liftingX[nX];                for ( x=0 ; x<(width>>1) ; x++ ) {                    sprintf (buf, "%.20g", *(liftPtr++));                    for ( k=1 ; k<nTilde ; k++ )                        sprintf (buf, "%s,%.20g", buf, *(liftPtr++));                    fprintf (stdout, "Gamma[%d] (%s)\n", x, buf);                }            }        }        if (nY-- > 0) {            /* Get lifting coefficients for columns */            GetLifting (liftingY[nY], filter, step, N, nTilde, height, TRUE, FALSE);            if (print) {                fprintf (stdout,                         "\nLifting Coefficients for Columns (Level=%d)\n",                         level);                liftPtr = liftingY[nY];                for ( y=0 ; y<(height>>1) ; y++ ) {                    sprintf (buf, "%.20g", *(liftPtr++));                    for ( k=1 ; k<nTilde ; k++ )                        sprintf (buf, "%s,%.20g", buf, *(liftPtr++));                    fprintf (stdout, "Gamma[%d] (%s)\n", y, buf);                }            }        }        level++;   /* go to next level */    }}/* CODE FOR THE IN-PLACE FLWT (INTERPOLATION CASE, N EVEN) *//* * FLWT2D function: This is a 2D Direct/Inverse Fast Lifted Wavelet  *                  Trasform that uses the "Square 2D" method to find  *                  the Gamma coefficients of the wavelet function Phi *                  in the Direct case and the Lambda coefficients of the *                  original signal in the Inverse case. The "Square 2D" *                  method applies the transform first to all the rows *                  and then to all the columns. This creates squared *                  window transforms for the process. Since the Lifting *                  Scheme is used, the final coefficients are organized *                  in-place in the original matrix Data[][]. In file *                  mallat.c there are functions provided to change this *                  organization to the Isotropic format originally *                  established by Mallat. */voidFLWT2D ( Matrix Data, const int width, const int height,                      const int N, const int nTilde,                      const int levels, const boolean inverse ){    int i, k, x, y, /* counters */        n,          /* maximum number of levels */        nX, nY,     /* number of iterations in X and Y directions */        step,       /* step size of current level */        max_step;   /* maximum and initial step for the direct and */                    /* inverse transforms, respectively */    Flt maxN;       /* maximum number of vanishing moments */    /* Verify for existence of filter and lifting coefficients */    if (!filter) {        Error ("FLWT2D", NO_FILTER_VECTOR, ABORT);    }    if ( !liftingX && !liftingY ) {	fprintf( stderr,	         "\nFLWT2D(): lifting coefficients are not initialized."		 "\nUse GetDual() and GetReal() before calling this function.\n");        exit( INPUT_ERROR );    }    /* Calculate number of iterations n. It is the maximum  */    /* value such that the following relation is satisfied. */    /*        (2^n)*(N-1) <= L < (2^(n+1))*(N-1) + 1        */    /* Where L = max (signal's length in X-Y direction).    */    /* and N = max (# dual vanish mom & # real vanish mom)  */    /* Hence, solving for n, we have the following equation */    /* for all the cases:  n = floor (log_2((L-1)/(N-1))    */    maxN = (Flt)MAX(N, nTilde) - (Flt)1;   /* max vanishing moments */    /* Iterations in X */    nX = (width == 1) ? 0 : (int)logBaseN ( (Flt)(width-1)/maxN, (Flt)2 );    nX = (nX < 0) ? 0 : MIN(levels, nX);   /* find lowest level */    /* Iterations in Y */    nY = (height == 1) ? 0 : (int)logBaseN ( (Flt)(height-1)/maxN, (Flt)2 );    nY = (nY < 0) ? 0 : MIN(levels, nY);   /* find lowest level */    /* Total number of iterations */    n = MAX(nX, nY);   /* find minimum number of iterations */    if ( !inverse ) {    /* Forward transform */        /* Calculate wavelet coefficients */        max_step = (n==0) ? 0 : 1<<n;   /* maximum step */        for ( step=1 ; step<max_step ; step<<=1 ) {            if (nX-- > 0) {                /* Apply forward transform to the rows */                for ( y=0 ; y<height ; y+=step ) {                    FLWT1D_Predict ( &Data[y][0], (long)width, 1,                                     (long)step, (long)N );                    FLWT1D_Update ( &Data[y][0], (long)width, 1,                                    (long)step, (long)nTilde, liftingX[nX] );                }            }    

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久精品黄色| 精品少妇一区二区三区在线视频| 精品在线视频一区| 亚洲妇女屁股眼交7| 日韩美女久久久| 国产精品久久久久久久久久久免费看 | 成人免费毛片嘿嘿连载视频| 久久99精品久久久| 国产在线精品免费| 丁香网亚洲国际| 99这里只有久久精品视频| aa级大片欧美| 国内外成人在线视频| 成人自拍视频在线| 国产精品小仙女| 中文字幕在线免费不卡| 国产精品免费观看视频| 国产精品护士白丝一区av| 亚洲四区在线观看| 亚洲成人自拍一区| 裸体在线国模精品偷拍| 国产一区激情在线| 成人a免费在线看| 色婷婷综合久久久中文一区二区 | 日韩限制级电影在线观看| 91精品国产丝袜白色高跟鞋| 久久色视频免费观看| 中文子幕无线码一区tr| 亚洲综合精品久久| 久久9热精品视频| av激情综合网| 欧美一区二区三区色| 国产欧美日韩综合| 亚洲一区二区三区美女| 国内精品第一页| 色一区在线观看| 日韩写真欧美这视频| 亚洲欧美在线视频观看| 免费看日韩a级影片| 不卡高清视频专区| 欧美高清视频一二三区 | 亚洲欧洲韩国日本视频| 日韩精品一二三区| 成人免费视频视频在线观看免费| 欧美精品99久久久**| 国产精品蜜臀在线观看| 亚洲成a人在线观看| 国产宾馆实践打屁股91| 欧美精品123区| 亚洲六月丁香色婷婷综合久久| 日韩国产精品久久久久久亚洲| 成人高清在线视频| 精品久久久久99| 亚洲综合在线第一页| 不卡的av网站| 2023国产精品自拍| 日本免费新一区视频| 91福利在线观看| 国产日产欧美一区二区视频| 日韩高清在线一区| 在线国产电影不卡| 中文字幕一区免费在线观看| 久久se这里有精品| 欧美高清视频一二三区| 一区二区三区不卡在线观看| 成人av在线电影| 国产精品嫩草影院com| 国产呦精品一区二区三区网站| 91麻豆精品国产自产在线| 亚洲成人激情自拍| 欧美日韩免费观看一区三区| 亚洲精品综合在线| 91蝌蚪porny九色| 亚洲欧美色一区| 色综合视频一区二区三区高清| 日韩一区在线免费观看| www.欧美色图| 中文字幕日本乱码精品影院| 99视频在线观看一区三区| 国产精品电影院| 99久久精品免费精品国产| 亚洲欧洲国产专区| 一本大道综合伊人精品热热| 亚洲精品乱码久久久久| 欧美性生活大片视频| 性做久久久久久免费观看欧美| 欧美日韩黄色一区二区| 日本不卡的三区四区五区| 欧美一级日韩不卡播放免费| 久久aⅴ国产欧美74aaa| 国产日产亚洲精品系列| 99v久久综合狠狠综合久久| 亚洲狼人国产精品| 7777精品久久久大香线蕉| 美女性感视频久久| 国产精品视频一二三区 | 日韩中文字幕一区二区三区| 欧美一区二区三区四区视频| 国产一区不卡精品| 国产精品久久777777| 欧美日韩精品免费观看视频 | 中文字幕在线免费不卡| 色8久久精品久久久久久蜜| 石原莉奈在线亚洲三区| 久久久91精品国产一区二区精品| 成人动漫一区二区在线| 亚洲成人动漫在线免费观看| www国产精品av| 一本久久a久久精品亚洲| 免费视频一区二区| 中文字幕一区二区三区蜜月| 欧美精品在线观看一区二区| 国产成人综合视频| 亚洲无人区一区| 久久精品亚洲乱码伦伦中文| 欧美亚男人的天堂| 国产一区91精品张津瑜| 亚洲成av人在线观看| 国产午夜精品理论片a级大结局 | 三级成人在线视频| 国产精品久久777777| 51精品视频一区二区三区| youjizz国产精品| 日本女优在线视频一区二区| 亚洲免费视频中文字幕| 久久综合视频网| 欧美一区二区免费观在线| av亚洲精华国产精华| 国产乱码精品一区二区三| 天天综合色天天综合色h| 日本一区二区高清| 欧美成人三级在线| 欧美日本一区二区三区四区| 成人av资源在线观看| 精品一区二区成人精品| 日韩黄色片在线观看| 亚洲激情校园春色| 亚洲视频1区2区| 国产精品素人视频| 国产欧美精品一区| 精品国产91乱码一区二区三区| 欧美三级电影网| 在线免费观看日本欧美| 91在线播放网址| jiyouzz国产精品久久| 国产91精品免费| 成人免费看视频| 成人一区二区视频| www.亚洲精品| 成人精品免费视频| av电影在线不卡| www.一区二区| 一本久久a久久精品亚洲 | 亚洲成人精品在线观看| 亚洲国产va精品久久久不卡综合 | 欧美一级片在线| 欧美一级爆毛片| 日韩精品一区二区三区老鸭窝 | 国产欧美一区二区精品久导航| 精品福利视频一区二区三区| 精品国产一区二区精华| 久久久久久亚洲综合影院红桃 | 欧美午夜免费电影| 欧美色综合久久| 91麻豆精品国产91久久久久 | 久久久综合九色合综国产精品| 久久色.com| 成人欧美一区二区三区视频网页| 中文字幕亚洲一区二区av在线| 亚洲视频一区二区免费在线观看| 亚洲免费av观看| 五月天网站亚洲| 免费在线观看日韩欧美| 国产麻豆精品95视频| 高清免费成人av| 欧美最猛黑人xxxxx猛交| 91精品综合久久久久久| 久久综合国产精品| 亚洲人成影院在线观看| 午夜久久久久久久久久一区二区| 秋霞电影网一区二区| 成人免费视频免费观看| 欧美系列在线观看| 久久网站最新地址| 成人欧美一区二区三区小说| 日韩精品高清不卡| 国产91精品在线观看| 欧美久久久久久蜜桃| 国产日韩欧美精品在线| 亚洲综合激情网| 国产精品一区在线| 欧美视频精品在线| 国产精品欧美久久久久一区二区| 亚洲一区在线电影| 韩国av一区二区三区四区| 色国产综合视频| 欧美激情综合五月色丁香小说| 午夜视频一区二区三区| 不卡一区二区三区四区| 欧美色综合影院|