amin例子的简单研究
amin这个例子,使用了比较复杂高阶的qml技巧,但是也有局限性。下面分3个部分,分别是界面部分,算法部分和扩展部分,简单地对这个问题进行理解。
视频地址 :https://files.cnblogs.com/files/jsxyhelu/amin%E4%BE%8B%E5%AD%90%E8%A7%86%E9%A2%91.zip
standardButtons
}
messageDialog.close()
}
}
}
anchors.rightMargin
anchors.bottomMargin
anchors.leftMargin
anchors.topMargin
anchors.fill: parent
//TabBar和swipview要对应起来
onCurrentIndexChanged:
{
tabBar.setCurrentIndex(swipeView.currentIndex)
}
//视频预览
Page
{……
padding
Text
{
id: helpText
wrapMode: Text.Wrap
anchors.left: parent.left
anchors.right: parent.right
text: "由衷感谢:<a href=\"http://amin-ahmadi.com/quick-camera-cv/\">http://amin-ahmadi.com/quick-camera-cv</a>" +
"给本程序很多借鉴" +
"<br>" +
"<br>" +
"作者博客:" +
"<br>" +
"<a href=\"jsxyhelu.cnblogs.com\">jsxyhelu.cnblogs.com</a>" +
"<br>" +
"<a href=\"jsxyhelu.cnblogs.com\"><img src=\"http://images2015.cnblogs.com/blog/508489/201607/508489-20160731065441684-483128601.png\" alt=\"欢迎访问!\"></a>"+
"<br>" +
"<b>版权</b>" +
"本程序使用 <a href=\"http://qt.io/\">Qt Framework</a> 作为GUI" +
"<br>" +
"同时使用 <a href=\"http://opencv.org/\">OpenCV</a> 做图像处理算法." +
"<br>" +
"程序采用ICO来自<a href=\"http://flaticon.com/\">Flat Icon</a>."
onLinkActivated:
{
Qt.openUrlExternally(link);
}
}
{
id: cameraCombo
Layout.fillWidth: true
Layout.fillHeight: true
model: QtMultimedia.availableCameras
textRole: "displayName"
delegate: ItemDelegate
{
text: modelData.displayName
}
onCurrentIndexChanged:
{
camera.stop()
camera.deviceId = model[currentIndex].deviceId
camera.start()
}
}
void QCvImageProcessor::setCamera(QVariant v)
{
QObject *o = qvariant_cast<QObject *>(v);
camera = qvariant_cast<QCamera *>(o->property("mediaObject"));
camera->setCaptureMode(QCamera::CaptureStillImage);
imageCapture = new QCameraImageCapture(camera);
camera->focus()->setFocusMode(QCameraFocus::ContinuousFocus);
camera->focus()->setFocusPointMode(QCameraFocus::FocusPointAuto);
//直接在这里设置动作级联
connect(imageCapture, &QCameraImageCapture::imageSaved, [this](int id, const QString &fileName)
{
Q_UNUSED(id);
processSavedImage(fileName);
});
}
void QCvImageProcessor::capture()
{
if(imageCapture->isReadyForCapture())
{
//注意这里获得一个可用的图片地址的方法
imageCapture->capture(QStandardPaths::writableLocation(QStandardPaths::PicturesLocation));
}
else
{
emit errorOccured("Camera is not ready to capture.");
}
}
附件列表
amin例子的简单研究的更多相关文章
- AgileEAS.NET SOA 中间件平台.Net Socket通信框架-简单例子-实现简单的服务端客户端消息应答
一.AgileEAS.NET SOA中间件Socket/Tcp框架介绍 在文章AgileEAS.NET SOA 中间件平台Socket/Tcp通信框架介绍一文之中我们对AgileEAS.NET SOA ...
- 简单研究Loader笔记
2015-11-11 18:25:34 1. Loader是什么? /** * Static library support version of the framework's {@link and ...
- SQLSERVER2012 列存储索引的简单研究和测试
SQLSERVER2012 列存储索引的简单研究和测试 SQLSERVER2012 列存储索引的简单研究和测试 看这篇文章之前可以先看一下下面这两篇文章: 列存储索引 http://www.cnblo ...
- SQLSERVER中的LOB页面简单研究
SQLSERVER中的LOB页面简单研究 这篇文章和我另一篇文章是相辅相成的,在看<SQLSERVER2012 列存储索引的简单研究和测试>这篇文章之前希望大家先看一下这篇文章o(∩_∩) ...
- 关于BLOB/TEXT字段存储设计及性能的简单研究
简单研究了一下BLOB/TEXT字段对数据库性能的影响,得到一个大概的结论:(未验证) 无论MySQL还是MSSQL,都可以通过把BLOB/TEXT数据存储在行外的方式提高性能 把BLOB/TEXT字 ...
- 对jQuery ajax三级级联的简单研究
最近写程序的时候经常遇到使用ajax获取数据的问题,刚好昨天遇到ajax写三级级联问题,自己写了一个简单的级联.对于服务端获取数据的就不多写了,客户端的ajax发送请求我在这里详细说一下,因为我也没专 ...
- 简单研究下Retrofit
2015-09-24 15:36:26 第一部分: 1. 什么是Retrofit? (点击图片有惊喜) 以上是来自官网的解释,言简意赅,咳咳,我就不翻译了~ 2. 如何使用Retrofit? 2.1 ...
- 简单研究Android View绘制三 布局过程
2015-07-28 17:29:19 这一篇主要看看布局过程 一.布局过程肯定要不可避免的涉及到layout()和onLayout()方法,这两个方法都是定义在View.java中,源码如下: /* ...
- IOS Animation-CABasicAnimation例子(简单动画实现)
这些例子都是CABasicAnimation的一些简单实现的动画,例如移动.透明度.翻转等等.方法里面传入一个CALayer类或者子类就可以了. 下面是用swift实现的,这些方法我们也可以用作公共类 ...
随机推荐
- Spark+IDEA单机版环境搭建+IDEA快捷键
1. IDEA中配置Spark运行环境 请参考博文:http://www.cnblogs.com/jackchen-Net/p/6867838.html 3.1.Project Struct查看项目的 ...
- 【紫书】Oil Deposits UVA - 572 dfs求联通块
题意:给你一个地图,求联通块的数量. 题解: for(所有还未标记的‘@’点) 边dfs边在vis数组标记id,直到不能继续dfs. 输出id及可: ac代码: #define _CRT_SECURE ...
- 查看mobileprovision信息
security cms -D -i ***********.mobileprovision
- Reading table information for completion of table and column names
mysql> use ad_detail_page;Reading table information for completion of table and column namesYou c ...
- Rhino
http://shrinksafe.dojotoolkit.org/ a JavaScript interpreter
- python count()
count() 描述 Python count() 方法用于统计字符串里某个字符出现的次数.可选参数为在字符串搜索的开始与结束位置. 语法 count()方法语法: str.count(sub, st ...
- 【spring mvc】application context的生命周期
上一次讲application context中bean的生命周期,后面贴了一部分代码,但根本没理解代码意思,有幸在博客园看到一篇关于这部分的代码解析,特别长,特此做了一些整理笔记,并附上链接:htt ...
- linux报错 find: missing argument to `-exec'
在linux下使用find命令时,报错:find: missing argument to `-exec' 具体执行命令为: find /u03 -name server.xml -exec grep ...
- Py-lamda表达式学习【转载】
转自:https://blog.csdn.net/zjuxsl/article/details/79437563 1.语法定义 在Python中,lambda的语法是唯一的.其形式如下: lambda ...
- 安装selenium python
https://pypi.org/project/selenium/#files selenium-3.13.0-py2.py3-none-any.whl 安装成功后才能用 from selenium ...