FIGS. 6a and 6b show histograms extracted from an object formed as a circular disc placed in the center or out of center, respectively, of a window pattern of the type shown in FIG. 2;
FIG. 7 shows a block diagram of a second embodi- 5 ment of means according to the invention;
FIG. 8 depicts a window configuration particularly suited for measurement of drilled holes in an object; and FIG. 9 depicts a window configuration particularly suited for fault detection of a continuously running 10 string of material.
The means according to the invention works with a window-set, where each window has a separate form but is part of a pattern formed of all the windows together. According to the invention this whole window 15 pattern is translationally moveable over the TV-frame and is rotationally symmetric. In the TV-frame there is also an image of the object whose location and orientation are to be measured. Although the window pattern will in practice first be scrolled on the TV-display in the 20 horisontal (x) and vertical (y) directions until its center coincides with that of the object, we will first describe the performance of the means when this scrolling is completed. Thereafter follows a description of several methods of achieving this x-, y-scrolling. 25
In the block diagram in FIG. 1 a TV-camera 1 is focussed on an object 2 which is transported by a rolling belt 3 or similar equipment. Camera 1 is steadily aimed at the object 2 either directly or indirectly via some kind of movable mirror system which compensates for the 30 movements of the object during the measuring cycle in a way that is in itself well known, and that is of no importance for the invention and therefore will not be described here. During the measuring time, the object does not move relative to the optical axis of the camera 35 or moves so slowly that it does not significantly influence the accuracy of the measurement. The video signal from camera 1 is preprocessed in a preprocessor unit 4 in a well known way and is converted to a sequence of digital signals in an analog-to-digital converter 5. In a 40 digital window memory 6 there are stored the size and position of the various windows. In principle a window is a definition of a certain number specified but arbitrary positioned pixel addresses within the picture frame. This window memory will be read synchronously with 45 the output of the sequence of digital data (signals) from the converter 5. By the contents of memory 6, an operator is designated to each pixel within a predefined rectangular area, which covers at least the larger part of the picture (or is equivalent to the whole picture). Each 50 pixel within the rectangle thus has a unique counterpart in an operator memory 7 which is connected to a microprocessor 8. Windows positioned within this area are used to define active operations on equivalent pixel grey scale values. The output of window memory 6 is con- 55 nected to one of the inputs of an adder memory 9. The adder memory 9 has a dedicated memory field for each window. An adder circuit 10 has one of its inputs connected to the output of the adder memory 9 and its second input to the output of the analog-to-digital con- 60 verter 5. A window operator dedicated to each pixel within a certain window activates an accumulating addition of all grey scale values of pixels contained by the window. The values are added in the adder circuit 10 in the order they come into an accumulating register 65 designated to the windows and forming parts of the adder memory 9. The operator which characterizes a window, consists of the address to the accumulating
window register to which a present pixel value shall be added to the last registered sum.
When the video signal representing a whole TV-picture (or the part defined by the whole active rectangle) has been processed (in real time) by the window operators, there are in the registers of the adder memory 9 a sum stored for each window. These sums bear information which is characteristic of an image of an object and its location and orientation, provided that the windows have been formed and positioned in a relevant way within the picture frame. The picture is displayed on a monitor unit 11, which is preferably a TV-screen.
One condition that can be placed regarding the shape of the windows is that the image of the object must generate almost analogous and recognizable sequences of window sums, when the object is translated and turned within given limits. It ought to at least be possible to separate translation and rotation by the imaging processing scheme.
Rotation can be distinguished by placing the windows rotationally symmetrically around one manually chosen centre point in the picture.
In FIG. 2 a rectangular (light) object M is shown which has a (darker) hole drilled near one of the short sides. M is positioned with its centre where the centre of the window pattern is. In this realization of the window pattern, the windows are shaped as a number of circle sectors A1-A12 which together form a circle 12 with centre point C. The circle radii shall be chosen so large that the characteristic details are covered by a good margin by the area of the circle divided into sectors.
The number of sectors are chosen in such a way that the width of one sector is of about the same size as the measure of the characteristic details, which define the orientation of the object. In order to give each sector a share of characteristic information that is as large as possible, an inner circular area 13 is out off from the sectors.
To summarize, the operator selects the centre of the circle, an inner and an outer radius and the number of sectors in the cake-shaped pattern which form the windows A1-A12 that in fact have filtering functions in that the partial sums together give characteristic information of an object of current interest. These sums can be represented e.g. in a histogram as FIG. 3 shows. Before being put in the histogram the sums A are preferably normalized (the same symbols are used here as in FIG. 2) by division by the number of pixels which are contained within each truncated sector, and if desired also normalized in that the highest value is set at a suitable value, e.g. 32 or 64 and all other values scaled linearly with respect to that. The highest value chosen depends on the resolution of the A/D-converter 5 and other factors.
If still another circle ring B1-B12 is generated (see FIG. 2) which is split by borders that are radial extensions of those in the inner circle A1-A12, this complementary set of windows can to some extent be used to compensate for inhomogeneties in illumination and/or reproduction. If the background is of a homogenously reflecting material, the normalized sums of the pixel grey scale values of the outer ring are measures of the illumination level in each sector as it is sensed by the camera. A division of the sums A,-with the related (normalized) sums B,- gives such a crude compensation.
Before the actual measurements take place a reference measurement is made with a reference object carefully put into a desired position and orientation. A histo