资源简介
在ubuntu12系统下,使用QT作为界面编程的,基v4l2的视频采集的,并将采集下来的数据用 ffmpej 进行编码保存成本地avi文件的应用程序。,并将采集下来的数据进行编码保存成本地avi文件的应用程序。
代码片段和文件信息
/****************************************************************************
# GspcaGui: Gspca/Spca5xx Grabber #
# Copyright (C) 2004 2005 2006 Michel Xhaard #
# #
# This program is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program; if not write to the Free Software #
# Foundation Inc. 59 Temple Place Suite 330 Boston MA 02111-1307 USA #
# #
****************************************************************************/
#include
#include
#include
#include “color.h“
static int *LutYr = NULL;
static int *LutYg = NULL;;
static int *LutYb = NULL;;
static int *LutVr = NULL;;
static int *LutVrY = NULL;;
static int *LutUb = NULL;;
static int *LutUbY = NULL;;
static int *LutRv = NULL;
static int *LutGu = NULL;
static int *LutGv = NULL;
static int *LutBu = NULL;
#if 0
#define RGB24_TO_Y(rgb) LutYr[(r)] + LutYg[(g)] + LutYb[(b)]
#define YR_TO_V(ry) LutVr[(r)] + LutVrY[(y)]
#define YB_TO_U(by) LutUb[(b)] + LutUbY[(y)]
#define R_FROMYV(yv) CLIP((y) + LutRv[(v)])
#define G_FROMYUV(yuv) CLIP((y) + LutGu[(u)] + LutGv[(v)])
#define B_FROMYU(yu) CLIP((y) + LutBu[(u)])
#endif
unsigned char
RGB24_TO_Y(unsigned char r unsigned char g unsigned char b)
{
return (LutYr[(r)] + LutYg[(g)] + LutYb[(b)]);
}
unsigned char
YR_TO_V(unsigned char r unsigned char y)
{
return (LutVr[(r)] + LutVrY[(y)]);
}
unsigned char
YB_TO_U(unsigned char b unsigned char y)
{
return (LutUb[(b)] + LutUbY[(y)]);
}
unsigned char
R_FROMYV(unsigned char y unsigned char v)
{
return CLIP((y) + LutRv[(v)]);
}
unsigned char
G_FROMYUV(unsigned char y unsigned char u unsigned char v)
{
return CLIP((y) + LutGu[(u)] + LutGv[(v)]);
}
unsigned char
B_FROMYU(unsigned char y unsigned char u)
{
return CLIP((y) + LutBu[(u)]);
}
void initLut(void)
{
int i;
#define Rcoef 299
#define Gcoef 587
#define Bcoef 114
#define Vrcoef 711 //656 //877
#define Ubcoef 560 //500 //493 564
#define CoefRv 1402
#define CoefGu 714 // 344
#define Co
- 上一篇:日语罗马字→假名转换软件 V1.00
- 下一篇:qt+opencv的视频采集 与保存
相关资源
- qt+opencv的视频采集 与保存
- 基于RS232的数据采集系统设计
- 竞价 关键词采集器 已破解
- listview列表视频播放,支持全屏,上滑
- 开眼视频个人改良版源码
- 视频点播系统,视频点播系统
- VS-04视频监控常见问题定位思路及方法
- CAD2007教学视频,特别适用于初学者
- NVP6114 datasheet
- 监控系统VISIO素材
- 可以插入视频、音乐的.htaDEMO用来哄女
- 视频流实时人脸检测Filter
- 基于QT4的视频音频播放器设计与实现
- 电商视频图片采集助手(支持淘宝 天
- 按键触发ADC采集串口发送
- 仿今日头条视频显示效果
- 激光打标软件Ezcad2.7.6软件破解免加密
- 自己采集的eeg数据需处理
- qt环境下使用opencv打开双摄像头并保存
- 帧差欧式距离提取关键帧.rar
- 基于FPGA的OV7670摄像头采集及实时显示
- stm32f4 ad波形采集用da接示波器
- TD-LTE AMR 语音采集编解码收发程序
- Lionsgate狮门的片头 AE源文件 3D logo文
- DirectShow的视频播放器.rar
- 被动毫米波雷达中基于PCI总线高速数
- 数据采集系统设计 用FPGA+程序代码
- 基于Linux、QT的视频监控系统的设计与
- 百旺增值税开票软件数据采集工具.
- 视频分割软件
评论
共有 条评论