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. 你真的说的清楚ArrayList和LinkedList的区别吗

    参见java面试的程序员,十有八九会遇到ArrayList和LinkedList的区别?相信很多看到这个问题的人,都能回答个一二.但是,真正搞清楚的话,还得花费一番功夫. 下面我从4个方面来谈谈这个问 ...

  2. cocos2d-x之加法计算器

    bool HelloWorld::init() { if ( !Layer::init() ) { return false; } Size visibleSize = Director::getIn ...

  3. 面试之jsp、Servlet相关知识——生命周期, 区别等

    1.servlet生命周期 所谓生命周期,指的是servlet容器如何创建servlet实例.分配其资源.调用其方法.并销毁其实例的整个过程. 阶段一: 实例化(就是创建servlet对象,调用构造器 ...

  4. SQOOP Load Data from Oracle to Hive Table

    sqoop import -D oraoop.disabled=true \ --connect "jdbc:oracle:thin:@(description=(address=(prot ...

  5. Check list

                            greenplum    

  6. [译]OpenStack Object Storage Monitoring

    注:翻译的不完整,主要是有些地方翻译后反而妨碍理解,有些不知道怎么翻,anyway,需要时拿来用用也是可行的,顺便共享啦.欢迎提意见. 一个OpenStack Object Storage(OSOS) ...

  7. ZooKeeper系列3:ZooKeeper命令、命令行工具及简单操作

    问题导读1.ZooKeeper包含哪些常用命令?2.通过什么命令可以列出服务器 watch 的详细信息?3.ZooKeeper包含哪些操作?4.ZooKeeper如何创建zookeeper? 常用命令 ...

  8. TestNG之执行顺序

    如果很有个测试方法,并且这几个方法又有先后顺序,那么如果让TestNG按照自己想要的方法执行呢 一.通过Dependencies 1.在测试类中添加Dependencies @Test public ...

  9. 怎样用ZBrush快速雕刻皮肤纹理

    今天的ZBrush教程我们将对利用基础笔刷制作出的“亡灵僵尸”头部模型进行皮肤纹理的处理,主要用到了Layers 3D图层和Alpha笔触类型添加皮肤纹理. 详细的视频教程地址可前往:http://w ...

  10. UVALive 6264 Conservation --拓扑排序

    题意:一个展览有n个步骤,告诉你每一步在那个场馆举行,总共2个场馆,跨越场馆需要1单位时间,先给你一些约束关系,比如步骤a要在b前执行,问最少的转移时间是多少. 解法:根据这些约束关系可以建立有向边, ...