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的更多相关文章

  1. 差异基因分析:fold change(差异倍数), P-value(差异的显著性)

    在做基因表达分析时必然会要做差异分析(DE) DE的方法主要有两种: Fold change t-test fold change的意思是样本质检表达量的差异倍数,log2 fold change的意 ...

  2. Project Woosah Tu (五色土)

    I bought this Raspberry Pi (model B) in spring 2013, I hadn't done too much with it except for some ...

  3. Windows Service--Write a Better Windows Service

    原文地址: http://visualstudiomagazine.com/Articles/2005/10/01/Write-a-Better-Windows-Service.aspx?Page=1 ...

  4. View and Data API 现在支持IE11了

    By Daniel Du After a long time waiting, IE11 finally supports WebGL, which enables us viewing our 3D ...

  5. 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 ...

  6. MAGIC XPA最新版本Magic xpa 2.4c Release Notes

    New Features, Feature Enhancements and Behavior ChangesSubforms – Behavior Change for Unsupported Ta ...

  7. http2协议翻译(转)

    超文本传输协议版本 2 IETF HTTP2草案(draft-ietf-httpbis-http2-13) 摘要 本规范描述了一种优化的超文本传输协议(HTTP).HTTP/2通过引进报头字段压缩以及 ...

  8. Groovy 模版引擎

    1. Introduction Groovy supports multiple ways to generate text dynamically including GStrings, print ...

  9. 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 ...

随机推荐

  1. swap分区

    swap分区 一块的新加进来的硬盘,我们要怎么给它创建swap分区呢?要遵循下面四个步骤: (1)使用一个现有的分区,比如记为A (2)然后分区类型的16进制编码,即A的16进制编码. (3)格式化A ...

  2. Java并发大师Brain Goetz和Doug Lea 的中英文博客文章地址

    Java并发大师Brain Goetz和Doug Lea是Java并发方面最权威的人物,他的文章绝对是最具有参考价值的,值得仔仔细细的推敲和研究. Brain Goetz 中文地址:http://ww ...

  3. Web Service中的几个重要术语

    WSDL:web service definition language 直译:WebService定义语言 1.对应一种该类型的文件.WSDL 2.定义了Web Service的服务器与客户端应用交 ...

  4. jquery parent和parents,children和find

    parent返回匹配元素的父元素的元素集合:parents返回匹配元素的祖先元素的元素集合. children返回匹配元素的子元素的元素集合:find返回匹配元素的后代元素的元素集合.

  5. MAVEN整理(乘国庆还有时间,停下来整理一下)

    昨天写下了这篇博客(http://www.cnblogs.com/hzmark/p/131003Release.html),今天有时间,就这里一下第一篇内容. 换工作公司开发平台: WINDOWS+V ...

  6. sql server 2005 32位+64位、企业版+标准版、CD+DVD 下载地址大全 .

    企业版DVD SQL Server 2005 Enterprise Edition(支持超大型企业) 32 位DVD: ed2k://|file|cs_sql_2005_ent_x86_dvd.iso ...

  7. 【转载】jQuery Validate验证框架 + CKEditor 无法验证问题的解决方法

    文章1:http://yangzhihuan.iteye.com/blog/717254 CKEDITOR.instances["page_content"].on("i ...

  8. codeforces 577B B. Modulo Sum(水题)

    题目链接: B. Modulo Sum time limit per test 2 seconds memory limit per test 256 megabytes input standard ...

  9. BZOJ 2186 [Sdoi2008]沙拉公主的困惑 【逆元】

    题意:求中互质的数的个数,其中. 分析:因为,所以,我们很容易知道如下结论    对于两个正整数和,如果是的倍数,那么中与互素的数的个数为      本结论是很好证明的,因为中与互素的个数为,又知道, ...

  10. CPU相关知识-寄存器与存储器的区别

    存储器一般在CPU外,一般指硬盘,U盘等可以在切断电源后保存资料的设备,容量一般比较大,缺点是读写速度都很慢,普通的机械硬盘读写速度一般是 50MB/S左右.内存和寄存器就是为了解决存储器读写速度慢而 ...