亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? classimageprocessing.cls

?? FaceRec 簡(jiǎn)單易懂的神經(jīng)網(wǎng)絡(luò)面部特征識(shí)別例子 [VB源碼]
?? CLS
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
  Dim x As Integer
  Dim y As Integer
  Dim RGBval As Long
  Dim maxcol As Long
  Dim screenWidth As Single
  Dim screenHeight As Single
  Dim screenLeft As Single
  Dim screenTop As Single
  Dim index As Integer
  Dim max As Long
  Dim redValue As Byte
  Dim greenValue As Byte
  Dim blueValue As Byte
  
  If (Not IsMissing(left)) And (Not IsMissing(top)) Then
    screenLeft = left
    screenTop = top
    screenWidth = wdth
    screenHeight = hght
    Else
    screenLeft = 0
    screenTop = 0
    screenWidth = canvas.ScaleWidth
    screenHeight = canvas.ScaleHeight
  End If
  
  'clear the histogram
  For index = 0 To Histogram_levels - 1
    ColourHistogram(index) = 0
  Next
  max = 0
  
  'get the histogram
  maxcol = RGB(255, 255, 255)
  For x = 0 To screenWidth - 1
    For y = 0 To screenHeight - 1
      RGBval = canvas.Point(screenLeft + x, screenTop + y)
      
      redValue = getRGBvalue(RGBval, 0)
      greenValue = getRGBvalue(RGBval, 1)
      blueValue = getRGBvalue(RGBval, 2)
      index = Int(getSpectrumValue(redValue, greenValue, blueValue) * Histogram_levels)
      
      ColourHistogram(index) = ColourHistogram(index) + 1
      If (ColourHistogram(index) > max) Then
        max = ColourHistogram(index)
      End If
    Next
  Next
  
  'normalize the histogram
  If (max > 0) Then
    For index = 0 To Histogram_levels - 1
      ColourHistogram(index) = ColourHistogram(index) / max
    Next
  End If
  
End Sub


Public Sub saveColourHistogram(FileNumber As Integer)
  Dim i As Integer
  
  Print #FileNumber, Histogram_levels
  For i = 0 To Histogram_levels - 1
    Print #FileNumber, ColourHistogram(i)
  Next
End Sub


Public Sub loadColourHistogram(FileNumber As Integer)
  Dim i As Integer
  Dim col As Single
  
  Input #FileNumber, Histogram_levels
  ReDim ColourHistogram(Histogram_levels)
  ReDim Hist(Histogram_levels)
  For i = 0 To Histogram_levels - 1
    Input #FileNumber, col
    ColourHistogram(i) = col
  Next
End Sub


Public Sub updateDirect(canvas As PictureBox, Optional left As Variant, Optional top As Variant, Optional wdth As Variant, Optional hght As Variant)
'import a picture pixel-for-pixel without any scaling
'processtype = 0   greyscale
'              1   red
'              2   green
'              3   blue
'              4   edges
'              5   movement

  Dim x As Integer
  Dim y As Integer
  Dim screenX As Integer
  Dim screenY As Integer
  Dim w As Integer
  Dim h As Integer
  Dim value As Double
  Dim RGBval As Long
  Dim pixels As Double
  Dim maxcol As Long
  Dim edgeValue As Single
  Dim screenWidth As Single
  Dim screenHeight As Single
  Dim screenLeft As Single
  Dim screenTop As Single
  
  If (Not IsMissing(left)) And (Not IsMissing(top)) Then
    screenLeft = left
    screenTop = top
    screenWidth = wdth
    screenHeight = hght
    Else
    screenLeft = 0
    screenTop = 0
    screenWidth = canvas.ScaleWidth
    screenHeight = canvas.ScaleHeight
  End If
  
  w = CInt(screenWidth / width)
  If (w < 1) Then
    w = 1
  End If
  h = CInt(screenHeight / height)
  If (h < 1) Then
    h = 1
  End If

  pixels = w * h
  maxcol = RGB(255, 255, 255)
  For x = 0 To width - 1
    For y = 0 To height - 1
      edgeTraced(x, y) = False
      screenX = screenLeft + ((x / width) * screenWidth)
      screenY = screenTop + ((y / height) * screenHeight)
      RGBval = canvas.Point(screenX, screenY)
      Select Case processType
        Case 0  'greyscale
          value = (RGBval / maxcol)
        Case 1  'red
          value = ((RGBval And 255) / 255)
        Case 2  'green
          value = ((RGBval And 65280) / 65280)
        Case 3  'blue
          value = ((RGBval And 16711680) / 16711680)
      End Select
      
      image(x, y) = value
    Next
  Next

