⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 server.c

📁 捕获arm开发板上中心威等厂家usb摄像头图像
💻 C
字号:
/****************************************************************************Mouse-capture Version 1:2006-6-29This program is used to get one picture from a jpeg webcam to test whether the webcam's drive is successfully installed.It is made for ARM9.Of course it can be used on PC if you modify the complier:)It is modified from servfox by daily3(戴丽-戴小鼠 in Hefei University of Technology and HHCN-BBS).Thanks to 我爱狗熊.If you have problems ,you can contact me.Email:daily3@126.comWish you some useful help!Best Wish to the orignal authors! Thank you very much!****************************************************************************/#include <stdlib.h>#include <stdio.h>#include <string.h>#include "spcav4l.h"struct vdIn videoIn;int main (int argc, char *argv[]){	char videodevice[] = "/dev/video0";	char jpegfile[] = "/tmp/1.jpg";	int grabmethod = 0;	int format = VIDEO_PALETTE_JPEG;	int width = 352;	int height = 288;  	memset(&videoIn, 0, sizeof (struct vdIn));	if(init_videoIn(&videoIn, videodevice, width, height, format,grabmethod)== 0)   {    	v4lGrab(&videoIn, jpegfile);        if(grabmethod==1)        printf("you use mmap method!\n");        else if(grabmethod==0)  	printf("you use read method!\n");	printf("you have get a picture in %s\n",jpegfile);	}	else	printf("can't open your camera!\n");	close_v4l (&videoIn);	return 0;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -