图像矩 Moments moments(InputArray array, bool binaryImage=false ) Parameters: array – Raster image (single-channel, 8-bit or floating-point 2D array) or ...
分类:
其他好文 时间:
2014-11-23 22:57:54
阅读次数:
571
在图像处理领域,我们经常需要遍历一幅图像,opencv提供多种方法完成对图像的遍历,但是他们的效率是不同的。程序中我们常使用指针或者迭代器的方法遍历图像,下面的程序将对两种方法的效率做对比。
条件:单线程,主频3.4GHz计算机运行,图像image.jpg尺寸为768×576。
// readImage.cpp : 定义控制台应用程序的入口点。
//
#include "stda...
分类:
其他好文 时间:
2014-11-23 21:42:25
阅读次数:
186
凸包 找到物体的轮廓之后,再找其凸包 void convexHull(InputArray points, OutputArray hull, bool clockwise=false, bool returnPoints=true ) Parameters: points – Input 2D p...
分类:
其他好文 时间:
2014-11-23 21:40:11
阅读次数:
316
外接旋转矩形 ,或外接椭圆 RotatedRect minAreaRect(InputArray points) 返回面积最小的外接矩形 RotatedRect fitEllipse(InputArray points) The function calculates the ellipse tha...
分类:
其他好文 时间:
2014-11-23 21:33:27
阅读次数:
364
同样是提取出轮廓之后的处理 ~~ void approxPolyDP(InputArray curve, OutputArray approxCurve, double epsilon, bool closed) Parameters: curve – Input vector of a 2D po...
分类:
其他好文 时间:
2014-11-23 21:22:39
阅读次数:
302
void findContours(InputOutputArray image, OutputArrayOfArrays contours, OutputArray hierarchy, int mode, intmethod, Point offset=Point()) Parameters: ...
分类:
其他好文 时间:
2014-11-23 18:47:58
阅读次数:
308
反向投影 一种记录给定图像中的像素点如何适应直方图模型像素分布的方式。 反向投影就是首先计算某一特征的直方图模型,然后使用模型去寻找图像中存在的该特征。 backproject是直接取直方图中的值,即以灰度为例,某种灰度值在整幅图像中所占面积越大,其在直方图中的值越大,backproject时,其对...
分类:
其他好文 时间:
2014-11-23 17:32:36
阅读次数:
362
模板匹配 从源图像中发掘目标图像 将目标图像块逐像素滑动,然后度量此区域的源图像块和目标图像块的匹配程度 匹配都最高的像素位置作为最终定位 void matchTemplate(InputArray image, InputArray templ, OutputArray result, int m...
分类:
其他好文 时间:
2014-11-23 17:23:59
阅读次数:
240
今年7月份,kinect V2.0上市,价格相比一代便宜了不少,而且精度也有了很大提升。不过有个缺点是这个二代产品太挑设备,不是什么系统都能使用它们。下面就一些问题做下总结,方便新手学习。
(1)操作系统一定要求是windows8或8.1以上,如果你想试一下Win7,在安装开发包的时候就会提示你操作系统不支持。所以在使用Kinect之前需要先准备好Win8.1系统。
(2)在硬件方面,对电脑主...
一、随机数产生器在OpenCV中,我们主要使用RNG类(即Random Number Generator)来产生随机数。RNG rng(); // 默认以0xffffffff作为随机数产生器的种子我们也可以以系统的当前时间作为随机数产生器的种子。这也是常用的手段。#include RNG rng( ...
分类:
其他好文 时间:
2014-11-22 17:25:29
阅读次数:
185