ClearImage COM API
DeleteLines Method
CiRepair Object : DeleteLines Method
Description
Delete lines and reconnect intersected objects
Syntax
Visual Basic
Public Sub DeleteLines( _
   ByVal Direction As ELineDirection, _
   Optional ByVal bRepair As EBoolean = ciTrue _
) 
Parameters
Direction
ValueDescription
ciLineHorzHorizontal lines
ciLineUnknownUnknown
ciLineVertVertical lines
ciLineVertAndHorzBoth vertical and horizontal lines
bRepair
ValueDescription
ciFalseValue is false (0)
ciTrueValue is true (-1)
Remarks

Lines are identified based on the values of pLineCurvature, pMinLineLength, pMaxLineGap  and pMaxLineAngle  properties. If bRepair is true after lines are deleted the remaining lines and portions of characters at the intersection with the removed lines are reconnected.
 

Example
Sub RepairMethods(imageFile As String, imageFileOut As String)
    ' Create objects and open input images
  Dim Ci As New CiServer
  Dim Repair As CiRepair: Set Repair = Ci.CreateRepair
  Repair.Image.Open imageFile
    ' Do Processing
  Repair.AutoDeskew                  ' Use AutoDeskew before AutoRotate
  Repair.AutoRotate
  '  Repair.AutoCrop 10, 10, 10, 10  ' Do not use AutoCrop with AutoRegister or BorderExtract
  '  Repair.AutoRegister 100, 100    ' Do not use AutoRegister with AutoCrop or BorderExtract
  Repair.AdvancedBinarize 0, 0, 0
  Repair.BorderExtract ciBexBorderDeskewCrop, ciBeaCleaner
  Repair.RemovePunchHoles
  Repair.SmoothCharacters ciSmoothDarkenEdges
  Repair.CleanNoise 3                ' Use CleanNoiseExt to remove white noise
  '  Repair.CleanNoiseExt (ciCnxBlackNoise + ciCnxWhiteNoise), 3, 3, 10, 0
  Repair.pLineCurvature = ciCurvLow
  Repair.pMaxLineAngle = 5
  Repair.pMaxLineGap = 5
  Repair.pMinLineLength = 200
  Repair.DeleteLines ciLineVertAndHorz, ciTrue
  Repair.Image.SaveAs imageFileOut, ciEXT
End Sub
See Also

CiRepair Object  | CiRepair Members  | DeleteLines  | ReconstructLines  | pLineCurvature  | pMaxLineAngle  | pMaxLineGap  | pMinLineLength