主题:如何多次照相

  共有23276人关注过本帖    
阿剑
1楼


如何多次照相  发帖心情 Post By:2005-3-12 18:27:00   [只看该作者]

这是你们提供的一个摄像头摄像的程序,请问如何才能多次拍照?谢谢!


#include <stdio.h>
#include <dos.h>
#include <dir.h>

#include <mem.h>
#include "etrzsb.h"
#include "etr100.h"
int Dat[256];
DatInfo Acq;
unsigned char t[20000];
int tt=0;

void main()
{
   int Pin;
   FILE*  fp;
   unsigned char Bit1;
   ZSB.InsIntDram();

    asm mov ax,08000h
    asm out 23h,al
    asm xchg ah,al
    asm out 22h,al
    asm out 22h,ax

   PutDOUT(0xff);

for(;;)
{
   if(inportb(0xf870)&0x01==0x01)
   {
     t[tt]=inportb(0x300);
     if((t[tt]==0xD9)&(t[tt-1]==0xFF))
       {
 PutDOUT(0x00);
 break;
       }
     tt++;
   }
}

fp = fopen("c:\\1.jpg", "w+b" );
fwrite(&t, tt, 1, fp );
fclose( fp );

}

  单帖管理 | 引用 | 回复 回到顶部
liyan
2楼


  发帖心情 Post By:2005-3-13 12:01:00   [只看该作者]

周一给你详细答复。

  单帖管理 | 引用 | 回复 回到顶部

返回首页

如何多次照相

用户名:
            验证码: 验证码,看不清楚?请点击刷新验证码
内容: