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

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

?? zoom_or.c

?? NIST Handwriting OCR Testbed
?? C
字號:
/*# proc: zoomN - shrinks image by logical OR of square tiles, handles 1/8 bit# proc:         per pixel input -and- outputs, padding of outputs, prealloc# proc:         or internal alloc of output data.# proc: zoomx4 - shrinks an unsigned char image down by logical OR of tiles# proc:          of size 4x4. wrapper call to zoomN# proc: zoomx3 - shrinks an unsigned char image down by logical OR of tiles# proc:          of size 3x3. wrapper call to zoomN# proc: zoomx2 - shrinks an unsigned char image down by logical OR of tiles# proc:          of size 2x2. wrapper call to zoomN# proc: zoomx8 - shrinks an unsigned char image down by logical OR of tiles# proc:          of size 8x8. wrapper call to zoomN# proc: zoomxN - shrinks an unsigned char image down by logical OR of tiles# proc:          of size NxN. wrapper call to zoomN# proc: zoomaux{2,3,4,8,N} - auxialliary zooming routines called by zoomN.# proc                 know what you are doing before calling these!*/#include <stddef.h>#include <zoom_or.h>#define BITSPERBYTE 8zoomx2(inp, iw, ih, out, ow, oh)unsigned char *inp; int iw, ih;unsigned char **out; int *ow, *oh;{   zoomN(2, inp, iw, ih, INPUT_IS_8, NULL, out, ow, oh,          NO_MK_1_BIT, MK_8_BIT, NO_ZM_ALLOC, ZM_ALLOC);}zoomx3(inp, iw, ih, out, ow, oh)unsigned char *inp; int iw, ih;unsigned char **out; int *ow, *oh;{   zoomN(3, inp, iw, ih, INPUT_IS_8, NULL, out, ow, oh,          NO_MK_1_BIT, MK_8_BIT, NO_ZM_ALLOC, ZM_ALLOC);}zoomx4(inp, iw, ih, out, ow, oh)unsigned char *inp; int iw, ih;unsigned char **out; int *ow, *oh;{   zoomN(4, inp, iw, ih, INPUT_IS_8, NULL, out, ow, oh,          NO_MK_1_BIT, MK_8_BIT, NO_ZM_ALLOC, ZM_ALLOC);}zoomx8(inp, iw, ih, out, ow, oh)unsigned char *inp; int iw, ih;unsigned char **out; int *ow, *oh;{   zoomN(8, inp, iw, ih, INPUT_IS_8, NULL, out, ow, oh,          NO_MK_1_BIT, MK_8_BIT, NO_ZM_ALLOC, ZM_ALLOC);}zoomxN(f, inp, iw, ih, out, ow, oh)unsigned char *inp; int f, iw, ih;unsigned char **out; int *ow, *oh;{   zoomN(f, inp, iw, ih, INPUT_IS_8, NULL, out, ow, oh,          NO_MK_1_BIT, MK_8_BIT, NO_ZM_ALLOC, ZM_ALLOC);}/* crunch by OR ing of NxN tiles. If any pixel in a tile is set the	*//* output image pixel is set.						*//* inputs:								*//*    n                 crunching factor, allowed 1, 2, 3, 4, 8		*//*   i18		Either  a 1 or 8 bit per pixel image		*//*   w, h	        with width w and height h.			*//*   in_1_or_8          if the input is 8 bits per pixel then set	*//*			in_1_or_8 to INPUT_IS_8	else INPUT_IS_1		*//*   mk_1_bit		if a 1 bit per pixel output is desired then	*//*                      set mk_1_bit to MK_1_BIT else set NO_MK_1_BIT	*//*   mk_8_bit		if a 8 bit per pixel output is desired then	*//*                      set mk_8_bit to MK_8_BIT else set NO_MK_8_BIT	*//*   alloc_1_bit	if a 1 bit output is desired and already 	*//*                  alloced then set this NO_ZM_ALLOC else set ZM_ALLOC	*//*   alloc_8_bit	if a 8 bit output is desired and already	*//*                  alloced then set this NO_ZM_ALLOC else set ZM_ALLOC	*//* outputs:								*//*   o1		The address of the pointer to the 1 bit per pixel	*//*   		output image.						*//*   o8         The address of the pointer to the 8 bit per pixel	*//*		output image.						*//*   ow		The address of the output width				*//*   oh		The address of the output height			*//* return codes:							*//*    1		nothing was done, neither 1 nor 8 bit images were	*//*		asked for.						*//*    2		1 bit output image was requested, the space was		*//*              apparently prealloced but the output block was NULL	*//*    3		8 bit output image was requested, the space was		*//*              apparently prealloced but the output block was NULL	*//*    4         input is apparently not 1 bit (INPUT_IS_1) nor 8 bit	*//*		(INPUT_IS_8)						*//*    5         mk_8_bit is neither MK_8_BIT nor NO_MK_8_BIT		*//*    6         alloc_1_bit is neither ZM_ALLOC nor NO_ZM_ALLOC		*//*    7         alloc_8_bit is neither ZM_ALLOC nor NO_ZM_ALLOC		*//*    8         attempt to crunch by a nonpositive integer.		*//*  notes:								*//*    if you crunch by a factor of 1 then output is a copy of input	*//*    unless 1 bit per pixel output is required whence padding is done	*//*    if necessary.							*//*									*//*    if you will eventually need 1 bit per pixel outputs then this	*//*    routine handle padding. It will optionally make both 1 and 8 bit	*//*    outputs, correctly padded. If you opt not to make 1 bit output	*//*    you will have to do the padding yourself later			*//*									*//*    all the internal operations are done on 8 bit per pixel ops	*//*    so the 8 bit output is always available, so you can get it for	*//*    free. only use NO_MK_8_BIT if you are going to free the 8 bit	*//*    output yourself anyway.						*/int zoomN(n, i18, iw, ih, in_1_or_8, o1, o8, ow, oh,       mk_1_bit, mk_8_bit, alloc_1_bit, alloc_8_bit)unsigned char *i18, **o1, **o8;int n, in_1_or_8, iw, ih, *ow, *oh;int mk_1_bit, mk_8_bit, alloc_1_bit, alloc_8_bit;{unsigned char *inp8, *inp1, *out8, *out1, *tmp;unsigned char *mallocate_image();int outw, oldw, outh;   if (mk_1_bit == NO_MK_1_BIT && mk_8_bit == NO_MK_8_BIT)      return 1;   switch (in_1_or_8)   {      case INPUT_IS_1 : inp1 = i18;                        inp8 = mallocate_image(iw, ih, 8);                        bits2bytes(inp1, inp8, iw*ih);                        break;      case INPUT_IS_8 : inp1 = NULL;                        inp8 = i18;                        break;      default:          return 4;   }   outw = iw / n;   outh = ih / n;   switch (mk_8_bit)   {      case    MK_8_BIT : switch (alloc_8_bit)                         {                            case ZM_ALLOC :                               out8 = mallocate_image(outw, outh, 8);                               break;                            case NO_ZM_ALLOC :                               if ((out8 = *o8) == NULL)                                  return 3;                               break;                            default :                               return 7;                         }			 break;      case NO_MK_8_BIT : out8 = mallocate_image(outw, outh, 8);                         break;      default          : return 5;   }   if ( n < 1 )     return 8;   switch (n)   {      case 1: memcpy(out8, inp8, iw*ih);              outw = iw;              outh = ih;              break;      case 2: zoomaux2(inp8, iw, ih, out8, &outw, &outh);              break;      case 3: zoomaux3(inp8, iw, ih, out8, &outw, &outh);              break;      case 4: zoomaux4(inp8, iw, ih, out8, &outw, &outh);              break;      case 8: zoomaux8(inp8, iw, ih, out8, &outw, &outh);              break;      default:zoomauxN(n, inp8, iw, ih, out8, &outw, &outh);              break;   }   if (in_1_or_8 == INPUT_IS_1)      free(inp8);   if (mk_1_bit == MK_1_BIT)   {      if (outw % BITSPERBYTE)      {         for (oldw = outw ; outw % BITSPERBYTE ; outw++ );         tmp = out8;         image_pad(&out8, oldw, outh, outw, outh, 0);          free(tmp);      }      switch (alloc_1_bit)      {         case    ZM_ALLOC : out1 = mallocate_image(outw, outh, 1);                            break;         case NO_ZM_ALLOC : out1 = *o1;                            if (out1 == NULL)                               return 2;                            break;         default          : return 6;      }      bytes2bits(out8, out1, outw*outh);      *o1 = out1;      *ow = outw;      *oh = outh;   }   if (mk_8_bit == MK_8_BIT)   {      *o8 = out8;      *ow = outw;      *oh = outh;   }   else   if (mk_8_bit == NO_MK_8_BIT)      free(out8);   return 0;}/* if any of the pixels in 4x4 pixel tile of the input 1 byte per pix *//* image is set true then set the output pixel true, this effects a   *//* nice looking image downsampling */zoomaux4(inp, iw, ih, out, ow, oh)unsigned char *inp; int iw, ih;unsigned char *out; int *ow, *oh;{unsigned char sum, *p1, *p2, *p3, *p4;int i, j, w, h, n;   n = iw + iw + iw;    /* loop adds 1*iw so we need to add 3*iw */   *ow = w = (iw >> 2);   *oh = h = (ih >> 2);   n += iw - (w << 2);   p1 = inp ; p2 = p1 + iw ; p3 = p2 + iw ; p4 = p3 + iw;   for ( i = 0 ; i < h ; i++ )   {      for ( j = 0 ; j < w ; j++ )      {         /* any pixel is good enough for "true" output, which raises    */         /* the possibility of not looking at all sixteen raster locs   */         /* maybe breaking early from the 4 lines if sum already non    */         /* zero. this, it turns out is slower since the pointers have  */         /* to be adjusted if you break out early                       */         sum  = *p1++  +  *p2++  +  *p3++  +  *p4++;         sum += *p1++  +  *p2++  +  *p3++  +  *p4++;         sum += *p1++  +  *p2++  +  *p3++  +  *p4++;         sum += *p1++  +  *p2++  +  *p3++  +  *p4++;         *out++ = (unsigned char)(sum > 0);   /* any true pixels */      }      p1 += n; p2 += n ; p3 += n ; p4 += n;   }}zoomaux3(inp, iw, ih, out, ow, oh)unsigned char *inp; int iw, ih;unsigned char *out; int *ow, *oh;{unsigned char sum, *p1, *p2, *p3;int i, j, w, h, n;   n = iw + iw;   *ow = w = iw / 3;   *oh = h = ih / 3;   n += iw - (w * 3);   p1 = inp ; p2 = p1 + iw ; p3 = p2 + iw;   for ( i = 0 ; i < h ; i++ )   {      for ( j = 0 ; j < w ; j++ )      {         sum  = *p1++  +  *p2++  +  *p3++;         sum += *p1++  +  *p2++  +  *p3++;         sum += *p1++  +  *p2++  +  *p3++;         *out++ = (unsigned char)(sum > 0);   /* any true pixels */      }      p1 += n; p2 += n ; p3 += n;   }}zoomaux2(inp, iw, ih, out, ow, oh)unsigned char *inp; int iw, ih;unsigned char *out; int *ow, *oh;{unsigned char sum, *p1, *p2;int i, j, w, h, n;   n = iw;    /* loop adds 1*iw so we need to add 1*iw */   *ow = w = (iw >> 1);   *oh = h = (ih >> 1);   n += iw - (w << 1);   p1 = inp; p2 = p1 + iw;   for ( i = 0 ; i < h ; i++ )   {      for ( j = 0 ; j < w ; j++ )      {         sum  = *p1++ + *p2++;         sum += *p1++ + *p2++;         *out++ = (unsigned char)(sum > 0);      }      p1 += n; p2 += n;   }}zoomaux8(inp, iw, ih, out, ow, oh)unsigned char *inp; int iw, ih;unsigned char *out; int *ow, *oh;{unsigned char sum, *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8;int i, j, w, h, n;   n = (iw << 3) - iw;    /* loop adds 1*iw so we need to add 7*iw */   *ow = w = (iw >> 3);   *oh = h = (ih >> 3);   n += iw - (w << 3);   p1 = inp     ; p2 = p1 + iw ; p3 = p2 + iw ; p4 = p3 + iw;   p5 = p4 + iw ; p6 = p5 + iw ; p7 = p6 + iw ; p8 = p7 + iw;    for ( i = 0 ; i < h ; i++ )   {      for ( j = 0 ; j < w ; j++ )      {         sum  = *p1++ + *p2++ + *p3++ + *p4++ + *p5++ + *p6++ + *p7++ + *p8++;         sum += *p1++ + *p2++ + *p3++ + *p4++ + *p5++ + *p6++ + *p7++ + *p8++;          sum += *p1++ + *p2++ + *p3++ + *p4++ + *p5++ + *p6++ + *p7++ + *p8++;          sum += *p1++ + *p2++ + *p3++ + *p4++ + *p5++ + *p6++ + *p7++ + *p8++;          sum += *p1++ + *p2++ + *p3++ + *p4++ + *p5++ + *p6++ + *p7++ + *p8++;          sum += *p1++ + *p2++ + *p3++ + *p4++ + *p5++ + *p6++ + *p7++ + *p8++;          sum += *p1++ + *p2++ + *p3++ + *p4++ + *p5++ + *p6++ + *p7++ + *p8++;          sum += *p1++ + *p2++ + *p3++ + *p4++ + *p5++ + *p6++ + *p7++ + *p8++;          *out++ = (unsigned char)(sum > 0);   /* any true pixels */      }      p1 += n ; p2 += n ; p3 += n ; p4 += n;      p5 += n ; p6 += n ; p7 += n ; p8 += n;   }}zoomauxN(f, inp, iw, ih, out, ow, oh)unsigned char *inp; int f, iw, ih;unsigned char *out; int *ow, *oh;{unsigned char sum, **p;int i, j, k, l, w, h, n;   if ((p = (unsigned char **)malloc(f * sizeof(unsigned char *))) == NULL)      syserr("zoomXN", "malloc", "space for pointer array");   n = (f - 1)*iw;   *ow = w = iw / f;   *oh = h = ih / f;   n += iw - (w * f);   for ( k = 0 ; k < f ; k++ )      p[k] = inp + k*iw;   for ( i = 0 ; i < h ; i++ )   {      for ( j = 0 ; j < w ; j++ )      {         for ( k = 0, sum = 0 ; k < f ; k++ )            for ( l = 0 ; l < f ; l++ )               sum += *p[l]++;         *out++ = (unsigned char)(sum > 0);      }      for ( k = 0 ; k < f ; k++ )         p[k] += n;   }   free(p);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区影院| 精品影视av免费| 精品中文av资源站在线观看| 9久草视频在线视频精品| 日韩一区二区三区视频在线| 亚洲精品免费一二三区| 丁香婷婷深情五月亚洲| 日韩丝袜美女视频| 午夜视频在线观看一区二区三区 | 91丝袜高跟美女视频| 制服丝袜在线91| 亚洲乱码国产乱码精品精的特点| 捆绑变态av一区二区三区| 欧美四级电影在线观看| 亚洲精品免费播放| 91蝌蚪porny九色| 国产精品久久三区| 丁香婷婷综合五月| 国产丝袜在线精品| 国产精品一区二区三区四区| 欧美不卡视频一区| 日韩电影在线免费观看| 欧美日韩大陆一区二区| 亚洲va韩国va欧美va| 色94色欧美sute亚洲13| 最新国产精品久久精品| 99在线视频精品| 中文字幕日韩一区| 91免费国产在线| 亚洲婷婷国产精品电影人久久| 成人国产在线观看| 亚洲色图欧美在线| 91高清在线观看| 偷拍亚洲欧洲综合| 91精品国产全国免费观看| 青青草97国产精品免费观看无弹窗版| 欧美日韩国产免费一区二区 | 在线观看区一区二| 亚洲午夜免费视频| 91精品国产色综合久久不卡蜜臀 | 91美女视频网站| 亚洲视频免费观看| 欧美揉bbbbb揉bbbbb| 免费在线观看精品| 久久影音资源网| 波多野结衣亚洲| 亚洲一区中文在线| 欧美一区二区三区电影| 国产精品自在在线| 综合分类小说区另类春色亚洲小说欧美| 91蜜桃传媒精品久久久一区二区| 亚洲一区二区五区| 日韩精品专区在线| www.欧美日韩| 午夜电影网一区| 国产亚洲综合色| 欧洲精品一区二区三区在线观看| 欧美aaaaaa午夜精品| 国产精品色呦呦| 在线不卡免费av| 夫妻av一区二区| 天天av天天翘天天综合网| 日韩欧美一区电影| www.亚洲色图.com| 日本欧美一区二区| 中文字幕免费观看一区| 欧美日韩精品欧美日韩精品一| 韩国精品久久久| 亚洲国产精品自拍| 国产清纯美女被跳蛋高潮一区二区久久w| 91在线视频在线| 久久成人免费日本黄色| 亚洲麻豆国产自偷在线| www欧美成人18+| 欧美日韩一区二区三区不卡| 成人听书哪个软件好| 日日摸夜夜添夜夜添国产精品 | 午夜视频久久久久久| 欧美韩日一区二区三区四区| 欧美夫妻性生活| 99在线热播精品免费| 狠狠色丁香婷婷综合久久片| 亚洲资源在线观看| 国产精品灌醉下药二区| 日韩免费电影一区| 欧美性欧美巨大黑白大战| 国产91精品在线观看| 毛片av一区二区三区| 亚洲国产视频一区| 亚洲视频在线一区观看| 久久久久久毛片| 精品久久久久久久久久久久久久久| 色丁香久综合在线久综合在线观看 | 精品影视av免费| 亚洲va欧美va人人爽| 亚洲精品成a人| 自拍视频在线观看一区二区| 久久久久久久精| 精品日韩欧美在线| 日韩欧美一级在线播放| 欧美日韩激情一区二区三区| 在线亚洲高清视频| 色婷婷国产精品| 色综合天天视频在线观看| 成人激情小说网站| 风间由美一区二区av101| 国产成人亚洲综合a∨婷婷| 免费在线成人网| 青青青爽久久午夜综合久久午夜| 一区二区三区日韩欧美精品 | 热久久久久久久| 日本中文字幕一区二区视频| 亚洲福中文字幕伊人影院| 一区二区免费看| 一区二区三区在线影院| 亚洲乱码日产精品bd| 一区二区不卡在线视频 午夜欧美不卡在| 亚洲日韩欧美一区二区在线| 一区二区日韩av| 午夜一区二区三区在线观看| 日本在线播放一区二区三区| 久久精品免费看| 国产电影一区在线| aaa国产一区| 欧美日韩一区二区三区四区| 欧美一区在线视频| 久久免费国产精品| 综合激情网...| 亚洲高清中文字幕| 久久99精品视频| 成人一二三区视频| 在线亚洲+欧美+日本专区| 在线电影欧美成精品| 欧美成人vr18sexvr| 国产女同性恋一区二区| 亚洲码国产岛国毛片在线| 午夜精品一区二区三区电影天堂| 日韩精品五月天| 国产精品18久久久久久久网站| 播五月开心婷婷综合| 欧洲激情一区二区| 精品国产亚洲在线| 亚洲精品伦理在线| 精品亚洲免费视频| 91尤物视频在线观看| 欧美丰满少妇xxxxx高潮对白| 欧美精品一区二区三区蜜臀| 亚洲乱码日产精品bd| 久久 天天综合| 一本久久a久久精品亚洲| 日韩精品最新网址| 亚洲精品视频免费看| 久久国产三级精品| 在线精品视频一区二区| 久久新电视剧免费观看| 亚洲成人黄色小说| 国产不卡在线一区| 91精品国产综合久久香蕉的特点| 国产嫩草影院久久久久| 日本美女一区二区三区| 91在线免费看| 久久综合九色综合欧美亚洲| 一区二区三区日韩欧美| 成人在线综合网站| 日韩三级电影网址| 一区二区三区四区精品在线视频| 国产一区二区三区香蕉 | 在线影视一区二区三区| 久久色.com| 奇米精品一区二区三区在线观看 | 93久久精品日日躁夜夜躁欧美| 欧美一区二区三区精品| 亚洲欧美视频在线观看| 紧缚奴在线一区二区三区| 欧美精品日韩一本| 亚洲少妇最新在线视频| 成人午夜激情片| 久久久精品免费网站| 蜜桃视频一区二区三区在线观看| 欧美在线观看视频在线| 日韩一区中文字幕| 成人久久18免费网站麻豆| 精品国产91洋老外米糕| 美女视频黄 久久| 欧美日韩精品综合在线| 亚洲精品中文字幕在线观看| 成人av网站大全| 国产精品成人免费在线| av电影在线观看完整版一区二区| 久久亚洲捆绑美女| 精品一区二区三区在线播放| 91精品国产综合久久福利软件| 亚洲成人av一区二区| 欧美专区亚洲专区| 亚洲国产婷婷综合在线精品| 欧美色网一区二区| 日韩av在线播放中文字幕| 91精品中文字幕一区二区三区| 亚洲成人av中文| 91精品国产一区二区人妖|