常用opencv函数
来源:互联网 发布:如何注册淘宝海外买手 编辑:程序博客网 时间:2024/05/22 21:39
countNonZero
boundingRect
reduce 计算投影值
Mat mRegionInv = 255 - mBinSrc(rcBound);
Mat mHorProj;
reduce(mRegionInv / 255, mHorProj, 1, CV_REDUCE_SUM, CV_32SC1);
int nTopInd = 0;
if ( 0 != mHorProj.at<int>(0, 0) )
{
while( nTopInd < mHorProj.rows && mHorProj.at<int>(nTopInd, 0) )
{
nTopInd ++;
}
}
findContours(matBin.clone(), contours, hierarchy, CV_RETR_EXTERNAL, CV_CHAIN_APPROX_SIMPLE);
boundingRect
reduce 计算投影值
Mat mRegionInv = 255 - mBinSrc(rcBound);
Mat mHorProj;
reduce(mRegionInv / 255, mHorProj, 1, CV_REDUCE_SUM, CV_32SC1);
int nTopInd = 0;
if ( 0 != mHorProj.at<int>(0, 0) )
{
while( nTopInd < mHorProj.rows && mHorProj.at<int>(nTopInd, 0) )
{
nTopInd ++;
}
}
findContours(matBin.clone(), contours, hierarchy, CV_RETR_EXTERNAL, CV_CHAIN_APPROX_SIMPLE);
Rect r = boundingRect(contours[i]);
//图像匹配
Mat mTemplGray = cv::imread(pTemplePage->templateDM.szImageName, 0);
Mat matSearchImage = mBin(rcSearchRegion);
Mat matResult;
cv::matchTemplate(matSearchImage, mTempl, matResult, CV_TM_SQDIFF_NORMED);
double dMinValue;
Point ptMinLoc;
cv::minMaxLoc(matResult, &dMinValue, NULL, &ptMinLoc, NULL);
contentOffset.x = ptMinLoc.x + rcSearchRegion.x - datumPoint.x;
contentOffset.y = ptMinLoc.y + rcSearchRegion.y - datumPoint.y;
0 0
- opencv函数库常用函数
- OpenCV常用函数
- OpenCv常用函数实例
- OpenCV常用函数
- 常用OpenCV函数
- OpenCV常用函数
- 常用OpenCV函数查询
- 常用opencv函数
- OPENCV 常用函数
- OpenCV常用函数札记
- opencv 常用函数
- opencv 常用函数
- openCV常用函数
- opencv 常用函数 C++
- OpenCV中常用函数
- opencv常用函数总结
- 常用opencv函数
- opencv 常用函数实现
- 设计模式之模板方法
- 网络测试工具netperf
- ES002-Elasticsearch环境安装
- linux下端口号查看及top命令
- 【解决】Spark运行时产生的临时目录的问题
- 常用opencv函数
- 使用Apache Benchmark做压力测试遇上的5个常见问题
- 卷积神经网络CNN
- Linux 多线程环境下 进程线程终止函数小结
- [刷题]Inorder Successor in BST
- POJ 2449 A* 求 k 短路 模板题
- 【解决】Spark On Yarn执行中executor内存限制问题
- dos2unix批量转换的一种方法
- 关于comparator以及comparable的区别及应用