⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 multichr.c

📁 NIST Handwriting OCR Testbed
💻 C
字号:
/*# proc: detect_multi_char_blob - determines if the blob passed contains multiple# proc:              characters based on a simple 2D-linear discrimination function.# proc: detect_multi_alpha_blob - determines if the blob passed contains multiple# proc:    alphabetic characters based on a simple 2D-linear discrimination function.*/#include <blobls.h>#include <defs.h>/*******************************************************************/detect_multi_char_blob(blob, esw, charh, dlm, dlx, dly)BLOB *blob;int esw, charh;float dlm, dlx, dly;{   float hvb_fet, hvw_fet, thresh_y, compute_y();   static int oesw = -1, ocharh = -1, std_stroke;   if((oesw != esw) || (ocharh != charh)){      oesw = esw;      ocharh = charh;      std_stroke = esw * charh;   }   /* compute left subimage features */   /* first feature measures density in the image in termes of */   /* number of "standard" strokes */   hvb_fet = blob->pixcnt/(float)std_stroke;   /* second feature simple measures aspect ratio of the image */   hvw_fet = blob->w/(float)charh;   thresh_y = compute_y(hvw_fet, dlm, dlx, dly);   if(hvb_fet > thresh_y)      return(TRUE);   else      return(FALSE);}/*******************************************************************/detect_multi_alpha_blob(blob, esw, charh, dlm, dlx, dly)BLOB *blob;int esw, charh;float dlm, dlx, dly;{   float hvb_fet, hvw_fet, thresh_y, compute_y();   static int oesw = -1, ocharh = -1, std_stroke;   if((oesw != esw) || (ocharh != charh)){      oesw = esw;      ocharh = charh;      std_stroke = esw * charh;   }   /* compute left subimage features */   /* first feature measures density in the image in termes of */   /* number of "standard" strokes */   hvb_fet = blob->pixcnt/(float)std_stroke;   /* second feature measures aspect ratio of the image */   /* relative to component height */   hvw_fet = blob->w/(float)blob->h;   thresh_y = compute_y(hvw_fet, dlm, dlx, dly);   if(hvb_fet > thresh_y)      return(TRUE);   else      return(FALSE);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -