¹âµç×éÎ人¿Æ¼¼´óѧÊ×°²Ò»¶Ó¼¼Êõ±¨¸æ - ͼÎÄ ÏÂÔر¾ÎÄ

µÚËÄÕ ÖÇÄÜÆû³µ¿ØÖÆÈí¼þ·ÖÎöÓëÉè¼Æ

4.1 С³µÕûÌåÈí¼þÉè¼Æ

ΪÁ˱£Ö¤Ð¡³µ¼ÈÄÜÎȶ¨ÔËÐУ¬ÓÖÄÜÌáÉýËٶȣ¬ÎÒÃÇÐèҪʹÕû¸öϵͳ¿ØÖƾßÓÐÁ¼ºÃµÄʵʱÐÔºÍÖÜÆÚÐÔ£¬Òò´Ë³ýÁ˼ÈÒªÄÜʵÏÖ¹¦ÄܵÄÍêÕûÐÔ£¬»¹ÒªÊ¹ÆäÄܹ»Ôڼȶ¨µÄʱ¼äÀïÎȶ¨Ö´ÐÐÏàÓ¦µÄÈÎÎñ£¬ÔÚÉè¼Æʱ£¬ÐèÒªÓõ½¶¨Ê±Æ÷ÖжÏÀ´Íê³É¡£

È»¶ø£¬ÔÚÉè¼Æʱ£¬±Ï¾¹ÖжÏʱ¼äÓÐÏÞ£¬²»Äܽ«ËùÓеÄÖ´ÐгÌÐò¶¼·ÅÈëÖжϡ£ ËùÒÔÔÚ³ÌÐòÖ´ÐÐʱ£¬´ÓÖ÷º¯Êý¿ªÊ¼£¬Ê×ÏÈÍê³É¶Ôϵͳ×ÊÔ´µÄ³õʼ»¯É趨£¬È»ºó´ò¿ª¶¨Ê±Öжϣ¬ÔÙ½øÈëÒ»¸öÖ÷Ñ­»·º¯Êý£¬ÔÚ¸ÃÑ­»·º¯ÊýÖÐÊÇһЩ¶Ô¿ØÖÆʵʱÐÔÒªÇ󲻸߻òʹÓÃƵÂʽϵ͵ĸ¨ÖúÐÔº¯Êý£¬ÈçÒº¾§ÏÔʾÆÁÏÔʾ¡¢²¦Âë¼°°´¼üÇé¿öɨÃèµÈº¯Êý£¬Ö÷ÒªÊÇÔÚÖжϺ¯ÊýÖ´ÐÐÍêºóµÄ¿ÕÓàʱ¼äÀïÖ´ ÐУ¬ÎÒÃÇ¿ÉÒÔ½«Æä³ÆΪºǫ́¡£¶ø¶ÔÓÚÆäËûÐèÒª¾ßÓнϺõÄÖÜÆÚÐÔºÍʵʱÐԵĿØÖÆÀຯÊý£¬ÔòÖ÷Òª·ÅÔÚÁ˶¨Ê±ÖжϺ¯ÊýÀïÃ棬ÈçÐźŲɼ¯¡¢ÐźŴ¦Àí¡¢¿ØÖÆÔËËã¡¢¿ØÖÆÊä³öµÈ×Óº¯Êý£¬ÕâÑùÒÔ±£Ö¤ÏµÍ³ÔËÐеÄÎȶ¨ÐÔ£¬¿ÉÒÔ½«Æä³Æ×÷Ϊǰ̨¡£ÕâÑù¼È¿ÉÒÔÌá¸ßÖ´ÐÐЧÂÊ£¬ÓÖ¿ÉÒÔ¶Ô¸÷¸ö²¿·Ö×öµ½¾«È·µÄ¿ØÖÆ¡£

27

µÚ¾Å½ìÈ«¹ú´óѧÉúÖÇÄÜÆû³µÑûÇëÈü¼¼Êõ±¨¸æ

¸÷¸öÄ£¿é³õʼ»¯ ¿ªÍⲿÖÐ¶Ï N Y ¿ªÊ¼ ¿ª¶¨Ê±Æ÷ÖÐ¶Ï N ¶¨Ê±Æ÷ÖжÏ? Y ÍⲿÖжÏ? Y ÏÔʾÆÁÄ» AD²É¼¯¼°Í¼Ïñ´¦Àí Âú×ãÍ£³µ? Y µÆËþ½áÊø³ÌÐò Âú×ãÆðÅÜ£¿ Y µÆËþÆðÅܳÌÐò °´¼üɨÃè ƽºâ¿ØÖÆ ·½Ïò¿ØÖÆ ËٶȿØÖÆ °´Ï°´¼ü»ò²¦Âë С³µÍ£Ö¹ С³µÆô¶¯ ¸Ä±ä²ÎÊý»ò²ßÂÔ ³öÍⲿÖÐ¶Ï ³ö¶¨Ê±Æ÷ÖÐ¶Ï Ë¢ÐÂÆÁÄ» ͼ4.1 ÕûÌå³ÌÐò¿òͼ

28

4.2ÏßÐÔCCD´«¸ÐÆ÷·¾¶¾«È·Ê¶±ð¼¼Êõ

ÔÚ±¾½ì´óÈüÖУ¬¹âµç×éµÄ¹æÔò·¢ÉúÁË·­Ì츲µØµÄ±ä»¯£¬ÓÉ´«Í³µÄËÄÂÖС³µ±ä³ÉÁËÁ½ÂÖÖ±Á¢³µ £¬¶ÔÓÚ¹âµç´«¸ÐÆ÷ÒªÇóÑ¡ÔñʹÓÃÏßÐÔCCDÒÔ¼°LED×÷ΪÐÂÒ»´úµÄ¹âµç³µµÄ´«¸ÐÆ÷£¬µ«ÓÉÓÚLEDµÄÇ°Õ°¾àÀëÊ®·ÖÓÐÏÞ£¬ËùÒÔÏßÐÔCCD×ÔÈ»³ÉΪÁ˽Ϻõķ½°¸Ñ¡Ôñ¡£

4.2.1ÐÂÐÍ´«¸ÐÆ÷·¾¶Ê¶±ð״̬·ÖÎö

ÓÉÓÚ½ñÄêµÄÈüµÀÐÅÏ¢Ôö¼ÓÁËÖ±½Ç¹æÔò£¬²¢ÇÒ¶Ô¹âÔ´´«¸ÐÆ÷×ö³öÁËÒª

Çó£¬ÔÚʹÓÃCCD½øÐÐÈüµÀʶ±ð£¬´«Í³µÄ´«¸ÐÆ÷ËÑË÷Ìø±äÑØËã·¨¿ÉÈ¡Ö®´¦²»ÊǺܴ󣬲»¹ý²»È±·¦½è¼øÖ®´¦¡£

ͼ 4.2 CCD´«¸ÐÆ÷·µ»ØÖµ²¨ÐÎͼ

