ImgFindSkewBlackBorderBottom

Top  Previous  Next

Prototype

 

floatAngle:=ImgFindSkewBlackBorderBottom(intImageHandle, floatRange,BooleanNoisyBorder)

 

Description

 

Finds the bottom black border skew angle.

 

Parameters

 

intImageHandle: integer value corresponding to the image handle.

 

BooleanNoisyBorder: boolean value (true/false) for indicating if border is noisy (i.e. there are white elements).

 

floatRange: skew range; the skew will be calculated in the range between -SelectedValue and +MaxSelectedValue.

 

Returned value

 

floatAngle: the bottom black border skew angle.

 

Notes

 

None.

 

Example

 

// Updating log with description of next operation

ApplicationLog('Image Skew and Deformation Correction Using Black Borders...' );

 

// Apply SKEW AND DEFORMATION CORRECTION on the image

// Range: -5/+5°

// Background: Black

 

LeftAngle:=ImgFindSkewBlackBorderLeft( _CurrentImage, 5.0, True);

TopAngle:=ImgFindSkewBlackBorderTop( _CurrentImage, 5.0, True);

RightAngle:=ImgFindSkewBlackBorderRight( _CurrentImage, 5.0, True);

BottomAngle:=ImgFindSkewBlackBorderBottom( _CurrentImage, 5.0, True);

if ((LeftAngle>=0) and (RightAngle>=0)) or

  ((LeftAngle<=0) and (RightAngle<=0)) then

begin

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

end else HorzAngle:=0.0;

if ((TopAngle>=0) and (BottomAngle>=0)) or

  ((TopAngle<=0) and (BottomAngle<=0)) then

begin

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

end else VertAngle:=0.0;

ImgCorrectDeformation( _CurrentImage, HorzAngle, VertAngle, True );