亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
国产精品一二三区| 亚洲男人电影天堂| 极品少妇一区二区| 欧美岛国在线观看| 蜜芽一区二区三区| 日韩女同互慰一区二区| 精品制服美女丁香| 久久久久一区二区三区四区| 国产一区高清在线| 国产精品白丝在线| 在线观看区一区二| 毛片av一区二区三区| 欧美成人艳星乳罩| 高清免费成人av| 一区二区三区在线免费播放| 欧美福利电影网| 国产乱妇无码大片在线观看| 国产精品不卡在线| 欧美日韩不卡一区二区| 韩国在线一区二区| 一区二区三区中文字幕电影| 在线观看亚洲专区| 黄色日韩三级电影| 亚洲毛片av在线| 日韩一级欧美一级| 白白色 亚洲乱淫| 日韩精品亚洲一区| 欧美国产日韩亚洲一区| 91国在线观看| 狠狠色丁香九九婷婷综合五月| 亚洲手机成人高清视频| 91精品国产综合久久香蕉的特点| 国内精品免费**视频| 亚洲男女一区二区三区| 日韩女优毛片在线| 欧美午夜在线观看| 国产成人av影院| 日韩电影免费在线看| 最新日韩av在线| 精品国产乱码91久久久久久网站| 色婷婷精品久久二区二区蜜臀av | 精品久久久久久久久久久久久久久 | 欧美剧情电影在线观看完整版免费励志电影 | 国产三级久久久| 欧美精品自拍偷拍| 99这里只有精品| 极品销魂美女一区二区三区| 一区二区欧美在线观看| 久久美女艺术照精彩视频福利播放 | 亚洲永久精品大片| 国产精品每日更新| 久久久久久免费| 欧美一级理论性理论a| 91影院在线观看| 国产成人精品一区二区三区四区 | 亚洲国产精品久久久久婷婷884| 久久九九全国免费| 欧美大片在线观看| 欧美日本国产视频| 欧洲色大大久久| 91麻豆国产福利在线观看| 国产精品18久久久久| 石原莉奈一区二区三区在线观看| 亚洲欧美国产三级| 中文字幕免费观看一区| 精品国产青草久久久久福利| 3d动漫精品啪啪一区二区竹菊| 在线免费观看日本欧美| 97久久精品人人爽人人爽蜜臀| 成人影视亚洲图片在线| 国产精品一品视频| 国产乱国产乱300精品| 国产真实乱子伦精品视频| 精彩视频一区二区三区 | 久草在线在线精品观看| 天天操天天干天天综合网| 亚洲一区二区av电影| 亚洲午夜电影在线| 亚洲bdsm女犯bdsm网站| 日本午夜精品一区二区三区电影| 久久久久久亚洲综合| 日韩美女啊v在线免费观看| 日本亚洲电影天堂| 国产日韩欧美精品综合| 精品国产伦一区二区三区观看体验 | 色婷婷久久久亚洲一区二区三区| 99精品欧美一区二区三区小说 | 在线精品视频免费观看| 日本电影亚洲天堂一区| 在线精品视频一区二区三四| 欧美午夜在线一二页| 日韩欧美不卡在线观看视频| 久久久久久免费网| 国产精品国产三级国产aⅴ入口 | 欧美激情一区二区三区| 国产日韩欧美一区二区三区乱码| 中文字幕第一区二区| 一区二区三区在线免费观看| 热久久一区二区| 国产成人在线网站| 成人午夜在线播放| 在线观看一区日韩| 日韩区在线观看| 久久免费午夜影院| 国产成人午夜视频| 99re这里只有精品首页| 欧美群妇大交群中文字幕| 日韩欧美一区二区在线视频| 国产午夜亚洲精品理论片色戒| 中文字幕日韩av资源站| 亚洲福利视频导航| 激情av综合网| 色菇凉天天综合网| 精品欧美一区二区久久| 亚洲欧洲精品一区二区三区不卡| 亚洲va国产天堂va久久en| 国产一区视频导航| 色视频欧美一区二区三区| 日韩三区在线观看| 亚洲色图第一区| 蜜臀va亚洲va欧美va天堂 | 福利一区二区在线| 欧美日韩精品电影| 国产精品剧情在线亚洲| 日本vs亚洲vs韩国一区三区二区| 风间由美一区二区av101| 欧美日韩亚洲综合在线 | 最新热久久免费视频| 免费视频一区二区| 色悠久久久久综合欧美99| 精品久久久久久久久久久久包黑料| 亚洲少妇屁股交4| 久久不见久久见免费视频1| 欧洲av一区二区嗯嗯嗯啊| 国产亚洲欧洲997久久综合| 日韩专区中文字幕一区二区| 91丨porny丨在线| 欧美精品一区二区三区蜜桃视频| 亚洲免费视频中文字幕| 日韩亚洲欧美在线观看| 狠狠色伊人亚洲综合成人| av网站一区二区三区| 欧美一区二区黄| 国产精品三级电影| 日韩和欧美的一区| 色婷婷激情综合| 国产精品美女久久久久久久久久久| 久久国产人妖系列| 正在播放亚洲一区| 亚洲综合图片区| 色综合色狠狠天天综合色| 欧美韩国日本一区| 国产老妇另类xxxxx| 亚洲午夜免费电影| 欧美一区二区在线免费播放| 亚洲地区一二三色| 久久精品一区二区三区不卡 | 日本不卡1234视频| 日韩免费高清电影| av中文字幕亚洲| 亚洲日本在线观看| 欧美一区二区免费观在线| www.激情成人| 国产麻豆日韩欧美久久| 男男gaygay亚洲| 最近日韩中文字幕| 欧美激情艳妇裸体舞| 6080午夜不卡| 在线视频你懂得一区二区三区| 国产中文一区二区三区| 美女在线视频一区| 日本不卡123| 久久国产婷婷国产香蕉| 亚洲精品少妇30p| 国产精品久久久久久久第一福利 | 奇米在线7777在线精品| 中文字幕在线播放不卡一区| 色又黄又爽网站www久久| 色av综合在线| 亚洲男女一区二区三区| 色婷婷久久综合| 香蕉成人啪国产精品视频综合网 | 91成人免费在线| 亚洲综合色区另类av| 欧美精选午夜久久久乱码6080| 丝袜美腿成人在线| 欧美mv日韩mv| 成人综合婷婷国产精品久久蜜臀| 国产精品视频在线看| 中文在线免费一区三区高中清不卡| 国产日韩欧美亚洲| 秋霞电影网一区二区| 精品久久久久av影院 | 国产成人综合亚洲91猫咪| 国产精品国产三级国产| 色八戒一区二区三区| 日韩av网站免费在线| 国产欧美一区二区精品秋霞影院 | 视频一区二区欧美| 精品不卡在线视频|