delphi 图像
图像图像
图像识别
识别识别
识别技术(逐行扫描识别
识别识别
识别)
unit bmp2number;
{将传递进来的图像
图像图像
图像进行对比,识别
识别识别
识别出图片中的数字。
本程序使用的是模式识别
识别识别
识别的方式,需要照片标准,数字无反光。
电表只有 4 位数字+1 位小数,小数因为在拍照中不能保证停止,所以本程序也不作小数位
的识别
识别识别
识别
因此。如果当前的数字 已经识别
识别识别
识别到了 4 位,程序就返回,
我们预设一个记录,用来记录这被识别
识别识别
识别的出 4 位数字的具体位置,再通过对 TOP 及 LEFT 位置
的进行排序组合后返回
对于本模板的重要方法说明:
Function GetNumber:string
功能:返回识别
识别识别
识别出的数字字符串
按照对 TBmp2Number 对象的下列属性:
SoruceBitmap:需要被识别
识别识别
识别的图像
图像图像
图像
Temp_Index:模板编号
Temp_path:模板文件目录
discern_rate:识别
识别识别
识别率
}
interface
uses windows,math,classes,controls,graphics,jpeg,sysutils,dialogs,extctrls,forms,
stdctrls,ComCtrls;
Type
pRGBTripleArray = ^TRGBTripleArray;
TRGBTripleArray = array [0 .. 65535] of TRGBTriple;
Ptemplate=^Ttemplate; //被识别
识别识别
识别的数字当用记录保存起来
Ttemplate=record
number:integer;
top:Integer;
Left:Integer;
end;
TBmp2Number=class(Tobject)
private
FSourceBitMap:Tbitmap;
FTempl_index:integer;
Ftempl_Path:String;
Fdiscern_rate:Double;
FNumber:string;
FNumberList:TList;