![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Opencv
文章平均质量分 84
zzy_1988
计算机编程爱好者。。。
展开
-
贴标签算法求连通域代码——opencv 实现
#include "cv.h"#include "cxcore.h"#include "highgui.h"#include #include using namespace std;#pragma comment(lib,"cv.lib")#pragma comment(lib,"cxcore.lib")#pragma comment(lib,"highg原创 2014-04-29 21:41:38 · 1072 阅读 · 0 评论 -
条码方向定位
参考了一篇论文的思想,主要思路就是通过分块求取各窗口内的梯度方向,利用密度阈值过滤。缺点是要手动定义窗口大小和密度值。具体代码如下://窗口内计算边缘密度特征struct EdgeDensity{ int num; //边缘点数 float orient; //边缘梯度方向};//排序bool pairSortFun3(EdgeDensity elem1, EdgeDensity e...原创 2018-03-06 10:58:40 · 3071 阅读 · 3 评论 -
QR码定位
参考 :http://blog.csdn.net/c602273091/article/details/43901137本文主要的思路如下:1>根据比例关系分别获取水平方向和垂直方向的游程码。2>粗定位两个方向上的探测图形中心。3>匹配4>聚类,获取QR码的中心。...原创 2018-03-13 12:57:01 · 1525 阅读 · 1 评论 -
windows下caffe安装及测试
借鉴前辈们的经验,学习了windows(仅cpu)下的安装及测试,还要继续努力,分享一下安装及测试的经验,主要借鉴以下资料。http://blog.csdn.net/wanz2/article/details/52770316http://blog.csdn.net/qq_14845119/article/details/52415090http://blog.csdn.net/guduruyu/...原创 2018-03-13 10:45:20 · 3923 阅读 · 1 评论 -
opencv 神经网络使用
#include #include #include #include #include using namespace std;using namespace cv;int main(){ //初始化 Ptr bp = ml::ANN_MLP::create(); const int sampleNum = 6; // 训练的总样本数 const int fe原创 2018-01-31 14:15:26 · 438 阅读 · 0 评论 -
opencv中的EM算法应用
BM算法及原理不是很懂,先上一个实例代码。// 训练分类器 Ptr em_model = EM::create(); em_model->setClustersNumber(N); em_model->setCovarianceMatrixType(EM::COV_MAT_SPHERICAL); em_model->setTermCriteria(TermCriteria(TermCr原创 2018-01-31 19:58:20 · 705 阅读 · 0 评论 -
Opencv中提取图像中的轮廓及中心点
// contourStudy.cpp : 定义控制台应用程序的入口点。//没有深度限制#include "stdafx.h"#include #include #include using namespace std;#include #include //计算轮廓深度int GetLayerCnt(CvSeq *seq){int coun原创 2016-10-21 14:19:00 · 44750 阅读 · 12 评论 -
获取轮廓深度
//在项目中往往需要对嵌套的多个轮廓进行区分,当父轮廓拥有多个不同深度的子轮廓时,需要计算该父轮廓的最大深度;struct CTData{ CvSeq * seq; int layer;};int GetLayerCnt(CvSeq *seq){ int count = 0; stack data; CvSeq *tmpContour = 0; data.push(s原创 2017-11-07 10:12:54 · 409 阅读 · 0 评论 -
opencv中角点排序
// 角点检测.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include #include using namespace std;using namespace cv;#include #define max_corners 100 //初始定义角点个数typedef struct Corn原创 2016-10-29 11:00:20 · 6188 阅读 · 3 评论 -
opencv项目中常见问题总结
0.配置问题。解决方案:略。1.typedef void * POINTER_64 PVOID64; error:缺分号等解决方法1:#define POINTER_64 __ptr642.缺少tbb_debug.dll或者tbb.dll解决方法: 复制tbb_debug.dll 到Debug下,可以将_debug去掉变成 tbb.dll放到re原创 2016-10-28 16:12:56 · 931 阅读 · 0 评论 -
opencv中利用轮廓构建连通树
// contourStudy.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include #include using namespace std;#include #include int _tmain(int argc, _TCHAR* argv[]){IplImage* src;// the原创 2016-10-14 14:40:54 · 1149 阅读 · 0 评论 -
opencv中获取任意方向的ROI
// GetSpecifiedDirectionROI.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include #include using namespace std;//计算距离double DistanceOfPoints(const CvPoint &p1,const CvPoint &p2){retu原创 2016-10-21 13:10:51 · 1962 阅读 · 0 评论 -
模版匹配应用
//获取下一匹配图CvPoint getNextMinLoc(IplImage *result, CvPoint minLoc, int maxVaule, int templatW, int templatH){ // 先将第一个最小值点附近两倍模板宽度和高度的都设置为最大值防止产生干扰 int startX = minLoc.x - templatW;原创 2015-09-01 20:37:06 · 464 阅读 · 0 评论 -
用 opencv 中旋转函数 写的 电子钟
#include "cv.h"#include "cxcore.h"#include "highgui.h"#include "math.h"#include #include using namespace std;#pragma comment(lib,"cv.lib")#pragma comment(lib,"cxcore.lib")#pragma原创 2014-04-30 08:20:14 · 729 阅读 · 0 评论 -
图像清晰度评价
//计算图像清晰度double computeImageSharpnessByEnergyEvaluation(cv::Mat src){ if (!src.data) { return -1; } double resValue = 0.; for (int i = 0; i < src.rows - 1; i++) {...原创 2018-11-03 17:56:56 · 831 阅读 · 1 评论