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

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

?? canedge.c~

?? feret人臉圖象數據庫處理代碼
?? C~
?? 第 1 頁 / 共 2 頁
字號:
  return(hthreshold);}/*===========================================================================*//* This function takes as arguments an array to operate on, and threearrays to fill with results.  The function differentiates the sourcearray in the x and y directions (over a four element window) and stores these results in two of the destination arrays (float).The function also computes the magnitude of the gradient at each point and returns this result in the source array. NOTE: THIS MUTATES THE SOURCE ARRAY.The map of the local maximums of the gradient magnitude array is storedin the third array (character array).Note: Realize that the last row and column of the x derivative, yderivative, and magnitude arrays contain garbage. Sizes of arrays are defined in the include file gdef.h. */gradmax(img_array, xdir, ydir, edges, vert_size, horiz_size)     float **img_array;     float **xdir;     float **ydir;     char **edges;     int vert_size, horiz_size;{  register int row, col;  int x0y0, x0y1, x1y0, x1y1;  float front, back;	/* temporary storage for max check */  float mag2;    /* start gradient computation */    for(row=0; row < vert_size-1; row++) /* rt and bt edge */    for(col=0; col < horiz_size-1; col++) {            x0y1 = img_array[row][col];      x1y1 = img_array[row][(col + 1)];      x0y0 = img_array[(row + 1)][col];      x1y0 = img_array[(row + 1)][(col + 1)];            xdir[row][col]= x1y1 + x1y0 - x0y0 - x0y1;      ydir[row][col]= x0y1 + x1y1 - x0y0 - x1y0;            /*   compute magnitude and store in original */            mag2 = xdir[row][col] * xdir[row][col] +	ydir[row][col] * ydir[row][col];            img_array[row][col] = sqrt(mag2);		          }      /* Points in the gradient magnitude array are tested to see if they are     local maximums.     Definitions:        front--nearest pixel in the direction defined by the gradient        back---nearest pixel in the direction opposite that defined by               the gradient     If the gradient magnitude at a point is greater than that at the front     and greater than that at the back, it is marked as local maximum.      If the gradient does not point directly at a pixel, linear interpolation     is performed. Note: this is called 'non-maximum suppression' in the      literature. */  /* non-max suppression */  /* remember that edges of arrays are garbage */  for(row = 1; row < vert_size - 2; row++)    for(col = 1; col < horiz_size - 2; col++) {            if(xd==0 && yd==0)	edges[row][col]=0;            /* quadrants I and III */            else if ((xd >= 0 && yd >= 0) || (xd <= 0 && yd <= 0)) {		if ( fabs(yd) >= fabs(xd) ) {	  front = v3 + (xd / yd) * (v2 - v3); /* octant 2 */	  back = v7 + (xd / yd) * (v6 - v7);  /* octant 6 */	  if (V > front && V > back)	    edges[row][col] = 255; /* mark edge */	  else	    edges[row][col] = 0; /* no edge */ }		else if( fabs(yd) <= fabs(xd) ) {	  front = v1 + (yd / xd) * (v2 - v1);  /* octant 1 */	  back = v5 + (yd / xd) * (v6 - v5);   /* octant 5 */	  if (V > front && V > back)	    edges[row][col] = 255; /* mark edge */	  else	    edges[row][col] = 0; /* no edge */ }		else	  printf("Error: nms\n");      }            /* quadrants II and IV */            else if ((xd >= 0 && yd <= 0) || (xd <= 0 && yd >= 0)) {		if ( fabs(yd) >= fabs(xd) ) {	  front = v3 - (xd / yd) * (v4 - v3); /* octant 3 */	  back = v7 - (xd / yd) * (v8 - v7);  /* octant 7 */	  if (V > front && V > back)	    edges[row][col] = 255; /* mark edge */	  else	    edges[row][col] = 0; /* no edge */ }		else if( fabs(yd) <= fabs(xd) ) {	  front = v1 - (yd / xd) * (v8 - v1);  /* octant 8 */	  back = v5 - (yd / xd) * (v4 - v5);   /* octant 4 */	  if (V > front && V > back)	    edges[row][col] = 255; /* mark edge */	  else	    edges[row][col] = 0; /* no edge */ }		else 	  printf("Error: nms\n"); }            else 	printf("Error: non-maximum suppression\n");    }	    /* fill non-valid parts */    for(row = 0; row < vert_size; row++) {  /* fill columns */    edges[row][0] = 0;    edges[row][horiz_size-2] = 0;    edges[row][horiz_size-1] = 0;  }    for(col = 0; col < horiz_size; col++) {  /* fill rows */    edges[0][col] = 0;    edges[vert_size-2][col] = 0;    edges[vert_size-1][col] = 0;  }}/*===========================================================================*//* This function takes as arguments a pointer to a 2-D array of float (the horizontal dimension is defined in the include file gdef.h) anda float value representing the sigma for a gaussian filter. The functionmutates the array by convolving it with the gaussian filter. */gsmooth(img_array, sigma, vert_size, horiz_size)     float **img_array;     float sigma;     int vert_size, horiz_size; {  float gauss[MAX_GAUSS];    /* for filter coefficients */  float worksp[WORKSIZE];    /* for workspace */    register int row, col;  float scale;  int n, gwidth, i, index;  int count, wksprpt, wksplpt, wksptpt, wkspbpt;    /* determine width */  n = (int)(ceil(sqrt(-log(CUTOFF) * 2) * sigma)); /* max n */  gwidth = 2 * n + 1; 	/* gaussian width */    wksplpt= n;	  		/* left end of workspace */  wksprpt= (horiz_size -1) + n;	/* right end of workspace */  wksptpt= n;			/* top of workspace */  wkspbpt= (vert_size - 1) + n;	/* bottom of workspace */  /* calculate scale factor */    scale = 0;  		/* initialize */  for(i = -n; i <= n ; i++) {    scale += exp(-(i*i)/(2 * sigma * sigma));}  /* fill gaussian */    for(i = -n; i <= n; i++) {    index = i + n;    gauss[index] = (exp(-(i*i)/(2 * sigma * sigma)))/scale;}  /* convolve rows */    for(row=0; row < vert_size; row++) {        for(col=0; col < horiz_size; col++)      worksp[(col+n)]=img_array[row][col];        for(count=1; count<=n ; count++) {      worksp[(wksplpt-count)]=worksp[(wksplpt+count)];      worksp[(wksprpt+count)]=worksp[(wksprpt-count)]; }        for(col=0; col < horiz_size; col++)      img_array[row][col] = fconv(gauss,				  &worksp[col],gwidth); }    /* convolve columns */    for(col=0; col < horiz_size ; col++) {        for(row=0; row < vert_size; row++)      worksp[(row+n)]=img_array[row][col];        for(count=1; count<=n; count++) {      worksp[(wksptpt-count)]=worksp[(wksptpt+count)];      worksp[(wkspbpt+count)]=worksp[(wkspbpt-count)]; }    for(row=0; row < vert_size ; row++)      img_array[row][col]= fconv(gauss,					 &worksp[row],gwidth);}}/*===========================================================================*/void main(argc, argv)     int argc;     char *argv[];{  float h_threshold;  int bytes;  int vert_size, horiz_size;  float **picture, **xdirection, **ydirection, **hgrm_working_space;  char *im, **edges, **w1space, **w2space;  char infile[MAX_FILENAME_CHAR];  char line_outfile[MAX_FILENAME_CHAR];  char mag_outfile[MAX_FILENAME_CHAR];  /* This is the default for smoothing (must be > 0) */  float sigma = CANNY_SIGMA_DEF;  /* This is the default for 'growing' (must be >= 0) */  int passes = CANNY_PASSES_DEF;  /* This is the default for thresholding (must be 0 < hp < 100) */  float h_percent = CANNY_H_PERC_DEF;  /* This is the default for thresholding (must be 0 < tf < 1 */  float thr_factor = CANNY_THR_FACTOR;    parse_options(argc, argv, &sigma, &h_percent, &thr_factor, &passes,		infile, line_outfile, mag_outfile);  /* read input file */  read_image(infile, &im, &horiz_size, &vert_size, &bytes);    if (bytes != 1) {    fprintf(stderr,"Sorry, only reads char files.\n");    exit(-1); }  /* allocate memory */  picture = (float **) matrix(0, vert_size-1, 0, horiz_size-1);  xdirection = (float **) matrix(0, vert_size-1, 0, horiz_size-1);  ydirection = (float **) matrix(0, vert_size-1, 0, horiz_size-1);  hgrm_working_space = (float **) matrix(0, vert_size-1, 0, horiz_size-1);  edges = (char **) cmatrix(0, vert_size-1, 0, horiz_size-1);  w1space = (char **) cmatrix(0, vert_size-1, 0, horiz_size-1);  w2space = (char **) cmatrix(0, vert_size-1, 0, horiz_size-1);    convert_1duc_2df(im, picture, vert_size, horiz_size);	  /* gsmooth smooths an array with a gaussian filter */  gsmooth(picture, sigma, vert_size, horiz_size);  /* gradmax takes the smoothed picture and replaces it     with the gradient magnitude (a mutation). It also     returns the x and y derivatives, and it returns the      map of local maximums. */    gradmax(picture, xdirection, ydirection, edges, vert_size, horiz_size);    /* find_thres takes the x derivative and y derivative     arrays, a histogram percentile value, and an array     (as working space) to estimate the high threshold     for thresholding */    h_threshold = find_thres(xdirection, ydirection, h_percent,			   hgrm_working_space,vert_size, horiz_size);  /* threshold takes arguments: gradient magnitude array,     map of local maximums, a value for high threshold,     the number of passes for 'growing', and two arrays     for work space. It returns the final edge map in     the array of local maximums (a mutation). */    threshold(picture, edges, h_threshold, thr_factor, passes,	    w1space, w2space, vert_size, horiz_size);    /* write edge map and magnitude of gradient at edges */    convert_2dc_1dc(edges, im, vert_size, horiz_size);  write_image(line_outfile, im, horiz_size, vert_size, 1);  magedges(picture, edges, vert_size, horiz_size);  convert_2df_1duc(picture, im, vert_size, horiz_size);  write_image(mag_outfile, im, horiz_size, vert_size, 1);    /* free memory */  free_matrix(picture, 0, vert_size-1, 0, horiz_size-1);  free_matrix(xdirection, 0, vert_size-1, 0, horiz_size-1);  free_matrix(ydirection, 0, vert_size-1, 0, horiz_size-1);  free_matrix(hgrm_working_space, 0, vert_size-1, 0, horiz_size-1);  free_cmatrix(edges, 0, vert_size-1, 0, horiz_size-1);  free_cmatrix(w1space, 0, vert_size-1, 0, horiz_size-1);  free_cmatrix(w2space, 0, vert_size-1, 0, horiz_size-1);}     

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区在线不卡| 国产毛片精品国产一区二区三区| 国产成a人无v码亚洲福利| 欧美sm美女调教| 国内精品伊人久久久久av影院 | 成人avav影音| 亚洲三级理论片| 日韩一区二区三区视频在线| 久久99国产乱子伦精品免费| 国产精品午夜免费| 亚洲精品你懂的| 色哟哟欧美精品| 亚洲精品国产高清久久伦理二区| 7777精品伊人久久久大香线蕉完整版 | 亚洲精品国产精华液| 97久久超碰国产精品| 国内精品免费在线观看| 91精品欧美综合在线观看最新 | 五月天网站亚洲| 日韩视频免费直播| 欧美理论在线播放| 欧美视频一区在线| 欧美mv和日韩mv国产网站| 91精品麻豆日日躁夜夜躁| 亚洲18女电影在线观看| 国产一区激情在线| 欧美一卡二卡三卡| 久久国产精品区| 中文字幕国产精品一区二区| 91美女片黄在线| 色天使色偷偷av一区二区| 91福利在线免费观看| 色综合激情五月| 51午夜精品国产| 精品一区二区综合| 国产精品毛片大码女人 | 69堂精品视频| 日韩一区在线播放| 日本不卡1234视频| 欧美大片一区二区三区| 亚洲一区二区影院| 色综合色综合色综合色综合色综合 | 欧美成人精品二区三区99精品| 婷婷综合久久一区二区三区| 日本高清不卡aⅴ免费网站| 亚洲日本欧美天堂| 色一情一乱一乱一91av| 亚洲精品欧美专区| 成人av在线一区二区三区| 99re热视频精品| 日日夜夜免费精品视频| 日本成人在线网站| 成人午夜碰碰视频| 欧美精选午夜久久久乱码6080| 日韩一区二区三区电影| 日韩理论片网站| 国内精品伊人久久久久av一坑| 91亚洲精品久久久蜜桃网站| 91高清在线观看| 精品国产欧美一区二区| 一区二区三区中文字幕在线观看| 麻豆成人久久精品二区三区红| 成人av在线一区二区| 国产人成一区二区三区影院| 日韩精品国产精品| 欧美中文字幕一区二区三区亚洲| 久久久久久久久99精品| 极品少妇一区二区| 51精品国自产在线| 天天射综合影视| 欧美人xxxx| 日韩在线卡一卡二| 欧美一区二区三区小说| 美国毛片一区二区三区| 91精品一区二区三区久久久久久| 日日夜夜精品视频天天综合网| 欧美性受xxxx| 美日韩一区二区三区| 日韩免费在线观看| 国产91露脸合集magnet| 自拍偷拍亚洲欧美日韩| 欧美色老头old∨ideo| 图片区日韩欧美亚洲| 日韩一卡二卡三卡四卡| 麻豆精品视频在线| 欧美韩国日本综合| 欧美日韩在线播放三区四区| 日本欧美在线观看| 欧美激情在线观看视频免费| 在线一区二区视频| 久久er精品视频| 国产成人一区在线| 色94色欧美sute亚洲线路二| 天天操天天干天天综合网| 欧美—级在线免费片| 波多野结衣中文字幕一区二区三区 | 亚洲午夜成aⅴ人片| 亚洲高清在线精品| 国产高清不卡一区| 欧美性猛交xxxx乱大交退制版| 欧美乱熟臀69xxxxxx| 欧美www视频| 亚洲青青青在线视频| 日本在线播放一区二区三区| 精品亚洲aⅴ乱码一区二区三区| 国产成人小视频| 欧美日本一区二区三区四区| 国产视频一区不卡| 热久久国产精品| 欧美综合视频在线观看| 久久亚洲精华国产精华液| 亚洲一区二区不卡免费| 国产福利一区二区| 日韩欧美精品在线| 亚洲午夜精品网| 91老司机福利 在线| 久久亚洲精华国产精华液| 日韩国产欧美三级| 在线免费不卡电影| 一区二区三区欧美亚洲| 成人h动漫精品| 自拍偷拍亚洲综合| 成人av资源下载| 国产精品每日更新| 99久久久国产精品免费蜜臀| 久久一留热品黄| 国产传媒久久文化传媒| 26uuu色噜噜精品一区二区| 久久精品国产亚洲a| 欧美岛国在线观看| 国产一区久久久| 国产亚洲成aⅴ人片在线观看| 久久国产精品99久久久久久老狼| 欧美电影在线免费观看| 精品一区免费av| 国产精品三级电影| 91福利区一区二区三区| 亚洲成va人在线观看| 欧美一区二区三区小说| 国产一区二区视频在线| 日本一区二区三区高清不卡| 99久久精品国产精品久久| 夜夜精品浪潮av一区二区三区| 国产精品区一区二区三区| 男女男精品视频网| 欧美视频一区在线| 亚洲靠逼com| 成人a区在线观看| 欧美性生活一区| 成人欧美一区二区三区白人| 激情综合网最新| 成熟亚洲日本毛茸茸凸凹| 欧美成人aa大片| 国产馆精品极品| 亚洲成人免费在线| 国产欧美一区二区在线| 日本精品裸体写真集在线观看| 日韩制服丝袜先锋影音| 综合av第一页| 国产日韩在线不卡| 日韩午夜激情视频| 色噜噜狠狠一区二区三区果冻| 丝袜诱惑亚洲看片| 亚洲国产精品99久久久久久久久| 91精品国产91久久久久久一区二区| 奇米在线7777在线精品| 亚洲视频香蕉人妖| 国产精品视频九色porn| 中文字幕成人网| 日本一区二区在线不卡| 久久久久成人黄色影片| 日韩欧美一级片| 欧美大度的电影原声| 日韩久久久精品| 精品国产99国产精品| 欧美成人免费网站| 久久丝袜美腿综合| 中文无字幕一区二区三区| 久久久久久久久久电影| 欧美国产一区在线| 亚洲色图在线看| 亚洲mv大片欧洲mv大片精品| 亚洲精品视频在线观看网站| 五月天网站亚洲| 精品夜夜嗨av一区二区三区| 成人性生交大片免费看在线播放| 高清久久久久久| 欧美色综合网站| 久久午夜色播影院免费高清| 国产精品伦理在线| 天天av天天翘天天综合网色鬼国产 | 欧美精品 日韩| 精品久久久久99| 国产精品免费人成网站| 日韩在线一二三区| 不卡一区二区三区四区| 国产福利91精品一区| 韩国v欧美v日本v亚洲v| 成人午夜激情影院| 欧美老年两性高潮|