End Sub



Public Sub getImageEdges(rawImage As classImageProcessing)
'extracts edges from the given image
  Dim x As Integer
  Dim y As Integer
  Dim value As Single
  Dim scalex As Single
  Dim scaley As Single
  Dim xx As Integer
  Dim yy As Integer
  Dim p1 As Integer
  Dim p2 As Integer
  Dim avContrast As Double
  
  scalex = rawImage.width / width
  scaley = rawImage.height / height
  
  currEdgeVector = 0
  maxEdgeVectorIntensity = 0
  
  avContrast = 0
  For x = 1 To width - 1
    For y = 1 To height - 1
      edgeTraced(x, y) = False
      xx = x * scalex
      yy = y * scaley
      If ((xx >= 1) And (yy >= 1)) Then
        p1 = rawImage.getPoint(xx, yy)
        p2 = rawImage.getPoint(xx - 1, yy)
        value = Abs(p1 - p2)
        p2 = rawImage.getPoint(xx, yy - 1)
        value = value + Abs(p1 - p2)
        value = value / (255 * 2)
        avContrast = avContrast + value
        'If (Abs(value - averageContrast) < EdgeThreshold) Then
        If (value < EdgeThreshold) Then
          value = 0
          Else
          value = 255 * value
        End If
        image(x, y) = value
      End If
    Next
  Next
  
  'calc average contast
  avContrast = avContrast / (width * height)
  averageContrast = avContrast
  If (averageContrast < 0.01) Then
    averageContrast = 0.01
  End If
  
  'calc threshold used for tracing along edges
  TraceEdgesThresh = (averageContrast * 255) * 0.1
  
  'Call diffuseEdges
  
  'Call getEdges
  Call traceEdges
  
End Sub


Public Sub getImageContours(rawImage As classImageProcessing)
'extracts edges from the given image
  Dim x As Integer
  Dim y As Integer
  Dim value As Single
  Dim scalex As Single
  Dim scaley As Single
  Dim xx As Integer
  Dim yy As Integer
  Dim p1 As Integer
  Dim p2 As Integer
  Dim value2 As Single
  Dim max As Single
  
  scalex = rawImage.width / width
  scaley = rawImage.height / height
  
  currEdgeVector = 0
  maxEdgeVectorIntensity = 0
  max = 1 - EdgeThreshold
  
  For x = 1 To width - 1
    For y = 1 To height - 1
      edgeTraced(x, y) = False
      xx = x * scalex
      yy = y * scaley
      If ((xx >= 1) And (yy >= 1)) Then
        p1 = rawImage.getPoint(xx, yy)
        p2 = rawImage.getPoint(xx - 1, yy)
        value = Abs(p1 - p2)
        p2 = rawImage.getPoint(xx, yy - 1)
        value = value + Abs(p1 - p2)
        value = value / (255 * 2)
        value2 = value - EdgeThreshold
        If (value2 < 0) Then
          value = 0
          Else
          value = 255 - (255 * (value2 / max))
        End If
        image(x, y) = value
      End If
    Next
  Next
    
End Sub




Public Sub show(canvas As PictureBox, Optional tx As Variant, Optional ty As Variant, Optional subImageWidth As Variant, Optional subImageHeight As Variant)
  Dim x As Integer
  Dim y As Integer
  Dim screenX(2) As Single
  Dim screenY(2) As Single
  Dim value As Byte
  Dim c As Long
  Dim i As Integer
  Dim showPoint As Boolean
  
  If (processType <> 4) Then
  
  canvas.FillStyle = 0
  For x = 0 To width - 1
    For y = 0 To height - 1
      showPoint = True
      If (IsMissing(tx)) Then
        value = image(x, y)
        Else
        If (x >= tx) And (x < tx + subImageWidth) And (y >= ty) And (y < ty + subImageHeight) Then
          value = image(x, y)
          Else
          value = 0
          showPoint = False
        End If
      End If
      
      If (showPoint) Then
        Select Case processType
          Case 1 'red
            c = RGB(value, 0, 0)
          Case 2 'green
            c = RGB(0, value, 0)
          Case 3 'blue
            c = RGB(0, 0, value)
          Case 4 'edges
            value = 255 - value
            c = RGB(value, value, value)
          Case Else
            c = RGB(value, value, value)
        End Select
        canvas.FillColor = c
        screenX(0) = (x / width) * canvas.ScaleWidth
        screenY(0) = (y / height) * canvas.ScaleHeight
        screenX(1) = ((x + 1) / width) * canvas.ScaleWidth
        screenY(1) = ((y + 1) / height) * canvas.ScaleHeight
        canvas.Line (screenX(0), screenY(0))-(screenX(1), screenY(1)), c, B
      End If
    Next
  Next
  
  Else
  
    'Call showEdges(canvas)
    canvas.Cls
    Call showEdgeTraces(canvas)
  
  End If
  
