ImgFindBindingByValleys

Top  Previous  Next

Prototype

 

intHandleBind := ImgFindBindingByValleys(intImageHandle, intLeft, intTop, intRight, intBottom, intNoiseTol)

 

Description

 

Find the cutting line between two book pages looking for valley generated from book page wave effect.

 

Parameters

 

intImageHandle:integer value corresponding to handle image.

 

intLeft :integer value corresponding to area left coordinates where find binding

 

intTop:integer value corresponding to area top coordinates where find binding

 

intRight:integer value corresponding to area right coordinates where find binding

 

intBottom:integer value corresponding to area bottom coordinates where find binding

 

intNoiseTol: integer value corresponding to tolerance zone. If it is positive correspond to pixel, otherwise correspond to area percentage.

 

Returned Value

 

intHandleBind: integer value corresponding to binding handle.

 

Notes

 

None.

 

Example

 

// Image size

W:=ImgGetWidth(_CurrentImage);

H:=ImgGetHeight(_CurrentImage);

 

// Area coordinates where find binding

YStart:=0;

YEnd:=H-1;

XStart:=Round((W/11)*5);

XEnd:=Round((W/11)*6);

 

//Set tolerance

Noise:=-5; // 5% of pixels surrounding white holes

 

// Find binding line

L:=ImgfindbindingbyValleys(_CurrentImage,XStart,YStart,XEnd,YEnd,Noise);