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

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

?? canedge.c~

?? feret人臉圖象數(shù)據(jù)庫處理代碼
?? C~
?? 第 1 頁 / 共 2 頁
字號(hào):
#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
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美激情一区二区三区在线| 国产精品影音先锋| 久久99日本精品| 成人午夜短视频| 91福利在线导航| 欧美大胆人体bbbb| 亚洲欧美在线另类| 婷婷丁香激情综合| 国产激情一区二区三区| 色菇凉天天综合网| 欧美大白屁股肥臀xxxxxx| 国产精品传媒在线| 日韩电影在线一区| 成人动漫中文字幕| 日韩欧美国产午夜精品| 亚洲色图另类专区| 精彩视频一区二区三区| 在线观看精品一区| 久久久久9999亚洲精品| 亚洲国产欧美在线人成| 国产精品亚洲а∨天堂免在线| 欧美私人免费视频| 国产精品入口麻豆原神| 日本成人在线不卡视频| 91丨porny丨最新| 精品国产91久久久久久久妲己 | 日韩高清不卡一区二区三区| 成人va在线观看| 欧美电视剧在线观看完整版| 亚洲一区二区三区视频在线| 国产精品1区2区3区| 欧美高清精品3d| 亚洲欧洲制服丝袜| 国产999精品久久久久久绿帽| 欧美放荡的少妇| 亚洲精品国产无套在线观| 国产一区二区导航在线播放| 欧美日韩视频在线第一区| 亚洲天堂2014| 高清不卡在线观看av| 欧美一区二区三区男人的天堂| 亚洲免费大片在线观看| 国产一区二区三区最好精华液| 欧美美女一区二区在线观看| 中文字幕一区二区三区在线不卡 | 欧美成人精品1314www| 亚洲一二三四区不卡| 91在线视频免费观看| 国产欧美精品一区| 国产麻豆精品视频| 精品国产欧美一区二区| 日韩激情视频网站| 欧美三级韩国三级日本一级| 最新不卡av在线| 成人久久18免费网站麻豆| 久久日一线二线三线suv| 日韩二区三区四区| 91精品在线麻豆| 亚洲成在人线在线播放| 在线免费观看一区| 自拍偷拍欧美精品| 99精品欧美一区二区三区小说| 国产精品情趣视频| 成人午夜短视频| 久久久久久一二三区| 国产日产欧美一区二区三区 | 成人永久aaa| 欧美在线综合视频| 亚洲日韩欧美一区二区在线| 国产一区二区成人久久免费影院 | 国产盗摄视频一区二区三区| 国产精品国产a| 91精品欧美一区二区三区综合在| 国精产品一区一区三区mba视频| 日韩美女啊v在线免费观看| 日韩欧美中文一区| 91蜜桃免费观看视频| 久久精品国产99国产| 亚洲欧美精品午睡沙发| 久久奇米777| 欧美日韩色综合| 97久久超碰国产精品| 国产一区二区主播在线| 日韩中文字幕一区二区三区| 国产精品久久久久久久久快鸭 | 一区二区成人在线视频| 久久网这里都是精品| 欧美日韩亚洲国产综合| 白白色 亚洲乱淫| 乱中年女人伦av一区二区| 一区二区三区在线视频观看58| 国产日产欧美一区| 精品久久久久久久久久久院品网 | 色美美综合视频| 大尺度一区二区| 蜜臀av性久久久久蜜臀aⅴ| 亚洲欧美欧美一区二区三区| 欧美激情一二三区| 2欧美一区二区三区在线观看视频| 欧美片网站yy| 欧美性大战久久久久久久蜜臀| 成人免费毛片aaaaa**| 国内偷窥港台综合视频在线播放| 日本麻豆一区二区三区视频| 午夜私人影院久久久久| 一区二区三区四区蜜桃| 一区二区三区四区激情| 樱花草国产18久久久久| 中文字幕日本不卡| 国产精品三级电影| 国产精品福利av| 最近中文字幕一区二区三区| 最新日韩av在线| 亚洲欧美电影一区二区| 亚洲色欲色欲www在线观看| 自拍偷拍国产亚洲| 亚洲精选视频在线| 亚洲主播在线观看| 天天亚洲美女在线视频| 亚洲va韩国va欧美va| 丝袜亚洲精品中文字幕一区| 亚洲 欧美综合在线网络| 婷婷中文字幕综合| 美女脱光内衣内裤视频久久网站 | 91在线视频播放地址| 99久久er热在这里只有精品66| 99久久精品国产麻豆演员表| 99久精品国产| 欧美日韩中文精品| 欧美一二三四在线| 久久人人超碰精品| 国产精品国产三级国产专播品爱网 | 国产美女在线观看一区| 国产成人精品网址| 99麻豆久久久国产精品免费优播| 色综合中文字幕国产| 91在线国内视频| 欧美日韩视频专区在线播放| 欧美tickling挠脚心丨vk| 午夜精品福利久久久| 中文字幕免费观看一区| 亚洲免费av高清| 免费观看在线综合色| 国产成人免费xxxxxxxx| 欧美性xxxxxxxx| 精品久久久久久久久久久久久久久| 久久理论电影网| 一区二区成人在线观看| 激情伊人五月天久久综合| 粗大黑人巨茎大战欧美成人| 欧美日韩视频在线第一区 | 欧美白人最猛性xxxxx69交| 国产精品妹子av| 午夜视频在线观看一区二区| 国产精品一区三区| 欧美日韩性生活| 国产精品久久久久9999吃药| 午夜精品久久一牛影视| 成人视屏免费看| 日韩三级av在线播放| 国产精品女主播av| 蜜桃视频在线观看一区| 91色视频在线| 久久免费视频一区| 日韩不卡一二三区| 99视频在线精品| 精品国产乱码久久| 香蕉加勒比综合久久| a美女胸又www黄视频久久| 欧美一区二区视频观看视频| 亚洲视频小说图片| 国产福利精品一区| 日韩精品一区二区三区中文精品| 亚洲一级片在线观看| 成人国产精品免费观看动漫| 精品三级在线看| 日韩中文欧美在线| 欧美综合欧美视频| 中文字幕日韩一区二区| 成人一区二区视频| 精品国产免费一区二区三区四区| 亚瑟在线精品视频| 91传媒视频在线播放| 亚洲欧美国产77777| 成人ar影院免费观看视频| 久久久综合视频| 麻豆精品一区二区三区| 欧美精品免费视频| 亚洲国产精品欧美一二99| 99精品欧美一区二区三区综合在线| 国产欧美日本一区二区三区| 国产真实乱对白精彩久久| 精品福利一二区| 精品在线免费视频| 日韩限制级电影在线观看| 日本v片在线高清不卡在线观看| 欧美日韩免费高清一区色橹橹| 亚洲午夜一区二区三区| 日本道在线观看一区二区| 日韩美女视频一区二区在线观看|