End Sub


Public Sub showEdgeTraces(canvas As PictureBox)
  Dim x As Integer
  Dim y As Integer
  Dim screenX(2) As Single
  Dim screenY(2) As Single
  Dim value As Byte
  Dim c As Long
  Dim i As Integer
  
  'canvas.Cls
  canvas.FillStyle = 0
  For x = 0 To width - 1
    For y = 0 To height - 1
      If (edgeTraced(x, y) = True) Then
        c = RGB(230, 230, 230)
        canvas.FillColor = c
        screenX(0) = (x / width) * canvas.ScaleWidth
        screenY(0) = (y / height) * canvas.ScaleHeight
        screenX(1) = ((x + 1) / width) * canvas.ScaleWidth
        screenY(1) = ((y + 1) / height) * canvas.ScaleHeight
        canvas.Line (screenX(0), screenY(0))-(screenX(1), screenY(1)), c, B
      End If
    Next
  Next
  
  Call showEdgeVector(canvas)
  
End Sub

Public Sub showEdgeVector(canvas As PictureBox)
  Dim x1 As Integer
  Dim y1 As Integer
  Dim x2 As Integer
  Dim y2 As Integer
  Dim screenX(2) As Single
  Dim screenY(2) As Single
  Dim value As Byte
  Dim c As Long
  Dim i As Integer
  Dim radius As Integer
  
  'canvas.Cls
  canvas.FillStyle = 0
  canvas.DrawWidth = 1
  radius = (canvas.ScaleWidth / width) / 2
  For i = 0 To currEdgeVector - 1
    x1 = EdgeVector(0, i)
    y1 = EdgeVector(1, i)
    x2 = EdgeVector(2, i)
    y2 = EdgeVector(3, i)
    
    'c = RGB((EdgeVector(4, i) / maxEdgeVectorIntensity) * 255, 0, 0)
    c = RGB(i, 0, 0)
    canvas.FillColor = c
    screenX(0) = (x1 / width) * canvas.ScaleWidth
    screenY(0) = (y1 / height) * canvas.ScaleHeight
    screenX(1) = (x2 / width) * canvas.ScaleWidth
    screenY(1) = (y2 / height) * canvas.ScaleHeight
    If (i > 0) Then
      canvas.Line -(screenX(0), screenY(0)), c
    End If
    canvas.Line (screenX(0), screenY(0))-(screenX(1), screenY(1)), c
    'canvas.Circle (screenX(0), screenY(0)), radius, c
    'canvas.Circle (screenX(1), screenY(1)), radius, c
  Next
  
End Sub



Public Sub showEdges(canvas As PictureBox)
  Dim x As Integer
  Dim y As Integer
  Dim screenX(2) As Single
  Dim screenY(2) As Single
  Dim edgeType As Byte
  Dim c As Long
  Dim i As Integer
  
  canvas.Cls
  canvas.FillStyle = 0
  c = RGB(0, 0, 0)
  For x = 0 To edgesWidth - 1
    For y = 0 To edgesHeight - 1
      
      screenX(0) = (x / edgesWidth) * canvas.ScaleWidth
      screenY(0) = (y / edgesHeight) * canvas.ScaleHeight
      screenX(1) = ((x + 1) / edgesWidth) * canvas.ScaleWidth
      screenY(1) = ((y + 1) / edgesHeight) * canvas.ScaleHeight
      
      edgeType = Edges(x, y)
      Select Case edgeType
        Case 1 'horizontal line
          canvas.Line (screenX(0), screenY(0))-(screenX(1), screenY(0)), c
        Case 2 'vertical line
          canvas.Line (screenX(0), screenY(0))-(screenX(0), screenY(1)), c
        Case 3 'diagonal /
          canvas.Line (screenX(0), screenY(1))-(screenX(1), screenY(0)), c
        Case 4 'diagonal \
          canvas.Line (screenX(0), screenY(0))-(screenX(1), screenY(1)), c
        Case 5 'cross
          canvas.Line (screenX(0), screenY(0))-(screenX(1), screenY(0)), c
          canvas.Line (screenX(0), screenY(0))-(screenX(0), screenY(1)), c
      End Select
    Next
  Next
  
