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

我做人脸识别,希望大家给点资料,关于人脸中比如眼角和嘴角的距离怎么测.谢谢了!PrivateSubEZHH_Click()Picture1.ClsText4.Text="... 我做人脸识别,希望大家给点资料,关于人脸中比如眼角和嘴角的距离怎么测.谢谢了!

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
Dim graycolor As Long
Dim x0 As Integer
Dim y0 As Integer
For x0 = 0 To Picture2.Width
For y0 = 0 To Picture2.Height
c = Picture2.Point(x0, y0)
Red = (c And &HFF)
Green = (c And 65280) / 256
Blue = (c And &HFF0000) / 65536
graycolor = (Red + Green + Blue) / 3
Picture3.PSet (x0, y0), RGB(graycolor, graycolor, graycolor)
DoEvents
Next
Next
Text3.Text = "灰度化完毕"
End Sub

Private Sub Open_Click()
Text2.Text = "归一窗口"
Text3.Text = "灰度窗口"
Text4.Text = "二值窗口"
Text5.Text = "识别窗口"

On Error Resume Next
CommonDialog1.DialogTitle = "打开文件"
CommonDialog1.Filter = "所有支持的格式" + "(*.jpg;*.bmp;*.gif;*.pcx;*.ico)|"
CommonDialog1.ShowOpen
If CommonDialog1.FileName <> "" Then
If Err <> 32755 Then
Dim openfilename As String
openfilename = CommonDialog1.FileName
Picture1.Picture = LoadPicture(openfilename)
End If
End If
Text1.Text = "打开图片"
If Image.Height <> 1935 Then
Image.Height = 1935
End If
If Image.Width <> 1695 Then
Image.Width = 1695
End If
End Sub
展开
 我来答
_弑灬月_
2008-05-17 · 超过21用户采纳过TA的回答
知道答主
回答量:111
采纳率:0%
帮助的人:80万
展开全部
私有次级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 = (c和&HFF)
Green = (c和65280)/256
Blue = (c和&HFF0000)/65536
graycolor = (红色+绿色+蓝色)/3
Picture3.PSet (x0, y0), RGB (graycolor、graycolor, graycolor)
DoEvents
Next
Next
Text3.Text = “灰度化完毕”
End潜水艇

Private次级Open_Click ()
Text2.Text = “归一窗口”
Text3.Text = “灰度窗口”
Text4.Text = “二值窗口”
Text5.Text = “识别窗口”

On其次错误简历
CommonDialog1.DialogTitle = “打开文件”
CommonDialog1.Filter = “所有支持的格式” +” (*.jpg; *.bmp; *.gif; *.pcx; *.ico)|"
CommonDialog1.ShowOpen 然后If CommonDialog1.FileName ""
If然后犯错32755 作为串的Dim openfilename
openfilename = CommonDialog1.FileName
Picture1.Picture = LoadPicture (openfilename)
End,如果
End,如果
Text1.Text = “打开图片”
If Image.Height 1935然后
Image.Height = 1935年
End,如果
If Image.Width 1695然后
Image.Width = 1695年
End,如果
End潜水艇
VB绿手
2008-05-18 · TA获得超过504个赞
知道小有建树答主
回答量:495
采纳率:0%
帮助的人:172万
展开全部
为何不发到VB里去?
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 1条折叠回答
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式