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

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

?? chain2_compute.c

?? LastWave
?? C
字號:
/*..........................................................................*//*                                                                          *//*      L a s t W a v e    P a c k a g e 'dwtrans2d' 2.1                    *//*                                                                          *//*      Copyright (C) 1998-2002  E.Bacry, J.Fraleu, J.Kalifa, E. Le Pennec, *//*                         W.L. Hwang , S.Mallat, S.Zhong                   *//*      emails : lastwave@cmap.polytechnique.fr                             *//*               fraleu@cmap.polytechnique.fr                               *//*               kalifa@cmap.polytechnique.fr                               *//*               lepennec@cmap.polytechnique.fr                             *//*               mallat@cmap.polytechnique.fr                               *//*               whwang@iis.sinica.edu.tw                                   *//*               szhong@chelsea.princeton.edu                               *//*                                                                          *//*..........................................................................*//*                                                                          *//*      This program is a free software, you can redistribute it and/or     *//*      modify it under the terms of the GNU General Public License as      *//*      published by the Free Software Foundation; either version 2 of the  *//*      License, or (at your option) any later version                      *//*                                                                          *//*      This program is distributed in the hope that it will be useful,     *//*      but WITHOUT ANY WARRANTY; without even the implied warranty of      *//*      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the       *//*      GNU General Public License for more details.                        *//*                                                                          *//*      You should have received a copy of the GNU General Public License   *//*      along with this program (in a file named COPYRIGHT);                *//*      if not, write to the Free Software Foundation, Inc.,                *//*      59 Temple Place, Suite 330, Boston, MA  02111-1307  USA             *//*                                                                          *//*..........................................................................*/#include "lastwave.h"#include "extrema2d.h"  /*          7  0  1          6  *  2          5  4  3*/typedef struct W2_neighbor {  struct ext2 *neighbor[8];} *W2_NEIGHBOR;static W2_NEIGHBOR W2_new_point_neighbor(void){  W2_NEIGHBOR neighbor;  int i;  if(!(neighbor = (W2_NEIGHBOR)(Malloc(sizeof(struct W2_neighbor)))))    Errorf ("Mem. alloc for NEIGHBOR failed\n");  for (i = 0; i < 8 ; i++)    neighbor->neighbor[i] = NULL;  return (neighbor);}static W2_delete_point_neighbor(W2_NEIGHBOR neighbor){  int i;  for (i = 0 ; i < 8; i++)     neighbor->neighbor[i] = NULL;  Free(neighbor);  neighbor = NULL;}/******** fill up the neighbors of points in a extlis ************/static W2_compute_point_neighbor(EXTLIS2 extlis, W2_NEIGHBOR neighbor,int k){  int ncol = extlis->ncol;  EXT2 *values = extlis->first;  neighbor->neighbor[0] = values[k - ncol];  neighbor->neighbor[4] = values[k + ncol];  neighbor->neighbor[1] = values[k - ncol + 1];  neighbor->neighbor[5] = values[k + ncol - 1];  neighbor->neighbor[2] = values[k + 1];  neighbor->neighbor[6] = values[k - 1];  neighbor->neighbor[3] = values[k + ncol + 1];  neighbor->neighbor[7] = values[k - ncol - 1];}  /* link the points in the same level through previous and next */static void W2_point_pic_link(WTRANS2 wtrans,int level,int uniform){  EXTLIS2 extlis = wtrans->extrep->array[level];  int nrow = extlis->nrow,      ncol = extlis->ncol;  EXT2 *values = extlis->first;  EXT2 ext,neighbor,coarse, adjacent, adjacent1, adjacent2, adjacent3;  W2_NEIGHBOR pneighbor;  int dir,dir1,dir2;  int i,j,I;  LWFLOAT measure, measure_tmp;  /* obtain from coarser */  for(i = 1,I = ncol; i < nrow - 1; i++,I += ncol)    for(j = 1; j < ncol - 1; j++)      if(ext = values[I+j]) {        if(ext->coarser && ext->coarser->finer && 	   (ext->coarser->finer == ext)) {	  coarse = ext->coarser;          if(coarse->next) /* if coarser->next and its finer is close */            if(coarse->next->finer) { 	      neighbor = coarse->next->finer;              if(abs(neighbor->x - ext->x) < 2 &&                 abs(neighbor->y - ext->y) < 2)                ext->next = neighbor;	    }          if(coarse->previous)  /* coarser->previous and its finer is close */            if(coarse->previous->finer) {	      neighbor = coarse->previous->finer;              if(abs(neighbor->x - ext->x) < 2 &&                 abs(neighbor->y - ext->y) < 2)                 ext->previous = neighbor;	    }	}      }  /* by gradiant */  for(i = 1,I = ncol; i < nrow-1; i++,I += ncol)    for(j = 1; j < ncol - 1; j++)      if(ext = values[I+j]) { 	pneighbor = W2_new_point_neighbor();	W2_compute_point_neighbor(extlis, pneighbor, I+j);        W2_direction(ext->arg,&dir,&dir1,&dir2);	/* among the three closed directions, find next */	if (ext->next) {	  adjacent = ext->next;	  if (uniform)  measure = (LWFLOAT)	    fabs((double)(ext->next->mag - ext->mag));	  else measure = ext->next->mag;	}	else  adjacent = NULL;	if (dir == dir1) {	  dir1 = (dir +1)%8;	  dir2 = (dir +7)%8;	}	adjacent1 = pneighbor->neighbor[dir];	adjacent2 = pneighbor->neighbor[dir1];	adjacent3 = pneighbor->neighbor[dir2];	if (adjacent1) {	  if (uniform) 	    if (adjacent) {	      measure_tmp = (LWFLOAT)		fabs((double)(adjacent1->mag - ext->mag));	      if (measure_tmp < measure) {		adjacent = adjacent1;		measure = measure_tmp;	      }	    }	    else {	      adjacent = adjacent1;	      measure = (LWFLOAT) fabs((double)(adjacent->mag - ext->mag));	    }	  else	    if (adjacent) {	      measure_tmp = adjacent1->mag;	      if (measure_tmp > measure) {		adjacent = adjacent1;		measure = measure_tmp;	      }	    }	    else {	      adjacent = adjacent1;	      measure = adjacent->mag;	    }	}	if (adjacent2) {	  if (uniform) 	    if (adjacent) {	      measure_tmp = (LWFLOAT)		fabs((double)(adjacent2->mag - ext->mag));	      if (measure_tmp < measure) {		adjacent = adjacent2;		measure = measure_tmp;	      }	    }	    else {	      adjacent = adjacent2;	      measure = (LWFLOAT)fabs((double)(adjacent2->mag - ext->mag));	    }	  else	    if (adjacent) {	      measure_tmp = adjacent2->mag;	      if (measure_tmp > measure) {		adjacent = adjacent2;		measure = measure_tmp;	      }	    }	    else {	      adjacent = adjacent2;	      measure = adjacent->mag;	    }	}	if (adjacent3) {	  if (uniform) 	    if (adjacent) {	      measure_tmp = (LWFLOAT)fabs((double)(adjacent3->mag - ext->mag));	      if (measure_tmp < measure) {		adjacent = adjacent3;		measure = measure_tmp;	      }	    }	    else {	      adjacent = adjacent3;	      measure = (LWFLOAT)fabs((double)(adjacent3->mag - ext->mag));	    }	  else	    if (adjacent) {	      measure_tmp = adjacent3->mag;	      if (measure_tmp > measure) {		adjacent = adjacent3;		measure = measure_tmp;	      }	    }	    else {	      adjacent = adjacent3;	      measure = adjacent3->mag;	    }	}	if (adjacent) ext->next = adjacent;	else ext->next = NULL;	      	/* among the three opposite directions, find previous */	if (ext->previous) {	  adjacent = ext->previous;	  if (uniform)  measure = (LWFLOAT)	    fabs((double)(ext->previous->mag - ext->mag));	  else measure = ext->previous->mag;	}	else adjacent = NULL;	if (dir == dir1) {	  dir1 = (dir +1)%8;	  dir2 = (dir +7)%8;	}	adjacent1 = pneighbor->neighbor[(dir+4)%8];	adjacent2 = pneighbor->neighbor[(dir1+4)%8];	adjacent3 = pneighbor->neighbor[(dir2+4)%8];	if (adjacent1) {	  if (uniform) 	    if (adjacent) {	      measure_tmp = (LWFLOAT)fabs((double)(adjacent1->mag - ext->mag));	      if (measure_tmp < measure) {		adjacent = adjacent1;		measure = measure_tmp;	      }	    }	    else {	      adjacent = adjacent1;	      measure = (LWFLOAT)fabs((double)(adjacent1->mag - ext->mag));	    }	  else	    if (adjacent) {	      measure_tmp = adjacent1->mag;	      if (measure_tmp > measure) {		adjacent = adjacent1;		measure = measure_tmp;	      }	    }	    else {	      adjacent = adjacent1;	      measure = adjacent1->mag;	    }	}	if (adjacent2) {	  if (uniform) 	    if (adjacent) {	      measure_tmp = (LWFLOAT)fabs((double)(adjacent2->mag - ext->mag));	      if (measure_tmp < measure) {		adjacent = adjacent2;		measure = measure_tmp;	      }	    }	    else {	      adjacent = adjacent2;	      measure = (LWFLOAT)fabs((double)(adjacent2->mag - ext->mag));	    }	  else	    if (adjacent) {	      measure_tmp = adjacent2->mag;	      if (measure_tmp > measure) {		adjacent = adjacent2;		measure = measure_tmp;	      }	    }	    else {	      adjacent = adjacent2;	      measure = adjacent2->mag;	    }	}	if (adjacent3) {	  if (uniform) 	    if (adjacent) {	      measure_tmp = (LWFLOAT)fabs((double)(adjacent3->mag - ext->mag));	      if (measure_tmp < measure) {		adjacent = adjacent3;		measure = measure_tmp;	      }	    }	    else {	      adjacent = adjacent3;	      measure = (LWFLOAT)fabs((double)(adjacent3->mag - ext->mag));	    }	  else	    if (adjacent) {	      measure_tmp = adjacent3->mag;	      if (measure_tmp > measure) {		adjacent = adjacent3;		measure = measure_tmp;	      }	    }	    else {	      adjacent = adjacent3;	      measure = adjacent3->mag;	    }	}	if (adjacent) ext->previous = adjacent;	else ext->previous = NULL;	if(pneighbor) {	  W2_delete_point_neighbor(pneighbor);	  pneighbor = NULL;	}	      }  /** ext->next->previous == ext **/  /** ext->previous->next == ext **/    for(i = 0,I = 0; i < nrow; i++,I += ncol)      for(j = 0; j < ncol; j++)	if(ext = values[I+j]) {	  if(neighbor = ext->next) {	    if(!neighbor->previous)	      neighbor->previous = ext;	    else if(neighbor->previous != ext)	      ext->next = NULL;	  }	  if(neighbor = ext->previous) {	    if(!neighbor->next)	      neighbor->next = ext;	    else if(neighbor->next != ext)	      ext->previous = NULL;	  }	}}/** compute chainlis from extlis at level **/static CHAINLIS2 W2_compute_chain(WTRANS2 wtrans, int level){  EXTLIS2 extlis;  EXT2 *values;  EXT2 ext;  CHAINLIS2 chainlis;  int nrow, ncol;  CHAIN2 chain;  int i, j, I;  extlis = wtrans->extrep->array[level];  chainlis = wtrans->chainrep->array[level];  values = (EXT2 *)extlis->first;  nrow= chainlis->nrow = extlis->nrow;  ncol= chainlis->ncol = extlis->ncol;  chain = NewChain2();  chainlis->first = chain;  for(i = 1,I = ncol; i < nrow - 1; i++,I += ncol)    for(j = 1; j < ncol - 1; j++) {      if(ext = values[I+j])        if(ext->chain == NULL) {	  chain->next = NewChain2();	  chain->next->previous = chain;	  chain = chain->next;          chain->first = ext;          while(ext->previous && (ext->previous->next == ext)) { 	    /* walk through previous to beginning */            if(ext->previous == chain->first ||               ext->previous->chain) {/*no previous is in a chain,no loop*/	      /* if (ext->previous->chain) {		chain->head = ext->previous;	      } */	      if (ext->previous == chain->first) ext->previous = NULL;              break;	    }            else              ext = ext->previous;          }	  /* if (!(chain->head)) chain->head = ext->previous; */	  ext->previous = NULL;	  ext->chain = chain;           ext->chain_index = chainlis->size;           chain->first = ext;          chain->size = 1;           chain->mag = ext->mag;          while(ext->next && (ext->next->previous == ext)) { 	    /* walk through next to ending */            if(ext->next == chain->first || /* no loop to the header */               ext->next->chain) { /* no next in a chain */	      if (ext->next->chain) chain->last = ext->next;              ext->next = NULL;              break;            }else 	    ext = ext->next;            ext->chain = chain;            ext->chain_index = chainlis->size;              chain->size++;            chain->mag += ext->mag;          }	  if (!(chain->last)) chain->last = ext->next;	  ext->next = NULL;	  /* a chain has completed */          chain->mag /= chain->size;            chainlis->size++;	}    }  /* chainlis is established */  chain->next = NULL;  if (chainlis->first->next)  chainlis->first= chainlis->first->next;                                else { chain->first= NULL;}  W2_collect_point_in_point_pic(extlis, chainlis);  return(chainlis);}/* compute the chainrep from wtrans from coarse to fine */void ComputeChainrep2(WTRANS2 wtrans,int uniform){  EXTREP2 extrep;  CHAINREP2 chainrep;  CHAINLIS2  chainpic;  int l;  extrep = wtrans->extrep;  chainrep = wtrans->chainrep;    for(l = extrep->noct; l >= 1; l--) {    chainpic= wtrans->chainrep->array[l];    W2_remove_point_pic_link(extrep->array[l]);    W2_point_pic_link(wtrans,l, uniform);        wtrans->chainrep->array[l] = W2_compute_chain(wtrans,l);      }  chainrep->noct = wtrans->noct;}void C_ChainCompute2(char ** argv)  {  WTRANS2 wtrans;  int uniform = YES;  argv = ParseArgv(argv,tWTRANS2_,NULL,&wtrans,0);  if (wtrans ==NULL) wtrans= GetWtrans2Cur();   W2_check_point_repr(wtrans->extrep);  if(wtrans->chainrep->noct == 0) {    wtrans->chainrep->noct = wtrans->extrep->noct;  }  else ClearChainrep2(wtrans);    ComputeChainrep2(wtrans,uniform); }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
经典三级一区二区| 欧美午夜精品电影| 欧美三级日韩三级| 精品少妇一区二区三区| 中文字幕一区二区三区不卡在线| 美女网站在线免费欧美精品| 成a人片亚洲日本久久| 日韩欧美高清在线| 亚洲一区二区三区中文字幕| 国产精品一线二线三线精华| 7799精品视频| 亚洲精品你懂的| 99久久伊人精品| 久久久国产午夜精品 | 欧美美女一区二区在线观看| 国产亚洲一本大道中文在线| 日本欧美大码aⅴ在线播放| 91女神在线视频| 国产精品―色哟哟| 国产成人在线电影| 欧美tickling网站挠脚心| 日韩制服丝袜先锋影音| 欧美日韩精品一区视频| 一区二区三区.www| 欧美亚洲国产一区在线观看网站| 中文字幕免费不卡在线| 国产成人精品三级| 久久精子c满五个校花| 国产一区二区三区四区五区美女 | 色老汉一区二区三区| 国产精品久久久久久久蜜臀| 国产成人一区在线| 欧美激情综合在线| 成人精品免费网站| 国产精品成人免费精品自在线观看| 国产999精品久久| 国产精品乱人伦| 一本久道中文字幕精品亚洲嫩 | 337p粉嫩大胆色噜噜噜噜亚洲| 日本欧美在线观看| 精品久久久久久久人人人人传媒| 麻豆免费看一区二区三区| 精品日韩欧美在线| 国产黄人亚洲片| 中文字幕一区二区三中文字幕| 久久久影院官网| 一区二区三区美女| 色综合天天综合网天天狠天天| 日韩专区一卡二卡| 亚洲欧美aⅴ...| 国产精品欧美一区喷水| 91精品国产综合久久婷婷香蕉 | 欧美性色黄大片| 成人动漫一区二区在线| 久久激情五月激情| 亚洲成人手机在线| 亚洲欧美日韩电影| 国产精品天美传媒沈樵| 精品国产sm最大网站免费看| 欧美三级资源在线| 色狠狠综合天天综合综合| av中文字幕在线不卡| 风间由美一区二区三区在线观看 | 麻豆国产精品777777在线| 亚洲精品国产成人久久av盗摄| 久久精品亚洲精品国产欧美| 欧美刺激午夜性久久久久久久| 欧美日韩五月天| 欧美亚洲丝袜传媒另类| 91黄色激情网站| 91免费版pro下载短视频| 99视频超级精品| 91丨九色丨国产丨porny| 不卡的av电影在线观看| 国产精品系列在线播放| 国产精品一卡二卡在线观看| 国产精品综合一区二区三区| 精品一区二区三区免费播放| 青青青爽久久午夜综合久久午夜| 五月天激情综合| 天堂影院一区二区| 日本在线不卡一区| 青草av.久久免费一区| 久久国产精品免费| 国产一区二区免费看| 国产黑丝在线一区二区三区| 国产91露脸合集magnet| 波多野结衣中文字幕一区| 成人av电影在线| 色94色欧美sute亚洲线路二| 在线观看视频91| 欧美群妇大交群的观看方式| 91麻豆精品国产91久久久资源速度| 在线播放日韩导航| 日韩精品一区国产麻豆| 久久久精品一品道一区| 国产精品女人毛片| 亚洲一区二区欧美日韩| 视频一区欧美精品| 理论电影国产精品| 国产91精品免费| 色综合久久综合网| 69久久夜色精品国产69蝌蚪网| 欧美v亚洲v综合ⅴ国产v| 国产欧美一区二区精品忘忧草 | 欧美亚洲禁片免费| 欧美不卡一区二区| 中文字幕第一页久久| 一区二区免费看| 狠狠色狠狠色综合日日91app| 国产aⅴ综合色| 欧美性猛片xxxx免费看久爱| 日韩女优av电影在线观看| 国产精品视频在线看| 亚洲国产精品久久艾草纯爱| 麻豆精品新av中文字幕| www.欧美日韩| 日韩欧美一级二级三级久久久| 国产精品久久久久久久久图文区| 亚洲18女电影在线观看| 国产成人免费在线| 欧美吞精做爰啪啪高潮| 久久精品网站免费观看| 亚洲一区二区三区中文字幕在线| 久久国产夜色精品鲁鲁99| 99综合电影在线视频| 日韩欧美激情一区| 亚洲精品免费在线| 国内精品伊人久久久久av一坑| 色播五月激情综合网| 亚洲精品一区二区三区在线观看| 一区二区三区在线视频播放| 国产精品综合网| 日韩欧美国产一区二区三区| 日韩美女视频19| 国产一区二区精品久久91| 欧美日韩日日夜夜| 亚洲人成网站精品片在线观看| 精品伊人久久久久7777人| 欧美日韩在线免费视频| 国产精品久久久久永久免费观看| 日本不卡一二三| 欧洲一区在线观看| 日韩一区日韩二区| 国产精品自在在线| 日韩视频国产视频| 日日骚欧美日韩| 欧美色精品在线视频| 综合网在线视频| 成人成人成人在线视频| 久久久精品国产免大香伊| 久久精品国产免费| 欧美顶级少妇做爰| 五月综合激情婷婷六月色窝| 色综合中文字幕国产 | 裸体在线国模精品偷拍| 欧美日韩国产精选| 亚洲不卡在线观看| 欧美日韩中文一区| 一区二区三区在线影院| 99精品欧美一区| 亚洲日本va在线观看| 97超碰欧美中文字幕| 国产精品福利在线播放| 成人激情小说乱人伦| 日本一区免费视频| 国产精品伊人色| 亚洲国产精品成人综合| 国产a级毛片一区| 国产精品视频一区二区三区不卡| 国内成人精品2018免费看| 精品国产三级a在线观看| 狠狠色狠狠色综合日日91app| 久久久精品免费观看| 成人黄色在线视频| 亚洲图片激情小说| 91久久免费观看| 亚洲一二三专区| 日韩西西人体444www| 久久国产人妖系列| 久久久久久久免费视频了| 成人福利视频网站| 一区二区三区加勒比av| 欧美色爱综合网| 日本一道高清亚洲日美韩| 欧美成人a在线| 成人av在线播放网站| 亚洲黄色av一区| 69堂国产成人免费视频| 国产精品一区二区在线观看网站| 国产精品美女久久久久久2018 | 国产精品国产自产拍高清av| 91小视频免费看| 天天操天天干天天综合网| 精品欧美乱码久久久久久 | 91成人免费电影| 免费人成网站在线观看欧美高清| 精品国产伦理网| 99精品国产热久久91蜜凸| 视频一区在线播放|