Skip to content

Commit

Permalink
A-zximage
Browse files Browse the repository at this point in the history
  • Loading branch information
xiahouzuoxin committed Jan 14, 2015
1 parent f78e218 commit 02c3382
Show file tree
Hide file tree
Showing 19 changed files with 192 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Archives.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@
<a href="index.html" target="_self" title="主页">主页 </a><a href="Search.html" target="_self" title="站内搜索">站内搜索 </a><a href="Projects.html" target="_self" title="项目研究">项目研究 </a><a href="Archives.html" target="_self" title="文章存档">文章存档 </a><a href="README.html" target="_self" title="分类目录">分类目录 </a><a href="AboutMe.html" target="_self" title="关于我">关于我 </a>
</p>
</center></div>
<h1 id="section">2014-12</h1>
<h1 id="section">2015-01</h1>
<ul>
<li>2015-01-14 <a href="html/OpenCV集成到Qt的尝试-zximage.html">OpenCV集成到Qt的尝试-zximage</a></li>
</ul>
<h1 id="section-1">2014-12</h1>
<ul>
<li>2014-12-28 <a href="html/《追风筝的人》读后简记.html">《追风筝的人》读后简记</a></li>
</ul>
<h1 id="section-1">2014-11</h1>
<h1 id="section-2">2014-11</h1>
<ul>
<li>2014-11-30 <a href="html/读论文BinarizedNormedGradientsforObjectnessEstimationat300fps.html">读论文BinarizedNormedGradientsforObjectnessEstimationat300fps</a></li>
<li>2014-11-27 <a href="html/OpenCV图像处理篇之Hough变换.html">OpenCV图像处理篇之Hough变换</a></li>
Expand All @@ -30,13 +34,13 @@ <h1 id="section-1">2014-11</h1>
<li>2014-11-08 <a href="html/基于AR谱特征的声目标识别.html">基于AR谱特征的声目标识别</a></li>
<li>2014-11-01 <a href="html/一个程序猿从金庸开始的读书历程.html">一个程序猿从金庸开始的读书历程</a></li>
</ul>
<h1 id="section-2">2014-10</h1>
<h1 id="section-3">2014-10</h1>
<ul>
<li>2014-10-18 <a href="html/有关超声探头阻抗的分析.html">有关超声探头阻抗的分析</a></li>
<li>2014-10-09 <a href="html/空手套白狼的博弈智慧.html">空手套白狼的博弈智慧</a></li>
<li>2014-10-06 <a href="html/人生就是需求与追求的平衡.html">人生就是需求与追求的平衡</a></li>
</ul>
<h1 id="section-3">2014-09</h1>
<h1 id="section-4">2014-09</h1>
<ul>
<li>2014-09-26 <a href="html/Kalman滤波器从原理到实现.html">Kalman滤波器从原理到实现</a></li>
<li>2014-09-25 <a href="html/STM32复位和系统时钟.html">STM32复位和系统时钟</a></li>
Expand Down
4 changes: 4 additions & 0 deletions Archives.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 2015-01

- 2015-01-14 [OpenCV集成到Qt的尝试-zximage](html/OpenCV集成到Qt的尝试-zximage.html)

# 2014-12

- 2014-12-28 [《追风筝的人》读后简记](html/《追风筝的人》读后简记.html)
Expand Down
1 change: 1 addition & 0 deletions README.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ <h1 id="opencv系列">OpenCV系列</h1>
<li><a href="./html/OpenCV图像处理篇之阈值操作函数.html">OpenCV图像处理篇之阈值操作函数</a></li>
<li><a href="./html/OpenCV图像处理篇之边缘检测算子.html">OpenCV图像处理篇之边缘检测算子</a></li>
<li><a href="./html/OpenCV图像处理篇之Hough变换.html">OpenCV图像处理篇之Hough变换</a></li>
<li><a href="./html/OpenCV集成到Qt的尝试-zximage.html">OpenCV集成到Qt的尝试-zximage</a></li>
</ul>
<h1 id="嵌入式处理dspfpgaarm">嵌入式处理(DSP/FPGA/ARM)</h1>
<ul>
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
- [OpenCV图像处理篇之阈值操作函数](./essays/OpenCV图像处理篇之阈值操作函数.md)
- [OpenCV图像处理篇之边缘检测算子](./essays/OpenCV图像处理篇之边缘检测算子.md)
- [OpenCV图像处理篇之Hough变换](./essays/OpenCV图像处理篇之Hough变换.md)
- [OpenCV集成到Qt的尝试-zximage](./essays/OpenCV集成到Qt的尝试-zximage.md)

