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

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

?? canedge.c

?? feret人臉圖象數據庫處理代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
#include <stdio.h>#include <math.h>#include <string.h>#include "canedge.h"#include "nr.h"#include "dat.c"extern int optind;extern char *optarg;#define OPTIONS "s:h:l:i:"/*===========================================================================*/void print_documentation(s, h, l, i)     float s, h, l;     int i;{  char *message = "\Canedge is a simplified version of an edge detector developed by \\nJohn Canny at MIT's Artificial Intelligence laboratory. The detector\\nfirst smooths an image using a gaussian shaped low pass filter. \\nThen the gradient magnitude of the smoothed image is non-maximum\\nsuppressed in the direction of the gradient.  These maxima are then\\nthresholded at a high threshold, and again at a low threshold (which\\nis some fraction of the high threshold).  Every maxima above the\\nhigh threshold is an edge.  The next step is called edge 'growing'.\\nEvery point above the low threshold (but not above the high threshold)\\nis marked as an edge if it is next to a point above the high threshold.\\nThis process is repeated several times and thus, the edges are\\n'grown'.\n";  printf("\nusage: canedge [-s float] [-h float] [-l float] [-i int] in_im line_im mag_im\n\n");  printf("-s float : smoothing sigma\n");  printf("           Default: %f\n",s);  printf("-h float : high threshold\n");  printf("           Default: %f\n",h);  printf("-l float : low threshold\n");  printf("           Default: %f\n",l);  printf("-i int   : growing iterations\n");  printf("           Default: %d\n",i);    printf("\n%s\n",message);}/*===========================================================================*/void parse_options(argc, argv, s, h, l, i, infile, line_outfile, mag_outfile)     int argc, *i;     char *argv[], *infile, *line_outfile, *mag_outfile;     float *s, *h, *l;{  int errflag = 0;  int fileloc = 0;  char c; while ((c = getopt(argc, argv, OPTIONS)) != EOF)   switch (c) {   case 's':      *s = atof(optarg);      fileloc += 2;      break;    case 'l':      *l = atof(optarg);      fileloc += 2;      break;    case 'i':      *i = atoi(optarg);      fileloc += 2;      break;    case '?':      errflag = 1;      break;    }  if (argc != fileloc + 4) {    print_documentation(*s, *h, *l, *i);    exit(-1); }    fprintf(stderr,"%d s %s \n", fileloc, argv[fileloc+1]);  strcpy(infile, argv[fileloc+1]);  strcpy(line_outfile, argv[fileloc+2]);  strcpy(mag_outfile, argv[fileloc+3]);}/*===========================================================================*//* These functions are part of my first version of a float gaussian   smoother.  The include file sizes.h contains size information. */float convert(i)     char i;{  if (i>=0) return (float)i;  else return((float)(i+256));}float fconv(x,y,n)     register float *x, *y;     register int n;{  float sum=0;    if (n>0) {    do {      sum+= *x++ * *y;      y++;    } while (--n>0);  }  return(sum);}/* This function takes a pointer to a float array as argument and   scales the array to be less than 255 */scaler(f_array, vert_size, horiz_size)     float **f_array;     int vert_size, horiz_size;{  float scale, max=0;  register row, col;    for(row=0; row < vert_size; row++)    for(col=0; col < horiz_size; col++) {      /*	printf("%e\n",f_array[row][col]);  */      if (f_array[row][col] > max)	max = f_array[row][col];    }    scale = max / 255.0;  if (scale == 0) {    fprintf(stderr, "Div by zero\n");    exit(1); }    for(row=0; row < vert_size; row++)    for(col=0; col < horiz_size; col++)       f_array[row][col] /= scale;}magedges(imgarray, edgearray, vert_size, horiz_size)     float **imgarray;     char **edgearray;     int vert_size, horiz_size;{  register int row, col;    for(row = 0; row < vert_size; row++)    for(col = 0; col < horiz_size; col++)      if (edgearray[row][col] == 0)	imgarray[row][col] = 0;    scaler(imgarray, vert_size, horiz_size);    /* scale to 255 */}/*===========================================================================*//* Arguments: gradient magnitude array (float), map of local maximums   (char), value for high threshold (float), number of passes for   'growing', and two arrays for workspace.    The function first creates an array of points above the low threshold    (thresfactor times the high threshold).   Then the map of local maximums is run through the high threshold -THIS   IS A MUTATION. Next, for every point above the high threshold, the   eight nearest neighbors are checked to see if they are above the low   threshold. If so, they are marked (and the edge array is mutated again).   Thus, the edges are 'grown'. The number of passes defines how many   times this growing routine is run. */threshold(mag, edges, hthreshold, thresfactor, passes, low, wk_space,	  vert_size, horiz_size)     float **mag;     char **edges;     float hthreshold;     float thresfactor;     int passes;     char **low;     char **wk_space;     int vert_size, horiz_size;{  register int row, col;  float lthreshold;  int n;    lthreshold = hthreshold * thresfactor;    /* create an array of points above low threshold */    for(row = 0; row < vert_size; row++)    for(col = 0; col < horiz_size; col++) {            if ((edges[row][col]) && (mag[row][col] > lthreshold)) 	low[row][col] = 255; /* edges[row][col] */      /* indicates local maximum   */	      else 	low[row][col] = 0;    }	    /* now I must create an array of pts above the high threshold */  /* do this by changing edges */  for(row = 0; row < vert_size; row++)    for(col = 0; col < horiz_size; col++) {            if ((edges[row][col]) && (mag[row][col] > hthreshold))	edges[row][col] = 255;            else	edges[row][col] = 0;    }    /* now I have low and high pts */  for(n=0; n < passes; n++)     grow(edges, low, wk_space, vert_size, horiz_size);}grow(r_array, chk_array, w_array, vert_size, horiz_size)     char **r_array;     char **chk_array;     char **w_array;     int vert_size, horiz_size;{  register int row, col, i, j;    /* copy edge array of high points to workspace */    for(row=0; row < vert_size; row++)    for(col=0; col < horiz_size; col++)      w_array[row][col] = r_array[row][col];    /* now to add more points appropriately */    for(row=1; row < vert_size - 1; row++)    for(col=1; col < horiz_size - 1; col++)             if(w_array[row][col])  /** if high point **/		for(i = -1; i <= 1; i++)	  for(j = -1; j <= 1; j++)	    	    r_array[(row + i)][(col + j)] =	      chk_array[(row + i)][(col + j)];	}/*===========================================================================*//* This function takes as arguments: x and y derivative arrays (float),   histogram percentile, and a work space array (float). The function returns   an estimate of the maximum noise level in the picture.*/float find_thres(xdir, ydir, percentile, h_val, vert_size, horiz_size)     float **xdir;     float **ydir;     float percentile;     float **h_val;     int vert_size, horiz_size;{  int histogram[HISTOGRAM_SIZE];  float x2dx, y2dy, division_size, hthreshold, max;  int bucket, sumpts, total_points, ppt;  register int row, col;    /* initialize histogram */  for(bucket = 0; bucket < HISTOGRAM_SIZE; bucket++)    histogram[bucket] = 0;    /* run 2nd derivative operator in x and y directions */  /* also note the maximum value */  /* remember that the edges are garbage */  for(row = 1, max = 0; row < vert_size - 2; row ++)    for(col = 1; col < horiz_size - 2; col++) {      x2dx = xdir[row][col] * (-2) + xdir[row][(col - 1)]	+ xdir[row][(col + 1)];      y2dy = ydir[row][col] * (-2) + ydir[(row - 1)][col]	+ ydir[(row + 1)][col];            /* square 2nd derivate and store in work space */            h_val[row][col] = x2dx * x2dx + y2dy * y2dy;            if(h_val[row][col] > max)	max = h_val[row][col];    }    /* fill buckets */  for(row = 1; row < vert_size - 2 ; row++)    for(col = 1; col < horiz_size - 2 ; col++) {            if(h_val[row][col] == max)	bucket = HISTOGRAM_SIZE - 1;      else	bucket = (int)(floor((h_val[row][col] / max) *			     HISTOGRAM_SIZE));      (histogram[bucket])++;    }    total_points = (horiz_size - 3) * (vert_size - 3);    division_size = max / HISTOGRAM_SIZE;    ppt = (percentile / 100) * total_points; /* percent to pts  */    for(bucket = 0, sumpts = 0; sumpts < ppt; bucket++)    sumpts += histogram[bucket];    /* calculate the value at percentile and take sqrt */    hthreshold = ((bucket + bucket - 1) / 2) * division_size;    hthreshold = sqrt(hthreshold) * MAGIC_SCALE_FACTOR;  

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产日韩av一区| 久久aⅴ国产欧美74aaa| 日本欧美一区二区三区乱码| 亚洲视频1区2区| 亚洲黄一区二区三区| 亚洲美女淫视频| 亚洲色图色小说| 亚洲一区二区三区免费视频| 久久成人羞羞网站| 精品国产123| 日本一区二区综合亚洲| 国产精品久久久久久久久免费樱桃 | 亚洲国产高清在线| 中文字幕av资源一区| 亚洲国产精品激情在线观看| 国产精品国产三级国产三级人妇| 亚洲少妇30p| 午夜亚洲福利老司机| 奇米精品一区二区三区四区| 麻豆国产一区二区| 成人网在线播放| 在线免费观看日本一区| 日韩欧美一区电影| 国产亚洲制服色| 91麻豆产精品久久久久久| 91国在线观看| 久久这里都是精品| 亚洲三级在线免费观看| 麻豆传媒一区二区三区| 国产91综合网| 7777精品伊人久久久大香线蕉的 | 欧美撒尿777hd撒尿| 欧美一区二区成人6969| 中文字幕av资源一区| 亚洲大片精品永久免费| 国产一区二区不卡| 成a人片亚洲日本久久| 蜜臀av性久久久久av蜜臀妖精| 成人精品在线视频观看| 欧美老肥妇做.爰bbww视频| 国产日韩欧美精品在线| 视频在线观看91| av不卡在线播放| 久久综合久久久久88| 亚洲高清不卡在线观看| www.久久久久久久久| 欧美岛国在线观看| 五月婷婷欧美视频| 91丝袜高跟美女视频| 久久免费午夜影院| 青青草精品视频| 欧美色国产精品| 成人免费视频播放| 久久久综合精品| 久久激情五月婷婷| 欧美精品九九99久久| 一区二区三区在线影院| 成人高清视频在线| 国产女主播一区| 国产乱子轮精品视频| 国产精品自产自拍| 精品久久一二三区| 国产精品1024久久| 欧美一级高清片在线观看| 亚洲成国产人片在线观看| 不卡视频在线观看| 欧美激情在线观看视频免费| 国内精品伊人久久久久影院对白| 51精品国自产在线| 午夜久久电影网| 欧美自拍偷拍午夜视频| 樱桃视频在线观看一区| 色综合天天综合网天天看片| 亚洲色图制服诱惑| 91电影在线观看| 亚洲va欧美va人人爽| 欧美日韩二区三区| 免费观看久久久4p| 精品成人一区二区三区| 精品一区二区三区免费观看| 精品国产乱码久久久久久浪潮| 国产在线精品一区二区| 亚洲精品一区二区三区在线观看 | 韩国成人在线视频| 久久人人爽人人爽| 成人app网站| 一区二区三区在线播| 久久这里只有精品首页| 亚洲天堂久久久久久久| 色综合久久综合网| 五月婷婷综合网| 精品99久久久久久| 波多野结衣中文字幕一区二区三区| 中文字幕av资源一区| 色88888久久久久久影院按摩| 日韩不卡在线观看日韩不卡视频| 麻豆国产欧美日韩综合精品二区| 久久亚洲一区二区三区四区| 从欧美一区二区三区| 亚洲精品国产无天堂网2021| 欧美日韩综合不卡| 国产在线一区观看| √…a在线天堂一区| 欧美日韩国产片| 国产成人福利片| 亚洲午夜电影网| 久久精品亚洲国产奇米99| 欧美亚洲日本国产| 国产成人精品在线看| 亚洲午夜羞羞片| 亚洲国产精品高清| 欧美丰满少妇xxxbbb| 成熟亚洲日本毛茸茸凸凹| 五月婷婷激情综合网| 精品一区二区免费视频| 亚洲激情一二三区| 久久久久一区二区三区四区| 日本电影欧美片| 国产精品一区二区黑丝| 午夜精品福利一区二区三区蜜桃| 久久久久久电影| 欧美一级久久久| 6080午夜不卡| 免费人成精品欧美精品| 亚洲天堂久久久久久久| 久久久精品国产免大香伊| 欧美日韩国产乱码电影| 91美女片黄在线观看91美女| 极品少妇xxxx偷拍精品少妇| 午夜久久久久久久久久一区二区| 亚洲人快播电影网| 中文字幕免费在线观看视频一区| 国产一区二区三区不卡在线观看| 亚洲国产精品自拍| 亚洲色图一区二区三区| 亚洲国产成人在线| 久久免费精品国产久精品久久久久| 欧美浪妇xxxx高跟鞋交| 欧美在线观看18| 91免费国产在线观看| 成人白浆超碰人人人人| 韩国女主播成人在线| 黄色资源网久久资源365| 91美女片黄在线观看91美女| 国产精品一区二区无线| 蜜桃传媒麻豆第一区在线观看| 91福利视频网站| 91豆麻精品91久久久久久| 色av综合在线| 午夜a成v人精品| 亚洲成av人片一区二区三区| 亚洲九九爱视频| 悠悠色在线精品| 亚洲激情成人在线| 石原莉奈在线亚洲三区| 国产日韩欧美精品一区| 国产欧美精品一区二区色综合朱莉| 日韩电影一二三区| 日本aⅴ精品一区二区三区| 免费av成人在线| 麻豆一区二区三区| 国产精品一区二区黑丝| 成人理论电影网| 91国偷自产一区二区三区观看 | 国产一区二区在线观看免费| 免播放器亚洲一区| 国产麻豆成人传媒免费观看| 国产成人综合在线观看| 99精品欧美一区| 欧美特级限制片免费在线观看| 欧美日韩国产高清一区二区| 日韩一卡二卡三卡四卡| 久久精品免视看| 亚洲欧美国产三级| 欧美亚洲一区三区| 欧美成人a∨高清免费观看| 国产亚洲短视频| 亚洲精品精品亚洲| 青青草成人在线观看| 国产成人综合在线播放| 欧美在线高清视频| 久久久久久电影| 亚洲一区二区三区四区在线免费观看| 精品嫩草影院久久| 欧美一区二区三区爱爱| 久久久不卡影院| 亚洲一区二区三区四区在线| 国产一区二区三区久久久 | 日韩va亚洲va欧美va久久| 韩国女主播成人在线观看| 一本久久a久久精品亚洲| 91精品国产综合久久婷婷香蕉 | 欧美福利一区二区| 亚洲国产精品t66y| 美女国产一区二区三区| 色婷婷国产精品久久包臀| 精品国产第一区二区三区观看体验 | 2020日本不卡一区二区视频| 亚洲三级小视频| 国产一区在线观看视频|