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

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

?? pick.c

?? NIST Handwriting OCR Testbed
?? C
?? 第 1 頁 / 共 2 頁
字號:
   /* so it can't be selected again */   if(which)      *(pacc + (mmy * pax) + mmx) = 0;   else      *(nacc + (mmy * nax) + mmx) = 0;   my_trace("finished pick_max_pix_line\n");   return(TRUE);}/***************************************************************************//* pick_dash_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" dashed 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_dash_line(sum_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 *sum_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 x1[TOPN], y1[TOPN], x2[TOPN], y2[TOPN];   int lx[TOPN], ly[TOPN], rx[TOPN], ry[TOPN];   int pmax_v, pmx, pmy;   int nmax_v, nmx, nmy;   int mmx, mmy, mxs[TOPN], mys[TOPN];   float slope;   int nx, ny;   int *tpacc, plen, *tnacc, nlen;   int which[TOPN];   float bstd[TOPN], wstd[TOPN], max_stddev, tmax;   int nstd;   int npix[TOPN];   float how_small, how_close;   float max_score, score;   int  max_score_i;   static int last_x1, last_y1, last_x2, last_y2, last_npix;   static float last_bstd, last_wstd;   my_trace("entered pick_dash_line\n");   if(reset){      last_x1 = NOT_FOUND;      last_y1 = NOT_FOUND;      last_x2 = NOT_FOUND;      last_y2 = NOT_FOUND;      last_npix = NOT_FOUND;      last_bstd = 0.0;      last_wstd = 0.0;   }   /* allocate working copies of hough line transform matrices */   plen = pax * pay;   malloc_int(&tpacc, plen, "pick_dash_line : tpacc");   memcpy(tpacc, pacc, plen*sizeof(int));   nlen = nax * nay;   malloc_int(&tnacc, nlen, "pick_dash_line : tnacc");   memcpy(tnacc, nacc, nlen*sizeof(int));   need_pacc = 1;   need_nacc = 1;   /* instead of looking for max black pixels, to find a dashed line am going to      */   /* look for lowest stddev in both black and white pixel runs along a line          */   /* trajectory. dashed lines should have very uniform black and white run durations */   nstd = 0;   max_stddev = 0;   /* get the "top_n" selections based on summed pixels in the hough matrices */   for(i = 0; i < topn; i++){      /* if needed, get the next max from the [0..+n] 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] 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",                nstd, max(pmax_v, nmax_v), dist_limit);      /* if the next max is not "dominant" enough then stop */      /* dist_limit must be set much lower for dashed lines than with solid lines */      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;         /* store which matrix the current line was selected from along with location */         which[nstd] = 1;         mxs[nstd] = pmx;         mys[nstd] = pmy;      }      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;         /* store which matrix the current line was selected from along with location */         which[nstd] = 0;         mxs[nstd] = nmx;         mys[nstd] = nmy;      }      /* project the detected line to the edges of the image */      intersect_sides(&(x1[nstd]), &(y1[nstd]), &(x2[nstd]), &(y2[nstd]),                      nx, ny, slope, w, h);      /* compute the stddev of black and white runs (and sum the black pixels) along */      /* the selected line projection */      stddev_run_widths(&(bstd[nstd]), &(wstd[nstd]), &(npix[nstd]),                       &(lx[nstd]), &(ly[nstd]), &(rx[nstd]), &(ry[nstd]),                       x1[nstd], y1[nstd], x2[nstd], y2[nstd], 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[nstd] == 0){         if(which[nstd])            *(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");      }      /* if the selected line is not empty ... */      else{         /* keep track of the max stddev so far */         tmax = max(bstd[nstd], wstd[nstd]);         if(max_stddev < tmax)            max_stddev = tmax;        nstd++;      }   }   /* free the working copies */   free(tpacc);   free(tnacc);   /* if no lines were selected from the hough matrices then stop processing lines */   if(nstd == 0){      /* this point is reached 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_dash_line\n");      *sum_pix = 0;      return(FALSE);   }   /* pick the best dashed line from the "top_n" (more correctly, nstd) choices */   max_score = NOT_FOUND;   max_score_i = NOT_FOUND;   /* score each line based on its black and white run stddevs. scores are computed */   /* in two parts (how small, and how close). 1. the smaller the black and white run  */   /* stddevs, the more likely a dashed line. 2. the closer the black and white runs */   /* are to each other, the more likely a dashed line. */   for(i = 0; i < nstd; i++){      tmax = max(bstd[i], wstd[i]);      /* compute how small the stddevs are to each other with respect max stddev */      /* incurred in the "topn" lines */      if(max_stddev != 0)         how_small = (max_stddev - tmax) / max_stddev;      else         how_small = 0.0;      /* compute how close the stddevs are to each other with respect to the */      /* pairs max stddev */      if(tmax != 0)         how_close = 1.0 - (fabs(bstd[i] - wstd[i]) / tmax);      else         how_close = 0.0;      /* average the two components together to get the line's score */      score = (how_small + how_close) / 2.0;      /* keep track of the max score */      if(score > max_score){         max_score = score;         max_score_i = i;      }   }   /* store selected dashed line statistics */   *mx1 = x1[max_score_i];   *my1 = y1[max_score_i];   *mx2 = x2[max_score_i];   *my2 = y2[max_score_i];   *mlx = lx[max_score_i];   *mly = ly[max_score_i];   *mrx = rx[max_score_i];   *mry = ry[max_score_i];   *sum_pix = npix[max_score_i];   mmx = mxs[max_score_i];   mmy = mys[max_score_i];   /* 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_bstd == bstd[max_score_i]) &&      (last_wstd == wstd[max_score_i]) &&      (last_x1 == *mx1) &&      (last_y1 == *my1) &&      (last_x2 == *mx2) &&      (last_y2 == *my2) &&      (last_npix == *sum_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 */   last_bstd = bstd[max_score_i];   last_wstd = wstd[max_score_i];   last_x1 = *mx1;   last_y1 = *my1;   last_x2 = *mx2;   last_y2 = *my2;   last_npix = *sum_pix;   /* 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(*sum_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 */      my_trace("line selected has no black pixels\n");      my_trace("finished pick_dash_line\n");      return(FALSE);   }   my_trace4("selected line %d, black stddev = %f, white stddev = %f, score = %f\n",             max_score_i, bstd[max_score_i], wstd[max_score_i], max_score);   my_trace4("line projected from (%d, %d) to (%d, %d)\n", *mx1, *my1, *mx2, *my2);   /* must erase the chosen line from the appropriate master hough matrix */   /* so it can't be selected again */   if(which[max_score_i])      *(pacc + (mmy * pax) + mmx) = 0;   else      *(nacc + (mmy * nax) + mmx) = 0;   my_trace("finished pick_dash_line\n");   return(TRUE);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色哟哟精品一区| 91在线码无精品| 91在线观看成人| 欧美精品三级日韩久久| 日韩美女精品在线| 狠狠久久亚洲欧美| 欧美日本韩国一区| 亚洲欧美色图小说| 国产美女在线精品| 欧美一区二区三区四区五区 | 激情久久五月天| 在线观看日韩国产| 亚洲欧洲日韩一区二区三区| 极品瑜伽女神91| 4438x亚洲最大成人网| 亚洲欧美另类综合偷拍| 成人午夜短视频| 26uuu精品一区二区在线观看| 亚洲综合激情网| 欧美亚洲动漫制服丝袜| 亚洲欧美二区三区| 成人avav影音| 中文字幕日本乱码精品影院| 国产成人精品免费一区二区| 久久久久久电影| 国产福利91精品一区二区三区| 精品少妇一区二区三区免费观看| 日韩电影在线免费| 91精品国产综合久久精品性色| 亚洲第一搞黄网站| 欧美日韩国产精选| 亚洲成人激情自拍| 91国偷自产一区二区三区观看| 床上的激情91.| 国产欧美日韩在线观看| 国产精品综合av一区二区国产馆| 精品国产污网站| 国精品**一区二区三区在线蜜桃| 精品国产免费久久| 精品一区二区在线免费观看| 精品国产乱码久久久久久老虎 | 在线精品视频免费播放| 一区二区三区国产精品| 欧美日韩精品是欧美日韩精品| 亚洲国产精品久久久男人的天堂| 欧美日韩另类一区| 久久99精品网久久| 亚洲国产精品传媒在线观看| 99久久精品久久久久久清纯| 亚洲一区av在线| 日韩欧美在线不卡| 成人精品免费看| 亚洲精选免费视频| 欧美日韩视频在线观看一区二区三区| 三级一区在线视频先锋| 欧美精品一区二区三区蜜桃视频| 国产高清不卡一区| 亚洲一区二区三区视频在线| 日韩女优av电影| 成人精品鲁一区一区二区| 亚洲电影欧美电影有声小说| 精品剧情v国产在线观看在线| 国产91露脸合集magnet| 亚洲一区在线观看视频| 精品国产乱码久久久久久蜜臀 | 欧美在线不卡视频| 蜜桃视频一区二区三区| 亚洲国产成人午夜在线一区| 91成人国产精品| 国产一区二区三区综合| 亚洲欧洲精品一区二区精品久久久 | 亚洲成人动漫在线免费观看| 欧美va在线播放| 色婷婷亚洲精品| 国内精品免费**视频| 亚洲一区av在线| 国产精品毛片大码女人| 91免费看`日韩一区二区| 美女国产一区二区| 一级精品视频在线观看宜春院| 日韩一区二区精品| 日本道免费精品一区二区三区| 国产一区二区在线电影| 亚洲免费在线视频| 国产亚洲1区2区3区| 欧美日韩精品欧美日韩精品 | 在线看国产一区二区| 久久99精品久久久久| 亚洲精品国产成人久久av盗摄| 91精品国产综合久久久久久 | 秋霞电影网一区二区| 亚洲激情图片小说视频| 精品国产自在久精品国产| 欧美无砖专区一中文字| av日韩在线网站| 激情图片小说一区| 一区二区三区丝袜| 亚洲人成在线观看一区二区| 国产日产亚洲精品系列| 欧美一区三区四区| 欧美精品第1页| 91久久一区二区| 国产91色综合久久免费分享| 九九视频精品免费| 久久99久久99精品免视看婷婷 | 久久99精品网久久| 日韩和欧美一区二区三区| 亚洲国产一区在线观看| 曰韩精品一区二区| 亚洲精品v日韩精品| 国产精品第13页| 国产精品国产三级国产aⅴ中文 | 国产精品的网站| 国产精品国产三级国产| 中文字幕在线观看一区二区| 欧美激情一区三区| 国产欧美va欧美不卡在线| 欧美经典一区二区| 国产精品久久看| 成人欧美一区二区三区黑人麻豆 | 欧美一区二区视频在线观看| 欧美精品乱人伦久久久久久| 欧美乱妇一区二区三区不卡视频| 欧美视频一区二区三区| 91精品久久久久久久91蜜桃 | 国产中文字幕精品| 国产精品一区专区| av高清久久久| 欧美日韩一区视频| 2024国产精品| 国产精品久久久久三级| 一区二区三区中文在线| 午夜视频在线观看一区二区| 日韩不卡一二三区| 国产精品一二三区在线| 91啪亚洲精品| 91精品国产麻豆国产自产在线| www成人在线观看| 一区精品在线播放| 全部av―极品视觉盛宴亚洲| 国产精品538一区二区在线| 99久久伊人网影院| 欧美色电影在线| 日韩精品自拍偷拍| 国产精品欧美一区喷水| 亚洲线精品一区二区三区八戒| 美女一区二区视频| 成人福利在线看| 欧美日韩一区二区三区高清| 日韩精品一区二区三区视频播放 | 亚洲女人小视频在线观看| 午夜精品久久久久久久久| 国产又黄又大久久| 一本到一区二区三区| 欧美不卡一区二区三区四区| 国产精品理论片| 麻豆国产精品777777在线| 99国产精品久| 精品粉嫩超白一线天av| 亚洲影视在线播放| 成人综合激情网| 日韩精品一区二区三区视频| 亚洲免费av高清| 国产在线精品视频| 欧美精品1区2区| 亚洲乱码日产精品bd| 国产成人免费在线视频| 欧美日本免费一区二区三区| 国产精品久久久久久久第一福利 | 亚洲午夜一区二区| 成人午夜视频免费看| 91精品国产综合久久香蕉的特点| 中文字幕亚洲区| 国产激情精品久久久第一区二区| 欧美精品第一页| 一区二区三区欧美| 91麻豆国产在线观看| 中文字幕免费不卡| 国模一区二区三区白浆| 日韩三级高清在线| 午夜久久久久久电影| 91传媒视频在线播放| 综合欧美一区二区三区| 国产99久久久精品| 欧美国产综合一区二区| 韩国午夜理伦三级不卡影院| 欧美一级午夜免费电影| 日韩高清中文字幕一区| 欧美日韩大陆一区二区| 亚洲一区二区三区国产| 一本色道久久综合亚洲aⅴ蜜桃| 国产精品视频线看| 成人看片黄a免费看在线| 欧美极品xxx| 成人福利视频在线| 亚洲欧美乱综合| 一本大道久久a久久综合婷婷| 亚洲丝袜制服诱惑| 一本久道久久综合中文字幕| 中文字幕亚洲精品在线观看|