请帮忙翻译一下这段VB程序

来源:百度知道 编辑:UC知道 时间:2024/05/26 02:29:54
我做人脸识别,希望大家给点资料,关于人脸中比如眼角和嘴角的距离怎么测.谢谢了!

Private Sub EZHH_Click()
Picture1.Cls
Text4.Text = "二值化中"
For x0 = 0 To Picture3.Width
For y0 = 0 To Picture3.Height
c = Picture3.Point(x0, y0)
Red = (c And &HFF)
Green = (c And 65280) / 256
Blue = (c And &HFF0000) / 65536
graycolor = (Red + Green + Blue) / 3
If graycolor < 147 Then
T = 0
Else
T = 255
End If
Picture4.PSet (x0, y0), RGB(T, T, T)
DoEvents
Next
Next
Text4.Text = "二值化完毕"
End Sub

Private Sub GYH_Click()
Picture2.Width = 1695
Picture2.Height = 1935
Picture2.PaintPicture Picture1.Picture, 0, 0, Picture5.Width, Picture5.Height, 0, 0, Picture1.Width, Picture1.Height
Text2.Text = "归一化完毕"
End Sub

Private Sub HDH_Click()
Text3.Text = "灰度化中"
Dim Red As Integer
Dim Green As Integer
Dim Blue As Integer
Dim c As Long
D

私有次级EZHH_Click ()
Picture1.Cls
Text4.Text = “二值化中”
For x0 = 0对Picture3.Width
For y0 = 0对Picture3.Height
c = Picture3.Point (x0, y0)
Red = (c和&HFF)
Green = (c和65280)/256
Blue = (c和&HFF0000)/65536
graycolor = (红色+绿色+蓝色)/3
If graycolor < 147然后
T = 0
Else
T = 255
End,如果
Picture4.PSet (x0, y0), RGB (T, T, T)
DoEvents
Next
Next
Text4.Text = “二值化完毕”
End潜水艇

Private次级GYH_Click ()
Picture2.Width = 1695年
Picture2.Height = 1935年
Picture2.PaintPicture Picture1.Picture, 0, 0, Picture5.Width, Picture5.Height, 0, 0, Picture1.Width, Picture1.Height
Text2.Text = “归一化完毕”
End潜水艇

Private次级HDH_Click ()
Text3.Text = “灰度化中” 作为整数的Dim红色 作为整数的Dim绿色 作为整数的Dim蓝色
Dim c作为长期
Dim graycolor作为长期 作为整数的Dim x0 作为整数的Dim y0
For x0 = 0对Picture2.Width
For y0 = 0对Picture2.Height
c = Picture2.Point (x0, y0)
Red