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

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

?? 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 */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩五月天| 欧美最新大片在线看| 韩国精品免费视频| 久久久亚洲精华液精华液精华液| 日本成人中文字幕| 日韩精品最新网址| 豆国产96在线|亚洲| 亚洲女女做受ⅹxx高潮| 欧美日韩和欧美的一区二区| 久久精品国产精品亚洲红杏| 国产精品看片你懂得| 日本韩国一区二区| 狠狠色丁香久久婷婷综合丁香| 日韩电影免费一区| 精品一区二区三区日韩| 亚洲黄色在线视频| 精品国产欧美一区二区| 91亚洲午夜精品久久久久久| 天天影视色香欲综合网老头| 国产美女娇喘av呻吟久久| 亚洲欧美日韩国产综合在线| 亚洲精品v日韩精品| 午夜精品一区二区三区三上悠亚| 秋霞午夜鲁丝一区二区老狼| 国产精品超碰97尤物18| 一级精品视频在线观看宜春院| 日本一区二区三区四区在线视频| 91精品国产综合久久久久| 国产精品成人免费在线| 亚洲人成人一区二区在线观看| 午夜免费久久看| 国内精品伊人久久久久av一坑 | 日韩理论电影院| 精品av综合导航| 综合色天天鬼久久鬼色| 日韩精品一区在线| 亚洲精品国产第一综合99久久| 午夜精品成人在线| 不卡欧美aaaaa| 另类人妖一区二区av| 成人黄色777网| 日韩情涩欧美日韩视频| 一本色道久久加勒比精品| 丁香天五香天堂综合| 午夜婷婷国产麻豆精品| 成人免费视频caoporn| 美女任你摸久久| 午夜视黄欧洲亚洲| 99视频国产精品| 91在线一区二区三区| 99久久精品免费看| 久久网站热最新地址| 国产精品综合一区二区三区| 日韩激情视频网站| 午夜精品久久久久久久| 成人免费高清在线| 日韩欧美国产电影| 日本亚洲电影天堂| 91色在线porny| 日本一区二区久久| 亚洲视频在线观看一区| 久久一区二区三区国产精品| 亚洲第一成人在线| 天天综合日日夜夜精品| 欧洲精品在线观看| 亚洲欧美日韩在线不卡| caoporm超碰国产精品| 欧美极品另类videosde| 九九视频精品免费| 精品欧美乱码久久久久久 | 成人99免费视频| 久久综合久久鬼色| 国产在线不卡一区| 精品国免费一区二区三区| 免费日本视频一区| 欧美一激情一区二区三区| 亚洲电影激情视频网站| 欧美婷婷六月丁香综合色| 欧美一区二区三区婷婷月色| 国产亚洲午夜高清国产拍精品 | 日本午夜一区二区| 欧美一激情一区二区三区| 日韩专区中文字幕一区二区| 日韩一二三区不卡| 裸体在线国模精品偷拍| 欧美电视剧免费观看| 激情图区综合网| 国产精品萝li| 蜜桃视频在线一区| 欧美大片顶级少妇| 国产精品白丝jk黑袜喷水| 中文字幕不卡在线播放| 99久久精品费精品国产一区二区| 亚洲欧美日韩在线不卡| 91超碰这里只有精品国产| 蜜桃av噜噜一区二区三区小说| 2022国产精品视频| 成人av在线资源网| 天天亚洲美女在线视频| 久久久久久久久岛国免费| 成人av影视在线观看| 亚洲二区在线视频| www.日韩在线| 亚洲尤物视频在线| 亚洲人妖av一区二区| 91国产丝袜在线播放| 亚洲制服丝袜在线| 久久伊99综合婷婷久久伊| 国产情人综合久久777777| 色婷婷激情久久| 激情欧美日韩一区二区| 中文一区二区完整视频在线观看| 色呦呦一区二区三区| 美腿丝袜亚洲综合| 中文字幕中文字幕在线一区| 日韩免费观看高清完整版| 一本色道久久综合狠狠躁的推荐| 免费高清在线一区| 国产高清精品在线| 欧美不卡一二三| a4yy欧美一区二区三区| 日本欧美肥老太交大片| 国产精品美女一区二区在线观看| 色诱视频网站一区| 激情深爱一区二区| 日韩精品久久理论片| 欧美国产欧美综合| 91麻豆精品国产91久久久更新时间 | 中文字幕av不卡| 精品久久久久久久人人人人传媒| 欧美性欧美巨大黑白大战| 成人激情黄色小说| 国产在线视视频有精品| 视频一区中文字幕| 一区二区三区蜜桃| 亚洲欧洲另类国产综合| 99视频一区二区| 国产成人av电影在线观看| 日韩精品电影在线观看| 亚洲一区在线电影| 亚洲视频一二区| 国产精品久久久久影院色老大| 久久精品夜色噜噜亚洲aⅴ| 日韩欧美电影一区| 在线播放视频一区| 国内精品伊人久久久久av影院| 美腿丝袜在线亚洲一区| 免费成人小视频| 美女在线视频一区| 另类成人小视频在线| 日韩va欧美va亚洲va久久| 天堂一区二区在线| 日韩主播视频在线| 日韩国产高清在线| 日韩二区三区四区| 看片的网站亚洲| 国产美女视频一区| 成人看片黄a免费看在线| av午夜一区麻豆| 欧美在线综合视频| 欧美日韩亚洲综合一区| 在线成人午夜影院| 2020日本不卡一区二区视频| 国产亚洲精品精华液| 日本一二三四高清不卡| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 中文一区二区完整视频在线观看| 黑人巨大精品欧美黑白配亚洲| 紧缚捆绑精品一区二区| 国产一区二区不卡在线| 97久久人人超碰| 91国产免费观看| 日本午夜精品视频在线观看 | 美国欧美日韩国产在线播放| 精品亚洲成a人| 99久精品国产| 欧美精品免费视频| 亚洲精品在线观看视频| 亚洲欧美日韩小说| 日韩不卡一区二区三区 | 中文幕一区二区三区久久蜜桃| 亚洲欧美偷拍三级| 日本三级亚洲精品| 成人美女视频在线观看18| 欧美视频在线播放| 久久免费午夜影院| 伊人性伊人情综合网| 久久99久久久久久久久久久| 成人久久18免费网站麻豆| 欧美一级夜夜爽| 中文字幕一区二区三| 日本怡春院一区二区| www.久久精品| 91精品午夜视频| 亚洲日韩欧美一区二区在线| 精品一区二区三区视频在线观看| 色婷婷精品大在线视频| 国产女人18毛片水真多成人如厕| 亚洲第一激情av| 91猫先生在线|