Accusoft.ImagXpressSdk Namespace > Processor Class : CropBorder Method |
Valid values are 0.0 to 1.0
This value may be adjusted to compensate for noise that is typically found in scanned documents. Typically this value will be greater than 0.9. For cleaner images this value should be even greater. In this instance, some value around or above 0.98 would be a good choice. For a computer generated image with no noise, 1.0 may be used. A value of 0.0 would never allow any cropping to occur.
'Declaration Public Sub CropBorder( _ ByVal percentToCrop As Single, _ ByVal cropType As CropType _ )
'Usage Dim instance As Processor Dim percentToCrop As Single Dim cropType As CropType instance.CropBorder(percentToCrop, cropType)
public void CropBorder( float percentToCrop, CropType cropType )
public: void CropBorder( float percentToCrop, CropType cropType )
public: void CropBorder( float percentToCrop, CropType cropType )
Valid values are 0.0 to 1.0
This value may be adjusted to compensate for noise that is typically found in scanned documents. Typically this value will be greater than 0.9. For cleaner images this value should be even greater. In this instance, some value around or above 0.98 would be a good choice. For a computer generated image with no noise, 1.0 may be used. A value of 0.0 would never allow any cropping to occur.
Occassionally, scanned images possess edges where the selected scan area falls outside the scanned page. Use this method to remove these edges.
Use the DocumentBorderCrop(Boolean) method to trim these edges from documents.
Beginning with the top row, ImagXpress examines each row for pixels containing the border color. If the percentage pixels containing the border color in that row and its adjacent row is greater than the given percentToCrop, the row is eliminated and the next row is examined. The process continues until the number of pixels containing the border color is less than the percentToCrop.
The same process applies for rows from bottom to top, the leftmost column to the right and the rightmost column to the left. The specified percentToCrop argument can be adjusted to compensate for noise that is typically found in scanned documents.