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. 使用Apache Tomcat Maven插件部署运行 Web 项目

    什么是Apache Tomcat Maven Plugin? Maven Plugin 是Apache Tomcat 提供的一个Maven插件,它可以在你没有tomcat容器时将任何一个war项目文件 ...

  2. android图片缓存(包含ReusableBitmapDrawable和BitmapPool)

    现在做的项目中,有用到一个开源的2D地图框架osmdroid,但是在项目中,使用还是有一些问题,例如,多个地图实例,会有独自的图片缓存,Activity onPause时,并不会释放图片缓存,如果多级 ...

  3. oracle-删除归档日志

    rman target user/password; DELETE ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE-7';

  4. 一个自定义 HBase Filter -“通过RowKeys来高性能获取数据”

    摘要: 大家在使用HBase和Solr搭建系统中经常遇到的一个问题就是:“我通过SOLR得到了RowKeys后,该怎样去HBase上取数据”.使用现有的Filter性能差劲,网上也没有现成的自定义Fi ...

  5. sqlserver2008链接服务器的使用和oracle11g客户端修改字符集

    1.服务器对象-链接服务器-访问接口-(OracleDB.Oracle)属性-允许进程内 2.运行-regedit-HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE-NIS_LAN ...

  6. JQuery异步提交

    JQuery提交部分 $.ajax({ url:'www.baidu.com', //提交的地址,相当于form的action type:'POST', //提交方式,相当于form的method d ...

  7. Hadoop with tool interface

    Often Hadoop jobsare executed through a command line. Therefore, each Hadoop job has to support read ...

  8. uva 11134 fabled rooks (贪心)——yhx

    We would like to place n rooks, 1 n 5000, on a n nboard subject to the following restrictions• The i ...

  9. 【Android UI设计与开发】7.底部菜单栏(四)PopupWindow 实现显示仿腾讯新闻底部弹出菜单

    前一篇文章中有用到 PopupWindow 来实现弹窗的功能.简单介绍以下吧. 官方文档是这样解释的:这就是一个弹出窗口,可以用来显示一个任意视图.出现的弹出窗口是一个浮动容器的当前活动. 1.首先来 ...

  10. Scanner类总结

    1.构造器 Scanner(File source) Scanner(InputStream source) Scanner(String source) 参考:http://blog.sina.co ...