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

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

?? dribble.c

?? NIST Handwriting OCR Testbed
?? C
字號:
/*# proc: dribble_down_up - given an image and a starting x position, follows the gradients# proc:                   of character stroke edges from the top of the image down and # proc:                   from the bottom of the image up, stopping at minima points.# proc: dribble_down - starts at the top of the image at a specified x position and follows# proc:                edges downwards, stopping at a local minima.# proc: dribble_up - starts at the bottom of the image at a specified x position and follows# proc:                edges upwards, stopping at a local minima.# proc: sum_dys_left_down - given a starting point in an image, increments to the left a# proc:                specified window width measuring the distance down to the first# proc:                black pixel.# proc: sum_dys_right_down - given a starting point in an image, increments to the right a# proc:                specified window width measuring the distance down to the first# proc:                black pixel.# proc: sum_dys_left_up - given a starting point in an image, increments to the left a# proc:                specified window width measuring the distance up to the first# proc:                black pixel.# proc: sum_dys_right_up - given a starting point in an image, increments to the right a# proc:                specified window width measuring the distance up to the first# proc:                black pixel.# proc: send_feelers_look_down - from a specified point looks left and right to follow# proc:                the edge of a character stroke downwards.# proc: send_feelers_look_up - from a specified point looks left and right to follow# proc:                the edge of a character stroke upwards.# proc: look_left_down - looks for next step to the left down the edge of a# proc:                  character stroke.# proc: look_right_down - looks for next step to the right down the edge of a# proc:                   character stroke.# proc: look_left_up - looks for next step to the left up the edge of a# proc:                  character stroke.# proc: look_right_up - looks for next step to the right up the edge of a# proc:                   character stroke.*/#include <defs.h>#define SMALL_MAX_DY  2     /* threshold to determine if change in dys is flat *//*******************************************************************/dribble_down_up(dx, dy, dn, da, ux, uy, un, ua, cdata, cx, winw, w, h)int **dx, **dy, *dn, *da, **ux, **uy, *un, *ua;unsigned char *cdata;int cx, winw, w, h;{   /* initialize and compute cut statistics */   malloc_points(dx, dy, dn, da);   dribble_down(dx, dy, dn, da, cdata, cx, winw, w, h);   /* initialize and compute cut statistics */   malloc_points(ux, uy, un, ua);   dribble_up(ux, uy, un, ua, cdata, cx, winw, w, h);}/*******************************************************************/dribble_down(dx, dy, dn, da, cdata, cx, winw, w, h)int **dx, **dy, *dn, *da;unsigned char *cdata;int cx, winw, w, h;{   int px, py;   int by, wx, wy;   int ldys, lmdy, lmdy_x;   int rdys, rmdy, rmdy_x;   int lasth, lasty, lastp;   px = cx;   py = 0;   /* if starting from a black pixel ... */   if(*(cdata+px) == 1){      /* choose initial direction */      sum_dys_left_down(&ldys, &lmdy, &lmdy_x, cdata, px, py, winw, w, h);      sum_dys_right_down(&rdys, &rmdy, &rmdy_x, cdata, px+1, py, winw, w, h);      /* if both max dys too small or sum of dys both == 0 ... */      if(((lmdy < SMALL_MAX_DY) && (rmdy < SMALL_MAX_DY)) ||         ((ldys == 0) && (rdys == 0))){         /* simply set the starting point */         add_point(px, py, dx, dy, dn, da);         return;      }      /* otherwise, choose direction of larger mdy */      if(ldys > rdys){         /* initially look left from largest dy */         px = lmdy_x;      }      else{         /* otherwise initially look right */         px = rmdy_x;      }   }   lasth = h-1;   while(py < lasth){      if((by = find_pix_south(1, px, py, cdata, w, h)) == NOT_FOUND){         fill_points_down(px, py, lasth, dx, dy, dn, da);         break;      }      else{         lasty = by-1;         fill_points_down(px, py, lasty, dx, dy, dn, da);         py = lasty;      }      lastp = (*dn)-1;      if(send_feelers_look_down(&wx, &wy, cdata,              &((*dx)[lastp]), &((*dy)[lastp]), winw, w, h) == NOT_FOUND)         break;      else{         px = wx;         py = wy;      }   }}/*******************************************************************/dribble_up(ux, uy, un, ua, cdata, cx, winw, w, h)int **ux, **uy, *un, *ua;unsigned char *cdata;int cx, winw, w, h;{   int px, py;   int by, wx, wy;   int ldys, lmdy, lmdy_x;   int rdys, rmdy, rmdy_x;   int lasty, lastp;   px = cx;   py = h-1;   /* if starting from a black pixel ... */   if(*(cdata+(py*w)+px) == 1){      /* choose initial direction */      sum_dys_left_up(&ldys, &lmdy, &lmdy_x, cdata, px, py, winw, w, h);      sum_dys_right_up(&rdys, &rmdy, &rmdy_x, cdata, px+1, py, winw, w, h);      /* if both max dys too small or sum of dys both == 0 ... */      if(((lmdy < SMALL_MAX_DY) && (rmdy < SMALL_MAX_DY)) ||         ((ldys == 0) && (rdys == 0))){         /* simply set the starting point */         add_point(px, py, ux, uy, un, ua);         return;      }      /* otherwise, choose direction of larger mdy */      if(ldys > rdys){         /* initially look left from largest dy */         px = lmdy_x;      }      else{         /* otherwise initially look right */         px = rmdy_x;      }   }   while(py > 0){      if((by = find_pix_north(1, px, py, cdata, w, h)) == NOT_FOUND){         fill_points_up(px, py, 0, ux, uy, un, ua);         break;      }      else{         lasty = by+1;         fill_points_up(px, py, lasty, ux, uy, un, ua);         py = lasty;      }      lastp = (*un)-1;      if(send_feelers_look_up(&wx, &wy, cdata,              &((*ux)[lastp]), &((*uy)[lastp]), winw, w, h) == NOT_FOUND)         break;       else{         px = wx;         py = wy;      }   }}/*******************************************************************/sum_dys_left_down(dys, mdy, mdy_x, cdata, cx, cy, winw, w, h)int *dys, *mdy, *mdy_x;unsigned char *cdata;int cx, cy, winw, w, h;{   int x, by, delta;   *dys = 0;   *mdy = -1;   *mdy_x = -1;   for(x = cx; x >= max(0, cx-winw); x--){      if((by = find_pix_south(1, x, cy, cdata, w, h)) == NOT_FOUND)         break;      delta = by - cy;      *dys += delta;      if(delta > *mdy){         *mdy = delta;         *mdy_x = x;      }   }}/*******************************************************************/sum_dys_right_down(dys, mdy, mdy_x, cdata, cx, cy, winw, w, h)int *dys, *mdy, *mdy_x;unsigned char *cdata;int cx, cy, winw, w, h;{   int x, by, delta;   *dys = 0;   *mdy = -1;   *mdy_x = -1;   *dys = 0;   for(x = cx; x <= min(w-1, cx+winw); x++){      if((by = find_pix_south(1, x, cy, cdata, w, h)) == NOT_FOUND)         break;      delta = by - cy;      *dys += delta;      if(delta > *mdy){         *mdy = delta;         *mdy_x = x;      }   }}/*******************************************************************/sum_dys_left_up(dys, mdy, mdy_x, cdata, cx, cy, winw, w, h)int *dys, *mdy, *mdy_x;unsigned char *cdata;int cx, cy, winw, w, h;{   int x, by, delta;   *dys = 0;   *mdy = -1;   *mdy_x = -1;   *dys = 0;   for(x = cx; x >= max(0, cx-winw); x--){      if((by = find_pix_north(1, x, cy, cdata, w, h)) == NOT_FOUND)         break;      delta = cy - by;      *dys += delta;      if(delta > *mdy){         *mdy = delta;         *mdy_x = x;      }   }}/*******************************************************************/sum_dys_right_up(dys, mdy, mdy_x, cdata, cx, cy, winw, w, h)int *dys, *mdy, *mdy_x;unsigned char *cdata;int cx, cy, winw, w, h;{   int x, by, delta;   *dys = 0;   *mdy = -1;   *mdy_x = -1;   *dys = 0;   for(x = cx; x <= min(w-1, cx+winw); x++){      if((by = find_pix_north(1, x, cy, cdata, w, h)) == NOT_FOUND)         break;      delta = cy - by;      *dys += delta;      if(delta > *mdy){         *mdy = delta;         *mdy_x = x;      }   }}/*******************************************************************/send_feelers_look_down(wx, wy, cdata, cx, cy, winw, w, h)int *wx, *wy;unsigned char *cdata;int *cx, *cy, winw, w, h;{   if(*cy == h-1)      return(NOT_FOUND);   if(look_left_down(wx, wy, cdata, cx, cy, winw, w, h) == FOUND){      return(FOUND);   }   else if(look_right_down(wx, wy, cdata, cx, cy, winw, w, h) == FOUND){      return(FOUND);   }   else      return(NOT_FOUND);}/*******************************************************************/send_feelers_look_up(wx, wy, cdata, cx, cy, winw, w, h)int *wx, *wy;unsigned char *cdata;int *cx, *cy, winw, w, h;{   if(*cy == 0)      return(NOT_FOUND);   if(look_left_up(wx, wy, cdata, cx, cy, winw, w, h) == FOUND)      return(FOUND);   else if(look_right_up(wx, wy, cdata, cx, cy, winw, w, h) == FOUND)      return(FOUND);   else      return(NOT_FOUND);}/*******************************************************************/look_left_down(wx, wy, cdata, cx, cy, winw, w, h)int *wx, *wy;unsigned char *cdata;int *cx, *cy, winw, w, h;{   int x, nx, xlim;   unsigned char *sptr, *cptr, *nptr;   sptr = cdata + ((*cy) * w) + (*cx);   cptr = sptr;   nptr = cptr + w;   xlim = max(0, (*cx)-winw);   for(x = (*cx), nx = (*cx) - 1; x >= xlim; x--, nx--){      /* if current row runs into black, then ... */      if(*cptr == 1){         /* if only a single black bump */         if(((*cy) > 0) && (*(cptr-w) == 0) &&            (nx >= xlim) && (*(cptr-1) == 0)){            /* then ignore bump */            cptr--;            nptr--;            /* reset current point's x position passed bump */            *cx = nx;         }         else            /* otherwise stop searching in current direction */            break;      }      /* if next row runs into white, then ... */      else if(*nptr == 0){         /* if only a single white well */         if(((*cy)+2 < h) && (*(nptr+w) == 1) &&            (nx >= xlim) && (*(nptr-1) == 1)){            /* then ignore well */            cptr--;            nptr--;         }         else{            /* otherwise found next white step */            *wy = (*cy) + 1;            *wx = x;            return(FOUND);         }      }      /* otherwise current row pix is white and next row pix is black */      else{         cptr--;         nptr--;      }   }   return(NOT_FOUND);}/*******************************************************************/look_right_down(wx, wy, cdata, cx, cy, winw, w, h)int *wx, *wy;unsigned char *cdata;int *cx, *cy, winw, w, h;{   int x, nx, xlim;   unsigned char *sptr, *cptr, *nptr;   sptr = cdata + ((*cy) * w) + (*cx);   cptr = sptr;   nptr = cptr + w;   xlim = min(w-1, (*cx)+winw);   for(x = (*cx), nx = (*cx)+1; x <= xlim; x++, nx++){      /* if current row runs into black, then ... */      if(*cptr == 1){         /* if only a single black bump */         if(((*cy) > 0) && (*(cptr-w) == 0) &&            (nx <= xlim) && (*(cptr+1) == 0)){            /* then ignore bump */            cptr++;            nptr++;            /* reset current point's x position passed bump */            *cx = nx;         }         else            /* otherwise stop searching in current direction */            break;      }      /* if next row runs into white, then ... */      else if(*nptr == 0){         /* if only a single white well */         if(((*cy)+2 < h) && (*(nptr+w) == 1) &&            (nx <= xlim) && (*(nptr+1) == 1)){            /* then ignore well */            cptr++;            nptr++;         }         else{            /* otherwise found next white step */            *wy = (*cy) + 1;            *wx = x;            return(FOUND);         }      }      /* otherwise current row pix is white and next row pix is black */      else{         cptr++;         nptr++;      }   }   return(NOT_FOUND);}/*******************************************************************/look_left_up(wx, wy, cdata, cx, cy, winw, w, h)int *wx, *wy;unsigned char *cdata;int *cx, *cy, winw, w, h;{   int x, nx, xlim;   unsigned char *sptr, *cptr, *nptr;   sptr = cdata + ((*cy) * w) + (*cx);   cptr = sptr;   nptr = cptr - w;   xlim = max(0, (*cx)-winw);   for(x = (*cx), nx = (*cx)-1; x >= xlim; x--, nx--){      /* if current row runs into black, then ... */      if(*cptr == 1){         /* if only a single black bump */         if(((*cy) < h-1) && (*(cptr+w) == 0) &&            (nx >= xlim) && (*(cptr-1) == 0)){            /* then ignore bump */            cptr--;            nptr--;            /* reset current point's x position passed bump */            *cx = nx;         }         else            /* otherwise stop searching in current direction */            break;      }      /* if next row runs into white, then ... */      else if(*nptr == 0){         /* if only a single white well */         if(((*cy) > 2) && (*(nptr-w) == 1) &&            (nx >= xlim) && (*(nptr-1) == 1)){            /* then ignore well */            cptr--;            nptr--;         }         else{            /* otherwise found next white step */            *wy = (*cy) - 1;            *wx = x;            return(FOUND);         }      }      /* otherwise current row pix is white and next row pix is black */      else{         cptr--;         nptr--;      }   }   return(NOT_FOUND);}/*******************************************************************/look_right_up(wx, wy, cdata, cx, cy, winw, w, h)int *wx, *wy;unsigned char *cdata;int *cx, *cy, winw, w, h;{   int x, nx, xlim;   unsigned char *sptr, *cptr, *nptr;   sptr = cdata + ((*cy) * w) + (*cx);   cptr = sptr;   nptr = cptr - w;   xlim = min(w-1, (*cx)+winw);   for(x = (*cx), nx=(*cx)+1; x <= min(w-1, (*cx)+winw); x++, nx++){      /* if current row runs into black, then ... */      if(*cptr == 1){         /* if only a single black bump */         if(((*cy) < h-1) && (*(cptr+w) == 0) &&            (nx <= xlim) && (*(cptr+1) == 0)){            /* then ignore bump */            cptr++;            nptr++;            /* reset current point's x position passed bump */            *cx = nx;         }         else            /* otherwise stop searching in current direction */            break;      }      /* if next row runs into white, then ... */      else if(*nptr == 0){         /* if only a single white well */         if(((*cy) > 2) && (*(nptr-w) == 1) &&            (nx <= xlim) && (*(nptr+1) == 1)){            /* then ignore well */            cptr++;            nptr++;         }         else{            /* otherwise found next white step */            *wy = (*cy) - 1;            *wx = x;            return(FOUND);         }      }      /* otherwise current row pix is white and next row pix is black */      else{         cptr++;         nptr++;      }   }   return(NOT_FOUND);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产亚洲女人久久久久毛片| 久久激情五月激情| 国产成人精品午夜视频免费 | 国内精品伊人久久久久av一坑| 欧美优质美女网站| 亚洲成人高清在线| 91精品黄色片免费大全| 首页欧美精品中文字幕| 日韩一级二级三级精品视频| 久久99热这里只有精品| 久久久美女毛片 | 久久国产成人午夜av影院| www精品美女久久久tv| www.久久久久久久久| 亚洲人成影院在线观看| 欧美一区二区播放| 成人99免费视频| 日韩精品一区第一页| 亚洲成人精品在线观看| 欧美国产一区二区在线观看| 欧美视频一二三区| 国产乱子伦视频一区二区三区| 国产精品国产成人国产三级 | 亚洲欧美国产三级| 精品剧情v国产在线观看在线| 99久久免费国产| 国产最新精品精品你懂的| 亚洲欧美日韩在线不卡| 久久久久久免费毛片精品| 欧美日韩在线播| 91色视频在线| 在线综合视频播放| 91国偷自产一区二区三区成为亚洲经典 | 国产一区二区精品久久99| 亚洲午夜国产一区99re久久| 中文字幕一区日韩精品欧美| 精品精品国产高清一毛片一天堂| 欧美在线观看视频在线| 99精品久久只有精品| av一二三不卡影片| 国产剧情一区二区三区| 国产精品亚洲成人| 经典三级一区二区| 国产尤物一区二区在线| 精品在线观看视频| 国产一区二区三区四 | 亚洲另类一区二区| 亚洲天堂网中文字| 亚洲最大色网站| 亚洲高清在线精品| 久久69国产一区二区蜜臀| 久久精品国产成人一区二区三区 | 日韩精品高清不卡| 美女尤物国产一区| 国产精品456露脸| 99久久精品免费看国产免费软件| 成人av网站在线观看| 成人动漫av在线| 欧美伊人久久大香线蕉综合69| 白白色 亚洲乱淫| 91国产福利在线| 欧美成人伊人久久综合网| www成人在线观看| 欧美激情一区三区| 国产精品99久久久久久久女警 | 日韩午夜精品电影| 久久精品水蜜桃av综合天堂| 国产精品女人毛片| 午夜欧美视频在线观看| 狠狠色丁香久久婷婷综| 色综合夜色一区| 日韩欧美第一区| 一区二区三区精品在线观看| 国产在线视频不卡二| 在线亚洲精品福利网址导航| 久久久精品tv| 久久国产精品99久久久久久老狼| 成人免费高清在线| 精品理论电影在线观看 | 全国精品久久少妇| 99久久精品国产麻豆演员表| 日韩欧美国产一区二区三区| 亚洲一级二级三级在线免费观看| 国产不卡视频一区二区三区| 欧美日韩国产首页在线观看| 中文字幕一区二区三区视频| 麻豆91在线播放| 欧美一级欧美一级在线播放| 午夜视频在线观看一区二区三区 | 天堂资源在线中文精品| 91免费看`日韩一区二区| 中文字幕欧美国产| 国产一区视频导航| 久久久综合网站| 国产成人一区在线| 欧美国产精品劲爆| 福利一区二区在线观看| 国产精品入口麻豆原神| 亚洲aaa精品| 日韩精品在线看片z| 国产盗摄视频一区二区三区| 久久男人中文字幕资源站| 国产福利不卡视频| 国产精品白丝在线| 91极品视觉盛宴| 激情六月婷婷久久| 久久久久久久久久美女| 成人激情开心网| 亚洲一区欧美一区| 精品处破学生在线二十三| 韩国中文字幕2020精品| 亚洲日本在线天堂| 91麻豆精品国产91久久久资源速度| 免费亚洲电影在线| 国产欧美综合色| 在线免费观看不卡av| 九九精品视频在线看| 亚洲欧美国产77777| 日韩精品最新网址| 91久久一区二区| 国产福利一区二区三区| 日韩精品午夜视频| 亚洲欧美视频在线观看| 久久综合色天天久久综合图片| 在线观看日韩国产| 国产91精品在线观看| 日本成人在线网站| 亚洲乱码一区二区三区在线观看| 久久久久久久久久美女| 91精品国产一区二区| 欧美亚洲国产一区二区三区va| 国产成人免费视频网站高清观看视频 | 国产成人一级电影| 久久er精品视频| 日韩精品一二三四| 午夜在线成人av| 一区二区三区欧美日韩| 综合激情成人伊人| 国产精品嫩草影院com| 欧美激情在线一区二区三区| 精品福利在线导航| 日韩精品中文字幕一区| 精品国产乱码久久| 精品第一国产综合精品aⅴ| 欧美mv日韩mv国产| 国产婷婷一区二区| 国产欧美一区二区精品忘忧草| 欧美mv和日韩mv的网站| 精品国产欧美一区二区| 欧美精品一区二区三区久久久| 欧美三级电影网| 欧美不卡在线视频| 国产日韩一级二级三级| 日韩一区在线免费观看| 亚洲国产日韩a在线播放性色| 成人免费电影视频| 欧美日韩小视频| 精品久久国产老人久久综合| 久久综合久色欧美综合狠狠| 国产精品素人一区二区| 亚洲电影在线播放| 国产精品538一区二区在线| 91免费看片在线观看| 51久久夜色精品国产麻豆| 久久精品欧美日韩精品| 亚洲综合色区另类av| 久久99久久久久| 色94色欧美sute亚洲线路二| 精品少妇一区二区三区| 亚洲福利国产精品| 成人激情免费电影网址| 精品精品国产高清a毛片牛牛 | 亚洲国产电影在线观看| 日韩av高清在线观看| 91亚洲精品一区二区乱码| 精品日韩一区二区| 一区二区三区毛片| 97精品久久久久中文字幕| 欧美成人伊人久久综合网| 亚洲自拍偷拍九九九| 成人国产在线观看| 欧美第一区第二区| 婷婷开心激情综合| 色综合久久天天| 久久久精品tv| 久久se这里有精品| 日韩一区二区在线播放| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 美脚の诱脚舐め脚责91 | 欧美一区二区三区啪啪| 亚洲国产精品影院| 欧美午夜理伦三级在线观看| 亚洲一区二区三区四区在线观看 | 国产伦精一区二区三区| 精品国精品国产| 国产成人精品影视| 国产精品久久夜| 日本精品免费观看高清观看| 亚洲欧洲日韩综合一区二区| 色中色一区二区|