资源简介
答题卡识别小程序,适合新手练习,内容较价清晰,答题卡识别小程序,适合新手练习,内容较价清晰
代码片段和文件信息
#include “stdafx.h“
#include “ASLib.h“
using namespace std;
using namespace cv;
//获得锚点
// LT(0) RT(1)
//
// LD(2) RD(3);
void FetchAnchorPoints(Mat matSrcMat matTemplatePoint2f pointAnchors[])
{
int rows = matSrc.rows;
int cols = matSrc.cols;
double minVal;
double maxVal2;
Point minlocLTminlocLDminlocRTminlocRD;
Point maxlocLTmaxlocLDmaxlocRTmaxlocRD;
Point2f anchorLTanchorRTanchorLDanchorRD;
Mat matTemp;
int iHalfX = cols/2;
int iHalfY = rows/2;
Mat matLT = matSrc(Rect(00iHalfXiHalfY));
Mat matRT = matSrc(Rect(iHalfX0iHalfXiHalfY));
Mat matLD = matSrc(Rect(0iHalfYiHalfXiHalfY));
Mat matRD = matSrc(Rect(iHalfXiHalfYiHalfXiHalfY));
matchTemplate(matLTmatTemplatematTemp5);
normalize( matTemp matTemp 0 1 NORM_MINMAX -1 Mat() );
minMaxLoc( matTemp &minVal &maxVal2 &minlocLT &maxlocLT Mat() );
anchorLT = maxlocLT;
matchTemplate(matRTmatTemplatematTemp5);
normalize( matTemp matTemp 0 1 NORM_MINMAX -1 Mat() );
minMaxLoc( matTemp &minVal &maxVal2 &minlocRT &maxlocRT Mat() );
anchorRT = Point(maxlocRT.x + iHalfXmaxlocRT.y );
matchTemplate(matLDmatTemplatematTemp5);
normalize( matTemp matTemp 0 1 NORM_MINMAX -1 Mat() );
minMaxLoc( matTemp &minVal &maxVal2 &minlocLD &maxlocLD Mat() );
anchorLD = Point(maxlocLD.x maxlocLD.y + iHalfY);
matchTemplate(matRDmatTemplatematTemp5);
normalize( matTemp matTemp 0 1 NORM_MINMAX -1 Mat() );
minMaxLoc( matTemp &minVal &maxVal2 &minlocRD &maxlocRD Mat() );
anchorRD = Point(maxlocRD.x + iHalfXmaxlocRD.y + iHalfY);
pointAnchors[0] = anchorLT;
pointAnchors[1] = anchorRT;
pointAnchors[2] = anchorLD;
pointAnchors[3] = anchorRD;
}
//投影到x或Y轴上上波形为vup下波形为vdowngap为误差间隔
void projection2(Mat srcvector& vupvector& vdownint directionint gap)
{
Mat tmp = src.clone();
vector vdate;
if (DIRECTION_X == direction){
for (int i=0;i Mat data = tmp.col(i);
int itmp = countNonZero(data);
vdate.push_back(itmp);
}
}else{
for (int i=0;i Mat data = tmp.row(i);
int itmp = countNonZero(data);
vdate.push_back(itmp);
}
}
//整形去除长度小于gap的零的空洞
if (vdate.size()<=gap)
return;
for (int i=0;i if (vdate[i]>0 && vdate[i+gap]>0){
for (int j=i;j vdate[j] = 1;
}
i = i+gap-1;
}
}
//记录上下沿
for (int i=1;i if (vdate[i-1] == 0 && vdate[i]>0)
vup.push_back(i);
if (vdate[i-1]>0 && vdate[i] == 0)
vdown.push_back(i);
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2703 2017-02-16 16:16 L13 系统融合2\MFCApplication1\MFCApplication1\ASLib.cpp
文件 343 2017-02-16 16:12 L13 系统融合2\MFCApplication1\MFCApplication1\ASLib.h
文件 12175 2016-10-07 22:08 L13 系统融合2\MFCApplication1\MFCApplication1\CameraDS.cpp
文件 3421 2017-02-27 14:38 L13 系统融合2\MFCApplication1\MFCApplication1\CameraDS.h
文件 6741 2011-11-12 06:18 L13 系统融合2\MFCApplication1\MFCApplication1\CvvImage.cpp
文件 2024 2011-11-12 06:17 L13 系统融合2\MFCApplication1\MFCApplication1\CvvImage.h
文件 631 2008-02-27 14:52 L13 系统融合2\MFCApplication1\MFCApplication1\DirectShow\Include\activecf.h
文件 1826 2008-02-27 14:52 L13 系统融合2\MFCApplication1\MFCApplication1\DirectShow\Include\amaudio.h
文件 1065 2008-02-27 14:52 L13 系统融合2\MFCApplication1\MFCApplication1\DirectShow\Include\amparse.h
文件 73261 2008-02-27 14:52 L13 系统融合2\MFCApplication1\MFCApplication1\DirectShow\Include\amstream.h
文件 3974 2008-02-27 14:52 L13 系统融合2\MFCApplication1\MFCApplication1\DirectShow\Include\amva.h
文件 19851 2008-02-27 14:52 L13 系统融合2\MFCApplication1\MFCApplication1\DirectShow\Include\Amvideo.h
文件 1097 2008-02-27 14:52 L13 系统融合2\MFCApplication1\MFCApplication1\DirectShow\Include\atsmedia.h
文件 1532 2008-02-27 14:52 L13 系统融合2\MFCApplication1\MFCApplication1\DirectShow\Include\audevcod.h
文件 20543 2008-02-27 14:52 L13 系统融合2\MFCApplication1\MFCApplication1\DirectShow\Include\austream.h
文件 13805 2008-02-27 14:52 L13 系统融合2\MFCApplication1\MFCApplication1\DirectShow\Include\aviriff.h
文件 6820 2008-02-27 14:52 L13 系统融合2\MFCApplication1\MFCApplication1\DirectShow\Include\ba
文件 125594 2008-02-27 14:52 L13 系统融合2\MFCApplication1\MFCApplication1\DirectShow\Include\bdaiface.h
文件 54539 2008-02-27 14:52 L13 系统融合2\MFCApplication1\MFCApplication1\DirectShow\Include\bdamedia.h
文件 53527 2008-02-27 14:52 L13 系统融合2\MFCApplication1\MFCApplication1\DirectShow\Include\Bdatif.h
文件 15486 2008-02-27 14:52 L13 系统融合2\MFCApplication1\MFCApplication1\DirectShow\Include\bdatypes.h
文件 944 2008-02-27 14:52 L13 系统融合2\MFCApplication1\MFCApplication1\DirectShow\Include\comlite.h
文件 178266 2008-02-27 14:52 L13 系统融合2\MFCApplication1\MFCApplication1\DirectShow\Include\control.h
文件 88071 2008-02-27 14:52 L13 系统融合2\MFCApplication1\MFCApplication1\DirectShow\Include\d3d.h
文件 72232 2008-02-27 14:52 L13 系统融合2\MFCApplication1\MFCApplication1\DirectShow\Include\d3d8.h
文件 16088 2008-02-27 14:52 L13 系统融合2\MFCApplication1\MFCApplication1\DirectShow\Include\d3d8caps.h
文件 63735 2008-02-27 14:52 L13 系统融合2\MFCApplication1\MFCApplication1\DirectShow\Include\d3d8types.h
文件 96132 2008-02-27 14:52 L13 系统融合2\MFCApplication1\MFCApplication1\DirectShow\Include\d3d9.h
文件 22164 2008-02-27 14:52 L13 系统融合2\MFCApplication1\MFCApplication1\DirectShow\Include\d3d9caps.h
文件 69800 2008-02-27 14:52 L13 系统融合2\MFCApplication1\MFCApplication1\DirectShow\Include\d3d9types.h
............此处省略176个文件信息
- 上一篇:STM32温湿度传感器DHT11代码,通过串口上传
- 下一篇:大量icon图标
相关资源
- Opencv2.1 的dll和lib文件 win系统的
- HDR_Code_Image.rar for opencv
- opencv毕业设计
- opencv3.4.1+opencv_contrib经vs2015编译后生成
- opencv交叉编译过程中boostdesc_bgm.i等一
- opencv网络摄像头功能和文件传输功能
- opencv410编译好的32位库
- OpenCV文字区域定位
- 利用PCL,OpenCV求取点云的体积
- opencv按像素切割图片并按照类别编号
- opencv三角测量一种代码实现
- kinect2.0获取深度图、彩色图,并利用
- 比opencv还牛的,免费、高效的人脸检
- SURF源码(opencv中文注释).rar
- 二值图像的形状特征提取并显示在图
- opencv 轮廓的提取多种方法
-
ob
jectMarker正样本采集 - 基于opencv的图像去噪源代码
- opencv图像校正摄像头校正
- numpy-1.15.0-cp37-none-win32
- 矩形检测OPENCV
- VS2010下的视频烟雾检测
- 时间差分法帧间差分法opencv和vc代码实
- 基于opencv实现的人脸识别程序,需要
- boostdesc_bgm.i等OpenCV缺失时的文件.zip
- 视频流中的人脸跟踪以及眼睛定位
- 帧差法提取前景目标
- 基于QT的摄像头捕获程序
- OpenCV3.3最小二乘法直线拟合
- OpenCV相机姿态更新
评论
共有 条评论