ImgCorrectDeformation

Top  Previous  Next

Prototype

 

ImgCorrectDeformation(intImageHandle, floatHorizAngle, floatVerticAngle, boolIfWhiteBackground)

 

Description

 

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);