www.pudn.com > PlateDSP.rar > main.frm
VERSION 5.00
Object = "{6801F6E0-06B2-4572-8498-91EB7373715A}#1.0#0"; "PlateDSP.ocx"
Begin VB.Form Form1
Caption = "PlateDSP演示程序"
ClientHeight = 7080
ClientLeft = 60
ClientTop = 450
ClientWidth = 10485
LinkTopic = "Form1"
ScaleHeight = 7080
ScaleWidth = 10485
StartUpPosition = 2 'CenterScreen
Begin PlateDSP.PlateDSPX PlateDSPX1
Height = 6855
Left = 120
OleObjectBlob = "main.frx":0000
TabIndex = 0
Top = 120
Width = 6855
End
Begin VB.Label LabelPercent
AutoSize = -1 'True
Caption = "Label1"
Height = 195
Left = 7080
TabIndex = 4
Top = 5400
Width = 3240
End
Begin VB.Label LabelColor
AutoSize = -1 'True
Caption = "Label1"
Height = 195
Left = 7080
TabIndex = 3
Top = 5040
Width = 3240
End
Begin VB.Label LabelType
AutoSize = -1 'True
Caption = "Label1"
Height = 195
Left = 7080
TabIndex = 2
Top = 4680
Width = 3240
End
Begin VB.Image ImagePlate
Height = 615
Left = 7080
Stretch = -1 'True
Top = 3120
Width = 3255
End
Begin VB.Image ImageCar
Height = 2895
Left = 7080
Stretch = -1 'True
Top = 120
Width = 3255
End
Begin VB.Label LabelNumber
AutoSize = -1 'True
Caption = "Label1"
BeginProperty Font
Name = "Arial"
Size = 26.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 600
Left = 7080
TabIndex = 1
Top = 3840
Width = 3300
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
LabelNumber.Caption = ""
LabelType.Caption = ""
LabelColor.Caption = ""
LabelPercent.Caption = ""
PlateDSPX1.VideoConnect (0)
End Sub
Private Sub PlateDSPX1_OnRecoged(ByVal PlateNum As Long)
Dim TmpFile As String
Dim PerStr As String
TmpFile = App.Path + "\CaptureTmp1.bmp"
PlateDSPX1.SaveCapturePicture (TmpFile)
ImageCar.Picture = LoadPicture(TmpFile)
If PlateNum > 0 Then
LabelNumber.Caption = PlateDSPX1.GetPlateNumber(0)
LabelType.Caption = "种类:" + CStr(PlateDSPX1.GetPlateClassName(0))
LabelColor.Caption = "颜色:" + CStr(PlateDSPX1.GetPlateColor(0))
i = -1
Per = PlateDSPX1.GetPlateReliability(0, i)
PerStr = "置信度:" + CStr(Per) + " ("
For i = 0 To 20
Per = PlateDSPX1.GetPlateReliability(0, i)
If (Per >= 0) Then
PerStr = PerStr + " " + CStr(Per)
End If
Next i
LabelPercent.Caption = PerStr + " )"
TmpFile = App.Path + "\PlateTmp1.bmp"
PlateDSPX1.SavePlatePicture 0, TmpFile
ImagePlate.Picture = LoadPicture(TmpFile)
ImagePlate.Visible = True
Else
LabelNumber.Caption = ""
LabelType.Caption = ""
LabelColor.Caption = ""
LabelPercent.Caption = ""
ImagePlate.Visible = False
End If
End Sub