ClearImage COM API
FirstLine Method
CiTools Object : FirstLine Method
Description
Find the first line
Syntax
Visual Basic
Public Function FirstLine() As CiLine
Return Type
Nothing or null when no more lines are available.
Remarks

Lines are identified based on values of pLineCurvature, pMinLineLength, pMaxLineGap  and pMaxLineAngle  properties

Example
Iterate image lines
Sub ListLines(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 Line As CiLine
  Tools.pLineCurvature = ciCurvVeryLow
  Tools.pMaxLineAngle = 4.5
  Tools.pMaxLineGap = 5
  Tools.pMinLineLength = 100
  Tools.pLineDirection = ciLineVertAndHorz
  Set Line = Tools.FirstLine
  Do While Not Line Is Nothing
    Debug.Print "  Line Angle=" & Line.Angle & "  Thickness=" & Line.Thickness
    Debug.Print "  Rect=" & "(" & Line.Rect.Left & "," & Line.Rect.Top & " - " & Line.Rect.Right & "," & Line.Rect.bottom & ")"
    Debug.Print "  Start (" & Line.Start.x & "," & Line.Start.y & ")  End (" & Line.End.x & "," & Line.End.y & ")"
    Debug.Print "  Dir=" & Switch(Line.Direction = ciLineHorz, "Horz", Line.Direction = ciLineVert, "Vert") & vbCrLf
    Set Line = Tools.NextLine
  Loop
End Sub
See Also

CiTools Object  | CiTools Members  | NextLine  | FirstLine  | pLineCurvature  | pLineDirection  | pMaxLineAngle Property  | pMaxLineGap  | pMinLineLength  | CiLine