社区
Linux/Unix社区
帖子详情
如何知道摄像头输出什么格式的数据,bmp、jpeg还是rgb或者yuv格式
Do_Change_Lyd
2014-08-02 08:42:52
请问如何知道摄像头输出什么格式的数据,是bmp或者jpeg还是rgb或者yuv格式,因为要知道摄像头输出数据的格式,才能确定是不是要进行格式转换,我使用H.264编码库对yuv格式数据进行编码然后传输
...全文
3100
5
打赏
收藏
如何知道摄像头输出什么格式的数据,bmp、jpeg还是rgb或者yuv格式
请问如何知道摄像头输出什么格式的数据,是bmp或者jpeg还是rgb或者yuv格式,因为要知道摄像头输出数据的格式,才能确定是不是要进行格式转换,我使用H.264编码库对yuv格式数据进行编码然后传输
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
5 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
Do_Change_Lyd
2014-08-07
打赏
举报
回复
我使用下面程序检查摄像头是否支持 rgb240格式 的数据,为什么没反应的? //检查是否支持某种帧格式 struct v4l2_format fmt; fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_RGB24; if( ioctl( vd->fd, VIDIOC_TRY_FMT, &fmt) == -1 ) if( errno == EINVAL ) printf(" Not support format RGB24!\n"); else printf("support format RGB24 !\n");
nuclears
2014-08-06
打赏
举报
回复
下面这个是我的Logitech C270摄像头的输出信息: #luvcview -L luvcview 0.2.6 SDL information: Video driver: x11 A window manager is available Device information: Device path: /dev/video0 { pixelformat = 'YUYV', description = 'YUV 4:2:2 (YUYV)' } { discrete: width = 640, height = 480 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 160, height = 120 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 176, height = 144 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 320, height = 176 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 320, height = 240 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 352, height = 288 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 432, height = 240 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 544, height = 288 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 640, height = 360 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 752, height = 416 } Time interval between frame: 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 800, height = 448 } Time interval between frame: 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 800, height = 600 } Time interval between frame: 1/20, 1/15, 1/10, 1/5, { discrete: width = 864, height = 480 } Time interval between frame: 1/20, 1/15, 1/10, 1/5, { discrete: width = 960, height = 544 } Time interval between frame: 1/15, 1/10, 1/5, { discrete: width = 960, height = 720 } Time interval between frame: 1/10, 1/5, { discrete: width = 1024, height = 576 } Time interval between frame: 1/10, 1/5, { discrete: width = 1184, height = 656 } Time interval between frame: 1/10, 1/5, { discrete: width = 1280, height = 720 } Time interval between frame: 1/10, 1/5, { discrete: width = 1280, height = 960 } Time interval between frame: 2/15, 1/5, { pixelformat = 'MJPG', description = 'MJPEG' } { discrete: width = 640, height = 480 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 160, height = 120 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 176, height = 144 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 320, height = 176 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 320, height = 240 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 352, height = 288 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 432, height = 240 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 544, height = 288 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 640, height = 360 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 752, height = 416 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 800, height = 448 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 800, height = 600 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 864, height = 480 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 960, height = 544 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 960, height = 720 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 1024, height = 576 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 1184, height = 656 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, { discrete: width = 1280, height = 720 } Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, 剩下的不贴了,超过字数限制了。
nuclears
2014-08-06
打赏
举报
回复
现在的摄像头基本都是支持V4L2的。 通过V4L2的接口可以获得当前摄像头驱动所支持的所有数据格式以及分辨率等信息。 或者将摄像头插到Linux机器上,直接使用命令luvcview获得当前摄像头所支持的所有数据格式以及分辨率信息: luvcview -L
falloutmx
2014-08-04
打赏
举报
回复
这个跟摄像头有关,YUV/RGB都有,也有两种都支持的。如果是YUV也会有区别,有些是YUV420有些是YUV422。
Do_Change_Lyd
2014-08-04
打赏
举报
回复
我的摄像头输出的是jpeg格式的数据,需要先用libjpeg库解码,得到RGB24格式的数据,然后将它转换成yuv420格式的,再对其进行编码传送。你有做过这个吗。你的QQ多少,想和你讨论一下,可以么?
7
yuv
一个用于可视化并编辑原始图像
数据
的工具
7
yuv
是一个用于可视化并编辑原始图像
数据
的工具。7
yuv
能打开任何类型的文件,并将
数据
作为原始二进制进行处理。 通过设定像素
格式
,7
yuv
能查看并编辑 Bayer、
RGB
、
YUV
等
格式
的图像文件。 1、调色板编辑 2、生成测试框架 3、
格式
之间的转换
RGB
和
YUV
格式
4、超快速的寻找和编辑独立的文件大小 5、位图字体和图形的自定义渲染引擎 6、将单个视频帧保存到图像(
bmp
、
JPEG
、PNG等) 7、选项卡式文件编辑,内置文件资源管理器 8、HEX编辑模式(字节,16 / 24 / 32 / 64点的话,大和小端) 9、RawText editing mode (SBC, DBC, UTF-32 encoding, little and big endian) 10、图形与可选择的像素
格式
编辑模式:
RGB
,YU
BMP
_
JPEG
.zip
jpg,
bmp
,
yuv
格式
数据
保存成jpg、
bmp
图片,
yuv
转
rgb
保存,
yuv
保存成黑白图,需要的拿去学习。
OpenGL实现
RGB
到
YUV
的转化
采用OpenGLES2.0规范,在GPU硬件上实现高效率的
RGB
数据
到
YUV
数据
的转化
获取USB
摄像头
的1080p的
JPEG
格式
的图片20180608_1806.7z
获取USB
摄像头
的1080p的
JPEG
格式
的图片20180608_1806.7z 电脑上的系统:ubuntu14.04 // http://www.linuxidc.com/Linux/2011-03/33020.htm // V4L2
摄像头
获取单幅图片测试程序(MMAP模式) // [日期:2011-03-06] 来源:Linux社区 作者:aokikyon [字体:大 中 小] // // #加了点注释 // // #Rockie Cheng // printf #include #include // memset #include #include #include #include // close write usleep read #include #include #include #include #include #include // mmap #include #include #include #include // pthread_create pthread_join #include #define CLEAR(x) memset (&(x), 0, sizeof (x)) #define REQ_COUNT 6 #define uchar unsigned char struct buffer { void * start; size_t length; }; static char * dev_name = "/dev/video0";//
摄像头
设备名 static int fd = -1; struct buffer * buffers = NULL; // static unsigned int n_buffers = 0; // 2012-7-13 11:33 camera flag // static int iFlagCamera = 0; volatile int iFlagCamera = 0; // 函数名称:thread1 // 函数功能:用于接受键盘的输入,之后通知thread2抓图 // 参数列表: // 返回值 : void thread1(void) { char ch; printf("\n !!!!Warning!!!!\n Max 1000 color
bmp
\n Input the char: \n"); printf("\n !!!!press o an capture 1 frame picture! \n"); printf("\n !!!!press t an capture 10 frame picture! \n"); printf("\n !!!!press h an capture 100 frame picture! \n"); while(1) { while((ch=getchar()) != '\n') { printf("%c\n", ch); if('o'==ch) { iFlagCamera = 1; printf("thread1=%d\n", iFlagCamera); } else if('t'==ch) { iFlagCamera = 10; printf("thread1=%d\n", iFlagCamera); } else if('h'==ch) { iFlagCamera = 101; printf("thread1=%d\n", iFlagCamera); } else if('q'==ch) { iFlagCamera = 10001; printf("thread1=%d\n", iFlagCamera
基于m
jpeg
-streamer定制开发智能目标检测识别系统
基于m
jpeg
-streamer定制开发智能目标检测识别系统, 使用opencv 检测识别算子,检测识别追踪目标移动轨迹,实时效果好。 M
JPEG
-streamer方案的实现 优点: 程序简单,所有源码一目了然,便于学习 对CPU性能要求不高 缺点: 实现局域网内的视频监控 要实现互联网视频监控,需要另外实现内网穿透 M
jpeg
-streamer没有实现声音传输
JPEG
,MJPG
格式
简介
JPEG
:简称jpg 一个像素的颜色可以用
RGB
三原色来表示,其实还可以用
YUV
格式
表示 使用
RGB
,
YUV
格式
编码照片,文件都很大,比如
BMP
文件就是用
RGB
编码 把一个
BMP
文件转换为
JPEG
文件,可以发现图片质量没发生变化,但是文件变小了很多
JPEG
是根据人体视觉的特点采用了YCbCr
格式
,大大压缩了照片的大小 M
JPEG
M
JPEG
是静态图片的编码
格式
,MJPG是动态的视频编码
格式
可以简单理解:MJPG就是把多个
JPEG
图片连续显示出来 MJPG的优点 很多
摄像头
本身就支持
JPEG
,MJPG,所以处理器不要太多处理 M
JPEG
的缺点 M
JPEG
只是多个M
JPEG
图片的组合,它补考虑
Linux/Unix社区
23,125
社区成员
74,509
社区内容
发帖
与我相关
我的任务
Linux/Unix社区
Linux/Unix社区 应用程序开发区
复制链接
扫一扫
分享
社区描述
Linux/Unix社区 应用程序开发区
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章