亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
色综合久久久久| 欧美少妇一区二区| 在线免费观看日韩欧美| 91.com在线观看| 中文字幕一区二区三| 亚洲123区在线观看| 成人aa视频在线观看| 日韩欧美国产一区二区三区 | 99国产精品国产精品久久| 777精品伊人久久久久大香线蕉| 欧美国产精品一区二区三区| 欧美96一区二区免费视频| 91黄色免费观看| 日韩美女视频一区二区| 国内成人精品2018免费看| 欧美日韩精品高清| 亚洲乱码国产乱码精品精小说 | 欧美一级黄色片| 亚洲美女淫视频| 精品一区二区三区在线播放| 欧美区在线观看| 天天av天天翘天天综合网| heyzo一本久久综合| 中文字幕av资源一区| 国产二区国产一区在线观看| 欧美精品一区二区三区久久久| 麻豆传媒一区二区三区| 欧美一区二区三区在线电影| 午夜精品久久久久久久99水蜜桃| 欧美性视频一区二区三区| 亚洲综合精品久久| 欧美少妇xxx| 亚洲成人资源在线| 欧美日韩不卡一区二区| 日韩专区欧美专区| 日韩一级二级三级| 激情国产一区二区| 国产日韩av一区| 99久久伊人久久99| 亚洲宅男天堂在线观看无病毒| 91豆麻精品91久久久久久| 亚洲午夜精品一区二区三区他趣| 欧美三级电影网| 免费看精品久久片| 久久久久国产精品麻豆ai换脸| 久久精品国产亚洲一区二区三区| 精品久久久久久久久久久久久久久久久| 美女一区二区视频| 国产欧美1区2区3区| a亚洲天堂av| 一区二区三区高清| 欧美一区二区三区日韩视频| 精品一区二区免费在线观看| 国产精品萝li| 欧美日韩在线三级| 精品一区二区三区免费观看| 中文字幕不卡在线观看| 色婷婷综合久久久中文字幕| 一卡二卡欧美日韩| 欧美变态凌虐bdsm| 97se亚洲国产综合自在线| 日本亚洲欧美天堂免费| 国产亚洲精品7777| 色嗨嗨av一区二区三区| 免费精品视频在线| 亚洲国产成人私人影院tom| 欧美色爱综合网| 国产揄拍国内精品对白| 亚洲美女在线国产| 精品剧情v国产在线观看在线| 成人激情免费视频| 天天综合网天天综合色| 国产精品天干天干在线综合| 欧美日韩电影在线播放| 国产成人亚洲综合a∨婷婷| 亚洲国产美女搞黄色| 久久久久国产一区二区三区四区 | 色综合久久久久久久久| 国产曰批免费观看久久久| 亚洲一区二区不卡免费| 久久久久久免费| 91精品在线免费观看| av在线一区二区| 国产一区在线精品| 首页国产欧美久久| 亚洲人成网站影音先锋播放| 亚洲精品一区二区三区四区高清 | 国产日韩欧美综合在线| 欧美伦理视频网站| 色婷婷国产精品| 国产一区二区三区精品欧美日韩一区二区三区 | 午夜精品久久久久久久| 亚洲蜜臀av乱码久久精品蜜桃| 国产欧美一区二区精品性色| 欧美一区欧美二区| 欧美日韩免费视频| 在线看一区二区| caoporn国产一区二区| 国产一区在线精品| 韩国毛片一区二区三区| 日本91福利区| 亚洲另类在线制服丝袜| 亚洲欧美综合色| 久久免费视频一区| 精品国产精品网麻豆系列 | 久久狠狠亚洲综合| 日韩一区在线免费观看| 欧美激情一区三区| 国产精品少妇自拍| 亚洲国产成人一区二区三区| 国产亚洲一二三区| 亚洲国产精品激情在线观看 | 日韩欧美精品在线| 精品日韩一区二区三区 | 一二三区精品视频| 一区二区三区视频在线观看| 亚洲欧美日韩一区| 亚洲欧美另类久久久精品| 亚洲欧洲日产国码二区| 综合久久久久久| 亚洲欧美日韩人成在线播放| 亚洲素人一区二区| 一区二区三区加勒比av| 亚洲综合视频在线观看| 天堂va蜜桃一区二区三区| 日本aⅴ亚洲精品中文乱码| 黄页网站大全一区二区| 国产成人免费在线视频| 色婷婷精品大视频在线蜜桃视频| 欧洲av一区二区嗯嗯嗯啊| 欧美精品久久天天躁| 精品国产一区二区三区久久久蜜月| 久久久蜜桃精品| 亚洲情趣在线观看| 免费人成精品欧美精品| 国产精品1区二区.| 色婷婷激情一区二区三区| 91精选在线观看| 国产欧美一区二区精品性色 | 亚洲国产一区二区视频| 奇米综合一区二区三区精品视频 | 免费观看91视频大全| 国产精品正在播放| 91久久精品一区二区三区| 欧美精品 日韩| 国产亚洲成aⅴ人片在线观看| 亚洲视频一区在线观看| 美脚の诱脚舐め脚责91| 成人h精品动漫一区二区三区| 欧美亚洲国产bt| 国产亚洲福利社区一区| 亚洲一区二三区| 国产精品一卡二卡在线观看| 91成人在线精品| 欧美国产精品一区| 日韩二区三区在线观看| 99热这里都是精品| 欧美成人一级视频| 亚洲一区二区美女| 国产91综合一区在线观看| 欧美日韩五月天| 亚洲欧洲精品一区二区精品久久久 | 久久成人免费电影| 欧美最猛黑人xxxxx猛交| 国产亚洲短视频| 另类欧美日韩国产在线| 色激情天天射综合网| 欧美激情一区二区三区四区| 久久精品国产澳门| 欧美日本一道本| 亚洲免费观看视频| 成人av资源站| 久久久久国产一区二区三区四区| 亚洲自拍偷拍欧美| 99热这里都是精品| 国产精品午夜春色av| 久久综合综合久久综合| 欧美日韩国产一级片| 一区二区三区欧美日韩| 成人一级黄色片| 国产亚洲一区字幕| 精品一区二区久久久| 欧美精品久久久久久久多人混战 | 91香蕉视频在线| 欧美激情一区在线观看| 韩国视频一区二区| 日韩一区二区在线观看视频 | 一本大道久久a久久综合| 国产精品久久久久久久浪潮网站| 国内一区二区视频| 日韩美女主播在线视频一区二区三区 | 国产精品网站导航| 免费在线成人网| 欧美va亚洲va香蕉在线| 蜜臀久久99精品久久久久宅男| 欧美日韩激情一区二区| 亚洲妇女屁股眼交7| 欧美伦理影视网| 热久久久久久久| 久久综合丝袜日本网|