概述
#ifndef __COMMON_H
#define __COMMON_H
//该头文件定义的是摄像头在屏幕上显示的宽度和高度
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<errno.h>
#include <stdint.h>
typedef unsigned char U8;
typedef unsigned int U32;
typedef unsigned short U16;
#define WIDTH 800
#define HEIGHT 600
#endif //__COMMON_H
#ifndef __VIDEOCAPTURE_H
#define __VIDEOCAPTURE_H
#include"common.h"
#include<sys/mman.h>
#include<fcntl.h>
#include<linux/videodev2.h>
#define VIDEODEVNAME ("/dev/video0")
#define COUNT 4
//需要调用的摄像头相关的接口,包括初始化,开始,结束,采取一帧的数据并保存
int initCamera();
void unInitCamera();
int startCamera();
int stopCamera();
int getOneFrame(U8* pcYuvBuffer);
#endif //__VIDEOCAPTURE_H
#include"videoCapture.h"
static U8* pcYuv[COUNT]={NULL};
static int vidDevFd = -1;
static int
最后
以上就是知性飞机为你收集整理的基于V4L2摄像头采集图片程序设计的全部内容,希望文章能够帮你解决基于V4L2摄像头采集图片程序设计所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复