亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
久久综合999| 欧美videos大乳护士334| 国产毛片一区二区| 日本不卡一区二区三区高清视频| 一区二区三区四区五区视频在线观看 | 中文字幕欧美区| 国产丝袜欧美中文另类| 日韩美女视频在线| 欧美高清视频在线高清观看mv色露露十八| 91丨porny丨首页| 91社区在线播放| 在线观看欧美精品| 3atv在线一区二区三区| 日韩一区二区三| 精品盗摄一区二区三区| 国产欧美日韩亚州综合 | 亚洲欧洲精品成人久久奇米网| 国产精品欧美一区二区三区| 亚洲精品精品亚洲| 日韩电影在线一区二区| 精品在线免费观看| 99久久99久久精品免费看蜜桃| 色综合天天狠狠| 日韩欧美在线1卡| 国产欧美一区在线| 午夜精品福利一区二区三区蜜桃| 日本午夜一区二区| 成人精品亚洲人成在线| 91美女精品福利| 精品国产成人在线影院| 中文字幕色av一区二区三区| 午夜精品久久久久久久99水蜜桃| 国产精品亚洲第一区在线暖暖韩国 | 日韩午夜小视频| 欧美国产综合色视频| 一级特黄大欧美久久久| 极品少妇xxxx精品少妇| 91蝌蚪porny成人天涯| 日韩欧美激情四射| 一区二区三区在线播放| 高清在线成人网| 3atv在线一区二区三区| 亚洲欧美电影院| 国产精品正在播放| 欧美欧美欧美欧美首页| 久久精品人人做人人综合| 偷拍亚洲欧洲综合| av毛片久久久久**hd| 日韩欧美国产精品| 亚洲成人午夜电影| 91九色02白丝porn| 国产精品久久久久婷婷二区次| 日韩av中文字幕一区二区| 91美女视频网站| 国产精品女主播在线观看| 免费一级片91| 欧美精品自拍偷拍| 一区二区三区免费网站| 成人av影院在线| 久久久久久久精| 国产一区二区三区蝌蚪| 色妞www精品视频| 亚洲天堂福利av| 成人黄色av电影| 国产午夜亚洲精品不卡| 精品一区免费av| 91麻豆精品国产91久久久久| 午夜精品福利视频网站| 欧美日韩你懂的| 亚洲1区2区3区4区| 欧美性猛交一区二区三区精品| 综合电影一区二区三区 | 日韩激情中文字幕| 欧美日韩一级黄| 亚洲国产欧美在线| 欧美日韩精品一区二区三区蜜桃 | 日韩影院精彩在线| 欧美日本一区二区| 亚州成人在线电影| 91精品国产综合久久久久久久| 日韩精品一二三| 51精品视频一区二区三区| 日韩在线一二三区| 91精品国产色综合久久ai换脸| 亚洲高清中文字幕| 欧美日韩国产综合一区二区 | 日韩欧美亚洲一区二区| 狠狠狠色丁香婷婷综合久久五月| 精品美女一区二区| 高潮精品一区videoshd| 亚洲欧洲日韩综合一区二区| 在线观看一区日韩| 久久草av在线| 国产欧美精品一区二区三区四区| voyeur盗摄精品| 婷婷国产v国产偷v亚洲高清| 日韩欧美在线网站| 99免费精品在线| 天天色综合天天| 久久久精品国产免费观看同学| 91伊人久久大香线蕉| 丝袜诱惑亚洲看片| 国产日韩欧美制服另类| 欧美性生活影院| 国产麻豆精品在线| 亚洲va韩国va欧美va| 国产日韩欧美一区二区三区乱码 | 欧美精品一区二区久久婷婷| 成人免费三级在线| 亚洲777理论| 日韩一区在线免费观看| 91精品国产综合久久久蜜臀粉嫩| 国产不卡高清在线观看视频| 午夜精品福利久久久| 国产精品美女久久久久高潮| 9191久久久久久久久久久| 成人精品视频.| 蜜臀久久久久久久| 亚洲女人****多毛耸耸8| 26uuu色噜噜精品一区二区| 欧美在线短视频| 成人97人人超碰人人99| 另类小说视频一区二区| 亚洲一卡二卡三卡四卡五卡| 国产精品素人一区二区| 91精品欧美一区二区三区综合在| 国产成人免费视频网站| 美女视频黄频大全不卡视频在线播放| 国产精品福利一区二区| 久久综合久久久久88| 欧美日韩在线播| 色综合久久综合| 成人性生交大片免费看视频在线 | 国产精品美女久久久久久久| 精品福利一区二区三区免费视频| 91麻豆精东视频| 国产一区在线视频| 麻豆精品视频在线观看| 视频一区在线播放| 亚洲国产成人tv| 亚洲一区二区三区激情| 亚洲另类在线制服丝袜| 亚洲欧美在线视频观看| 国产午夜精品福利| 久久久久久久久免费| 精品日韩99亚洲| 亚洲精品在线观| 久久婷婷成人综合色| 亚洲精品在线三区| 精品第一国产综合精品aⅴ| 精品国产一二三| www激情久久| 日本一区二区三区高清不卡| 中文在线免费一区三区高中清不卡| 久久精品视频免费| 亚洲国产精品成人综合色在线婷婷| 国产偷国产偷精品高清尤物 | 欧美日韩国产高清一区二区三区| 欧美色综合网站| 欧美丰满少妇xxxbbb| 欧美电影一区二区三区| 欧美一区中文字幕| 日韩一区二区三区在线| 久久亚洲精品国产精品紫薇| 国产午夜精品一区二区三区视频 | 欧美色图第一页| 91精品在线观看入口| 精品99久久久久久| 久久精品欧美一区二区三区麻豆| 欧美国产一区视频在线观看| 欧美国产日韩精品免费观看| 亚洲乱码国产乱码精品精可以看 | 日韩中文字幕av电影| 精品一区二区在线视频| 国产91露脸合集magnet | 日韩欧美色电影| 日本一区二区三区电影| 亚洲一区二区av电影| 九九久久精品视频| 99国产精品久| 在线综合+亚洲+欧美中文字幕| 久久综合色综合88| 亚洲精品国产视频| 另类小说色综合网站| 91欧美一区二区| 欧美成人激情免费网| 自拍偷拍亚洲激情| 青青草97国产精品免费观看| 成人免费视频免费观看| 3d动漫精品啪啪一区二区竹菊| 国产精品欧美经典| 日本aⅴ精品一区二区三区| 成人av电影在线播放| 欧美岛国在线观看| 亚洲国产精品影院| 成人黄色软件下载| 日韩欧美国产小视频| 亚洲综合在线第一页| 国产精品一区一区三区| 欧美三级韩国三级日本一级|