Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ÓÃC»òC++ͳ¼Æ»ÆÉ«Õ¼Õû¸öͼÏñµÄ±ÈÀý£¿

±ÈÈçÓиöͼÏñ¡°image1.bmp¡±£¬ÉÏÃæÓв»¹æÔòµÄ»ÆÉ«£¬ÈçºÎ±àд´úÂ루c»òc++£©¼ÆËãÉÏÃæ»ÆÉ«²¿·ÖÕ¼Õû¸öͼÏñµÄ±ÈÀý£¿Ð»Ð»´ó¼Ò£¡£¡
ÂÌ°Ó

±éÀúÿ¸öÏñËØ£¬È»ºóÓûÆÉ«µãµÄ×ÜÊý³ýÒÔͼÏñµÄ×ÜÏñËØ

C/C++ code:

int count_yellow=0;
int h=image.getHeight();
int w=image.getWidth();

for (int i=0;i<w;i++)
for (int j=0;j<h;j++)
if (isYellowPixel(image.getPixel(i,j)))
count_yellow++;

...

//±ÈÀý
//count_yellow/(1.00*h*w)

ΪʲôҪÓÃÕâÑùµÄʵÏÖ,ʶ±ð»ð»¹ÊÇÈâÌå? ÕâÖÖ˼·±¾ÉíÓо޴óȱÏÝ.








LZÔÚ¿ª·¢ÐÂÒ»´úÂÌ°ÓÂð
»ÆÉ«Ôõô¸ö¶¨Ò壬¶¼ÊÇͬÑù»ÆÉ«£¬»¹ÊÇÓÐÉîdzµÄ?

ÂÌ°Ó˼Ïë°¡

ÎÒ¸Õ½Ó´¥Í¼Ïñ´¦Àí£¬ÄǸöimage.getHeight·ÃÎʵÄÊÇʲô?ÄÜдһÏÂÍêÕûµÄ´úÂëÂ𣿸м¤²»¾¡£¡
ÒýÓÃ
C/C++ codeint count_yellow=0;int h=image.getHeight();int w=image.getWidth();for (int i=0;i <w;i++)for (int j=0;j <h;j++)if (isYellowPixel(image.getPixel(i,j)))
  count_yellow++;

...//±ÈÀý//count_yellow/(1.00*h*w)
ΪʲôҪÓÃÕâÑùµÄʵÏÖ,ʶ±ð»ð»¹ÊÇÈâÌå? ÕâÖÖ˼·±¾ÉíÓо޴óȱÏÝ.




°¥£¬ÕâЩÒùÃñ°¡£¡£¡£¡

ÂÌ°Ó¶¼ÓÃOpenCVµÄ¶«Î÷£¬ÄãȥϸöOpenCVÓÃÓá£

ÒýÓÃ
ÂÌ°Ó

µ¹ÁË


Ïà¹ØÎÊ´ð£º

ѧϰÌÖÂÛ C/C++ QQȺ - C/C++ / ·Ç¼¼ÊõÇø

QQȺ 29152388
ÓÑÇéUP

°ï¶¥

up

°ïup

up Ö§³Ö£¡

up jf

...ÄѵÀÓзÖ..?

up up up
Ï£ÍûÓеüӷ֣¬¹þ¹þ¡£

Ö§³Ö£¬ÎÒ¼ÓÁË£¬Ï£ÍûÂ¥Ö÷ÄܼÓÎÒ£¬¹²Í¬Ñ§Ï°¹þ

¼ÓÁË¡£

¶¥ÉÏ£¬Ã¿ÌìÊÕ»ñÒ»µã£¬Ö§³Ö ......

C\C++ÈçºÎ¼ÆË㺯ÊýµÄµ¼Êý

C\C++ÈçºÎ¼ÆË㺯ÊýµÄµ¼Êý,±¾ÈËÐÂÊÖ£¬Ïëд¸ö³ÌÐò£¬µ«ÊDz»ÖªµÀÈçºÎÏÂÊÖ£¬»¹Íû¸ßÊÖÖ¸µãÒ»¶þ£¬Ð»¹ý¡£
Õâ¸ö¡­¡­

¸úº¯ÊýµÄ¾ßÌåÐÎʽÓйذɣ¬ÄѵÀÄãÏë±à³ö¸ö¡°ÍòÄÜ¡±µÄÇ󵼺¯Êý£¿

°³ÉÏѧʱÏë¹ý×Ô¶¯ÍƵ¼¹«Ê½£¬ºóÀ´ ......

ʹÓÃCµÄ¸ßÊÖÇë½ø

´ó¼ÒºÃ£¡ÎÒÊÇһλC°®ºÃÕߣ¬Ïò´ó¼ÒÇë½ÌÏ£¬C³ÌÐòÔ±¿ÉºÃÕÒ¹¤×÷£¿¹«Ë¾ÓÃC¸ÉЩʲô£¿
ÎÞËùνºÃ²»ºÃÕÒ¹¤×÷£¬Ò»°ãͨÐÅ¡¢ÏµÍ³¡¢Ç¶Èëʽ¡¢Ó²¼þ·½ÃæÓõĶ࣬¶øÇÒÓÉÓÚCµÄµ×²ãÌØÐÔ£¬Ñ§»áºóÔÚѧÆäËûµÄ»á±È½ÏÈÝÒ×

²»¹ÜÓÃʲôÓï ......

C#µ÷Óà C DLLÎÊÌ⣬¶®µÄÀ´ÇÀ·ÖÁË

//C ½Ó¿Ú
extern "C"
{
  TESSDLL_API int __cdecl GetTessText(const char *imagefile, char *text);  
}
//ÎÒÔÚC#ÖÐÉùÃ÷
//µ÷ÓÃC DLL Öеĺ¯Êý
[DllImport("OCRapi.dll&quo ......

CÖеÄһЩСÎÊÌâ¡£¡£¡£

/* Note:Your choice is C IDE

×÷Ó㺠Ëæ»úÊý¼ÓÃÜ·¨£¬£¬£¬£¬
ÒÔÏÂÓÐÐí¶à²»¶®£¬Çë½Ìһϣ¬ÇëÖ÷Òâ´úÂë;
*/
#include <stdio.h>
#include <stdlib.h>
union
{
int value;
struct
{
c ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