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

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

?? susan.cpp

?? vc下實現的sussan算子
?? CPP
?? 第 1 頁 / 共 4 頁
字號:
/* {{{ Copyright etc. *//**********************************************************************\  SUSAN Version 2l by Stephen Smith  Oxford Centre for Functional Magnetic Resonance Imaging of the Brain,  Department of Clinical Neurology, Oxford University, Oxford, UK  (Previously in Computer Vision and Image Processing Group - now  Computer Vision and Electro Optics Group - DERA Chertsey, UK)  Email:    steve@fmrib.ox.ac.uk  WWW:      http://www.fmrib.ox.ac.uk/~steve  (C) Crown Copyright (1995-1999), Defence Evaluation and Research Agency,  Farnborough, Hampshire, GU14 6TD, UK  DERA WWW site:  http://www.dera.gov.uk/  DERA Computer Vision and Electro Optics Group WWW site:  http://www.dera.gov.uk/imageprocessing/dera/group_home.html  DERA Computer Vision and Electro Optics Group point of contact:  Dr. John Savage, jtsavage@dera.gov.uk, +44 1344 633203  A UK patent has been granted: "Method for digitally processing  images to determine the position of edges and/or corners therein for  guidance of unmanned vehicle", UK Patent 2272285. Proprietor:  Secretary of State for Defence, UK. 15 January 1997  This code is issued for research purposes only and remains the  property of the UK Secretary of State for Defence. This code must  not be passed on without this header information being kept  intact. This code must not be sold.\**********************************************************************//* }}} *//* {{{ Readme First *//**********************************************************************\  SUSAN Version 2l  SUSAN = Smallest Univalue Segment Assimilating Nucleus  Email:    steve@fmrib.ox.ac.uk  WWW:      http://www.fmrib.ox.ac.uk/~steve  Related paper:  @article{Smith97,        author = "Smith, S.M. and Brady, J.M.",        title = "{SUSAN} - A New Approach to Low Level Image Processing",        journal = "Int. Journal of Computer Vision",        pages = "45--78",        volume = "23",        number = "1",        month = "May",        year = 1997}  To be registered for automatic (bug) updates of SUSAN, send an email.  Compile with:  gcc -O4 -o susan susan2l.c -lm  See following section for different machine information. Please  report any bugs (and fixes). There are a few optional changes that  can be made in the "defines" section which follows shortly.  Usage: type "susan" to get usage. Only PGM format files can be input  and output. Utilities such as the netpbm package and XV can be used  to convert to and from other formats. Any size of image can be  processed.  This code is written using an emacs folding mode, making moving  around the different sections very easy. This is why there are  various marks within comments and why comments are indented.  SUSAN QUICK:  This version of the SUSAN corner finder does not do all the  false-corner suppression and thus is faster and produced some false  positives, particularly on strong edges. However, because there are  less stages involving thresholds etc., the corners that are  correctly reported are usually more stable than those reported with  the full algorithm. Thus I recommend at least TRYING this algorithm  for applications where stability is important, e.g., tracking.  THRESHOLDS:  There are two thresholds which can be set at run-time. These are the  brightness threshold (t) and the distance threshold (d).  SPATIAL CONTROL: d  In SUSAN smoothing d controls the size of the Gaussian mask; its  default is 4.0. Increasing d gives more smoothing. In edge finding,  a fixed flat mask is used, either 37 pixels arranged in a "circle"  (default), or a 3 by 3 mask which gives finer detail. In corner  finding, only the larger 37 pixel mask is used; d is not  variable. In smoothing, the flat 3 by 3 mask can be used instead of  a larger Gaussian mask; this gives low smoothing and fast operation.  BRIGHTNESS CONTROL: t  In all three algorithms, t can be varied (default=20); this is the  main threshold to be varied. It determines the maximum difference in  greylevels between two pixels which allows them to be considered  part of the same "region" in the image. Thus it can be reduced to  give more edges or corners, i.e. to be more sensitive, and vice  versa. In smoothing, reducing t gives less smoothing, and vice  versa. Set t=10 for the test image available from the SUSAN web  page.  ITERATIONS:  With SUSAN smoothing, more smoothing can also be obtained by  iterating the algorithm several times. This has a different effect  from varying d or t.  FIXED MASKS:  37 pixel mask:    ooo       3 by 3 mask:  ooo                   ooooo                    ooo                  ooooooo                   ooo                  ooooooo                  ooooooo                   ooooo                    ooo  CORNER ATTRIBUTES dx, dy and I  (Only read this if you are interested in the C implementation or in  using corner attributes, e.g., for corner matching)  Corners reported in the corner list have attributes associated with  them as well as positions. This is useful, for example, when  attempting to match corners from one image to another, as these  attributes can often be fairly unchanged between images. The  attributes are dx, dy and I. I is the value of image brightness at  the position of the corner. In the case of susan_corners_quick, dx  and dy are the first order derivatives (differentials) of the image  brightness in the x and y directions respectively, at the position  of the corner. In the case of normal susan corner finding, dx and dy  are scaled versions of the position of the centre of gravity of the  USAN with respect to the centre pixel (nucleus).  BRIGHTNESS FUNCTION LUT IMPLEMENTATION:  (Only read this if you are interested in the C implementation)  The SUSAN brightness function is implemented as a LUT  (Look-Up-Table) for speed. The resulting pointer-based code is a  little hard to follow, so here is a brief explanation. In  setup_brightness_lut() the LUT is setup. This mallocs enough space  for *bp and then repositions the pointer to the centre of the  malloced space. The SUSAN function e^-(x^6) or e^-(x^2) is  calculated and converted to a uchar in the range 0-100, for all  possible image brightness differences (including negative  ones). Thus bp[23] is the output for a brightness difference of 23  greylevels. In the SUSAN algorithms this LUT is used as follows:  //取得圓的最初的那個點  p=in + (i-3)*x_size + j - 1;  p points to the first image pixel in the circular mask surrounding
  point (x,y).  cp=bp + in[i*x_size+j];  cp points to a position in the LUT corresponding to the brightness  of the centre pixel (x,y).  now for every pixel within the mask surrounding (x,y),  n+=*(cp-*p++);  the brightness difference function is found by moving the cp pointer  down by an amount equal to the value of the pixel pointed to by p,  thus subtracting the two brightness values and performing the  exponential function. This value is added to n, the running USAN  area.  in SUSAN smoothing, the variable height mask is implemented by  multiplying the above by the moving mask pointer, reset for each new  centre pixel.  tmp = *dpt++ * *(cp-brightness);\**********************************************************************//* }}} *//* {{{ Machine Information *//**********************************************************************\  Success has been reported with the following:  MACHINE  OS         COMPILER  Sun      4.1.4      bundled C, gcc  Next  SGI      IRIX       SGI cc  DEC      Unix V3.2+   IBM RISC AIX        gcc  PC                  Borland 5.0  PC       Linux      gcc-2.6.3  PC       Win32      Visual C++ 4.0 (Console Application)  PC       Win95      Visual C++ 5.0 (Console Application)                      Thanks to Niu Yongsheng <niuysbit@163.net>:                      Use the FOPENB option below  PC       DOS        djgpp gnu C                      Thanks to Mark Pettovello <mpettove@umdsun2.umd.umich.edu>:                      Use the FOPENB option below  HP       HP-UX      bundled cc                      Thanks to Brian Dixon <briand@hpcvsgen.cv.hp.com>:                      in ksh:                      export CCOPTS="-Aa -D_HPUX_SOURCE | -lM"                      cc -O3 -o susan susan2l.c\**********************************************************************//* }}} *//* {{{ History *//**********************************************************************\  SUSAN Version 2l, 12/2/99  Changed GNUDOS option to FOPENB.  (Thanks to Niu Yongsheng <niuysbit@163.net>.)  Took out redundant "sq=sq/2;".  SUSAN Version 2k, 19/8/98:  In corner finding:  Changed if(yy<sq) {...} else if(xx<sq) {...} to          if(yy<xx) {...} else {...}  (Thanks to adq@cim.mcgill.edu - Alain Domercq.)
  SUSAN Version 2j, 22/10/97:  Fixed (mask_size>x_size) etc. tests in smoothing.  Added a couple of free() calls for cgx and cgy.  (Thanks to geoffb@ucs.ed.ac.uk - Geoff Browitt.)  SUSAN Version 2i, 21/7/97:  Added information about corner attributes.  SUSAN Version 2h, 16/12/96:  Added principle (initial enhancement) option.  SUSAN Version 2g, 2/7/96:  Minor superficial changes to code.  SUSAN Version 2f, 16/1/96:  Added GNUDOS option (now called FOPENB; see options below).  SUSAN Version 2e, 9/1/96:  Added -b option.  Fixed 1 pixel horizontal offset error for drawing edges.  SUSAN Version 2d, 27/11/95:  Fixed loading of certain PGM files in get_image (again!)  SUSAN Version 2c, 22/11/95:  Fixed loading of certain PGM files in get_image.  (Thanks to qu@San-Jose.ate.slb.com - Gongyuan Qu.)  SUSAN Version 2b, 9/11/95:  removed "z==" error in edges routines.  SUSAN Version 2a, 6/11/95:  Removed a few unnecessary variable declarations.  Added different machine information.  Changed "header" in get_image to char.  SUSAN Version 2, 1/11/95: first combined version able to take any  image sizes.  SUSAN "Versions 1", circa 1992: the various SUSAN algorithms were  developed during my doctorate within different programs and for  fixed image sizes. The algorithms themselves are virtually unaltered  between "versions 1" and the combined program, version 2.\**********************************************************************//* }}} *//* {{{ defines, includes and typedefs *//* ********** Optional settings */#ifndef PPCtypedef int        TOTAL_TYPE; /* this is faster for "int" but should be "float" for large d masks */#elsetypedef float      TOTAL_TYPE; /* for my PowerPC accelerator only */#endif/*#define FOPENB*/           /* uncomment if using djgpp gnu C for DOS or certain Win95 compilers */#define SEVEN_SUPP           /* size for non-max corner suppression; SEVEN_SUPP or FIVE_SUPP */#define MAX_CORNERS   15000  /* max corners per frame *//* ********** Leave the rest - but you may need to remove one or both of sys/file.h and malloc.h lines */#include <stdlib.h>#include <stdio.h>#include <string.h>#include <math.h>//#include <sys/file.h>    /* may want to remove this line */#include <malloc.h>      /* may want to remove this line */#define  exit_error(IFB,IFC) { fprintf(stderr,IFB,IFC); exit(0); }#define  FTOI(a) ( (a) < 0 ? ((int)(a-0.5)) : ((int)(a+0.5)) )typedef  unsigned char uchar;typedef  struct {int x,y,info, dx, dy, I;} CORNER_LIST[MAX_CORNERS];/* }}} *//* {{{ usage() */usage(){  printf("Usage: susan <in.pgm> <out.pgm> [options]\n\n");  printf("-s : Smoothing mode (default)\n");  printf("-e : Edges mode\n");  printf("-c : Corners mode\n\n");  printf("See source code for more information about setting the thresholds\n");  printf("-t <thresh> : Brightness threshold, all modes (default=20)\n");  printf("-d <thresh> : Distance threshold, smoothing mode, (default=4) (use next option instead for flat 3x3 mask)\n");  printf("-3 : Use flat 3x3 mask, edges or smoothing mode\n");  printf("-n : No post-processing on the binary edge map (runs much faster); edges mode\n");  printf("-q : Use faster (and usually stabler) corner mode; edge-like corner suppression not carried out; corners mode\n");  printf("-b : Mark corners/edges with single black points instead of black with white border; corners or edges mode\n");  printf("-p : Output initial enhancement image only; corners or edges mode (default is edges mode)\n");  printf("\nSUSAN Version 2l (C) 1995-1997 Stephen Smith, DRA UK. steve@fmrib.ox.ac.uk\n");  exit(0);}/* }}} *//* {{{ get_image(filename,in,x_size,y_size) *//* {{{ int getint(fp) derived from XV */int getint(fd)  FILE *fd;{  int c, i;  char dummy[10000];  c = getc(fd);  while (1) /* find next integer */  {    if (c=='#')    /* if we're at a comment, read to end of line */      fgets(dummy,9000,fd);    if (c==EOF)      exit_error("Image %s not binary PGM.\n","is");    //找到數據開始所在的地方
	if (c>='0' && c<='9')      break;   /* found what we were looking for */    c = getc(fd);  }  /* we're at the start of a number, continue until we hit a non-number */  //取得文件的大小,灰度為多少,例子文件是256*256*255
  i = 0;  while (1) {    i = (i*10) + (c - '0');    c = getc(fd);    if (c==EOF) return (i);    if (c<'0' || c>'9') break;  }  return (i);}/* }}} */void get_image(filename,in,x_size,y_size)  char           filename[200];  unsigned char  **in;  int            *x_size, *y_size;{FILE  *fd;char header [100];int  tmp;//打開指定的文件
#ifdef FOPENB  if ((fd=fopen(filename,"rb")) == NULL)#else  if ((fd=fopen(filename,"r")) == NULL)#endif    exit_error("Can't input image %s.\n",filename);  /* {{{ read header */  header[0]=fgetc(fd);  header[1]=fgetc(fd);  if(!(header[0]=='P' && header[1]=='5'))    exit_error("Image %s does not have binary PGM header.\n",filename);  //取得圖像的大小256*256,灰度為255
  *x_size = getint(fd);  *y_size = getint(fd);  tmp = getint(fd);/* }}} */  //讀取圖像數據
  *in = (uchar *) malloc(*x_size * *y_size);  if (fread(*in,1,*x_size * *y_size,fd) == 0)    exit_error("Image %s is wrong size.\n",filename);  fclose(fd);}/* }}} *//* {{{ put_image(filename,in,x_size,y_size) */put_image(filename,in,x_size,y_size)  char filename [100],       *in;  int  x_size,       y_size;{FILE  *fd;#ifdef FOPENB  if ((fd=fopen(filename,"wb")) == NULL) #else  if ((fd=fopen(filename,"w")) == NULL) #endif    exit_error("Can't output image%s.\n",filename);  fprintf(fd,"P5\n");  fprintf(fd,"%d %d\n",x_size,y_size);  fprintf(fd,"255\n");    if (fwrite(in,x_size*y_size,1,fd) != 1)    exit_error("Can't write image %s.\n",filename);  fclose(fd);}/* }}} *//* {{{ int_to_uchar(r,in,size) */int_to_uchar(r,in,size)  uchar *in;  int   *r, size;{int i,    max_r=r[0],    min_r=r[0];  for (i=0; i<size; i++)    {      if ( r[i] > max_r )        max_r=r[i];      if ( r[i] < min_r )        min_r=r[i];    }  /*printf("min=%d max=%d\n",min_r,max_r);*/  max_r-=min_r;  for (i=0; i<size; i++)    in[i] = (uchar)((int)((int)(r[i]-min_r)*255)/max_r);}/* }}} *//* {{{ setup_brightness_lut(bp,thresh,form) */void setup_brightness_lut(bp,thresh,form)  uchar **bp;  int   thresh, form;{int   k;float temp;  *bp=(unsigned char *)malloc(516);  *bp=*bp+258;  for(k=-256;k<257;k++)  {    temp=((float)k)/((float)thresh);    temp=temp*temp;    if (form==6)      temp=temp*temp*temp;    temp=100.0*exp(-temp);    *(*bp+k)= (uchar)temp;  }}/* }}} *//* {{{ susan principle *//* {{{ susan_principle(in,r,bp,max_no,x_size,y_size) */susan_principle(in,r,bp,max_no,x_size,y_size)  uchar *in, *bp;  int   *r, max_no, x_size, y_size;{int   i, j, n;uchar *p,*cp;  memset (r,0,x_size * y_size * sizeof(int));  for (i=3;i<y_size-3;i++)    for (j=3;j<x_size-3;j++)    {      n=100;      p=in + (i-3)*x_size + j - 1;      cp=bp + in[i*x_size+j];      n+=*(cp-*p++);      n+=*(cp-*p++);      n+=*(cp-*p);      p+=x_size-3;       n+=*(cp-*p++);      n+=*(cp-*p++);      n+=*(cp-*p++);      n+=*(cp-*p++);      n+=*(cp-*p);      p+=x_size-5;      n+=*(cp-*p++);      n+=*(cp-*p++);      n+=*(cp-*p++);      n+=*(cp-*p++);      n+=*(cp-*p++);      n+=*(cp-*p++);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品国产999大香线蕉| 免费人成网站在线观看欧美高清| 一区2区3区在线看| 日韩激情视频在线观看| 成人白浆超碰人人人人| 6080yy午夜一二三区久久| 中文字幕第一区综合| 亚洲电影你懂得| 99久久精品国产导航| 欧美va在线播放| 午夜精品国产更新| 色先锋资源久久综合| 久久久精品欧美丰满| 天天亚洲美女在线视频| 91亚洲大成网污www| 2021中文字幕一区亚洲| 天堂午夜影视日韩欧美一区二区| av不卡在线观看| 国产日韩影视精品| 久久精品免费观看| 日韩亚洲欧美成人一区| 亚洲永久精品国产| 99精品视频一区| 国产精品久久久久久久久图文区| 久久99精品国产麻豆婷婷| 欧美另类变人与禽xxxxx| 一区二区激情小说| 在线视频你懂得一区| 中文字幕一区二区三区在线观看 | 91在线免费视频观看| 亚洲精品在线免费观看视频| 男人的天堂久久精品| 7777精品伊人久久久大香线蕉超级流畅 | 国产精品免费看片| 激情成人综合网| 久久综合久久久久88| 美女www一区二区| 2024国产精品视频| 国产成人精品亚洲日本在线桃色| 久久精品视频一区二区三区| 国产经典欧美精品| 国产精品午夜春色av| www.久久久久久久久| 日韩理论片中文av| 一本色道**综合亚洲精品蜜桃冫| 亚洲乱码国产乱码精品精小说| 91首页免费视频| 夜夜夜精品看看| 欧美一级黄色片| 国产一区在线观看麻豆| 国产欧美一区二区精品婷婷| 99久久精品一区二区| 亚洲最新视频在线播放| 欧美精品123区| 国产精品一二三四五| 中文字幕一区二区三| 色哟哟一区二区| 日日夜夜精品免费视频| 26uuu久久综合| 99国产精品久久久久| 亚洲国产你懂的| 精品国产91亚洲一区二区三区婷婷| 国内精品视频一区二区三区八戒| 国产精品电影一区二区三区| 欧美日韩成人激情| 九九在线精品视频| 成人欧美一区二区三区白人| 欧美伦理视频网站| 国产精品1024久久| 天天操天天干天天综合网| 久久久99久久| 欧美日韩美女一区二区| 黑人精品欧美一区二区蜜桃| 亚洲情趣在线观看| 日韩一区二区三区四区五区六区 | 欧美男男青年gay1069videost| 精品一区二区在线观看| 亚洲欧美在线另类| 欧美一区二区免费视频| 北条麻妃国产九九精品视频| 日本不卡一区二区三区高清视频| 亚洲国产精品成人综合| 欧美精品aⅴ在线视频| 99天天综合性| 国产一区二区调教| 樱桃国产成人精品视频| 国产日韩欧美精品在线| 欧美日韩www| 一本色道久久综合亚洲91| 国产麻豆视频一区| 天堂蜜桃一区二区三区| 综合激情成人伊人| 久久久五月婷婷| 69av一区二区三区| 色94色欧美sute亚洲线路二| 高清在线观看日韩| 日韩专区一卡二卡| 一区二区三区在线不卡| 日本一区二区三区电影| 精品成人免费观看| 欧美高清视频不卡网| 色婷婷综合久色| www.久久久久久久久| 国产超碰在线一区| 激情文学综合丁香| 青青草成人在线观看| 亚洲一区二区免费视频| 亚洲欧美视频在线观看视频| 国产精品久久久久久妇女6080 | 岛国精品一区二区| 激情综合色丁香一区二区| 裸体健美xxxx欧美裸体表演| 日韩高清不卡在线| 亚洲国产裸拍裸体视频在线观看乱了 | 亚洲一区二区三区中文字幕在线| 亚洲欧洲国产专区| 欧美高清在线一区| 国产欧美精品一区| 国产精品欧美综合在线| 国产精品全国免费观看高清 | 日本乱人伦aⅴ精品| 波多野结衣亚洲一区| 成人免费毛片a| 97久久久精品综合88久久| www.欧美亚洲| 色综合久久久网| 欧美色涩在线第一页| 欧美美女激情18p| 欧美白人最猛性xxxxx69交| 欧美大片拔萝卜| 国产偷v国产偷v亚洲高清| 国产欧美一区二区精品性| 亚洲国产精华液网站w| 亚洲欧洲av色图| 午夜精品久久久久久| 美女尤物国产一区| 国产不卡视频一区二区三区| 91在线视频官网| 欧美色网站导航| 精品国产污网站| 亚洲视频狠狠干| 午夜精品久久久久久久久| 久久精品国产亚洲高清剧情介绍 | 国产不卡视频一区二区三区| 99这里都是精品| 欧美日韩国产免费一区二区| 日韩一区二区三区av| 久久久国产午夜精品| 亚洲欧美激情插| 久久国产精品色| 不卡视频在线看| 91麻豆精品国产| 欧美国产综合一区二区| 一级日本不卡的影视| 另类欧美日韩国产在线| 成人免费毛片a| 6080日韩午夜伦伦午夜伦| 国产欧美日本一区视频| 亚洲福利一区二区| 国产乱码精品一区二区三| 在线欧美一区二区| 久久亚洲二区三区| 亚洲乱码中文字幕综合| 九九热在线视频观看这里只有精品| 成人v精品蜜桃久久一区| 欧美日韩一区成人| 国产欧美精品一区aⅴ影院 | 欧美大片在线观看一区二区| 国产精品丝袜91| 久久97超碰国产精品超碰| 色激情天天射综合网| 久久久噜噜噜久久人人看 | 国产精品毛片久久久久久久| 婷婷丁香激情综合| 成av人片一区二区| 久久午夜免费电影| 婷婷激情综合网| 色婷婷国产精品久久包臀| 久久亚洲一级片| 日本成人在线一区| 欧美三级电影网| 亚洲精品中文在线影院| 国产盗摄一区二区| 日韩午夜激情免费电影| 亚洲一区二区三区在线看| 99久久精品99国产精品| 精品国产第一区二区三区观看体验| 午夜精品久久久久久久久久| 91国产免费看| 国产精品久久777777| 国产精品99久久久久| 精品美女在线观看| 日本欧美久久久久免费播放网| 欧洲一区二区av| 亚洲精品五月天| 在线看国产一区| 一区二区三区中文字幕电影| 91在线视频免费观看| 综合久久久久综合| 97成人超碰视|