ImgCorrectDeformation
Previous  Top  Next

Prototype

ImgCorrectDeformation(intImageHandle, floatHorizAngle, floatVerticAngle, boolIfWhiteBackground)

Description

It corrects image skew and deformation.

Parameters

intImageHandle: integer value corresponding to the image handle.
floatHorizAngle: horizontal correction angle.
floatVerticAngle: vertical correction angle.
boolIfWhiteBackground: boolean value that specifies if new created background is white.

Returned value

None.

Notes

None.

Example

//calculate skew on the borders
LeftAngle:=ImgFindSkewBlackBorderLeft( _CurrentImage, 5.0 );
TopAngle:=ImgFindSkewBlackBorderTop( _CurrentImage, 5.0 );
RightAngle:=ImgFindSkewBlackBorderRight( _CurrentImage, 5.0 );
BottomAngle:=ImgFindSkewBlackBorderBottom( _CurrentImage, 5.0 );

if Abs(LeftAngle)>Abs(RightAngle) then HorzAngle:=LeftAngle else HorzAngle:=RightAngle;
if Abs(TopAngle)>Abs(BottomAngle) then VertAngle:=TopAngle else VertAngle:=BottomAngle;

//apply the procedure for correcting skew and deformation
ImgCorrectDeformation( _CurrentImage, HorzAngle, VertAngle, False);

ApplicationLog(_CurrentAgent,'Correcting Border Deformation');