1. When the system is starting and the beam and the ball have to be found on the image. It is called Global Image Analysis.

2.Previous values of the beam angle and the ball position are known and one wants to find current beam angle and ball position. It is called Local Image Analysis

The next step is to find the edges of the beam. This is necessary in order to convert the position of the ball in pixels to a number between -1 and 1 (where -1 and 1 are the end points). It is known in advance that the edges will be close to the ends of the image. The rough position of the ball is found by searching along a long line some pixels over the beam. After that two new lines are drawn around that rough position to find the edges of the ball. The mean value of the two edge positions is used as the position of the ball. The position of the ball is calculated relative to the edges of the beam.

First step is to calculate the current angle by drawing two lines for identifying the beam angle. Since it should go as fast as possible the line should be as short as possible. After a number of experimentations an equation was found. More information about the equation is found in the rapport. Only two lines are analyzed since the calculations are time critical so as few lines as possible should be analyzed. Two lines is the lower limit. If more time were given more lines should be analyzed so the result could be better and more reliable.

To find the ball a line some pixels left of the previous position is drawn and just check the matrix values of the current pixels. When the first pixel is found with a value greater than a specified threshold the searching is stopped. Around that position an edge point detection is done to find the left side of the ball. Another line right of the left side position is then drawn and finds the right side of the ball. The mean value of these two points is the new position of the ball. Since the ball diameter is constant it might be enough to find the left side and then calculate where the right side should be.

With the beam angle and the ball position as input the control signals into the controller are calculated.

The closed system includes controller, process and vision. The difference from normally systems is the vision with an image as input and the beam angle and the ball position as output. Vision is replacing the electrical sensor on the process. It includes a camera, a frame grabber and image analysis.

The system:

Vision:

A good routine for image analysis could be this: When the program starts, the beam angle and ball position is found by using global picture analysis, which takes rather long time. After that, the program is entering the local image analysis mode which updates the beam angle and the ball position. This is less time consuming since only a small part of the image has to be analyzed. It will do so until either the angle or the position are lost, which should result in re-entering the first picture analysis, or the program is stopped. This is implemented except that when the angle or the position are lost. It results in an error.

The results and many other things can be found in my report or just read the english abstract or the swedish abstract. Soon also a sequence of how well it works will be here.

Edited by Fredrik Emilsson [e93fem@efd.lth.se] and last modified 27 Nov 1997.