Cannot Change Opencv Webcam Setting
I have encountered a problem that when I use opencv API, I cannot change the width and height of
Webcam output:
cvSetCaptureProperty(capture, CV_CAP_PROP_FRAME_WIDTH, );
cvSetCaptureProperty(capture, CV_CAP_PROP_FRAME_HEIGHT, );
But after seaching the internet, I have found the key point:
The webcam on linux usually uses the V4L api, and I have not install the library for V4L.
When OpenCV is built, it does not includes the V4L API interface.
So, that's the solution:
1.install V4L dev library on ubuntu: libv4l-dev
2. enter opencv sourcecode dir, and reinstall it:
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_IPP=OFF ..
make
sudo make install
After using cmake, I can see the output for V4L:
-- Video I/O:
-- DC1394 .x: NO
-- DC1394 .x: NO
-- FFMPEG: YES
-- codec: YES (ver 53.35.)
-- format: YES (ver 53.21.)
-- util: YES (ver 51.22.)
-- swscale: YES (ver 2.1.)
-- gentoo-style: YES
-- GStreamer: NO
-- OpenNI: NO
-- OpenNI PrimeSensor Modules: NO
-- OpenNI2: NO
-- PvAPI: NO
-- GigEVisionSDK: NO
-- UniCap: NO
-- UniCap ucil: NO
-- V4L/V4L2: Using libv4l (ver 0.8.)
-- XIMEA: NO
-- Xine: NO
--
3. After you have rebuilt your program, it will work well.
I can see my 720P camera works well:

have fun!
(ibus not installed, can only type english on ubuntu 12.04)
Cannot Change Opencv Webcam Setting的更多相关文章
- 差异基因分析:fold change(差异倍数), P-value(差异的显著性)
在做基因表达分析时必然会要做差异分析(DE) DE的方法主要有两种: Fold change t-test fold change的意思是样本质检表达量的差异倍数,log2 fold change的意 ...
- Project Woosah Tu (五色土)
I bought this Raspberry Pi (model B) in spring 2013, I hadn't done too much with it except for some ...
- Windows Service--Write a Better Windows Service
原文地址: http://visualstudiomagazine.com/Articles/2005/10/01/Write-a-Better-Windows-Service.aspx?Page=1 ...
- View and Data API 现在支持IE11了
By Daniel Du After a long time waiting, IE11 finally supports WebGL, which enables us viewing our 3D ...
- Creating a radius based VPN with support for Windows clients
This article discusses setting up up an integrated IPSec/L2TP VPN using Radius and integrating it wi ...
- MAGIC XPA最新版本Magic xpa 2.4c Release Notes
New Features, Feature Enhancements and Behavior ChangesSubforms – Behavior Change for Unsupported Ta ...
- http2协议翻译(转)
超文本传输协议版本 2 IETF HTTP2草案(draft-ietf-httpbis-http2-13) 摘要 本规范描述了一种优化的超文本传输协议(HTTP).HTTP/2通过引进报头字段压缩以及 ...
- Groovy 模版引擎
1. Introduction Groovy supports multiple ways to generate text dynamically including GStrings, print ...
- Sharepoint学习笔记—习题系列--70-576习题解析 -(Q84-Q87)
Question 84You are designing a Web Part for SharePoint 2010 that must be able to be used on any sit ...
随机推荐
- Effective Java 65 Don't ignore exceptions
Principle An empty catch block defeats the purpose of exceptions, which is to force you to handle ex ...
- 图解 SQL 各种连接查询之间的区别
转载自:http://blog.csdn.net/xuanjiewu/article/details/50636465 对于SQL的Join,在学习起来可能是比较乱的.我们知道,SQL的Join语法有 ...
- CentOS下SSH无密码登录的配置
1.确认本机sshd的配置文件(需要root权限) $ gedit /etc/ssh/sshd_config 找到以下内容,并去掉注释符"#" RSAAuthentication ...
- JavaScript吸顶灯的实现
吸顶灯是各站点常用的一个功能,它有两个特性 向下滚动到div位置时,该div一直固定在页面的顶部 向上滚动到div原有位置时,div又恢复到文档中的原位置 div可能是一个“分类菜单”,也可能是一个“ ...
- IE11的API变化
IE11已经登录Win8.1,它的API有了很大变更 一.User-agent字符串的更改 IE10的是 Mozilla/5.0 (compatible; MSIE 10.0; Windows NT ...
- Linux Purify命令
一.简介 在C/C++的软件开发中,没有任何一种工具可以让你的应用程序避免引入内存问题,但是我们可以使用诸如Purify这样的工具对已经做好了的程序进行内存问题的检查.Purify的强大之处是可以找到 ...
- 初探Team Foundation Server (TFS) 2015 REST API
REST是一种简洁方便的Web服务,通过基于http协议的远程通信,可以为多种客户端程序提供远程服务,大幅提高了服务器系统的可扩展性. 微软宣布从Team Foundation Server 从201 ...
- python之2048
#-*- coding:utf-8 -*- import curses from random import randrange, choice # generate and place new ti ...
- 数据结构Java实现05----栈:顺序栈和链式堆栈
一.堆栈的基本概念: 堆栈(也简称作栈)是一种特殊的线性表,堆栈的数据元素以及数据元素间的逻辑关系和线性表完全相同,其差别是线性表允许在任意位置进行插入和删除操作,而堆栈只允许在固定一端进行插入和删除 ...
- java7-3 继承
1.继承概述: 把多个类中相同的内容给提取出来定义到一个类中. 如何实现继承呢? Java提供了关键字:extends 格式: class 子类名 extends 父类名 {} 父类也称为基类.超类: ...