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

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

?? pick.c

?? NIST Handwriting OCR Testbed
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*# proc: dominant_hori_line - chooses the most "dominant" solid or dashed# proc:          horizontal line from the hough transform matrices passed.# proc: pick_max_pix_line - selects the most "dominant" solid horizontal line# proc:          from the hough transform matrices passed.# proc: pick_dash_line - selects the most "dominant" dashed horizontal line# proc:          from the the hough transform matrices passed.*/#include <stdio.h>#include <math.h>#include <defs.h>#include <rmline.h>#include <mytrace.h>/***************************************************************************//* dominant_hori_line - takes the output from two hough line transforms    *//* (one for [0..+n] degrees and the other for [0..-n] degrees) and locates *//* the next "dominant" line. The routine returns the endpoints of the      *//* actual detected line (lx, ly) to (rx, ry), the endpoints of the line    *//* projected to the edges of the field image, and the black pixels summed  *//* along this trajectory.                                                  *//***************************************************************************/dominant_hori_line(npix, x1, y1, x2, y2, lx, ly, rx, ry, solid_flag,                   pacc, pax, pay, pmin, pmax, nacc, nax, nay, nmin, nmax, td,                   cdata, w, h, prct_len, dist_limit)int *npix, *x1, *y1, *x2, *y2, *lx, *ly, *rx, *ry;int *pacc, pax, pay;float pmin, pmax;int *nacc, nax, nay;float nmin, nmax, td;unsigned char *cdata;int w, h, dist_limit;float prct_len;{   int i, line_found, pix_limit;   float dist, distance();   my_trace("entered dominant_hori_line\n");   i = 0;   do{      ++i;      if(solid_flag)         /* locate a dominant solid line */         line_found = pick_max_pix_line(npix, x1, y1, x2, y2, lx, ly, rx, ry,                 TOPN, pacc, pax, pay, pmin, pmax, nacc, nax, nay, nmin, nmax, td,                 cdata, w, h, dist_limit,(i==1?1:0));      else         /* locate a dominant dashed line */         line_found = pick_dash_line(npix, x1, y1, x2, y2, lx, ly, rx, ry,                 TOPN, pacc, pax, pay, pmin, pmax, nacc, nax, nay, nmin, nmax, td,                        cdata, w, h, dist_limit,(i==1?1:0));      if((!line_found) || ((*npix) == 0)){         my_trace("did not find next hori line\n");         my_trace("finished dominant_hori_line\n");         return(FALSE);      }      dist = distance((float)(*lx), (float)(*ly), (float)(*rx), (float)(*ry));      pix_limit = prct_len * dist;      my_trace2("black pixels = %d, pixel limit = %d\n", *npix, pix_limit);      my_trace2("dist = %f, dist limit = %d\n", dist, dist_limit);   /* look for another line if either the number of black pixels is too few */   /* or the distance is too short (these help define "dominant") */   }while(((*npix) < pix_limit) || (dist < dist_limit));   my_trace("found next hori line\n");   my_trace("finished dominant_hori_line\n");   return(TRUE);}/***************************************************************************//* pick_max_pix_line - takes the output from two hough line transforms     *//* (one for [0..+n] degrees and the other for [0..-n] degrees) and locates *//* the next "dominant" solid line. The routine returns the endpoints of    *//* the detected line (lx, ly) to (rx, ry), the endpoints of the line       *//* projected to the edges of the field image, and the black pixels summed  *//* along this trajectory.                                                  *//***************************************************************************/pick_max_pix_line(max_pix, mx1, my1, mx2, my2, mlx, mly, mrx, mry,               topn, pacc, pax, pay, pmin, pmax, nacc, nax, nay, nmin, nmax, td,               cdata, w, h, dist_limit, reset)int *max_pix, *mx1, *my1, *mx2, *my2, *mlx, *mly, *mrx, *mry;int topn, *pacc, pax, pay;float pmin, pmax;int *nacc, nax, nay;float nmin, nmax, td;unsigned char *cdata;int w, h, dist_limit, reset;{   int i, need_pacc, need_nacc;   int npix, x1, y1, x2, y2, lx, ly, rx, ry;   int pmax_v, pmx, pmy;   int nmax_v, nmx, nmy;   int mmx, mmy;   float slope;   int nx, ny;   int *tpacc, plen, *tnacc, nlen;   int last, which, top_i;   static int last_x1, last_y1, last_x2, last_y2, last_npix;   my_trace("entered pick_max_pix_line\n");   if(reset){      last_x1 = NOT_FOUND;      last_y1 = NOT_FOUND;      last_x2 = NOT_FOUND;      last_y2 = NOT_FOUND;      last_npix = NOT_FOUND;   }   /* allocate working copies of hough line transform matrices */   plen = pax * pay;   malloc_int(&tpacc, plen, "pick_max_pix_line : tpacc");   memcpy(tpacc, pacc, plen*sizeof(int));   nlen = nax * nay;   malloc_int(&tnacc, nlen, "pick_max_pix_line : tnacc");   memcpy(tnacc, nacc, nlen*sizeof(int));   need_pacc = 1;   need_nacc = 1;   *max_pix = 0;   *mx1 = NOT_FOUND;   *my1 = NOT_FOUND;   *mx2 = NOT_FOUND;   *my2 = NOT_FOUND;   *mlx = NOT_FOUND;   *mly = NOT_FOUND;   *mrx = NOT_FOUND;   *mry = NOT_FOUND;   /* choose the line with the most black pixels from the set of "top_n" max lines */   /* in the hough line transform matrices */   for(i = 0; i < topn; i++){      /* if needed, get the next max from the [0..+n] degrees matrix */      if(need_pacc){         max_2d_addr(tpacc, pax, pay, &pmax_v, &pmx, &pmy);         need_pacc = 0;      }      /* if needed, get the next max from the [0..-n] degrees matrix */      if(need_nacc){         max_2d_addr(tnacc, nax, nay, &nmax_v, &nmx, &nmy);         need_nacc = 0;      }      my_trace3("line %d: hough max = %d, limit = %d\n", i, max(pmax_v, nmax_v),                dist_limit);      /* if the next max is not "dominant" enough then stop */      if(max(pmax_v, nmax_v) < dist_limit)         break;      /* if max from [0..+n] matrix ... */      if(pmax_v >= nmax_v){         /* erase max point from the working copy matrix, so not to be picked again */         *(tpacc + (pmy * pax) + pmx) = 0;         /* remember, hough matrix based on radial distance along "normal" vector */         /* to the line */         /* compute point and slope of the detected line based on location of max */         /* in hough matrix */         gen_slope_point(&slope, &nx, &ny, pmx, pmy, pmin, pmax, td, (pax>>1));         /* need a new max from [0..+n] matrix */         need_pacc = 1;         /* set flag to [0..+n] matrix */         last = 1;      }      /* if max from [0..-n] matrix ... */      else{         /* erase max point from the working copy matrix, so not to be picked again */         *(tnacc + (nmy * nax) + nmx) = 0;         /* remember, hough matrix based on radial distance along "normal" vector */         /* to the line. */         /* compute point and slope of the detected line based on location of max */         /* in hough matrix */         gen_slope_point(&slope, &nx, &ny, nmx, nmy, nmin, nmax, td, (nax>>1));         /* need a new max from [0..-n] matrix */         need_nacc = 1;         /* set flag to [0..-n] matrix */         last = 0;      }      /* project the detected line to the edges of the image */      intersect_sides(&x1, &y1, &x2, &y2, nx, ny, slope, w, h);      /* sum up the number of black pixels along this line projection */      /* this black pixel count is much more accurate than the accumulated pixels */      /* in the hough matrices, and should be used to choose actual lines */      n_pixels_on_line(&npix, &lx, &ly, &rx, &ry, BLACK_PIX, x1, y1, x2, y2, cdata, w, h);      /* if npix == 0, then line must have been already erased when processing */      /* a previous line, so erase cell from appropriate global acc so it won't be */      /* chosen again and go back and pick a new line */      if(npix == 0){         if(last)            *(pacc + (pmy * pax) + pmx) = 0;         else            *(nacc + (nmy * nax) + nmx) = 0;         /* pick a new line it this line's place */         i--;         my_trace("line was previously erased, so ignored\n");      }      /* update maximum black pixel line statistics */      else if(npix > *max_pix){         top_i = i;         *mx1 = x1;         *my1 = y1;         *mx2 = x2;         *my2 = y2;         *mlx = lx;         *mly = ly;         *mrx = rx;         *mry = ry;         *max_pix = npix;         which = last;         /* store the actual locations in the hough matrices as well */         if(last == 1){            mmx = pmx;            mmy = pmy;         }         else{            mmx = nmx;            mmy = nmy;         }      }   }   /* free the working copies */   free(tpacc);   free(tnacc);   /* if the selected line has no black pixels, then the line must have been erased       */   /* when another selected line was processed. this can happen because the lines in      */   /* an image frequently have line widths greater than 1. so, for each line in an image, */   /* there are multiple lines of width 1 overlaying the same line. therefore, there      */   /* can be multple points in the hough line transform matrices representing the same    */   /* line in the image. by selecting and processing one hough detected line, other lines */   /* in the hough matrices may become obsolete. upon experiments, it was found to be     */   /* easier and more accurate to detect these obsolete lines by checking for 0 black     */   /* pixels after selection, rather than deleteing cells from hough matrices up front.   */   if(*max_pix <= 0){      /* it is possible for all "top_n" max hough lines to be obsolete with no black */      /* pixels in them. possibly something could be done about this, but for now    */      /* line processing will simply stop */      /* this point is reached also when no more "dominant" lines are found in the */      /* hough matrices */      my_trace("no more dominant lines found in hough matrices\n");      my_trace("finished pick_max_pix_line\n");      return(FALSE);   }   /* if the same line is selected between subsequent calls to this routine, */   /* then line searching should stop so as not to fall into an infinite loop */   if((last_x1 == *mx1) &&      (last_y1 == *my1) &&      (last_x2 == *mx2) &&      (last_y2 == *my2) &&      (last_npix == *max_pix)){      my_trace("uh-oh, selected same line as last time\n");      my_trace("finished pick_max_pix_line\n");      return(FALSE);   }   /* store the selected line into static variables */   my_trace2("selected line %d, black pixels = %d\n", top_i, *max_pix);   my_trace4("line projected from (%d, %d) to (%d, %d)\n", *mx1, *my1, *mx2, *my2);   last_x1 = *mx1;   last_y1 = *my1;   last_x2 = *mx2;   last_y2 = *my2;   last_npix = *max_pix;   /* must erase the chosen line from the appropriate master hough matrix */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品国产无天堂网2021 | 在线播放日韩导航| 在线不卡欧美精品一区二区三区| 国产成人精品亚洲日本在线桃色 | 日韩欧美国产系列| 亚洲精品一区二区三区香蕉| av不卡在线观看| 欧美日韩一区二区三区四区五区| 欧美一级二级在线观看| 一区二区中文字幕在线| 久久丁香综合五月国产三级网站| 麻豆精品在线观看| 国产成人免费9x9x人网站视频| caoporm超碰国产精品| 欧美一区二区三区啪啪| 欧美国产激情一区二区三区蜜月| 亚洲欧美日韩国产另类专区| 久久精品久久综合| 99re这里只有精品视频首页| 精品毛片乱码1区2区3区| 亚洲精品成a人| 国内一区二区在线| 欧美绝品在线观看成人午夜影视| 欧美www视频| 亚洲成人第一页| 粗大黑人巨茎大战欧美成人| 欧美一区二区视频在线观看2020| 一色桃子久久精品亚洲| 国精产品一区一区三区mba桃花 | 精品少妇一区二区三区视频免付费| 中文字幕亚洲一区二区av在线| 免费日本视频一区| 欧美性极品少妇| 成人免费在线观看入口| 国产不卡在线播放| 精品国产自在久精品国产| 亚洲精品日韩一| 波多野结衣精品在线| 久久免费的精品国产v∧| 免费成人结看片| 欧美人妖巨大在线| 亚洲一区二区三区四区五区中文| 成人h精品动漫一区二区三区| 精品乱人伦一区二区三区| 午夜精品在线看| 欧美性大战久久久久久久| 一区在线中文字幕| 国产中文字幕一区| 精品久久久久久亚洲综合网| 免费一区二区视频| 欧美精品乱码久久久久久| 亚洲成人免费视频| 在线精品视频免费观看| 国产精品久久久久四虎| 成人免费视频app| 国产三级一区二区三区| 国产乱码字幕精品高清av| 26uuu另类欧美亚洲曰本| 免费欧美在线视频| 日韩你懂的电影在线观看| 午夜欧美在线一二页| 在线观看av不卡| 一区二区三区免费网站| 日本道在线观看一区二区| 亚洲激情第一区| 在线观看日产精品| 亚洲色图视频网| 色噜噜狠狠一区二区三区果冻| 自拍偷在线精品自拍偷无码专区| 99久久久免费精品国产一区二区| 成人欧美一区二区三区视频网页| 99久久er热在这里只有精品66| 国产欧美精品一区二区三区四区| 成人激情免费电影网址| 国产精品免费看片| 99这里只有精品| 国产精品国产三级国产普通话三级 | 色婷婷亚洲综合| 一区二区三区在线看| 欧美色图12p| 日日夜夜免费精品视频| 日韩久久免费av| 国产原创一区二区| 国产日产欧产精品推荐色| 99国产精品久久久久| 亚洲精品中文字幕在线观看| 欧美不卡激情三级在线观看| 午夜亚洲福利老司机| 日韩欧美国产综合一区| 国产91高潮流白浆在线麻豆| 亚洲视频一二区| 欧美亚洲国产一区二区三区| 日韩电影一区二区三区四区| 日韩精品影音先锋| 不卡免费追剧大全电视剧网站| 一区二区三区四区高清精品免费观看| 欧美性大战久久久久久久| 免费久久精品视频| 国产亚洲精品aa午夜观看| 国产+成+人+亚洲欧洲自线| 亚洲码国产岛国毛片在线| 91精品免费观看| 国产成a人亚洲| 亚洲一区在线观看视频| 色婷婷激情久久| 毛片av中文字幕一区二区| 亚洲欧洲国产日韩| 欧美成人精品高清在线播放| av在线综合网| 精品一区二区三区不卡 | 欧美日韩国产bt| 国产传媒日韩欧美成人| 亚洲成av人片在www色猫咪| 国产精品视频一区二区三区不卡| 欧美一区二区美女| 91黄色免费观看| 高潮精品一区videoshd| 麻豆精品视频在线观看视频| 亚洲一区二区三区小说| 国产精品黄色在线观看| 久久久综合网站| 91精品国产日韩91久久久久久| 91美女视频网站| 国产精品一卡二| 美女一区二区三区在线观看| 亚洲午夜影视影院在线观看| 日韩美女精品在线| 中文字幕乱码亚洲精品一区| 欧美大胆人体bbbb| 欧美理论在线播放| 欧美在线观看视频一区二区三区| 春色校园综合激情亚洲| 国产乱对白刺激视频不卡| 久久精品国产77777蜜臀| 亚洲国产一区二区三区青草影视| 1024成人网色www| 日本一区二区三区免费乱视频| 精品美女被调教视频大全网站| 91麻豆精品国产无毒不卡在线观看| 91久久精品一区二区| www.在线成人| 不卡高清视频专区| 成人动漫一区二区三区| 国产精品原创巨作av| 国产一本一道久久香蕉| 国内不卡的二区三区中文字幕 | 国产精品欧美久久久久无广告| 久久久另类综合| 久久久久久久久蜜桃| 26uuu亚洲婷婷狠狠天堂| 精品成人在线观看| 精品国内二区三区| 精品成a人在线观看| 2017欧美狠狠色| 久久九九99视频| 欧美韩国日本综合| 国产精品网友自拍| 国产精品免费久久久久| 日韩一区欧美一区| 亚洲激情网站免费观看| 亚洲一区二区偷拍精品| 午夜视频久久久久久| 日韩av一区二区三区四区| 秋霞av亚洲一区二区三| 久久成人综合网| 国产精品亚洲综合一区在线观看| 国产精品88888| 成人小视频免费在线观看| 波多野结衣中文字幕一区二区三区| 99久久免费精品| 欧美在线不卡视频| 69堂精品视频| 欧美电影免费观看高清完整版在| 精品久久人人做人人爰| 国产日韩欧美激情| 亚洲人成小说网站色在线| 亚洲一区二区黄色| 蜜桃在线一区二区三区| 国产一区二区不卡| 成人高清免费观看| 欧洲精品一区二区三区在线观看| 欧美日韩激情一区二区| 91精品国模一区二区三区| 久久婷婷久久一区二区三区| 国产精品国产三级国产普通话99 | 精品成人一区二区三区| 国产精品色呦呦| 亚洲一区二区三区视频在线| 视频一区二区中文字幕| 国精产品一区一区三区mba桃花| 成人av一区二区三区| 欧美在线三级电影| 欧美不卡视频一区| 国产精品色婷婷久久58| 亚洲国产日韩a在线播放性色| 久久国产成人午夜av影院| 成人激情小说网站| 欧美精选在线播放| 久久亚洲一区二区三区四区| 亚洲图片激情小说|