Chapter
4
Reference Manual
IVC-2D
140
©
SICK AG • Advanced Industrial Sensors • www.sick.com • All rights reserved
Calculation
Fit Circle
This tool fits a circle to four input coordinates and outputs the coordinates of the center of
the fitted circle and the radius in pixel units.
Note that you must enter all four coordinates; if you just type three coordinates the fourth
coordinates is set to the default values (X4=0, Y4=0).
If the circumference is touching the border of the FOV or if parts of the circle are outside
the FOV, the circle is not plotted in the destination bank. The calculation results for the
center of the circle and the radius are calculated anyway.
The result of the error flag may be used to check if the tool was executed correctly during
run mode.
Input Parameters
01 = Source bank
Number of the source bank. In this case just to copy
02 = X1
X coordinate of the first point
03 = Y1
Y coordinate of the first point
04 = X2
X coordinate of the second point
05 = Y2
Y coordinate of the second point
06 = X3
X coordinate of the third point
07 = Y3
Y coordinate of the third point
08 = X4
X coordinate of the fourth point
09 = Y4
Y coordinate of the fourth point
10 = Destination bank
Image bank in which to plot the fitted circle as an overlay on
the copied image from the source bank. Only executed at
debug mode.
Returned Values
01 = X center
X coordinate of the circle center
02 = Y center
Y coordinate of the circle center
03 = Radius
Circle radius in pixels.
Error Messages
Error 2
Input parameter values are "impossible" (e.g. negative or
out of field of view)
Error 114
At least two points of the four input points are identical
Error 140
At least three points of the four input points are on the same
line