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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? classimageprocessing.cls

?? 這是一個立體視覺程序
?? CLS
?? 第 1 頁 / 共 5 頁
字號:
  y = edges(FeatureNo, EDGE_Y)
End Sub


Public Function getEdgeGradient(px As Integer, py As Integer, minDistance As Integer, ByRef ax As Single, ByRef ay As Single) As Single
'returns the attraction towards edges at the given point
'ax and ay are always between -1 and +1
  Dim i As Integer
  Dim j As Integer
  Dim Dist As Single
  Dim dx As Single
  Dim dy As Single
  Dim grad As Single
  Dim d2 As Single
  Dim g As Single
  Dim ang As Single
  Dim instances As Single
  
  grad = 0
  ax = 0
  ay = 0
  instances = 0
  For i = 0 To noOfEdges - 1
    'For j = 0 To 2 Step 2
      dx = edges(i, EDGE_X1 + j) - px
      dy = edges(i, EDGE_Y1 + j) - py
      Dist = Sqr((dx * dx) + (dy * dy))
      If (Dist > 0) And (Dist < minDistance) Then
        d2 = Dist / minDistance
        d2 = d2 * d2
        g = 1 / (1 + d2)
        grad = grad + g
        ang = Acos(dy / Dist)
        If (dx < 0) Then
          ang = (2 * 3.1415927) - ang
        End If
    
        ax = ax + ((g) * Sin(ang) * 1 * (edges(i, EDGE_LENGTH) / 10))
        ay = ay + ((g) * Cos(ang) * 1 * (edges(i, EDGE_LENGTH) / 10))
        'ax = ax + (d2 * Sin(ang) * (edges(i, EDGE_LENGTH) / maxEdgeLength) * 100)
        'ay = ay + (d2 * Cos(ang) * (edges(i, EDGE_LENGTH) / maxEdgeLength) * 100)
        instances = instances + 1
      End If
    'Next
  Next
  
  If (noOfEdges > 0) Then
    grad = grad / noOfEdges
    ax = ax / noOfEdges
    ay = ay / noOfEdges
  End If
  getEdgeGradient = grad
  
End Function



Public Function averageIntensity() As Single
'returns the average pixel intensity
  Dim x As Integer
  Dim y As Integer
  Dim av As Single
  
  av = 0
  For x = 0 To width - 1
    For y = 0 To height - 1
      av = av + image(x, y)
    Next
  Next
  av = av / (width * height)
  
  averageIntensity = av
End Function


Public Sub showTestCard(pic As PictureBox)
  Dim x As Integer
  Dim maxcol As Long
  Dim col As Long
  
  pic.Cls
  maxcol = RGB(255, 255, 255)
  For x = 0 To pic.ScaleWidth
    col = (maxcol / pic.ScaleWidth) * x
    pic.Line (x, 0)-(x, pic.ScaleHeight), col
  Next
End Sub


Public Function colourSimilarity(pic As PictureBox, topX As Integer, topY As Integer, areaWidth As Integer, areaHeight As Integer) As Single
'compares an area of an image to the colour histogram
  Dim x As Integer
  Dim y As Integer
  Dim RGBvalue As Long
  Dim maxValue As Double
  Dim index As Integer
  Dim max As Double
  Dim similarity As Single
  Dim fract As Single
  Dim i As Integer
  Dim dc As Single
  Dim redValue As Byte
  Dim greenValue As Byte
  Dim blueValue As Byte
  
  'get histogram
  maxValue = RGB(255, 255, 255)
  For x = 0 To areaWidth - 1
    For y = 0 To areaHeight - 1
      RGBvalue = pic.Point(topX + x, topY + y)
      
      If (RGBvalue > 0) Then
        redValue = getRGBvalue(RGBvalue, 0)
        greenValue = getRGBvalue(RGBvalue, 1)
        blueValue = getRGBvalue(RGBvalue, 2)
        index = Int(getSpectrumValue(redValue, greenValue, blueValue) * Histogram_levels)
      
        Hist(index) = Hist(index) + 1
        If (Hist(index) > max) Then
          max = Hist(index)
        End If
      End If
    Next
  Next
  
  'normalize
  If (max > 0.01) Then
    For index = 0 To Histogram_levels - 1
      Hist(index) = Hist(index) / max
    Next
  End If
  
  'compare
  similarity = 0
  i = 0
  For index = 0 To Histogram_levels - 1
    If (ColourHistogram(index) > 0) And (Hist(index) > 0) Then
      dc = Abs(Hist(index) - ColourHistogram(index))
      similarity = similarity + (1 - (dc * dc))
      i = i + 1
    End If
  Next
  If (i > 0) Then
    similarity = similarity / i
  End If
  
  colourSimilarity = similarity
