ClearImage COM API
MeasureVertHistogram Method
CiTools Object : MeasureVertHistogram Method
Description
Measure vertical histogram
Syntax
Visual Basic
Public Function MeasureVertHistogram() As Variant
Return Type
An array of integers with the number of pixels in each row.
Remarks
Method requires bi-tonal image (object.Image.BitsPerPixel = 1).
Example
Measure Vertical and Horizontal Histograms
Sub MeasureHistogram(imageFile As String)
      ' Open image file
  Dim Ci As New CiServer
  Dim Tools As CiTools: Set Tools = Ci.CreateTools
  Tools.Image.Open imageFile
      ' Do processing
  Dim Hist, i, start
  Hist = Tools.MeasureHorzHistogram
  For i = LBound(Hist) To UBound(Hist)
    start = 0:  If (Tools.Image.IsZone) Then start = Tools.Image.Zone.Top
    Debug.Print "Row=" & start + i & " Pixels=" & Hist(i) & vbCrLf
  Next
  
  Hist = Tools.MeasureVertHistogram
  For i = LBound(Hist) To UBound(Hist)
    start = 0:  If (Tools.Image.IsZone) Then start = Tools.Image.Zone.Left
    Debug.Print "Col=" & start + i & " Pixels=" & Hist(i) & vbCrLf
  Next
End Sub
See Also

CiTools Object  | CiTools Members  | MeasureVertHistogram  | MeasureHorzHistogram