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

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

?? pixel8.c

?? NIST Handwriting OCR Testbed
?? C
字號:
/*# proc: find_pix_north - from a given point in an 8-bit pixel image, finds the# proc:                  the first pixel upward that has the specified value.# proc: find_pix_south - from a given point in an 8-bit pixel image, finds the# proc:                  the first pixel downward that has the specified value.# proc: find_pix_east - from a given point in an 8-bit pixel image, finds the# proc:                 the first pixel rightward that has the specified value.# proc: find_pix_west - from a given point in an 8-bit pixel image, finds the# proc:                 the first pixel leftward that has the specified value.# proc: find_pix_fwd_on_line - searches forward along a specified segment of a line# proc:                 trajectory for the first pixel that has the specified value.# proc: find_pix_bwd_on_line - searches backward along a specified segment of a line# proc:                 trajectory for the first pixel that has the specified value.# proc: n_pixels_on_line - counts the number of pixels with specified value along# proc:                 a given line trajectory.# proc: sub_column_eq - checks if the designated portion of a column in an 8-bit# proc:                 pixel image equals the specified pixel value.# proc: sub_row_eq - checks if the designated portion of a row in an 8-bit# proc:              pixel image equals the specified pixel value.# proc: next_pix_in_region_ptr - resumes search for a pixel in a region of a binary# proc:                      char image specified by a top and bottom trajectory using# proc:                      pointers.# proc: next_pix_in_region - resumes search for a pixel in a region of a binary char# proc:                      image specified by a top and bottom trajectory spanning the# proc:                      entire width of the image.*/#include <stdio.h>#include <defs.h>/***************************************************************************//* find_pix_north - locates the next pixel of specified value upward,      *//* given a starting point in the image from which to begin the search. If  *//* pixel is not found, then the routine returns NOT_FOUND.                 *//***************************************************************************/find_pix_north(pix, sx, sy, cdata, w, h)int pix, sx, sy, w, h;unsigned char *cdata;{   unsigned char *cptr;   int y;   if(!(is_in_range(pix, 0, 255)))      fatalerr("find_pix_north", "pixel value must be [0..255]", NULL);   if((!is_in_range(sx, 0, w-1)) ||      (!is_in_range(sy, 0, h-1))){      fatalerr("find_pix_north", "coordinates exceed image dimensions", NULL);   }   y = sy;   cptr = cdata + (sy*w) + sx;   while((y >= 0) && (*cptr != pix)){      y--;      cptr -= w;   }   if(y < 0)      return(NOT_FOUND);   else      return(y);}/***************************************************************************//* find_pix_south - locates the next pixel of specified value downward,    *//* given a starting point in the image from which to begin the search. If  *//* pixel is not found, then the routine returns NOT_FOUND.                 *//***************************************************************************/find_pix_south(pix, sx, sy, cdata, w, h)int pix, sx, sy, w, h;unsigned char *cdata;{   unsigned char *cptr;   int y;   if(!(is_in_range(pix, 0, 255)))      fatalerr("find_pix_south", "pixel value must be [0..255]", NULL);   if((!is_in_range(sx, 0, w-1)) ||      (!is_in_range(sy, 0, h-1))){      fatalerr("find_pix_south", "coordinates exceed image dimensions", NULL);   }   y = sy;   cptr = cdata + (sy*w) + sx;   while((y < h) && (*cptr != pix)){      y++;      cptr += w;   }   if(y >= h)      return(NOT_FOUND);   else      return(y);}/***************************************************************************//* find_pix_east - locates the next pixel of specified value to the right, *//* given a starting point in the image from which to begin the search. If  *//* pixel is not found, then the routine returns NOT_FOUND.                 *//***************************************************************************/find_pix_east(pix, sx, sy, cdata, w, h)int pix, sx, sy, w, h;unsigned char *cdata;{   unsigned char *cptr;   int x;   if(!(is_in_range(pix, 0, 255)))      fatalerr("find_pix_east", "pixel value must be [0..255]", NULL);   if((!is_in_range(sx, 0, w-1)) ||      (!is_in_range(sy, 0, h-1)))      fatalerr("find_pix_east", "coordinates exceed image dimensions", NULL);   x = sx;   cptr = cdata + (sy*w) + sx;   while((x < w) && (*cptr != pix)){      x++;      cptr++;   }   if(x >= w)      return(NOT_FOUND);   else      return(x);}/***************************************************************************//* find_pix_west - locates the next pixel of specified value to the left,  *//* given a starting point in the image from which to begin the search. If  *//* pixel is not found, then the routine returns NOT_FOUND.                 *//***************************************************************************/find_pix_west(pix, sx, sy, cdata, w, h)int pix, sx, sy, w, h;unsigned char *cdata;{   unsigned char *cptr;   int x;   if(!(is_in_range(pix, 0, 255)))      fatalerr("find_pix_west", "pixel value must be [0..255]", NULL);   if((!is_in_range(sx, 0, w-1)) ||      (!is_in_range(sy, 0, h-1)))      fatalerr("find_pix_west", "coordinates exceed image dimensions", NULL);   x = sx;   cptr = cdata + (sy*w) + sx;   while((x >= 0) && (*cptr != pix)){      x--;      cptr--;   }   if(x < 0)      return(NOT_FOUND);   else      return(x);}/***************************************************************************//* find_pix_fwd_on_line - locates the next pixel of specified value        *//* searching forward along a line trajectory given starting and ending     *//* points on the line. If no pixel is found, then the routine returns      *//* NOT_FOUND.                                                              *//***************************************************************************/find_pix_fwd_on_line(pix, fi, ti, lx, ly, num, cdata, w, h)int pix, fi, ti, *lx, *ly, w, h;unsigned char *cdata;{   int i, max_i;   if(!(is_in_range(pix, 0, 255)))      fatalerr("find_pix_fwd_on_line", "pixel value must be [0..255]", NULL);   max_i = num - 1;   if(!is_in_range(fi, 0, max_i))      fatalerr("find_pix_fwd_on_line", "from-index exceeds list length", NULL);   if(!is_in_range(ti, 0, max_i))      fatalerr("find_pix_fwd_on_line", "to-index exceeds list length", NULL);   i = fi;   while(i <= ti){      if (!valid_point(lx[i], ly[i], w, h))         fatalerr("find_pix_fwd_on_line", "coordinates exceed image dimensions", NULL);      if(*(cdata+(ly[i]*w)+lx[i]) == pix)         return(i);      i++;   }   return(NOT_FOUND);}/***************************************************************************//* find_pix_bwd_on_line - locates the next pixel of specified value        *//* searching backward along a line trajectory given starting and ending    *//* points on the line. If no pixel is found, then the routine returns      *//* NOT_FOUND.                                                              *//***************************************************************************/find_pix_bwd_on_line(pix, fi, ti, lx, ly, num, cdata, w, h)int pix, fi, ti, *lx, *ly, w, h;unsigned char *cdata;{   int i, max_i;   if(!(is_in_range(pix, 0, 255)))      fatalerr("find_pix_bwd_on_line", "pixel value must be [0..255]", NULL);   max_i = num - 1;   if(!is_in_range(fi, 0, max_i))      fatalerr("find_pix_bwd_on_line", "from-index exceeds list length", NULL);   if(!is_in_range(ti, 0, max_i))      fatalerr("find_pix_bwd_on_line", "to-index exceeds list length", NULL);   i = fi;   while(i >= ti){      if (!valid_point(lx[i], ly[i], w, h))         fatalerr("find_pix_bwd_on_line", "coordinates exceed image dimensions", NULL);      if(*(cdata+(ly[i]*w)+lx[i]) == pix)         return(i);      i--;   }   return(NOT_FOUND);}/***************************************************************************//* n_pixels_on_line - counts the number of pixels with specified value     *//* along a given line trajectory and determines the location of the left-  *//* most and right-most pixels with the specified value on the line.        *//***************************************************************************/n_pixels_on_line(npix, lx, ly, rx, ry, pix, x1, y1, x2, y2, cdata, w, h)int *npix, *lx, *ly, *rx, *ry;int pix, x1, y1, x2, y2;unsigned char *cdata;int w, h;{   int i, li, ri, max_i;   int *xlist, *ylist, num, alloc;   if(!is_in_range(pix, 0, 255))      fatalerr("n_pixels_on_line", "pixel value must be [0..255]", NULL);   if(!valid_point(x1, y1, w, h))      fatalerr("n_pixels_on_line","Point x1, y1","Invalid");    if(!valid_point(x2, y2, w, h))      fatalerr("n_pixels_on_line","Point x2, y2","Invalid");   /* interpolate between line's endpoints */   alloc = 0;   bres_line_alloc(x1, y1, x2, y2, &xlist, &ylist, &num, &alloc);   /* find the left-most pixel on the line */   max_i = num - 1;   if((li = find_pix_fwd_on_line(pix, 0, max_i, xlist, ylist, num,                                   cdata, w, h)) == NOT_FOUND){      *lx = NOT_FOUND;      *ly = NOT_FOUND;      *rx = NOT_FOUND;      *ry = NOT_FOUND;      *npix = 0;      free(xlist);      free(ylist);      return;   }   else {      /* store the location of the left-most pixel */      *lx = xlist[li];      *ly = ylist[li];   }   /* find the right-most pixel on the line */   if((ri = find_pix_bwd_on_line(pix, max_i, li, xlist, ylist, num,                                   cdata, w, h)) == NOT_FOUND){      /* should never reach here, because fwd search would already have failed */      fatalerr("n_pixels_on_line", "search backward for a specified pixel failed",               "should never reach this point");   }   else{      /* store the location of the right-most pixel */      *rx = xlist[ri];      *ry = ylist[ri];   }   /* count the pixels with specified value between the left-most and right-most pixels */   *npix = 0;   for(i = li; i <= ri; i++){      if(*(cdata + (ylist[i]*w) + xlist[i]) == pix)         (*npix)++;   }   free(xlist);   free(ylist);}/***************************************************************************//* sub_column_eq - checks if designated portion of column in an 8-bit      *//* per pixel image equals the specified pixel value.                       *//***************************************************************************/sub_column_eq(pix, x, y1, y2, cdata, w, h)int pix, x, y1, y2;unsigned char *cdata;int w, h;{   int y, max_y;   unsigned char *cptr;   if(!is_in_range(pix, 0, 255))      fatalerr("sub_column_eq", "pixel values not in range [0..255]", NULL);   max_y = h - 1;   if((!is_in_range(x, 0, w-1)) ||      (!is_in_range(y1, 0, max_y)) ||      (!is_in_range(y2, 0, max_y))){      fatalerr("sub_column_eq", "coordinates exceed image dimensions", NULL);   }   cptr = cdata + (y1*w) + x;   for(y = y1; y <= y2; y++){      if(*cptr != pix)         return(FALSE);      cptr += w;   }   return(TRUE);}/***************************************************************************//* sub_row_eq - checks if designated portion of row in an 8-bit per pixel  *//* image equals the specified pixel value.                                 *//***************************************************************************/sub_row_eq(pix, x1, x2, y, cdata, w, h)int x1, x2, y;unsigned char *cdata;int w, h;{   int x, max_x;   unsigned char *cptr;   if(!is_in_range(pix, 0, 255))      fatalerr("sub_row_eq", "pixel values not in range [0..255]", NULL);   max_x = w - 1;   if((!is_in_range(x1, 0, max_x)) ||      (!is_in_range(x2, 0, max_x)) ||      (!is_in_range(y, 0, h-1)))      fatalerr("sub_row_eq", "coordinates exceed image dimensions", NULL);   cptr = cdata + (y*w) + x1;   for(x = x1; x <= x2; x++){      if(*cptr != pix)         return(FALSE);      cptr ++;   }   return(TRUE);}/***********************************************************************************/next_pix_in_region_ptr(pix, px, py, sx, sy, ex, ey, ptys, pbys, cdata, w, h)int pix, *px, *py, sx, sy, ex, ey;int **ptys, **pbys;unsigned char *cdata;int w, h;{   unsigned char *cptr;   int cx, cy;   int *tys, *bys;   if(!is_in_range(pix, 0, 255))      fatalerr("next_pix_in_region_ptr", "pixel value not in range [0..255]", NULL);   if(!is_in_range(sx, 0, w-1) || !is_in_range(sy, 0, h-1))      fatalerr("next_pix_in_region_ptr", "start location exceeds image dimensions", NULL);   cx = sx;   cy = sy;   tys = *ptys;   bys = *pbys;   if(cy > *bys){      cx++;      tys++;      bys++;      if(cx > ex){         *ptys = tys;         *pbys = bys;         return(NOT_FOUND);      }      cy = *tys;   }   cptr = cdata + (cy*w) + cx;   while(cx <= ex){      if(*cptr == pix){         *px = cx;         *py = cy;         *ptys = tys;         *pbys = bys;         return(FOUND);      }      cy++;      if(cy > *bys){         cx++;         tys++;         bys++;         if(cx > ex)            break;         cy = *tys;      }      cptr = cdata + (cy*w) + cx;   }   *ptys = tys;   *pbys = bys;   return(NOT_FOUND);}/***********************************************************************************/next_pix_in_region(pix, px, py, sx, sy, tys, bys, cdata, w, h)int pix, *px, *py, sx, sy;int *tys, *bys;unsigned char *cdata;int w, h;{   unsigned char *cptr;   int cx, cy;   if(!is_in_range(pix, 0, 255))      fatalerr("next_pix_in_region", "pixel value not in range [0..255]", NULL);   if(!is_in_range(sx, 0, w-1) || !is_in_range(sy, 0, h-1))      fatalerr("next_pix_in_region", "start location exceeds image dimensions", NULL);   cx = sx;   cy = sy;   if(cy > bys[cx]){      cx++;      if(cx >= w)         return(NOT_FOUND);      cy = tys[cx];   }   cptr = cdata + (cy*w) + cx;   while(cx < w){      if(*cptr == pix){         *px = cx;         *py = cy;         return(FOUND);      }      cy++;      if(cy > bys[cx]){         cx++;         if(cx >= w)            break;         cy = tys[cx];      }      cptr = cdata + (cy*w) + cx;   }   return(NOT_FOUND);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区欧美视频| www.欧美亚洲| 91激情在线视频| 精品国产乱码久久久久久久 | 亚洲精品成人少妇| 激情六月婷婷久久| 欧美日韩一区高清| 亚洲欧美一区二区三区孕妇| 九九九久久久精品| 欧美日韩精品欧美日韩精品一综合| 久久蜜臀精品av| 激情六月婷婷综合| 日韩欧美一区二区久久婷婷| 亚洲sss视频在线视频| 99久久精品久久久久久清纯| 中文字幕精品综合| 国产乱人伦精品一区二区在线观看 | 7777女厕盗摄久久久| 一区二区三区不卡在线观看| 成人精品国产免费网站| 久久这里只有精品视频网| 老司机精品视频线观看86 | gogogo免费视频观看亚洲一| 久久一二三国产| 精品影院一区二区久久久| 日韩亚洲国产中文字幕欧美| 日本不卡在线视频| 日韩欧美在线一区二区三区| 日本中文在线一区| 91精品国产丝袜白色高跟鞋| 日韩专区一卡二卡| 69堂精品视频| 精品一区二区三区av| 日韩欧美黄色影院| 国产盗摄一区二区| 亚洲黄色免费电影| 国产凹凸在线观看一区二区 | 欧美老人xxxx18| 亚洲va天堂va国产va久| 欧美另类高清zo欧美| 亚洲国产成人精品视频| 欧美电影影音先锋| 蜜臀av在线播放一区二区三区| 欧美一级久久久| 韩国v欧美v日本v亚洲v| 国产欧美一区二区三区网站| 成人精品高清在线| 亚洲一卡二卡三卡四卡无卡久久| 欧美日韩一区二区三区高清| 青青国产91久久久久久| 久久在线观看免费| 99久久综合狠狠综合久久| 亚洲精品国产一区二区精华液 | 久久久久久久网| 99久久精品一区| 日韩国产精品大片| 久久久久久久综合| 欧美性色黄大片手机版| 日本强好片久久久久久aaa| 久久久久国产精品厨房| 91香蕉视频mp4| 日本欧美一区二区在线观看| 国产欧美日韩不卡| 欧美日韩一级片在线观看| 蜜臀久久99精品久久久久久9 | av在线不卡电影| 婷婷综合另类小说色区| 亚洲精品一区二区三区福利| 91视频观看视频| 免费视频一区二区| 日韩美女啊v在线免费观看| 欧美男人的天堂一二区| 国产福利精品一区二区| 亚洲自拍偷拍九九九| 久久久不卡网国产精品二区| 在线精品观看国产| 成人一级黄色片| 秋霞av亚洲一区二区三| 亚洲免费色视频| 国产三级精品三级在线专区| 欧美日韩二区三区| 91美女精品福利| 国产精品一区二区在线播放| 亚洲高清在线精品| 樱桃国产成人精品视频| 久久精品男人天堂av| 欧美日韩精品一二三区| av日韩在线网站| 精品在线一区二区三区| 日韩电影免费在线看| 一二三四社区欧美黄| 自拍视频在线观看一区二区| 久久精品男人的天堂| 精品日韩欧美在线| 欧美一二三区在线| 欧美挠脚心视频网站| 欧美色成人综合| 在线一区二区三区四区五区| 成人avav在线| 粉嫩一区二区三区性色av| 久久国产精品第一页| 日韩制服丝袜av| 午夜一区二区三区在线观看| 亚洲精品高清在线观看| 亚洲免费视频成人| 亚洲精品国产a| 亚洲人亚洲人成电影网站色| 中文字幕欧美激情一区| 国产日产欧产精品推荐色| 欧美精品一区二区三区很污很色的 | 久久99久久99| 精品在线一区二区三区| 美女国产一区二区| 麻豆成人免费电影| 精品一区二区综合| 狠狠网亚洲精品| 国产成人自拍高清视频在线免费播放| 裸体健美xxxx欧美裸体表演| 青青青伊人色综合久久| 麻豆国产91在线播放| 国产精品一区2区| 国产成人啪免费观看软件| 高清不卡一二三区| 99九九99九九九视频精品| 91在线精品秘密一区二区| 在线免费观看视频一区| 制服丝袜av成人在线看| 欧美tickle裸体挠脚心vk| 久久精品欧美日韩精品| 亚洲色图.com| 性久久久久久久| 激情五月婷婷综合| 成人免费黄色在线| 欧美色网站导航| 欧美精品一区二区三区在线| 国产精品久久久久久亚洲伦| 一区二区三区**美女毛片| 视频一区在线视频| 国产一区免费电影| 91久久免费观看| 日韩精品一区在线| 国产精品嫩草久久久久| 午夜婷婷国产麻豆精品| 国产一区二区三区免费播放| 91免费视频观看| 日韩美一区二区三区| 国产精品久久久久久久久搜平片| 亚洲第一二三四区| 国产美女娇喘av呻吟久久| 91在线免费看| 精品盗摄一区二区三区| 一区二区三区日韩欧美| 久久99精品久久久久久动态图| 国产91精品入口| 欧美一级电影网站| 亚洲欧美色一区| 国产精品91xxx| 欧美精品久久天天躁| 国产精品视频免费| 蜜桃视频在线一区| 91国偷自产一区二区开放时间 | 成人福利电影精品一区二区在线观看| 欧美综合色免费| 国产亚洲成aⅴ人片在线观看| 亚洲在线观看免费| 国产盗摄女厕一区二区三区| 欧美日韩中字一区| 中文字幕在线不卡一区二区三区| 久久国产精品露脸对白| 欧美视频在线观看一区| 欧美国产97人人爽人人喊| 久久精品国产精品亚洲红杏| 91蜜桃婷婷狠狠久久综合9色| 久久午夜色播影院免费高清| 天堂蜜桃91精品| 一本大道综合伊人精品热热| 国产性色一区二区| 久久成人av少妇免费| 欧美日韩精品三区| 亚洲美女屁股眼交| 成人av电影在线网| 中文字幕精品在线不卡| 国产精品综合二区| 精品美女一区二区三区| 亚洲国产va精品久久久不卡综合| 99国产精品99久久久久久| 国产亚洲精品bt天堂精选| 精品一区二区在线观看| 日韩欧美的一区二区| 蜜臀av一区二区三区| 91精品福利在线一区二区三区 | 国产视频一区在线播放| 免费在线看一区| 欧美一区二区三区喷汁尤物| 亚洲高清一区二区三区| 欧美日韩高清一区二区不卡| 亚洲成人av免费| 欧美精品丝袜中出| 日韩高清国产一区在线| 日韩精品专区在线影院重磅|