我在delphi程序开发范例宝典中看到一段识别车牌的程序,如图所示
图形中的文字已经识别出来了,但是如何转换为文字呢!求高手教我!!
程序源码:
unit Unit1;interfaceuses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ComCtrls, Buttons, ExtCtrls, ExtDlgs;type
  TForm1 = class(TForm)
    OpenPictureDialog1: TOpenPictureDialog;
    Image1: TImage;
    SpeedButton1: TSpeedButton;
    SpeedButton2: TSpeedButton;
    TrackBar1: TTrackBar;
    TrackBar2: TTrackBar;
    TrackBar3: TTrackBar;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    procedure SpeedButton1Click(Sender: TObject);
    procedure SpeedButton2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;var
  Form1: TForm1;
  P:array[1..400,1..400]of byte;
  t:Tcolor;
implementation{$R *.dfm}procedure TForm1.SpeedButton1Click(Sender: TObject);
begin
  if openpicturedialog1.Execute then
  image1.Picture.LoadFromFile(openpicturedialog1.FileName) ;
end;procedure TForm1.SpeedButton2Click(Sender: TObject);
var
  row,lie:integer;
begin
   form1.Repaint;
   for row:=trackbar1.Position to trackbar2.Position do
   begin
     for lie:=1 to 400 do
       begin
         t:=image1.Canvas.Pixels[row,lie];
         p[row,lie]:=getbvalue(t);
       end;
   end;
    for row:=trackbar1.Position to trackbar2.position do
      begin
        for lie:=1 to 400 do
          begin
             if p[row,lie]<trackbar3.Position then
               form1.Canvas.Pixels[row,lie]:=clred; 
          end;
      end;
end;end.