End Function









Public Sub showColourHistogram(pic As PictureBox)
  Dim i As Integer
  Dim x As Integer
  Dim y As Integer
  Dim prev_x As Integer
  Dim prev_y As Integer
  Dim c As Long
  
  pic.Cls
  c = RGB(255, 255, 255)
  pic.DrawWidth = 1
  For i = 0 To Histogram_levels
    If (ColourHistogram(i) <= 1) And (ColourHistogram(i) >= 0) Then
      x = (pic.ScaleWidth / Histogram_levels) * i
      y = pic.ScaleHeight - (pic.ScaleHeight * ColourHistogram(i))
      If (i > 0) Then
        pic.Line (prev_x, prev_y)-(x, y), c
      End If
      prev_x = x
      prev_y = y
    End If
  Next
  
End Sub


Public Function getEdgeHistogramValue(index As Integer) As Single
  getEdgeHistogramValue = EdgeHistogram(index)
End Function


Public Sub applyThreshold(Value As Byte)
'applies a threshold to the image
  Dim x As Integer
  Dim y As Integer
  
  For x = 0 To width - 1
    For y = 0 To height - 1
      If (image(x, y) < Value) Then
        image(x, y) = 0
      End If
    Next
  Next
End Sub






Private Function Dist(x1 As Single, y1 As Single, x2 As Single, y2 As Single) As Single
  Dim dx As Single
  Dim dy As Single
  
  dx = x1 = x2
  dy = y1 - y2
  Dist = Sqr((dx * dx) + (dy * dy))
End Function











Public Sub getEdge(index As Integer, ByRef x As Integer, ByRef y As Integer, ByRef angle As Integer, ByRef edgeLength As Integer, ByRef probability As Integer, ByRef TrackNumber As Integer)
  If (index < noOfEdges) Then
    x = edges(index, EDGE_X)
    y = edges(index, EDGE_Y)
    angle = edges(index, EDGE_ANGLE) * (180 / NoOfEdgeAngles)
    edgeLength = edges(index, EDGE_LENGTH)
    probability = edges(index, EDGE_PROBABILITY)
    TrackNumber = edges(index, EDGE_TRACK)
  End If
End Sub



Public Sub init(imageWidth As Integer, imageHeight As Integer)
  width = imageWidth
  height = imageHeight
  ReDim image(width, height)
  ReDim edgeTraced(width, height)
  
  NoOfEdgeAngles = 18
  ReDim EdgeHistogram(NoOfEdgeAngles)
  minEdgeLength = 6
  
  scanInterval = 2
  
  EdgeThreshold = 0
  processType = 0
  averageContrast = 1
  Histogram_levels = 40
  ReDim ColourHistogram(Histogram_levels)
  ReDim Hist(Histogram_levels)
  mergeEdgesRadius = 3
End Sub


Public Sub setHistogramLevels(levels As Integer)
  Histogram_levels = levels
  ReDim ColourHistogram(Histogram_levels)
  ReDim Hist(Histogram_levels)
End Sub


Public Sub Save(filenumber As Integer)
'save the image
  Dim x As Integer
  Dim y As Integer
  
  Print #filenumber, width
  Print #filenumber, height
  For x = 0 To width - 1
    For y = 0 To height - 1
      Print #filenumber, image(x, y)
    Next
  Next
End Sub


Public Sub Load(filenumber As Integer)
'save the image
  Dim x As Integer
  Dim y As Integer
  Dim b As Byte
  
  Input #filenumber, width
  Input #filenumber, height
  Call init(width, height)
  For x = 0 To width - 1
    For y = 0 To height - 1
      Input #filenumber, b
      image(x, y) = b
    Next
  Next
End Sub


Public Sub whiteNoise()
  Dim x As Integer
  Dim y As Integer
  
  For x = 0 To width - 1
    For y = 0 To height - 1
      image(x, y) = Rnd * 255
    Next
  Next
End Sub