ÎÒÃǵÄС³µ²ÉÓÃÈý·CCD¶ÔÈüµÀÐÅÏ¢½øÐÐʶ±ð£¬ÆäÖÐÖ÷ÒªÔ­ÀíÊÇÀûÓõÚÒ»µÚ¶þ¸öCCDµÄ¼ÓȨËã³öÈüµÀÖÐÐÄÆ«²î£¬Ò»¸öCCD°üº¬128¸öÏñËص㣬µ«Õâ128¸öµã²¢²»ÊÇËùÓеĵ㶼Äܹ»±»×¼È·»ñÈ¡»Ò¶ÈÖµ£¬ÎÒÃÇÑ¡Ôñ²ÉÓÃ×óÓÒ¸÷56¸öÏñËصãÀ´¶ÔÈüµÀÐÅÏ¢½øÐвɼ¯¡£ÕâЩÏñËصãÖÐÿ¸öµãµÄ»Ò¶ÈÖµÀíÂÛÉ϶¼ÓÐ0µ½1024£¨ÎÒÃǵÄAD²ÉÑùΪ2µÄ8´Î£©ÕâЩÖÖ״̬£¬ÎÒÃÇ·Ö±ð°Ñ×óÓÒ¸÷56¸öÏñËصã¼ÇΪleft 8~63ºÍright 64~119¡£ÕâÀïÎÒÃDzÉÓÃË«·åÖ±·½Í¼²â¶¯Ì¬·§Öµ£¬ÎÒÃǽ«»Ò¶ÈÖµ³ýÒÔ10£¬½«»Ò¶ÈÖµÊý×éѹËõ³É103£¬È»ºó¼ì²âÕâ103¶Î²»Í¬»Ò¶ÈÖµµãµÄ¶àÉÙ£¬ÕÒ³ö°×É«ºÍºÚÉ«µÄ×î´ó·Ö²¼µã£¬½øÒ»²½µÃµ½·§Öµ£¬³ÌÐòÈçÏ£º

#define LATCH_LINE_SUPER 103 uint16 ccd0min=300; uint16 ccd1min=300; uint16 ccd2min=300; uint16 ccd3min=300; uint16 ccdmax=1024;

uint16 ccd_white_latch=0; uint16 ccd_black_latch=0;

uint16 get_super_latch(uint16 *pic,uint8 x,uint16 ccdmin,float per) //Ë«·åÖ±·½Í¼²â¶¯Ì¬·§ÖµÈç¹û³öÏÖÎÊÌâ,Çë¼ì²éµç³ØÊÇ·ñÓеç

29

µÚ¾Å½ìÈ«¹ú´óѧÉúÖÇÄÜÆû³µÑûÇëÈü¼¼Êõ±¨¸æ

{

uint16 i=0;

uint16 total_super;

uint16 line_latch_super[LATCH_LINE_SUPER]={0}; //»Ò¶ÈÖµÊý×é float latch;

for (i=0;i

for (i=8;i<120;i++){

line_latch_super[pic[i]/10]++; }

total_super=line_latch_super[LATCH_LINE_SUPER-1]+line_latch_super[LATCH_LINE_SUPER-2]+line_latch_super[LATCH_LINE_SUPER-3]; //°×µã·½ÏòµÄÁ¬ÐøÈý×é·Ö²¼×ܺÍ

for(i=LATCH_LINE_SUPER-1;i>1;i--) //ÕÒÁ¬ÐøÈý×éºÍ×î´óµÄµØ·½ {

if(line_latch_super[i]+line_latch_super[i-1]+line_latch_super[i-2]>=total_super||total_super<10)

{total_super=total_super+line_latch_super[i-2]-line_latch_super[i+1];}//Ïò°µ´¦Òƶ¯£¬ÕÒ°×É«µÄ×î´ó·Ö²¼µã

else{ccd_white_latch=i;break;}//´Ë´¦Îª°×Ïß»Ò¶È }

total_super=line_latch_super[0]+line_latch_super[1]+line_latch_super[2]; //ºÚµã·½ÏòµÄÁ¬ÐøÈý×é·Ö²¼×ܺÍ

for(i=30;i

{if(line_latch_super[i]+line_latch_super[i+1]+line_latch_super[i+2]>=total_super)

{total_super=total_super+line_latch_super[i+2]-line_latch_super[i-1];} //ÏòÁÁ´¦Òƶ¯£¬ÕÒºÚÉ«µÄ×î´ó·Ö²¼µã

else{ccd_black_latch=i;break;} //´Ë´¦ÎªºÚÏß»Ò¶È }

latch=per*ccd_white_latch+(1-per)*ccd_black_latch;//ͼÏñ¼ì²â·§Öµ

while(line_latch_super[(int)latch]>40)latch-=1; return (int)(latch*10); }

30