ImgLineGetY2

Top  Previous  Next

Prototype

 

intX1:= ImgLineGetY2(intLineHandle)

 

Description

 

Return bottom line coordinate.

 

Parameters

 

intLineHandle: integer value corresponding to line handle.

 

Returned Value

 

intX1: integer value corresponding to bottom line coordinate.

 

Notes

 

None.

 

Example

 

// Image Size

W:=ImgGetWidth(_CurrentImage);

H:=ImgGetHeight(_CurrentImage);

 

// Calculate area where find the binding

YStart:=0;

YEnd:=H-1;

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

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

 

//Set tolerance: 5%

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

 

// Find binding line

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

 

// Find line coordinates

XTop:=ImgLineGetX1(L);

XBottom:=ImgLineGetX2(L);

 

// deallocate handle

ImgLineFree(L);