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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? canedge.c~

?? feret人臉圖象數(shù)據(jù)庫處理代碼
?? C~
?? 第 1 頁 / 共 2 頁
字號:
#include <stdio.h>#include <math.h>#include <string.h>#include "canedge.h"#include "nr.h"#include "/v/users/intille/stereo/new-stereo/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;  

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
k8久久久一区二区三区 | 亚洲乱码国产乱码精品精98午夜| 久久激五月天综合精品| 日韩一区二区三区av| 日韩av电影免费观看高清完整版| 欧美三日本三级三级在线播放| 亚洲在线成人精品| 欧美日韩国产另类不卡| 亚洲综合免费观看高清在线观看| 色综合激情五月| 午夜国产精品影院在线观看| 91精品国产入口| 黄页视频在线91| 亚洲国产成人午夜在线一区| 91色.com| 亚洲h在线观看| 久久久久久久久岛国免费| 国产成人免费高清| 亚洲日本丝袜连裤袜办公室| 欧美色电影在线| 成人午夜在线视频| 日日摸夜夜添夜夜添国产精品| 2022国产精品视频| 在线视频欧美精品| 精品中文字幕一区二区小辣椒| 中文字幕第一页久久| 欧美视频一区二区三区在线观看| 免费高清视频精品| 国产精品毛片久久久久久久| 7777精品伊人久久久大香线蕉的| 国产一区二区视频在线播放| 亚洲午夜精品一区二区三区他趣| 欧美区视频在线观看| 国产成人精品网址| 午夜精品福利视频网站| 国产精品久久久久久久浪潮网站 | 日本在线播放一区二区三区| 国产午夜精品久久久久久久 | 欧美一区二区三区啪啪| 在线这里只有精品| 粉嫩蜜臀av国产精品网站| 日本成人在线不卡视频| 一区二区免费看| 国产精品卡一卡二卡三| 国产亚洲欧美激情| 日韩精品一区二区三区蜜臀| 欧美视频在线观看一区| 在线视频欧美区| 北岛玲一区二区三区四区| 成人激情小说网站| 精品国产凹凸成av人导航| 久久成人免费电影| 国产精品主播直播| 欧美吻胸吃奶大尺度电影 | 成人免费毛片app| 国产精品影视网| 国产一区二区精品久久| 激情久久五月天| 国产一区二区三区高清播放| 国产成人啪免费观看软件| 国产麻豆精品视频| 国产精品中文字幕日韩精品 | 视频一区在线播放| 国产九九视频一区二区三区| 久草热8精品视频在线观看| 国产成人综合精品三级| 欧美亚洲尤物久久| 亚洲国产精品99久久久久久久久| 一区二区在线观看不卡| 日韩av电影免费观看高清完整版 | 99久久精品一区二区| 欧美精品丝袜久久久中文字幕| 日韩精品一区二区三区三区免费| 中文字幕在线视频一区| 麻豆久久久久久| 欧美在线观看一区| 欧美激情在线观看视频免费| 男女性色大片免费观看一区二区 | 欧美性生活一区| 玉米视频成人免费看| 精品婷婷伊人一区三区三| 亚洲图片有声小说| 国产福利视频一区二区三区| 欧美成人一区二区三区在线观看| 亚洲丝袜精品丝袜在线| 精品一区二区三区在线播放| 欧美性受xxxx| 一区二区免费视频| 日本韩国精品一区二区在线观看| 国产精品入口麻豆九色| 国产成人午夜高潮毛片| 国产喷白浆一区二区三区| 久久成人av少妇免费| 精品国产亚洲在线| 亚洲不卡av一区二区三区| 欧洲在线/亚洲| 日日摸夜夜添夜夜添国产精品| 91在线看国产| 亚洲美女免费在线| 欧美日韩一区国产| 免费高清在线视频一区·| 日韩一区二区在线免费观看| 三级亚洲高清视频| 精品国产百合女同互慰| 懂色av噜噜一区二区三区av| 久久久久九九视频| 99在线视频精品| 图片区日韩欧美亚洲| 精品对白一区国产伦| 国产成人精品免费在线| 国产精品美女久久久久aⅴ| 欧美日韩一区在线| 免费欧美在线视频| 中文字幕免费一区| 欧美性大战久久久久久久| 久久av中文字幕片| 夜夜精品浪潮av一区二区三区| 欧美精品色综合| 国产成人精品三级| 美女精品自拍一二三四| 欧美一区二区三区性视频| 99国产一区二区三精品乱码| 日韩精品欧美成人高清一区二区| 26uuu国产一区二区三区| 视频一区视频二区在线观看| 日韩一区二区高清| 不卡一卡二卡三乱码免费网站| 亚洲v中文字幕| 最近日韩中文字幕| 日韩一区二区三区视频在线观看| 成人免费av资源| 久久精品国产亚洲高清剧情介绍| 亚洲精品乱码久久久久久黑人| 久久综合狠狠综合| 欧美日本视频在线| 一本一道综合狠狠老| 国产成人99久久亚洲综合精品| 免费观看在线色综合| 婷婷综合在线观看| 亚洲男帅同性gay1069| 亚洲欧美综合在线精品| 亚洲国产精品v| 亚洲欧美偷拍三级| 亚洲精品美国一| 一区二区在线观看不卡| 亚洲国产中文字幕| 欧美xxxx在线观看| 久久久噜噜噜久噜久久综合| 久久综合五月天婷婷伊人| 日韩精品一区二区三区老鸭窝| 日韩一区二区三区免费观看| 欧美一区二区免费观在线| 欧美一区二区免费视频| 337p日本欧洲亚洲大胆精品| 日本一区二区三区高清不卡| 欧美经典一区二区| 亚洲乱码国产乱码精品精的特点| 一区二区三区在线看| 天天综合色天天综合| 欧美aⅴ一区二区三区视频| 蜜桃视频一区二区三区在线观看| 麻豆免费精品视频| yourporn久久国产精品| 欧美三级午夜理伦三级中视频| 日韩一区二区三区精品视频| 亚洲欧美另类在线| 亚洲人午夜精品天堂一二香蕉| 亚洲va欧美va人人爽| 国产99久久精品| 在线日韩一区二区| 久久精品视频网| 日韩精品成人一区二区三区| 国产露脸91国语对白| 欧美午夜不卡视频| 国产欧美日韩卡一| 奇米亚洲午夜久久精品| av欧美精品.com| 久久尤物电影视频在线观看| 亚洲妇熟xx妇色黄| 国产乱码一区二区三区| 这里是久久伊人| 亚洲最快最全在线视频| 国产成人在线观看免费网站| 日韩女优视频免费观看| 一区二区在线观看免费视频播放| 国产高清精品网站| 欧美精品tushy高清| 亚洲在线成人精品| 欧美日韩一本到| 亚洲激情自拍偷拍| 色综合视频在线观看| 国产精品久久久久久妇女6080| 国产精品18久久久久久vr| 久久久久久**毛片大全| 国产激情视频一区二区三区欧美 | 国产日韩欧美a| 黑人巨大精品欧美一区| 日韩美女天天操| 国产v综合v亚洲欧| 亚洲欧美日韩成人高清在线一区|