IEditablePictureObject

What it does

Represents a picture that can be edited in ABBYY FlexiCapture. The object is an extension of the IPictureObject interface.

Note. This object is not available on the Web Verification Station for checking rules locally.

Methods

Definition Description Allowable image color
ApplyContourSmoother ( params: IContourSmootherParams ) Applies the contour smoother to an image. For gray and color images
ApplyLocalContrastFilter ( params: ILocalContrastParams ) Applies the non-adaptive contrast filter to an image. For gray and color images
ApplyMultiscaleLocalContrastFilter () Applies the adaptive contrast filter to an image. Use this method to transform an image into a scan. For gray and color images
ApplyShadowsHighlightsFilter ( params: IShadowsHighlightsParams ) Applies shadow highlighting to an image. For gray and color images
ApplySigmaFilter () Removes digital noise from an image. For all images
AutoCrop ( [optional] type : string ) Automatically crops an image. Possible values of the type parameter are Photo, Scan, and Generic. The parameter is set to Generic by default. For all images
Binarize ( params: IBinarizationParams ) Converts colors on an image to black-and-white. Has a different set of properties than the ConvertToBW method. For gray and color images
ConvertToBW ( [optional] threshold : int ) Converts an image to black-and-white. You can specify a brightness threshold value. Values above the threshold will be considered white and those below the threshold level will be considered black. Brightness threshold values can range from 0 to 255. For all images
CreateBinarizationParams () : IBinarizationParams Creates an object with parameters for the Binarize method. For all images
CreateContourSmootherParams () : IContourSmootherParams Creates an object with parameters for the contour smoother. For all images
CreateLocalContrastFilterParams () : ILocalContrastParams Creates an object with parameters for the contrasting action. Parameters inside the filter are set to default. For all images
CreateShadowsHighlightsFilterParams () : IShadowsHighlightsParams Creates an object with parameters for the action of changing a shadow light effect. For all images
Crop ( rect : string ) Crops the image outside the specified rectangle. For all images
CutOut ( rect : string ) : IEditablePictureObject Cuts a specified rectangle from the image and returns this rectangle. For all images
Deskew ( [optional] byLines : bool, [optional] byBlackSquares : bool, [optional] byText : bool ) Deskews the image. Image skew can be corrected based on straight lines, black squares or text. By default, the byText parameter is set to true. For all images
Despeckle ( [optional] garbageSize : int ) Removes noise from black-and-white images. Speckles up to the size specified will be removed. If the garbageSize parameter is not specified, the size is detected automatically. Only for black-and-white images
Erase ( rectangle : string, [optional] red : int, [optional] green : int, [optional] blue : int ) Erases an area on the image. You can specify the color to erase the area with. By default the black color is used. For all images
FlipHorizontal () Flips the image horizontally. For all images
FlipVertical () Flips the image vertically. For all images
FreeScale ( newWidth : int, newHeight : int, newResolution : int ) Resizes the page according to the new values. For all images
Invert ( [optional] rectString : string ) Inverts the image. You can specify a string with coordinates of the rectangle to be inverted. For all images
NewRectsArray (): IRects Creates a new collection of rectangles. Only for color images
RemoveMotionBlur () Removes blurring caused by document, camera or scanner movement during scanning. For all images
RemoveStamps ( color: TColorToFilter, rects: IRects )

This method deletes color stamps and other marks of the specified color from an image.

  • color
    The color of stamps to remove.
  • rects
    The rectangle collection of the stamps to remove.

Example

Only for color images
RemoveStampsExt ( colorsToFilter : string )

This method deletes color stamps and other marks of the specified color from an image. It is similar to the previous method but it also uses an improved algorithm that lets you delete more colors. It is advised that you use this method.

colorsToFilter - The color of stamps to remove.

  • Accepts the following string values: Red, Green, Blue, Yellow, Orange, LightBlue, and Purple (not case-sensitive).
  • You can specify multiple values, separating them with commas (e.g. "Red, Green").
  • You can also specify an empty string ("") to make the program select the appropriate stamp color automatically. The program will delete any stamps it detects on an image which have one of the allowed color values.

Example

Only for color images
Rotate ( angle : int ) Rotates the image clockwise to the given angle. For all images
Scale ( ratio : int )

Stretches or compresses the image relative to the base size of 100%.

The method applies to image pixel size only. Image physical size remains unchanged.

For all images

Note: The rect parameter which is passed to the CutOut and Crop methods is a string in the form of "[left, top, right, bottom]". To get this string you can either call the ToString method for any object of the IRect type, or use the FCTools::Rect method.

Examples of scripts for custom processing stages that use methods of the IEditablePictureObject object

12.04.2024 18:16:02

Please leave your feedback about this article

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.