# 嵌入式处理(DSP/FPGA/ARM)

Expand Down
53 changes: 53 additions & 0 deletions essays/OpenCV集成到Qt的尝试-zximage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!---title:OpenCV集成到Qt的尝试-zximage-->
<!---keywords:OpenCV,Qt,zximage-->
<!---date:2015-01-14-->

这一个多月的时间一直忙着写程序,做论文,都没来得及更新博客,当时定下的伟大目标——每周一篇——就这样一溜烟的随着时间的缝隙划过,又留下我低徊忏悔。这是2015年的第一篇博文,希望自己继续坚持下去。回头看看之前写得博文,回忆渐渐涌上心头啊……

回顾了下之前的OpenCV博文,这次用Qt简单做了个界面程序(且给个名字zximage),关于在Qt中集成OpenCV在[搭建Qt界面的OpenCV开发环境](http://xiahouzuoxin.github.io/notes/html/搭建Qt界面的OpenCV开发环境.html)一文中详细的讨论过了。我在做zximage之前C++不熟,Qt基本上0基础,这种滥竽充数的作品按理是拿不上台面的,但虚荣心作怪,在初学者面前显摆显摆还是可以的,这里就展示展示吧,也许将来哪天回过头来看看(明年毕业的时候回来看这些幼稚的东西又会是什么感受呢?)

一开始是主界面,菜单栏做得很简单,就File,Tools,About,图片载入和保存对话框那是必须的,都在File菜单下,

![界面介绍](../images/OpenCV集成到Qt的尝试-zximage/界面介绍.png)

Tools中是一些图像处理的算法(大部分都来自OpenCV),选择算法后都会弹出对话框,用于设置算法相关参数。下面就用Blur滤波器来进行磨皮的美化操作,

![滤波器的美化——磨皮](../images/OpenCV集成到Qt的尝试-zximage/滤波器的美化——磨皮.png)

![幂次变换调对比度](../images/OpenCV集成到Qt的尝试-zximage/幂次变换调对比度.png)

图像中边缘检测很常见,zximage当然给加上了,

![边缘检测](../images/OpenCV集成到Qt的尝试-zximage/边缘检测.png)

Hough变换检测道路边界,

![Hough直线检测](../images/OpenCV集成到Qt的尝试-zximage/Hough直线检测.png)

形态学操作在OpenCV的图像处理篇中也用过,

![形态学操作](../images/OpenCV集成到Qt的尝试-zximage/形态学操作.png)

直方图均衡化在图像处理中应用还是很普遍的,优点就是能自适应——不用设置参数,

![直方图及其均衡化](../images/OpenCV集成到Qt的尝试-zximage/直方图及其均衡化.png)

人脸检测简直碉堡了,设计这些算法的人吃的都是啥啊,下面是Haar算子进行的人脸检测结果,

![人脸检测](../images/OpenCV集成到Qt的尝试-zximage/人脸检测.png)

为了证明这个软件的摄像头功能确实是可用的,我拿着摄像头对着屏幕的运行的zximage拍。瞬间大吃一惊,这是什么!!怎么这么多窗口!!!好像发明避孕套的人发现了避孕套一样,很是惊喜,我似乎看到了鸡生蛋蛋生鸡的问题。。。。拍下软件窗口,摄像头界面显示窗口,又将显示额窗口拍下,又显示。。。所以中心出现极亮的光斑。。。

![软件自拍-鸡生蛋蛋生鸡](../images/OpenCV集成到Qt的尝试-zximage/软件自拍-鸡生蛋蛋生鸡.png)

然后我把这个现象给实验室的师兄看,顺带给帅锅师兄来了一张,

![摄像头拍到的帅锅师兄](../images/OpenCV集成到Qt的尝试-zximage/摄像头拍到的帅锅师兄.png)

最后来一张zximage的自拍人脸检测,这个是手机拍下的屏幕照片,屏幕太亮没办法,

![zximage摄像头自拍人脸识别](../images/OpenCV集成到Qt的尝试-zximage/zximage摄像头自拍人脸识别.png)

## 源码

源码下载请到我的Github: <https://github.com/xiahouzuoxin/opencv_study> ,那里不仅包括zximage的源码,还包括我的OpenCV系列所有博文的源码,OpenCV系列博文链接可以在 <http://xiahouzuoxin.github.io/notes/README.html> 找到。
123 changes: 123 additions & 0 deletions html/OpenCV集成到Qt的尝试-zximage.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="pandoc" />
<title></title>
<style type="text/css">code{white-space: pre;}</style>
<link rel="stylesheet" href="../stylesheets/Github.css" type="text/css" />
<title>OpenCV集成到Qt的尝试-zximage</title>
</head>
<body>
<div id="header"><center>
<p class="header_titleline">
<a href="../index.html" target="_self" title="主页">主页 </a><a href="../Search.html" target="_self" title="站内搜索">站内搜索 </a><a href="../Projects.html" target="_self" title="项目研究">项目研究 </a><a href="../Archives.html" target="_self" title="文章存档">文章存档 </a><a href="../README.html" target="_self" title="分类目录">分类目录 </a><a href="../AboutMe.html" target="_self" title="关于我">关于我 </a>
</p>
</center></div>
<h1>OpenCV集成到Qt的尝试-zximage</h1>
<h4>2015-01-14 / xiahouzuoxin</h4>
<h4>Tags: OpenCV,Qt,zximage</h4>
转载请注明出处: <a href="http://xiahouzuoxin.github.io/notes/">http://xiahouzuoxin.github.io/notes/</a>
<div id="TOC">
<ul>
<li><a href="#源码">源码</a></li>
</ul>
</div>
<!---title:OpenCV集成到Qt的尝试-zximage-->
<!---keywords:OpenCV,Qt,zximage-->
<!---date:2015-01-14-->
<p>这一个多月的时间一直忙着写程序,做论文,都没来得及更新博客,当时定下的伟大目标——每周一篇——就这样一溜烟的随着时间的缝隙划过,又留下我低徊忏悔。这是2015年的第一篇博文,希望自己继续坚持下去。回头看看之前写得博文,回忆渐渐涌上心头啊……</p>
<p>回顾了下之前的OpenCV博文,这次用Qt简单做了个界面程序(且给个名字zximage),关于在Qt中集成OpenCV在<a href="http://xiahouzuoxin.github.io/notes/html/搭建Qt界面的OpenCV开发环境.html">搭建Qt界面的OpenCV开发环境</a>一文中详细的讨论过了。我在做zximage之前C++不熟,Qt基本上0基础,这种滥竽充数的作品按理是拿不上台面的,但虚荣心作怪,在初学者面前显摆显摆还是可以的,这里就展示展示吧,也许将来哪天回过头来看看(明年毕业的时候回来看这些幼稚的东西又会是什么感受呢?)</p>
<p>一开始是主界面,菜单栏做得很简单,就File,Tools,About,图片载入和保存对话框那是必须的,都在File菜单下,</p>
<div class="figure">
<img src="../images/OpenCV集成到Qt的尝试-zximage/界面介绍.png" alt="界面介绍" /><p class="caption">界面介绍</p>
</div>
<p>Tools中是一些图像处理的算法(大部分都来自OpenCV),选择算法后都会弹出对话框,用于设置算法相关参数。下面就用Blur滤波器来进行磨皮的美化操作,</p>
<div class="figure">
<img src="../images/OpenCV集成到Qt的尝试-zximage/滤波器的美化——磨皮.png" alt="滤波器的美化——磨皮" /><p class="caption">滤波器的美化——磨皮</p>
</div>
<div class="figure">
<img src="../images/OpenCV集成到Qt的尝试-zximage/幂次变换调对比度.png" alt="幂次变换调对比度" /><p class="caption">幂次变换调对比度</p>
</div>
<p>图像中边缘检测很常见,zximage当然给加上了,</p>
<div class="figure">
<img src="../images/OpenCV集成到Qt的尝试-zximage/边缘检测.png" alt="边缘检测" /><p class="caption">边缘检测</p>
</div>
<p>Hough变换检测道路边界,</p>
<div class="figure">
<img src="../images/OpenCV集成到Qt的尝试-zximage/Hough直线检测.png" alt="Hough直线检测" /><p class="caption">Hough直线检测</p>
</div>
<p>形态学操作在OpenCV的图像处理篇中也用过,</p>
<div class="figure">
<img src="../images/OpenCV集成到Qt的尝试-zximage/形态学操作.png" alt="形态学操作" /><p class="caption">形态学操作</p>
</div>
<p>直方图均衡化在图像处理中应用还是很普遍的,优点就是能自适应——不用设置参数,</p>
<div class="figure">
<img src="../images/OpenCV集成到Qt的尝试-zximage/直方图及其均衡化.png" alt="直方图及其均衡化" /><p class="caption">直方图及其均衡化</p>
</div>
<p>人脸检测简直碉堡了,设计这些算法的人吃的都是啥啊,下面是Haar算子进行的人脸检测结果,</p>
<div class="figure">
<img src="../images/OpenCV集成到Qt的尝试-zximage/人脸检测.png" alt="人脸检测" /><p class="caption">人脸检测</p>
</div>
<p>为了证明这个软件的摄像头功能确实是可用的,我拿着摄像头对着屏幕的运行的zximage拍。瞬间大吃一惊,这是什么!!怎么这么多窗口!!!好像发明避孕套的人发现了避孕套一样,很是惊喜,我似乎看到了鸡生蛋蛋生鸡的问题。。。。拍下软件窗口,摄像头界面显示窗口,又将显示额窗口拍下,又显示。。。所以中心出现极亮的光斑。。。</p>
<div class="figure">
<img src="../images/OpenCV集成到Qt的尝试-zximage/软件自拍-鸡生蛋蛋生鸡.png" alt="软件自拍-鸡生蛋蛋生鸡" /><p class="caption">软件自拍-鸡生蛋蛋生鸡</p>
</div>
<p>然后我把这个现象给实验室的师兄看,顺带给帅锅师兄来了一张,</p>
<div class="figure">
<img src="../images/OpenCV集成到Qt的尝试-zximage/摄像头拍到的帅锅师兄.png" alt="摄像头拍到的帅锅师兄" /><p class="caption">摄像头拍到的帅锅师兄</p>
</div>
<p>最后来一张zximage的自拍人脸检测,这个是手机拍下的屏幕照片,屏幕太亮没办法,</p>
<div class="figure">
<img src="../images/OpenCV集成到Qt的尝试-zximage/zximage摄像头自拍人脸识别.png" alt="zximage摄像头自拍人脸识别" /><p class="caption">zximage摄像头自拍人脸识别</p>
</div>
<h2 id="源码">源码</h2>
<p>源码下载请到我的Github: <a href="https://github.com/xiahouzuoxin/opencv_study" class="uri">https://github.com/xiahouzuoxin/opencv_study</a> ,那里不仅包括zximage的源码,还包括我的OpenCV系列所有博文的源码,OpenCV系列博文链接可以在 <a href="http://xiahouzuoxin.github.io/notes/README.html" class="uri">http://xiahouzuoxin.github.io/notes/README.html</a> 找到。</p>
<div class="ds-thread" data-thread-key="OpenCV集成到Qt的尝试-zximage" data-title="OpenCV集成到Qt的尝试-zximage" data-url="xiahouzuoxin.github.io/notes/html/OpenCV集成到Qt的尝试-zximage.html"></div>
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"slide":{"type":"slide","bdImg":"5","bdPos":"right","bdTop":"300"},"image":{"viewList":["qzone","tsina","tqq","renren","weixin"],"viewText":"分享到:","viewSize":"16"},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["qzone","tsina","tqq","renren","weixin"]}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>