End Sub


Public Sub showEdgeHistogram(chart As Object)
'displays edge histogram using MS chart control
  
  Dim i As Integer
  Dim estr As String

  chart.chartType = 7
  chart.RowCount = NO_OF_EDGE_TYPES
  chart.ColumnCount = 1
  
  estr = ""
  For i = 0 To chart.RowCount - 1
    chart.Row = i + 1
    chart.Data = EdgeHistogram(i)
    estr = estr & EdgeHistogram(i) & ", "
  Next
  chart.Refresh
  'MsgBox estr
  
End Sub


Public Sub showAngleHistogram(chart As Object)
'displays angle histogram using MS chart control
  
  Dim i As Integer
  Dim estr As String

  chart.chartType = 7
  chart.RowCount = 18
  chart.ColumnCount = 1
  
  estr = ""
  For i = 0 To chart.RowCount - 1
    chart.Row = i + 1
    chart.Data = angleHistogram(i)
    estr = estr & angleHistogram(i) & ", "
  Next
  chart.Refresh
  'MsgBox estr
  
End Sub


Private Function getRGBvalue(RGBColour As Long, ColourIndex As Integer) As Byte
'returns either the red green or blue component of the given colour
  Dim rgbsource As RGBthingy
  Dim rgbdest As RGBpoint
  
  rgbsource.value = RGBColour
  Call CopyMemory(rgbdest, rgbsource, 3)
  
  Select Case ColourIndex
    Case 0  'red
      getRGBvalue = rgbdest.red
    Case 1  'green
      getRGBvalue = rgbdest.Green
    Case 2  'blue
      getRGBvalue = rgbdest.Blue
  End Select
  
End Function


Private Function getSpectrumValue(red As Byte, Green As Byte, Blue As Byte) As Double
'returns a value between 0 and 1 indicating a point in a continuous colour spectrum
  Dim r As Single
  Dim g As Single
  Dim b As Single
  
  r = red
  g = Green
  b = Blue
  getSpectrumValue = ((r * r) + (g * g) + (b * b)) / 195075
