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

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

?? segchars.c

?? NIST Handwriting OCR Testbed
?? C
字號(hào):
/*# proc: segment_chars8 - takes a binary charimage of a field and segments it into# proc:                  characters by carefully compositing and spliting blobs.# proc: blob2chars8 - takes a list of blobs and the run lengths from a field and# proc:               constructs single character images.# proc: compose_chars8 - takes a list of blobs and attempts to reconstruct characters that# proc:               are fragmented, place dots back on i's and j's, and identify other# proc:                  small blobs as noise.# proc: split_chars8 - takes a list of blobs and attempts to detect and split multiple# proc:                touching characters.# proc: blobs2alphas8 - processes a list of blobs into a list of alphabetic# proc:                 characters.# proc: compose_alphas8 - merge blobs of characters pieces into composite single# proc:                   characters.# proc: split_alphas8 - takes a list of blobs and attempts to detect and split multiple# proc:                touching alphabetic characters.*/#include <blobls.h>#include <segchars.h>#include <multsort.h>#include <defs.h>/************************************************************/segment_chars8(blobls, noisels, cdata, w, h)BLOBLS **blobls, **noisels;unsigned char *cdata;int w, h;{   int *rlen, rn, ra;   /* get list of connected components from field image */   segblobs8rlen(blobls, BLOB_ALLS, cdata, w, h, &rlen, &rn, &ra);   /* construct single characters from components */   blobs2chars8(blobls, noisels, rlen, rn);   free(rlen);}/************************************************************/blobs2chars8(blobls, noisels, rlen, rn)BLOBLS **blobls, **noisels;int *rlen, rn;{   int i, esw, charh;   int h_offset, max_i;   float dlm;   /* estimate character stroke width */   esw = int_list_median(rlen, rn);   /* allocate space to hold very small noise blobs */   build_blobls(noisels, min(BLOB_CHUNKS, (*blobls)->num), BLOB_ALLS,                (*blobls)->bpp, (*blobls)->b_g);   /* take dots and stroke fragments and compose characters */   compose_chars8(esw, blobls, (*noisels));   /* get character height estimate from processed blobs */   blob_offsetof(h_offset, h);   find_first_max_blob_memb((*blobls), h_offset, &max_i, &charh);   /* slope of touching char detector */   dlm = -HVB_PT/HVW_PT;   /* detect and split touching characters */   split_chars8(esw, charh, dlm, HVW_PT, 0.0, blobls, (*noisels));   /* get new character height estimate from processed blobs */   find_first_max_blob_memb((*blobls), h_offset, &max_i, &charh);   /* put the tops back on fives for example */   paste_top_strokes_blobls(*blobls, esw, charh);   /* get new character height estimate from processed blobs */   find_first_max_blob_memb((*blobls), h_offset, &max_i, &charh);   /* remove small punctuation-sized blobs */   i = 0;   while(i < (*blobls)->num){      if(is_smallpunct_blob((*blobls)->blobs[i], esw, charh)){         append_blobls((*noisels), (*blobls)->blobs[i]);         remove_blobls(*blobls, i);      }      else         i++;   }}/************************************************************/compose_chars8(esw, blobls, noisels)int esw;BLOBLS **blobls, *noisels;{   int ci, ni, i;   int max_i, eh;   int *laps_i, *laps_d, nlaps, alaps;   int large_thresh;   BLOBLS *dots, *sblobls;   BLOB *cptr;   int h_offset, cx_offset;   /* if no original blobs, then done */   if((*blobls)->num == 0)      return;   /* initial size of allocation */   alaps =  min(BLOB_CHUNKS, (*blobls)->num);   /* allocate space to hold larger dot-sized blobs */   build_blobls(&dots, alaps, BLOB_ALLS, (*blobls)->bpp, (*blobls)->b_g);   /* allocate space to hold overlapping blob indices */   malloc_int(&laps_i, alaps, "compose_chars8 : malloc : laps_i");   malloc_int(&laps_d, alaps, "compose_chars8 : malloc : laps_d");   /* sort blob list on decreasing height, tallest blob to shortest blob */   blob_offsetof(h_offset, h);   sort_blobls_on_memb(&sblobls, DEC, (*blobls), h_offset);   free((*blobls)->blobs);   free((*blobls));   (*blobls) = sblobls;   /* INITIALIZE THRESHOLDS */   /* estimate character height from blob hieghts */   find_first_max_blob_memb((*blobls), h_offset, &max_i, &eh);   /* threshold for height of larger character stroke pieces */   large_thresh = sround(CHAR_H_FCTR * eh);   /* start at end of list (for efficiency of removing items) */   /* with shortest blobs */   ci = (*blobls)->num - 1;   while(ci >= 0){      cptr = (*blobls)->blobs[ci];      /* is the blob the size of potential noise? */      if(is_noise_blob(cptr, esw)){         /* store in a separate list for processing later */         append_blobls(noisels, cptr);         /* remove very small blob from list */         remove_blobls((*blobls), ci);         ci--;      }      /* dot blob or puncutation ? */      else if(is_dot_blob(cptr, esw)){         /* store in a separate list for processing later */         append_blobls(dots, cptr);         /* remove dot-sized blob from list */         remove_blobls((*blobls), ci);         ci--;      }      /* substantial character stroke (not noise or dots) */      else {         /* check to see if blob should be merged to another */         if((ci > 0) &&	    ((ni = find_merge_blob(&laps_i, &laps_d, &nlaps, &alaps,                                     (*blobls), ci, large_thresh, eh)) != NOT_FOUND)){            merge_within_blobls((*blobls), ci, ni);            /* with new merge, start testing from end of list */            /* ??? may be inefficient to retest for noise and dots though ??? */            /* noise and dot test are very cheap however */            ci = (*blobls)->num - 1;         }         else            ci--;      }   }   /* sort remaining blob list left to right */   blob_offsetof(cx_offset, cx);   if((*blobls)->num != 0){      sort_blobls_on_memb(&sblobls, INC, (*blobls), cx_offset);      free((*blobls)->blobs);      free((*blobls));      (*blobls) = sblobls;   }   /* process all the very small blobs collected */   process_noise_blobs(noisels, (*blobls));   /* process all the dot-sized blobs collected */   process_dot_blobs(esw, eh, dots, (*blobls));   /* free the overlap buffers */   free(laps_i);   free(laps_d);   /* append remaining dot blobs to noise list */   for(i = 0; i < dots->num; i++)      append_blobls(noisels, dots->blobs[i]);   free(dots->blobs);   free(dots);}/************************************************************/split_chars8(esw, charh, dlm, dlx, dly, blobls, noisels)int esw, charh;float dlm, dlx, dly;BLOBLS **blobls, *noisels;{   int i;   BLOBLS *oblobls;   BLOB *dup_blob();   /* if no original blobs, then done */   if((*blobls)->num == 0)      return;   build_blobls(&oblobls, (*blobls)->num, (*blobls)->flags,                (*blobls)->bpp, (*blobls)->b_g);   for(i = 0; i < (*blobls)->num; i++){      if(detect_multi_char_blob((*blobls)->blobs[i], esw, charh, dlm, dlx, dly)){         /* split the blob up into individual chars */         split_touching_chars((*blobls)->blobs[i], esw, charh, dlm, dlx, dly,                              &oblobls, noisels);      }      else{         /* append the single char blob to output list */         append_blobls(oblobls, dup_blob((*blobls)->blobs[i], (*blobls)->bpp));      }   }   free_blobls(*blobls);   *blobls = oblobls;}/************************************************************/blobs2alphas8(blobls, noisels, esw)BLOBLS **blobls, **noisels;int esw;{   int charh, h_offset;   float dlm;   /* allocate space to hold very small noise blobs */   build_blobls(noisels, min(BLOB_CHUNKS, (*blobls)->num), BLOB_ALLS,                (*blobls)->bpp, (*blobls)->b_g);   /* estimate character height for each phrase */   blob_offsetof(h_offset, h);   charh = prct_blobls_memb((*blobls), h_offset, HEIGHT_PRCT);   /* take dots and stroke fragments and compose characters */   compose_alphas8(esw, charh, blobls, (*noisels));   /* slope of touching char detector */   dlm = -ALPHA_HVB_PT/ALPHA_HVW_PT;   /* detect and split touching characters */   split_alphas8(esw, charh, dlm, ALPHA_HVW_PT, 0.0, blobls, (*noisels));   /* put the tops back on chars */   paste_alpha_tops(*blobls, esw, charh);}/************************************************************/compose_alphas8(esw, charh, blobls, noisels)int esw, charh;BLOBLS **blobls, *noisels;{   int ci, ni, i;   int *laps_i, *laps_d, nlaps, alaps;   int large_thresh;   BLOBLS *dots, *sblobls;   BLOB *cptr;   int h_offset, cx_offset;   int hthresh, onum;   /* if no original blobs, then done */   if((*blobls)->num == 0)      return;   /* initial size of allocation */   alaps =  min(BLOB_CHUNKS, (*blobls)->num);   /* allocate space to hold larger dot-sized blobs */   build_blobls(&dots, alaps, BLOB_ALLS, (*blobls)->bpp, (*blobls)->b_g);   /* allocate space to hold overlapping blob indices */   malloc_int(&laps_i, alaps, "compose_alphas8 : malloc : laps_i");   malloc_int(&laps_d, alaps, "compose_alphas8 : malloc : laps_d");   /* sort blob list on decreasing height, tallest blob to shortest blob */   blob_offsetof(h_offset, h);   sort_blobls_on_memb(&sblobls, DEC, (*blobls), h_offset);   free((*blobls)->blobs);   free((*blobls));   (*blobls) = sblobls;   /* threshold for height of larger character stroke pieces */   large_thresh = sround(CHAR_H_FCTR * charh);   /* start at end of list (for efficiency of removing items) */   /* with shortest blobs */   ci = (*blobls)->num - 1;   while(ci >= 0){      cptr = (*blobls)->blobs[ci];      /* is the blob the size of potential noise? */      if(is_noise_blob(cptr, esw)){         /* store in a separate list for processing later */         append_blobls(noisels, cptr);         /* remove very small blob from list */         remove_blobls((*blobls), ci);         ci--;      }      /* dot blob or puncutation ? */      else if(is_dot_blob(cptr, esw)){         /* store in a separate list for processing later */         append_blobls(dots, cptr);         /* remove dot-sized blob from list */         remove_blobls((*blobls), ci);         ci--;      }      /* substantial character stroke (not noise or dots) */      else {         /* check to see if blob should be merged to another */         if((ci > 0) &&	    ((ni = find_merge_blob(&laps_i, &laps_d, &nlaps, &alaps,                        (*blobls), ci, large_thresh, charh)) != NOT_FOUND)){            merge_within_blobls((*blobls), ci, ni);            /* with new merge, start testing from end of list */            /* ??? may be inefficient to retest for noise and dots though ??? */            /* noise and dot test are very cheap however */            ci = (*blobls)->num - 1;         }         else            ci--;      }   }   /* sort remaining blob list left to right */   blob_offsetof(cx_offset, cx);   if((*blobls)->num != 0){      sort_blobls_on_memb(&sblobls, INC, (*blobls), cx_offset);      free((*blobls)->blobs);      free((*blobls));      (*blobls) = sblobls;   }   /* process all the very small blobs collected */   process_noise_blobs(noisels, (*blobls));   /* process all the dot-sized blobs collected */   process_dot_blobs(esw, charh, dots, (*blobls));   /* free the overlap buffers */   free(laps_i);   free(laps_d);   /* append remaining dot blobs back to main blob list or to noise list */   hthresh = esw<<1;   onum = (*blobls)->num;   for(i = 0; i < dots->num; i++){      if(dots->blobs[i]->h < hthresh)         append_blobls(noisels, dots->blobs[i]);      else         append_blobls((*blobls), dots->blobs[i]);   }   free(dots->blobs);   free(dots);   /* sort remaining blob list left to right */   if(((*blobls)->num != 0) && (onum != (*blobls)->num)){      sort_blobls_on_memb(&sblobls, INC, (*blobls), cx_offset);      free((*blobls)->blobs);      free((*blobls));      (*blobls) = sblobls;   }}/************************************************************/split_alphas8(esw, charh, dlm, dlx, dly, blobls, noisels)int esw, charh;float dlm, dlx, dly;BLOBLS **blobls, *noisels;{   int i;   BLOBLS *oblobls;   BLOB *dup_blob();   /* if no original blobs, then done */   if((*blobls)->num == 0)      return;   build_blobls(&oblobls, (*blobls)->num, (*blobls)->flags,                (*blobls)->bpp, (*blobls)->b_g);   for(i = 0; i < (*blobls)->num; i++){      if(detect_multi_alpha_blob((*blobls)->blobs[i], esw, charh, dlm, dlx, dly)){         /* split the blob up into individual chars */         split_touching_alphas((*blobls)->blobs[i], esw, charh, dlm, dlx, dly,                              &oblobls, noisels);      }      else{         /* append the single char blob to output list */         append_blobls(oblobls, dup_blob((*blobls)->blobs[i], (*blobls)->bpp));      }   }   free_blobls(*blobls);   *blobls = oblobls;}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产黄人亚洲片| 亚洲一二三级电影| 最近日韩中文字幕| 日韩精品一二三四| 大白屁股一区二区视频| 91国偷自产一区二区三区成为亚洲经典 | 久久久不卡影院| 国产成人亚洲综合a∨婷婷图片 | 成人午夜看片网址| 欧美日韩一区二区在线视频| 欧美一区欧美二区| 亚洲欧美日韩国产成人精品影院 | 不卡的av电影在线观看| 欧美性色黄大片| 国产精品久久免费看| 偷拍日韩校园综合在线| 不卡一区二区在线| 国产日韩欧美电影| 国产视频一区不卡| 9i在线看片成人免费| 国产大陆精品国产| 欧美一区二区三区免费视频| 亚洲精品中文字幕在线观看| 国产呦精品一区二区三区网站| 色88888久久久久久影院按摩| 国产日韩v精品一区二区| 视频一区视频二区在线观看| 午夜久久久影院| 欧美v国产在线一区二区三区| 日韩一区国产二区欧美三区| 亚洲女性喷水在线观看一区| 成人性生交大片免费看中文| 日韩欧美电影一区| 成人免费高清视频在线观看| 欧美精品tushy高清| 亚洲精品视频一区| 99久久99久久免费精品蜜臀| 中日韩av电影| 国产**成人网毛片九色| 亚洲精品在线观| 国产真实精品久久二三区| 一本久久综合亚洲鲁鲁五月天 | 久草精品在线观看| 日韩午夜激情电影| 精品一区二区三区日韩| wwwwww.欧美系列| 国产乱人伦精品一区二区在线观看| 日韩欧美国产三级| 国产精品综合一区二区三区| 国产午夜亚洲精品午夜鲁丝片| 国产精品自在欧美一区| 中文字幕在线不卡国产视频| 亚洲大型综合色站| 国产在线视频不卡二| 精品日韩一区二区三区免费视频| 九九在线精品视频| 欧美不卡激情三级在线观看| 国内精品伊人久久久久影院对白| 91在线视频播放地址| 亚洲免费观看在线观看| 欧美手机在线视频| 精品一区二区三区的国产在线播放| 欧美videossexotv100| 国产成人综合视频| 综合网在线视频| 国产亚洲精品资源在线26u| 成人91在线观看| 国产精品久久久久影院老司| 色视频成人在线观看免| 欧美aaa在线| 日本一区二区三级电影在线观看| 99re6这里只有精品视频在线观看| 亚洲午夜电影在线| 国产校园另类小说区| 欧美电影免费观看高清完整版在线| 天天综合天天综合色| 国产拍揄自揄精品视频麻豆| 国产不卡视频一区二区三区| 亚洲人123区| 欧美刺激脚交jootjob| 色噜噜狠狠色综合中国| 蜜桃久久久久久久| 亚洲另类在线视频| 久久综合99re88久久爱| 日本一区二区综合亚洲| 日韩欧美在线123| 欧美精品一区二区三区在线| 99re热视频精品| 久久www免费人成看片高清| 亚洲免费在线看| 久久久九九九九| 欧美日韩精品一区二区三区四区 | 亚洲精品乱码久久久久久日本蜜臀| 日韩一级精品视频在线观看| 成人av动漫在线| 国产在线精品一区二区三区不卡| 亚洲国产综合色| 国产精品的网站| 久久久一区二区| 日韩精品一区二| 日韩午夜av电影| 欧美精品自拍偷拍| 欧美性生活久久| 91免费精品国自产拍在线不卡| 国产精品资源站在线| 日韩国产精品大片| 亚洲一区免费观看| 亚洲人亚洲人成电影网站色| 久久亚洲精品国产精品紫薇| 欧美人动与zoxxxx乱| 色综合久久中文综合久久97| 国产成人av电影在线观看| 国内精品久久久久影院一蜜桃| 青草国产精品久久久久久| 亚洲一区二区三区四区在线观看 | 午夜久久福利影院| 亚洲一区二区三区四区的| 最新国产成人在线观看| ...av二区三区久久精品| 中文字幕成人av| 日本在线观看不卡视频| 午夜精品免费在线| 欧美激情一区二区三区蜜桃视频| 久久久久久电影| 久久久精品人体av艺术| 国产偷国产偷亚洲高清人白洁| 国产午夜精品一区二区三区嫩草| 精品国产1区二区| 久久九九全国免费| 国产精品一级二级三级| 欧美日韩在线综合| 国产欧美一区二区三区在线老狼| 日韩欧美成人一区二区| 国产一区二区三区久久久| 欧美一区在线视频| heyzo一本久久综合| 色综合久久久久久久久久久| 色呦呦网站一区| 欧美精品 国产精品| 欧美成人三级电影在线| 久久久久久影视| 亚洲欧美另类小说视频| 一区二区成人在线| 欧美日韩精品综合在线| 成人av在线资源网| 国产麻豆日韩欧美久久| 99视频国产精品| 欧美日韩国产小视频| 欧美大胆人体bbbb| 日本高清不卡一区| 一区二区三区免费在线观看| 久久蜜桃av一区精品变态类天堂| 欧美激情自拍偷拍| 一区二区三区美女视频| 麻豆91精品视频| 国内精品久久久久影院薰衣草| 久久夜色精品国产噜噜av| 日本精品视频一区二区三区| 国产精品成人在线观看| 色成年激情久久综合| 成人欧美一区二区三区视频网页| 亚洲综合视频在线观看| 国内精品伊人久久久久av一坑 | 日韩—二三区免费观看av| 国产精品乡下勾搭老头1| 在线精品亚洲一区二区不卡| 欧美丰满嫩嫩电影| 午夜影院久久久| 久久这里都是精品| 亚洲国产一二三| 国产suv精品一区二区三区| 精品视频资源站| 欧美国产一区二区| 久久爱另类一区二区小说| 欧美专区日韩专区| 中文字幕一区二区三区不卡在线| 美女精品一区二区| 欧美军同video69gay| 亚洲人成精品久久久久久| 国产日韩欧美一区二区三区综合| 在线视频亚洲一区| 久久久久国产精品免费免费搜索| 亚洲欧美欧美一区二区三区| 国产一区二区在线观看视频| 91精品欧美综合在线观看最新| 亚洲特黄一级片| 成人综合在线视频| 欧美mv和日韩mv的网站| 青青草原综合久久大伊人精品| 色欧美日韩亚洲| 亚洲色图欧美在线| 成人av影视在线观看| 免费观看一级特黄欧美大片| 久久精品视频免费| 久久亚洲二区三区| 不卡的av电影在线观看| 久久综合九色综合97婷婷| 免费成人结看片| 欧美日韩夫妻久久| 国产精品18久久久久久久久久久久|