Accusoft.ImagXpress13.Net
CropBorder Method




A float value which represents the percent to crop.

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.

A CropType enumeration value which represents the type of crop to perform.
Performs border removal by cropping the edges of the current image.
Syntax
'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
) 

Parameters

percentToCrop
A float value which represents the percent to crop.

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.

cropType
A CropType enumeration value which represents the type of crop to perform.
Remarks

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.

See Also

Reference

Processor Class
Processor Members

 

 


©2019. Accusoft Corporation. All Rights Reserved.

Send Feedback