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. 为什么Erlang比C慢那么多倍?

    Erlang 一直以慢“著称”,本文就来看看 Erlang 慢在什么地方,为什么比实现同样功能的 C 语言程序慢那么多倍.Erlang 作为一种虚拟机解释的语言,慢是当然的.不过本文从细节上分析为什么 ...

  2. C#XmlHelper操作Xml文档的帮助类

    using System.Xml; using System.Data; namespace DotNet.Utilities { /// <summary> /// Xml的操作公共类 ...

  3. 在Unity中为模型使用表情

    在游戏中让角色能够拥有表情,是我一直很想实现的一件事情,今天搜索了一下这方面的资料,找到两个解决方案. MMD For Unity GitHub:https://github.com/mmd-for- ...

  4. Windows系统安装Oracle 11g客户端

    一.下载 http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html以下网址来源此官方下载页网 ...

  5. maven总结4

     仓库.nexus 构件:在maven中,任何一个依赖(jar包).插件(maven-compiler-plugin-2.5.1.jar)或者项目输出(前面例子中运行mvn clean install ...

  6. 用SqlParameter 给SQL传递参数

    1.数据访问层 using的用法: 01.可以using System;导命名控空间 02.using 的语法结构 using(变量类型  变量名 =new 变量类型()) { } 案例: 03.us ...

  7. java 19 -15 File类批量更改文件名的方法

    /* 需求: * 把H:\三国演义下面的视频名称修改为 00?_介绍.avi 思路: A:封装目录 B:获取该目录下所有的文件的File数组 C:遍历该File数组,得到每一个File对象 D:拼接一 ...

  8. 6月27日 OGDF不同的布局算法

    检查不同布局算法 备注 CircularLayout 可以非连通 FastMultipoleMultilevelEmbedder    FMMMLayout   可以非连通 StressMajoriz ...

  9. YII获取刚插入数据的id主键

    单条数据时model->attributes['id']; 循环插入时使用 Yii::app()->db->getLastInsertID() 获取 循环插入时需要每次插入后重置 m ...

  10. smarty插件开发代替注册插件方法registerPlugin