Public Sub Normalize()
'normalizes the image
  Dim max As Integer
  Dim x As Integer
  Dim y As Integer
  Dim p As Integer
  
  max = 0
  For x = 0 To width - 1
    For y = 0 To height - 1
      If (image(x, y) > max) Then
        max = image(x, y)
      End If
    Next
  Next
  
  If (max > 0) Then
    For x = 0 To width - 1
      For y = 0 To height - 1
        p = image(x, y)
        p = p / max * 255
        image(x, y) = p
      Next
    Next
  End If
  
End Sub


Public Function getPoint(x As Integer, y As Integer) As Byte
  getPoint = image(x, y)
End Function


Public Function setPoint(x As Integer, y As Integer, Value As Byte)
  image(x, y) = Value
End Function


Public Sub update(canvas As PictureBox, Optional left As Variant, Optional top As Variant, Optional wdth As Variant, Optional hght As Variant)
'import a picture
'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 xx As Integer
  Dim yy 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
  Dim rgbsource As RGBthingy
  Dim rgbdest As RGBpoint
  Dim r As Single
  Dim g As Single
  Dim b 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)
      Value = 0
      For xx = screenX To screenX + w - 1 Step scanInterval
        For yy = screenY To screenY + h - 1 Step scanInterval
          
          RGBval = canvas.Point(xx, yy)
          rgbsource.Value = RGBval
          Call CopyMemory(rgbdest, rgbsource, 3)
          r = rgbdest.Red
          g = rgbdest.Green
          b = rgbdest.Blue
          Select Case processType
            Case 0  'greyscale
              Value = Value + ((r + g + b) / 765)
            Case 1  'red
              Value = Value + (r / 255)
            Case 2  'green
              Value = Value + (g / 255)
            Case 3  'blue
              Value = Value + (b / 255)
            Case 5  'motion
              Value = Value + (RGBval / maxcol)
          End Select
          
        Next
      Next
      Value = (Value / pixels) * 255
            
      If (processType <> 5) Then
        image(x, y) = Value
        Else
        'difference between successive images
        image(x, y) = Abs(Value - image(x, y))
      End If
      
    Next
  Next

End Sub