End Function

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美三级一区二区| 久久亚洲精精品中文字幕早川悠里| 日韩欧美综合一区| 亚洲天堂成人网| 看电影不卡的网站| 99久久国产综合精品麻豆| 日韩欧美久久一区| 亚洲午夜免费视频| 成人福利视频在线| 精品国产不卡一区二区三区| 亚洲一区二区三区四区的| 粉嫩高潮美女一区二区三区| 日韩亚洲欧美一区| 亚洲国产日韩在线一区模特| aaa欧美色吧激情视频| 欧美精品一区男女天堂| 日韩成人午夜精品| 欧美系列在线观看| 亚洲人妖av一区二区| 国产东北露脸精品视频| 精品乱人伦一区二区三区| 亚洲1区2区3区视频| 色欧美片视频在线观看| 中文字幕久久午夜不卡| 国产精品自拍一区| 欧美电影免费观看高清完整版在线 | 韩国av一区二区三区在线观看| 在线亚洲+欧美+日本专区| 亚洲欧洲精品一区二区三区不卡| 国产一区二区主播在线| 欧美mv日韩mv| 久久不见久久见中文字幕免费| 欧美高清精品3d| 婷婷丁香久久五月婷婷| 欧美色电影在线| 亚洲午夜免费电影| 欧美影院一区二区| 亚洲国产视频a| 欧美剧在线免费观看网站| 亚洲一二三四区| 欧美性生活一区| 亚洲综合视频在线观看| 欧美综合天天夜夜久久| 亚洲国产综合人成综合网站| 欧美午夜片在线观看| 亚洲综合在线电影| 欧美视频在线观看一区| 亚洲福中文字幕伊人影院| 欧美性大战xxxxx久久久| 亚洲永久免费av| 欧美日韩国产首页| 日本亚洲欧美天堂免费| 欧美岛国在线观看| 国产一区999| 国产精品亲子伦对白| 成人av在线播放网站| 中文字幕在线免费不卡| 色av综合在线| 视频精品一区二区| 日韩精品在线看片z| 国产精品亚洲人在线观看| 国产欧美一区二区精品久导航| 波多野结衣精品在线| 一区二区高清视频在线观看| 欧美精品一二三四| 九九热在线视频观看这里只有精品| 久久久噜噜噜久噜久久综合| 成人免费毛片a| 一区二区三区四区视频精品免费| 欧美日韩国产片| 精品一区二区三区日韩| 中文天堂在线一区| 欧洲国内综合视频| 日本一不卡视频| 国产精品无人区| 在线看不卡av| 久久国产精品第一页| 国产精品色在线| 欧美性极品少妇| 久草这里只有精品视频| 中文欧美字幕免费| 欧美久久一二区| 国产精品一区二区三区99| 亚洲欧美国产高清| 日韩欧美高清在线| 成人av免费在线观看| 亚洲成人动漫在线免费观看| 26uuu精品一区二区在线观看| yourporn久久国产精品| 五月婷婷色综合| 国产日韩综合av| 欧美色欧美亚洲另类二区| 韩日欧美一区二区三区| 亚洲免费在线观看| 日韩欧美一级二级| 一本久久a久久精品亚洲| 美女www一区二区| 亚洲欧美国产三级| 精品成人佐山爱一区二区| 91免费观看视频在线| 久久精品国产99| 亚洲免费观看高清完整| 亚洲精品一区二区三区影院| 91麻豆国产精品久久| 极品少妇一区二区| 亚洲精品成人少妇| 国产性天天综合网| 欧美欧美欧美欧美首页| 成人涩涩免费视频| 老司机免费视频一区二区三区| 亚洲天天做日日做天天谢日日欢| 日韩欧美一二区| 欧美三级韩国三级日本三斤| 国产91综合一区在线观看| 午夜精品免费在线| 中文字幕亚洲一区二区av在线 | av资源站一区| 麻豆一区二区在线| 亚洲一二三专区| 亚洲色图视频网站| 久久久久久久久97黄色工厂| 欧美高清www午色夜在线视频| 一本色道综合亚洲| 国产成人av影院| 久草在线在线精品观看| 亚洲成人一区二区在线观看| 中文字幕乱码久久午夜不卡| 精品捆绑美女sm三区| 欧美日韩久久不卡| 一本久久综合亚洲鲁鲁五月天| 国产 日韩 欧美大片| 精品一区免费av| 日本不卡一区二区| 亚洲成人777| 一区二区三区在线视频播放| 国产精品美女久久久久久久| 久久综合视频网| 日韩精品一区二区三区中文精品| 欧美日韩午夜影院| 欧美专区在线观看一区| 99精品一区二区三区| 成人毛片老司机大片| 国产精品99久久久久久久vr | 日日噜噜夜夜狠狠视频欧美人| 亚洲男人的天堂一区二区| 国产精品久久久久一区 | 欧美日韩高清在线| 欧美亚洲高清一区| 色成年激情久久综合| 色94色欧美sute亚洲线路二| 91视频com| 91色在线porny| 91女厕偷拍女厕偷拍高清| 99视频超级精品| 91污在线观看| 99re这里只有精品视频首页| 国产白丝精品91爽爽久久| 国产精品夜夜嗨| 国产宾馆实践打屁股91| 成人午夜在线播放| 成人午夜在线免费| 91毛片在线观看| 日本韩国欧美国产| 欧美日韩在线三级| 7777精品伊人久久久大香线蕉超级流畅| 在线一区二区三区做爰视频网站| 色一情一乱一乱一91av| 日本福利一区二区| 精品视频999| 日韩一区二区在线看片| 欧美xxxxx裸体时装秀| 亚洲精品一线二线三线无人区| 2020国产精品| 国产精品视频九色porn| 亚洲伦理在线精品| 午夜日韩在线电影| 美女网站视频久久| 丁香五精品蜜臀久久久久99网站 | 国产一二三精品| 成人一区二区三区| 色哟哟一区二区| 51精品国自产在线| 精品国产免费久久| 中文字幕不卡三区| 亚洲激情综合网| 日韩高清欧美激情| 国产一区二区三区最好精华液| 国产成人综合亚洲网站| 97国产精品videossex| 欧美三片在线视频观看| 日韩免费视频一区二区| 久久精品夜色噜噜亚洲aⅴ| 亚洲婷婷国产精品电影人久久| 亚洲成国产人片在线观看| 精品在线视频一区| 99久久久精品免费观看国产蜜| 欧美日韩一区三区| 久久久久久久久99精品| 亚洲精选视频在线| 奇米影视7777精品一区二区|