<!-- 多说公共JS代码 start (一个网页只需插入一次) -->
<script type="text/javascript">
var duoshuoQuery = {short_name:"xiahouzuoxin"};
(function() {
var ds = document.createElement('script');
ds.type = 'text/javascript';ds.async = true;
ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
ds.charset = 'UTF-8';
(document.getElementsByTagName('head')[0]
|| document.getElementsByTagName('body')[0]).appendChild(ds);
})();
</script>
<!-- 多说公共JS代码 end -->

<div id="footer">
<p class="footer_subline">联系邮箱: xiahouzuoxin@163.com</p>
<p class="footer_subline">声明: 本站所有文章如非特别说明均为原创,转载请注明出处!
<script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_1253219218'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s4.cnzz.com/z_stat.php%3Fid%3D1253219218%26show%3Dpic' type='text/javascript'%3E%3C/script%3E"));</script>
</p>
</div>

<!-- 回到顶部 -->
<script>
lastScrollY=0;
function heartBeat(){
var diffY;
if (document.documentElement && document.documentElement.scrollTop)
diffY = document.documentElement.scrollTop;
else if (document.body)
diffY = document.body.scrollTop
else
{/*Netscape stuff*/}
percent=.1*(diffY-lastScrollY);
if(percent>0)percent=Math.ceil(percent);
else percent=Math.floor(percent);
document.getElementById("full").style.top=parseInt(document.getElementById("full").style.top)+percent+"px";
lastScrollY=lastScrollY+percent;
}
suspendcode="<div id=\"full\" style='right:1px;POSITION:absolute;TOP:600px;z-index:100'><a onclick='window.scrollTo(0,0);'><img src='../images/top.png'></a><br></div>"
document.write(suspendcode);
window.setInterval("heartBeat()",1);
</script>
</body>
</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
</center></div>
<h1 id="最新文章">最新文章</h1>
<ul>
<li>2015-01-14 <a href="html/OpenCV集成到Qt的尝试-zximage.html">OpenCV集成到Qt的尝试-zximage</a></li>
<li>2014-12-28 <a href="html/《追风筝的人》读后简记.html">《追风筝的人》读后简记</a></li>
<li>2014-11-30 <a href="html/读论文BinarizedNormedGradientsforObjectnessEstimationat300fps.html">读论文BinarizedNormedGradientsforObjectnessEstimationat300fps</a></li>
<li>2014-11-27 <a href="html/OpenCV图像处理篇之Hough变换.html">OpenCV图像处理篇之Hough变换</a><br /></li>
Expand Down
1 change: 1 addition & 0 deletions index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

# 最新文章

- 2015-01-14 [OpenCV集成到Qt的尝试-zximage](html/OpenCV集成到Qt的尝试-zximage.html)
- 2014-12-28 [《追风筝的人》读后简记](html/《追风筝的人》读后简记.html)
- 2014-11-30 [读论文BinarizedNormedGradientsforObjectnessEstimationat300fps](html/读论文BinarizedNormedGradientsforObjectnessEstimationat300fps.html)
- 2014-11-27 [OpenCV图像处理篇之Hough变换](html/OpenCV图像处理篇之Hough变换.html)
Expand Down

0 comments on commit 02c3382

Please sign in to comment.