Find and straighten image lines
Visual Basic |
---|
Public Sub ReconstructLines( _ ByVal Direction As ELineDirection _ ) |
Value | Description |
---|---|
ciLineHorz | Horizontal lines |
ciLineUnknown | Unknown |
ciLineVert | Vertical lines |
ciLineVertAndHorz | Both vertical and horizontal lines |
Lines are identified based on values of pLineCurvature, pMinLineLength, pMaxLineGap and pMaxLineAngle properties.
After lines are deleted straight lines of the same length, thickness and angle are drawn on the image.
Method requires bi-tonal image (object.Image.BitsPerPixel = 1).
Sub T_ReconstructLines(ByRef Rep As CiRepair) Rep.pLineCurvature = ciCurvHigh Rep.pMaxLineAngle = 5 Rep.pMaxLineGap = 5 Rep.pMinLineLength = 200 Rep.ReconstructLines ciLineVertAndHorz End Sub