Public Sub updateColourHistogram(canvas As PictureBox, Optional left As Variant, Optional top As Variant, Optional wdth As Variant, Optional hght As Variant)

  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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久精品一区二区| 懂色av噜噜一区二区三区av| 国产日韩视频一区二区三区| 色婷婷综合久久久久中文 | 久久99国产精品免费| 国产日韩欧美一区二区三区乱码 | 婷婷久久综合九色综合绿巨人| 欧美一级理论片| 99久久精品国产导航| 看国产成人h片视频| 一区二区三区四区五区视频在线观看| 精品少妇一区二区三区| 91精品1区2区| va亚洲va日韩不卡在线观看| 久久国内精品自在自线400部| 亚洲免费资源在线播放| 国产亚洲一区字幕| 日韩欧美成人午夜| 这里只有精品电影| 欧美色综合影院| 色综合色综合色综合色综合色综合 | 国产成人亚洲综合a∨婷婷图片| 亚洲第一成人在线| 一区二区三区欧美在线观看| 欧美国产禁国产网站cc| www久久久久| 日韩欧美一级片| 日韩免费性生活视频播放| 91精品婷婷国产综合久久性色 | 91国产精品成人| 91丝袜呻吟高潮美腿白嫩在线观看| 国产在线视频不卡二| 久久99国产精品免费| 久久97超碰色| 精品一区二区三区香蕉蜜桃| 久久国产福利国产秒拍| 久草精品在线观看| 韩国v欧美v亚洲v日本v| 韩国中文字幕2020精品| 黄色日韩三级电影| 精品一区二区三区免费播放| 激情综合色综合久久| 国产综合久久久久影院| 精品一区二区三区蜜桃| 韩国av一区二区| 成人一区二区在线观看| 不卡的av中国片| 色综合久久久久综合| 色嗨嗨av一区二区三区| 欧美色图免费看| 91精品国产欧美一区二区18| 欧美成人aa大片| 国产亚洲精品资源在线26u| 欧美国产日韩一二三区| |精品福利一区二区三区| 亚洲精品视频在线观看免费| 亚洲综合一二区| 日韩av在线发布| 韩国在线一区二区| 不卡电影一区二区三区| 欧美在线视频日韩| 91精品麻豆日日躁夜夜躁| 精品国产区一区| 激情小说欧美图片| 青青草国产成人99久久| 韩国欧美一区二区| caoporn国产精品| 欧美精品1区2区3区| 精品久久久久久久久久久久久久久久久 | 日产国产高清一区二区三区| 精品在线亚洲视频| www.日韩大片| 欧美日韩一区二区三区在线看| 欧美电影免费观看高清完整版在线| 国产亚洲综合av| 亚洲一区二区三区四区中文字幕| 免费精品视频在线| 97久久久精品综合88久久| 欧美午夜宅男影院| 久久精品一二三| 亚洲国产三级在线| 国产露脸91国语对白| 在线欧美小视频| 欧美精品一区二区三区一线天视频| 国产精品久久综合| 日韩av电影一区| 97久久精品人人爽人人爽蜜臀| 91精品国产色综合久久久蜜香臀| 国产精品视频观看| 麻豆久久一区二区| 91玉足脚交白嫩脚丫在线播放| 日韩一区二区三区电影| 亚洲色图在线视频| 国产在线一区观看| 欧美日韩高清一区二区不卡| 中文字幕免费不卡| 另类小说欧美激情| 欧美视频中文字幕| 亚洲天天做日日做天天谢日日欢 | 亚洲国产欧美在线| 成人免费视频免费观看| 日韩一区二区在线观看| 一区二区三区免费网站| 国产69精品一区二区亚洲孕妇| 欧美日韩mp4| 玉足女爽爽91| 成人99免费视频| 久久午夜电影网| 蜜臀av一区二区三区| 精品视频全国免费看| 一区二区中文视频| 国产69精品久久777的优势| 精品国产免费一区二区三区四区 | 人人精品人人爱| 在线观看国产日韩| 亚洲视频综合在线| 丁香婷婷综合色啪| 久久久亚洲精品一区二区三区| 日韩在线卡一卡二| 欧美在线播放高清精品| 综合分类小说区另类春色亚洲小说欧美| 国内外精品视频| 2019国产精品| 国产美女在线精品| 久久综合999| 九一九一国产精品| 欧美不卡在线视频| 久久精品国产亚洲a| 日韩欧美激情四射| 久久精品国产久精国产| 日韩视频123| 久久av资源站| 久久综合久久99| 国产美女视频91| 国产欧美一区二区在线观看| 国产高清在线观看免费不卡| 精品国产伦一区二区三区观看方式| 日本欧美大码aⅴ在线播放| 欧美一区二区三区视频免费| 麻豆国产精品官网| 精品国产一区二区国模嫣然| 久久99精品网久久| 国产婷婷色一区二区三区| 国产成人av自拍| 中文字幕一区二区三区色视频| 椎名由奈av一区二区三区| 成人污污视频在线观看| 国产精品家庭影院| av电影一区二区| 一个色综合网站| 欧美一区二区成人6969| 精品制服美女久久| 国产精品久久毛片av大全日韩| 91一区在线观看| 亚洲国产乱码最新视频| 欧美成人乱码一区二区三区| 国产suv精品一区二区883| 自拍偷拍亚洲激情| 欧美日韩黄色一区二区| 久久99精品久久久久久国产越南 | 亚洲一区二区三区四区五区黄| 欧美性高清videossexo| 强制捆绑调教一区二区| 久久夜色精品国产欧美乱极品| 成人美女视频在线看| 一区二区三区免费在线观看| 日韩一级欧美一级| 国产凹凸在线观看一区二区| 一区二区三区在线观看欧美| 日韩亚洲欧美成人一区| 成人在线视频一区| 亚洲va欧美va国产va天堂影院| 欧美va亚洲va| 97se亚洲国产综合自在线| 日韩高清欧美激情| 国产精品三级在线观看| 欧美日韩精品福利| 国产v综合v亚洲欧| 亚洲18影院在线观看| 久久综合狠狠综合久久激情| 91丨porny丨国产入口| 免费成人在线视频观看| 亚洲男女一区二区三区| 日韩欧美国产wwwww| 一本色道久久综合亚洲精品按摩| 日韩av在线发布| 亚洲视频一二三| 欧美精品一区二区精品网| 一本久久a久久精品亚洲| 久久不见久久见免费视频1| 亚洲男人电影天堂| 精品美女在线播放| 欧美亚洲综合久久| 国产成人免费xxxxxxxx| 亚洲.国产.中文慕字在线| 国产精品视频线看| 日韩色在线观看| 欧美精品久久久久久久多人混战 | 亚洲影院免费观看| 国产视频一区不卡|