Method and apparatus for calibrating an alignment unit for containers and for aligning containers

A method using a calibration block with control points and a mathematical model for coordinate transformation addresses the high costs and maintenance issues of existing container alignment systems, enabling efficient and accurate alignment of diverse container types with standard optics.

DE102011007520B4Active Publication Date: 2026-05-28KRONES AG
View PDF 7 Cites 0 Cited by

Patent Information

Authority / Receiving Office
DE · DE
Patent Type
Patents
Current Assignee / Owner
KRONES AG
Filing Date
2011-04-15
Publication Date
2026-05-28

AI Technical Summary

Technical Problem

Existing methods for aligning containers require separate calibration for each container type and camera replacement, leading to high costs and maintenance efforts due to the need for high-quality optics and expensive cameras, and are prone to operator errors.

Method used

A method using a calibration block with control points to determine world and image coordinates, allowing a single calibration for different container types by creating a mathematical model for coordinate transformation, which accounts for optical distortions and tolerances, enabling the use of standard optical components and reducing the need for recalibration.

Benefits of technology

This approach allows precise and efficient alignment of containers with minimal computational effort, reducing costs and operator errors, and enabling reliable detection of rotational positions for labeling, suitable for various container shapes and types.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

Method for aligning containers (2) in an alignment unit (1), comprising the steps: e) Providing a container to be aligned (2) at at least one measuring position (6) and imaging the container positioned in this way with at least one camera (3, 3') provided for container control on the alignment unit; f) Determining image coordinates (u, v) of at least one characteristic object point (17) of the depicted container; g) Providing at least one shape parameter (rb) characteristic of the surface shape of the container; h) Providing a coordinate transformation algorithm calculated using a method for calibrating the alignment unit (1) for the camera (3, 3'); and i) Transforming the world coordinates (xw, yw, zw) of the container into image coordinates (u, v) using the algorithm; and / or transforming the image coordinates (u, v) of the container into world coordinates (xw, yw, zw) using the algorithm, wherein the procedure for calibrating the alignment unit (1) comprises the following steps: a) Providing a calibration body (8) with several control points (9) at at least one calibration position (7) and imaging the control points positioned in this way with at least one camera (3, 3') provided for container control on the alignment unit; b) Determining world coordinates (xw, yw, zw) of the mapped control points; c) Determining image coordinates (u, v) of the depicted control points; d) Substituting the world coordinates and the image coordinates into a mathematical model of the camera image and calculating at least one algorithm for coordinate transformation from a camera coordinate system (15) of the camera (3, 3') into a world coordinate system (16) of the alignment unit (1), and wherein the value of the characteristic shape parameter (rb) is retrieved from a storage unit (4) to adapt the coordinate transformation to the type of container (2) to be aligned, wherein the retrieval is triggered automatically, in particular by a marker coupled to a container to be aligned.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] The invention relates to a method for aligning containers in an alignment unit, an alignment unit for carrying out the method according to the invention, and a labeling device with the alignment unit according to the invention.

[0002] Before labeling containers, such as PET bottles, they must be rotated into a suitable orientation for labeling. This prevents, for example, labeling over a crimp seam on the container's surface. Typically, the containers to be labeled are held in a rotating position and moved past several inspection cameras. The system then identifies a feature, such as a crimp seam, in multiple camera images showing the bottle in different orientations, and determines the container's current orientation. The desired target orientation can then be achieved.

[0003] To determine the actual rotational position of the container, image coordinates of the features found in the measurement images are typically compared with reference data in calibration images. For this purpose, it is known, for example, from DE 10 2006 022 492 A1, to use a calibration block for mapping world coordinates to image coordinates. This block has a uniform pattern of horizontal and vertical lines on its surface. Since the position and size of the line pattern on the calibration block are known, a predetermined image scale can be set using test camera images, and / or object points and image points can be mapped, and / or optical aberrations can be taken into account.

[0004] A disadvantage of this approach, however, is that such calibration must be performed separately for each individual recording situation. For example, a corresponding calibration target must be provided for each container type to be aligned. Similarly, when an inspection camera is replaced, the camera must be recalibrated for each individual container type using the corresponding calibration targets. Furthermore, optical aberrations can only be approximately accounted for at each measurement position and for the different container types.

[0005] Therefore, comparatively high-quality inspection optics must be used to minimize asymmetric image distortion, along with relatively expensive camera types with reproducible internal orientation. The aforementioned disadvantages thus result in undesirably high costs for the design and selection of optical components, as well as for the commissioning and maintenance of such inspection devices. Furthermore, operator errors during calibration and alignment can only be avoided, if at all, with a very significant personnel effort.

[0006] From DE 10 2005 050 902 A1, a method for aligning containers in an alignment unit, including its calibration, is also known, comprising the following steps: providing a container to be aligned at at least one measuring position and imaging the container positioned in this way with at least one camera provided for container inspection on the alignment unit; determining image coordinates of at least one characteristic object point of the imaged container; providing at least one shape parameter characteristic of the surface shape of the container; providing an algorithm calculated for the camera for coordinate transformation; and transforming world coordinates of the container into image coordinates using the algorithm and / or transforming image coordinates of the container into world coordinates using the algorithm.

[0007] Therefore, there is a need to improve the known methods and devices for aligning containers in this respect.

[0008] The stated problem is solved by a method for aligning containers according to claim 1 and by an alignment unit for aligning containers according to claim 12. Accordingly, the method comprises the following steps: a) providing a calibration block with several control points at at least one calibration position and imaging the control points positioned in this way with at least one camera provided for container control on the alignment unit; b) determining world coordinates of the imaged control points; c) determining image coordinates of the imaged control points; and d) inserting the world coordinates and the image coordinates into a mathematical model of the camera image and calculating at least one algorithm for coordinate transformation from a camera coordinate system of the camera to a world coordinate system of the alignment unit.Using the mathematical model of optical imaging and at least one transformation algorithm based on this model, it is possible to assign image coordinates and world coordinates of different containers to be aligned after calibration with a uniform calibration target. Thus, only one calibration is necessary to align the positions of different container types.

[0009] The control points can be, for example, points, lines, or any geometric pattern. The calibration block is preferably based on the shape of the containers to be aligned and is, for example, a cylindrical base. The world coordinates of the control points can be determined by moving the calibration block to defined calibration positions and maintaining a predefined rotational orientation. The image coordinates of the control points in the calibration image can be determined, for example, by automatic image analysis. The camera coordinate system is, for example, referenced to an imaging sensor in the camera and normalized with respect to the rows and columns of the image sensor.

[0010] Preferably, the mathematical model is based on a projection matrix with parameters for the camera's internal orientation and the camera's external orientation, and it includes, in particular, at least one correction function for correcting image distortion and / or the camera's affinity. The parameters for the internal orientation are, for example: the camera constant as the distance between the image plane and the camera lens, or approximately the focal length of the camera optics; the image sensor's affinity, i.e., the number of pixels per unit length in the row and column directions; and the position of the principal point, i.e., the point where the optical axis intersects the image plane. The parameters for the external orientation are, for example, the translation of the world coordinate system to the camera coordinate system and the rotation of the world coordinate system to the camera coordinate system.A projection matrix is ​​particularly well suited for the numerical calculation of the spatial relationship between image coordinates and world coordinates. However, other numerical methods and systems of equations for coordinate transformation in accordance with the invention are also conceivable.

[0011] Image distortions include radially symmetric, radially asymmetric, and tangential distortion. It is also conceivable to account for the image sensor's affinity using a separate correction function. Furthermore, a correction function can be implemented to compensate for non-orthogonality of the image coordinate system. The transformation algorithm is calculated, for example, according to the principle of photogrammetric bundle adjustment. This reduces errors caused by camera distortions when aligning containers. Consequently, standard optical components can be used that do not need to meet the stringent requirements of measuring cameras.Therefore, both during initial installation and when replacing individual components, it is sufficient to perform the calibration according to the invention in order to take into account the optical distortions and / or tolerances of the optical elements in an updated transformation algorithm.

[0012] In a particularly advantageous embodiment, the algorithm is designed to assign world coordinates to object points imaged by the camera on containers to be aligned, which have a defined surface shape and are positioned at a defined measurement location. Thus, during the subsequent measurement, it is sufficient to specify shape parameters for the container to be aligned in order to compare the image coordinates determined in the measurement images with the actual possible world coordinates of the container surface. World coordinates can therefore be calculated with exceptional reliability and minimal computational effort.

[0013] In a particularly advantageous configuration, the calibration position and the measurement position lie within the transport path of the containers and are, in particular, identical. This allows for precise agreement between the coordinate transformation during calibration and the subsequent measurement with comparatively little effort in calculating the transformation algorithm. It is especially advantageous if the calibration is performed at the subsequent measurement position. This eliminates or significantly reduces the need for interpolation and / or approximation calculations. However, it would also be conceivable to perform the calibration at calibration positions that are particularly convenient or easily accessible. The measurement positions could then, for example, also be located between the calibration positions.

[0014] Preferably, at least 15 control points are depicted in each calibration image, and in particular, at least 50 control points. This allows systems of equations of the mathematical model to be solved using a single image and a corresponding transformation algorithm to be calculated. A number of at least 100, and in particular at least 200, control points per camera image is especially advantageous. This further increases the accuracy of the transformation algorithm, especially when calculated from a single camera image. In particular, the external orientation can be calculated with high accuracy using a single image, and unknowns in correction functions can be determined.

[0015] In a particularly advantageous embodiment, the control points in step a) are imaged at at least two different calibration positions of the calibration target, and at least one parameter of the camera's internal orientation is calculated based on the differently imaged control points. This method takes advantage of the fact that the camera's internal orientation does not change even if the external orientation between the camera coordinate system and the world coordinate system changes. Therefore, the camera's internal orientation and the associated image distortions can be calculated with exceptional accuracy from multiple camera images of the same camera.

[0016] Preferably, a coordinate transformation algorithm that is essentially independent of the relative positions of the control points is calculated based on the mathematical model of the camera image. This allows the transformation algorithm to be used for or adapted to different container types. In other words, no recalibration is required if the container type to be aligned is changed later.

[0017] The method according to the invention further comprises the following steps: e) providing a container to be aligned at at least one measuring position and imaging the container positioned in this manner with at least one camera provided for container control on the alignment unit; f) determining image coordinates of at least one characteristic object point of the imaged container; g) providing at least one shape parameter characteristic of the surface shape of the container; h) providing an algorithm for coordinate transformation calculated for the camera using the method according to at least one of the preceding claims; and i) transforming world coordinates of the container into image coordinates using the algorithm; and / or transforming image coordinates of the container into world coordinates using the algorithm.

[0018] This allows for the simple and precise determination of world coordinates of object points on defined container surfaces. This applies to a wide variety of container shapes and types, such as PET bottles or glass bottles for beverages, pharmaceuticals, cleaning agents, and the like. The measurement position of the container to be aligned is determined, for example, by a constant transport speed of the container and the timing of the measurement process. Similarly, the acquisition time of the measurement image can be synchronized with the transport of the container to be aligned, and thus with the measurement position, with high accuracy. The image coordinates can be determined by evaluating suitable characteristic features, such as contrast differences, within the measurement image.

[0019] Characteristic shape parameters for the surface shape of the container include, for example, the diameter of cylindrical bottle bodies or any rotationally symmetric bottle contours. These are known, for instance, from the manufacturing process of the containers to be aligned. However, non-rotationally symmetric container shapes would also be suitable, as long as corresponding shape parameters can be provided to define the three-dimensional extent of the container. The surface shape of the container, defined by at least one shape parameter, corresponds to a set of possible three-dimensional object coordinates in the world coordinate system. It is therefore possible to compare the world coordinates calculated by the transformation algorithm with possible world coordinates of the container surfaces and thereby increase the accuracy of the calculated world coordinates.The provided transformation algorithm is an arbitrary calculation procedure based on the mathematical mapping model used during calibration. Because the measurement position and the shape parameters of the container to be aligned are known before the measurement image is acquired, the world coordinates of characteristic object points, such as a press seam, can be calculated particularly accurately and quickly, especially in real time, using the transformation algorithm.

[0020] The transformation in step i) can, for example, be carried out by calculating the possible world coordinates of the container surface at the respective measurement position for selected image coordinates or pixels of the measurement images before the measurement, using data obtained during calibration. This means that, based on the known orientation of the camera and container or measurement position relative to each other, the shape parameters, and the model of the optical imaging, a unique world coordinate can be assigned to each pixel of the measurement images that corresponds to the container surface and stored as a possible result coordinate for the subsequent measurement of the container orientation. When measuring individual containers, the corresponding, previously stored world coordinate can then be assigned to a characteristic pixel in the measurement image, and the actual orientation of the container can be calculated from this.This allows world coordinates to be assigned to points of interest particularly easily and quickly. The number of calculation steps required to determine the actual location of individual containers is thus minimized.

[0021] The transformation in step i) can alternatively be performed such that, for individual image points corresponding to characteristic object points on the container surface, the respective world coordinates are calculated only during the measurement of each individual container. This variant requires more computational effort for each measurement but allows for greater flexibility, as dynamic processes during the production sequence can then be incorporated into the calculation. Nevertheless, even in this variant, the coordinate transformation is based on the known orientation of the camera and container or measurement position relative to each other, at least one shape parameter of the container, and the model of the optical imaging, so that a world coordinate of the container surface can be uniquely assigned to each characteristic image point of the measurement images.

[0022] In a particularly advantageous embodiment, the method further comprises a step j) for determining the actual orientation of the container, in particular its rotational position, based on the world coordinates determined in step i), and a step k) for moving the container to a target orientation, in particular a target rotational position, for subsequent labeling. This allows the container to be positioned in a suitable starting position for subsequent labeling immediately after the calculation of its actual rotational position, during its continuous transport. Thus, the detection of the actual rotational position and the alignment of the container to a target rotational position can be carried out particularly quickly.In particular, the container alignment according to the invention can be integrated into a labeling carousel in a particularly advantageous manner, whereby only a small machine angle is required for detecting the actual rotational position and aligning it to a target rotational position. Thus, labeling carousels can be designed to be particularly compact and / or a particularly large machine angle of the labeling carousel can be used for the subsequent labeling process.

[0023] According to the invention, the value of the characteristic shape parameter is retrieved from a storage unit to adapt the coordinate transformation to the type of container being aligned. This retrieval is triggered automatically, in particular by a marker attached to the container being aligned. This allows the adaptation of the rotational position detection to different container types to be automated. This simplifies the operation of the rotational position detection, container alignment, and labeling, and avoids operator errors. The position marker can, for example, be a mark affixed to the container or an electronic marker that defines the container's position within a product flow. It would also be conceivable to recognize the respective container type as the container enters the alignment unit and to provide the corresponding shape parameter depending on the recognized container type.

[0024] Preferably, the containers are transported during step e), particularly along a circular path. This allows a product flow of containers to be aligned at high speed and in a continuous sequence. Transport along a circular path is particularly advantageous to implement in labeling systems. However, linear transport paths or any combination of linear and curved transport paths are also generally conceivable.

[0025] In a particularly advantageous embodiment of the method, the camera is assigned at least two consecutive measurement positions relative to the container's transport path. Furthermore, the container is rotated around its main axis between these measurement positions to capture at least two images of the container in different rotational orientations. This allows a particularly large circumference of the container to be inspected by each camera. Additionally, the parameters of the camera's internal orientation can be calculated with exceptional accuracy from multiple camera images taken by the same camera.

[0026] Preferably, the container is moved past at least two cameras arranged one behind the other with respect to its transport path, in order to image the container in at least four measurement images that overlap with respect to its rotational position, and in particular to capture its entire surface. This allows the rotational position to be reliably detected.

[0027] The alignment unit according to the invention for aligning containers comprises: a transport device for the containers, in particular a carousel-shaped one, wherein alignment means are provided on the transport device to individually align the containers during transport, in particular to rotate them about their main axis; at least one camera for monitoring the containers during transport; and at least one processing unit for evaluating image coordinates and for transforming the image coordinates into world coordinates according to the method of at least one of the preceding embodiments, in particular for calculating an actual rotational position of the containers and for calculating a rotational position correction in order to achieve a target rotational position of the containers for subsequent labeling. This allows the advantages described with regard to the methods according to the invention to be achieved.

[0028] The stated problem is further solved with a labeling device for containers comprising the alignment unit according to the invention. The calibration and alignment according to the invention can be combined particularly efficiently with immediately subsequent labeling of the containers. However, the alignment unit and the methods according to the invention can generally be used at any point in the production process where alignment of the containers, in particular alignment of the rotational position of PET bottles, is required.

[0029] A preferred embodiment of the invention is shown in the drawing. It shows: Fig. 1 a schematic top view of an alignment unit for containers according to the invention; Fig. 2 a schematic top view of the alignment unit according to the invention during calibration; Fig. 3 a schematic representation of a measurement image taken using the alignment method according to the invention; and Fig. 4 a schematic representation of a calibration image taken using the calibration method according to the invention.

[0030] As the Fig. As can be seen in Figure 1, a preferred embodiment of the alignment unit 1 according to the invention for aligning containers 2, such as beverage bottles and the like, comprises at least two cameras 3, 3' for sequentially imaging lateral views of the containers 2 to be inspected. Depending on the number of camera images required per container 2, further cameras with identical function may be provided, which are located in the Fig. Figure 1 is not shown for clarity. A configuration proven in practice, for example, provides four cameras, each taking three sequential images of the container 2 in different rotational positions φ of the container 2, in order to fully image it in a total of twelve images. However, the methods according to the invention could, in principle, also be carried out with a single camera 3 and for any desired size of partial areas of the container surface 2a, depending on the requirements.

[0031] In the Fig. 1 is furthermore a computing unit 4 for digital photogrammetric image evaluation, schematically indicated, as well as a storage unit 5 for storing: container-specific data, such as a container radius rb; camera-specific data of the internal orientation, such as focal lengths fx, fy and the principal point position cx, cy; and / or data of the external orientation, for example world coordinates xw, yw, zw of measurement positions 6 of the container 2 and / or calibration positions 7 of a calibration body 8. On the latter, control points 9 are also provided at defined locations as object points to be mapped for a mathematical modeling of the optical imaging of the cameras 3, 3'.

[0032] Furthermore, a transport means 10 is provided to continuously move the containers 2 through image acquisition areas 3a, 3a' of the cameras 3, 3' during imaging. The transport means 10 preferably rotates about a vertical axis 10a, so that the containers 2 move essentially along a circular transport path 10b. However, linear transport paths or combinations of linear and curved paths would also be conceivable.

[0033] For the sake of completeness, the following are included in the Fig. Light sources 11, 11' are indicated, which are designed such that a characteristic feature 2b provided on the container surface 2a, such as a press seam, an embossing or the like, can be imaged with high contrast by the cameras 3, 3', for example by illumination from an oblique angle above and / or oblique angle below. For holding and aligning the containers 2, alignment means 12 rotatable coaxially with the main axis 2c of the containers 2, such as turntables with holders, are mounted on the transport means 10.

[0034] Along the transport track 10b, several measuring positions 6 of the container 2 are provided, as well as several calibration positions 7 of the calibration body 8. The latter is the Fig. 2. That is, a measurement image 13 is taken from container 2 at each measurement position 6, and a calibration image 14 is taken from calibration body 8 at each calibration position 7. Corresponding measurement and calibration images 13, 14 are shown as examples in the Fig. 3 and Fig. 4 indicated, selected data streams of image data and parameter values ​​to the processing unit 4 by arrows in the Fig. 1 and Fig. 2.

[0035] The described number of measuring positions (6) and calibration positions (7) is merely an example. As in the Fig. 1 and Fig. As indicated for the first camera 3, the measurement positions 6 are expediently identical to the calibration positions 7 for the sake of simplifying the modeling. However, as indicated for the second camera 3', the measurement positions 6 and the calibration positions 7 can also be offset from each other along the transport path 10b, for example, the measurement positions 6 at intermediate positions between the calibration positions 7. The Fig. The two different distances shown between the calibration positions 7 of cameras 3 and 3' are only for the purpose of better understanding possible variations.

[0036] As the Fig. As further illustrated in Figure 1, the containers 2 are rotated about their principal axis 2c between the measuring positions 6 in order to depict the respective container 2 in successive measurement images 13 in different rotational positions φ. In contrast, the supports 12 are preferably not rotated between successive calibration images 14. This is shown in the Fig. 2 schematically indicated using the control points 9.

[0037] As the Fig. 3 and Fig. As can be seen from Figure 4, the measurement images 13 and the calibration images 14 differ essentially in that the measurement images 13 depict the containers 2 to be inspected, while the calibration images 14 depict the calibration body 8. A plurality of control points 9 or the like are provided on the calibration body 8, the spatial coordinates of which are defined with respect to the calibration body 8. Preferably, the control points 9 are arranged in a regular pattern. Since the world coordinates xw, xy, xz and the rotational position φ of the calibration body 8 are defined at the calibration positions 7, the world coordinates xw, xy, xz of the control points 9 depicted in the calibration images 7 can be uniquely assigned.

[0038] Since the world coordinates xw, yw, zw of the preferably stationary cameras 3, 3', including their orientation with respect to the transport path 10b, are also known, a spatial relationship between a camera coordinate system 15 of the respective camera 3, 3' and a world coordinate system 16 of the alignment unit 1 can be derived from the image coordinates u, v of the control points 9 in the calibration images 7 and the world coordinates xw, yw, zw of the control points 9 and the respective camera 3, 3'. The camera coordinate systems 15 originate, for example, in the image planes of the cameras 3, 3' and can be identical to the respective image coordinate systems or are linked to them by a coordinate transformation. The world coordinate system 16 could, for example, originate in the axis of rotation 10a of the transport means 10 (not shown).Although Cartesian coordinates xw, yw, zw are given as examples for the world coordinate system 16, cylindrical coordinates, polar coordinates or the like could also be used.

[0039] The spatial relationship between the camera coordinate system 15 and the world coordinate system 16 is established by a suitable mathematical model of the camera image. Such models are known from photogrammetry and are essentially based on the principle of central projection. As is known, the optical image is characterized by the inner orientation of the camera 3, 3' and the outer orientation of the camera coordinate system 15 with respect to the world coordinate system 16. A mathematical model of the camera image according to the invention is defined, for example, by the following projection matrix PM. This contains parameters fx, fy, cx, cy of the inner orientation and, for example, a rotation matrix and a translation matrix for defining the outer orientation: (uv1)=[fx0cx0fycy001][r1r2r3Txr4r5r6Tyr7r8r9Tz][xWyWzW1]

[0040] Here, the following denotes the mapping of a control point: u, v Image coordinates of control point 9 in row and column direction; fx, fy Focal length of the imaging optics in the horizontal and vertical directions; cx, cy Position of the principal point of the optical axis in the horizontal and vertical directions; r1 to r9 Rotation matrix; Tx, Ty, Tz translation matrix; and xw, yw, zw world coordinates of the control point 9 with the image coordinates u, v.

[0041] It goes without saying that a system of equations derived from the projection matrix PM can only be solved with a sufficient number of control points 9 per calibration image 14 and the associated coordinate pairs, i.e., image and world coordinates u, v, xw, yw, zw. Suitable algorithms for solving such systems of equations are available, for example, in free or commercial program libraries, so there is no need to discuss them in more detail here.

[0042] From the solution of the mathematical model, such as the projection matrix PM, at least one transformation algorithm based on the mathematical model is calculated, which allows a coordinate transformation of characteristic image points 17 in the measurement images 13 from the camera or image coordinate system 15 of the respective camera 3, 3' into the world coordinate system 16 of the alignment unit 1. Based on such calculated world coordinates xw, yw, zw of the characteristic image points 17, the actual rotational position φi of a press seam or the like can be determined, and a correction of the rotational position φ necessary for subsequent labeling can be initiated to set a target rotational position φa.

[0043] For the method according to the invention, 15 control points 9 per calibration image 14 are sufficient. Preferably, however, at least 50, preferably at least 100, and in particular at least 200 control points 9 are depicted in a calibration image 14 in order to take into account deviations of the optical image from the ideal of central projection and / or the affinity of the respective imaging sensor of the camera 3, 3'. These influencing factors can be included in the mathematical imaging model as correction functions for each camera 3, 3' separately.

[0044] For example, radially symmetric distortions caused by the design can generally be represented with sufficient accuracy in the model by a function with a polynomial of odd powers of the image radius. For radially asymmetric and tangential distortions caused by tolerances, solutions based on the calculations according to Conrady and / or Brown are available. Correction functions for the affinity of the image sensor, i.e., the ratio of the pixel dimensions in the column and row directions, can be integrated into the imaging model, as can any non-orthogonality of the camera coordinate system. Additional optical distortions can be caused by filters, protective lenses, and the like in the imaging beam paths. These can also be taken into account by suitable correction functions.For solving complex systems of equations with correction functions, a large number of control points 9 is advantageous in order to provide a realistic mapping model and to be able to determine the rotational position φ with sufficient accuracy.

[0045] The size and shape of the calibration body 8 are preferably based on the containers 2 to be aligned. However, a particular advantage of the calibration according to the invention is that, based on the control points 9, a mapping model is created that is independent of the shape of the calibration body 8 and / or the containers 2 to be aligned. It is therefore possible, after calibration with a single calibration body 8, to determine world coordinates xw, yw, zw of characteristic points 17 on containers 2 of different shapes and dimensions.

[0046] Different transformation algorithms for converting image coordinates u, v into world coordinates xw, yw, zw and rotational positions φ from the mathematical model of the camera image can be readily derived for the orientation of different container types. This may simplify the computational effort and enables reliable real-time detection of the actual orientation φi of the respective containers 2. However, the transformation algorithms are based on the same mathematical model or system of equations, for example, the projection matrix PM.

[0047] The number of control points 9 is preferably chosen such that the model of the optical imaging for each calibration position 7 can be derived from a single calibration image 14. This applies in particular to the derivation of the external orientation, which differs between the individual calibration positions 7 and measurement positions 6.

[0048] To derive the parameters of the internal orientation of camera 3, 3' with particularly high accuracy, data from different calibration images 14 of the same camera 3, 3' can be combined. That is, unlike the external orientation between the camera coordinate system 15 and the world coordinate system 16, the internal orientation of camera 3, 3' does not change between the respective corresponding calibration images 14 and calibration positions 7. This also applies, of course, to all measurement images 13 generated by a camera 3, 3'.

[0049] The described mathematical modeling of the optical imaging and the provision of at least one derived transformation algorithm for determining world coordinates xw, yw, zw from image coordinates u, v allows for the calibration of the alignment unit 1 using a single, universally usable calibration body 8, which is suitable for different types of containers to be aligned, in particular under the condition that, during the subsequent alignment of the rotational position φ, containers 2 are imaged whose size and shape are known.

[0050] The size and shape of the containers 2 to be aligned can be stored in memory unit 5 or another suitable database, for example, in the form of at least one shape parameter, such as, in the simplest case, the container radius rb, outlines, contours of solids of revolution, and the like. Manual entry of suitable shape parameters when changing container types would also be conceivable. However, automatic provision of the shape parameters assigned to each container 2 is advantageous. Such automatic assignment of shape parameters can be achieved, for example, by marking the containers 2 themselves and / or by using an electronic position marker to indicate the container's position within the product flow. This not only simplifies the production process but also increases the reliability of container alignment by preventing operator errors.

[0051] The measurement positions 6 and their world coordinates xw, yw, zw are defined along the transport path 10b, for example, by placing the containers 2 centered on the alignment device 12 and moving them past the cameras 3, 3' at a constant speed by the transport device 10. A defined acquisition time for the measurement images 13, and thus a defined measurement position 6, can be achieved by suitable image triggering. This applies equally to the calibration object 8, which could also be moved past the cameras 3, 3' at a reduced speed compared to the container alignment, for example, to acquire additional calibration images 14 at intermediate positions. The transport device 10 could also be stopped at the calibration positions 7.The calibration can be adapted as desired to the requirements of the mathematical mapping model and the transformation algorithms used in the container alignment.

[0052] Although the containers 2 can, in principle, be moved along any shaped transport path 10b past the cameras 3, 3', a circular transport path 10b is particularly advantageous. This can be easily implemented in a labeling carousel with the transport means 10. The alignment means 12 allow, firstly, the rotational position φ of the containers 2 to be changed in defined angular increments between the individual measurement images 13, and secondly, the containers 2 to be rotated from an actual rotational position φi to a target rotational position φa after the last measurement image 13 has been taken. This target position is preferably the starting position of the containers 2 for subsequent labeling. Preferably, the containers 2 are labeled immediately after reaching the target rotational position φa.

[0053] The alignment unit 1 according to the invention can be calibrated as follows: The calibration body 8 according to the invention is preferably moved continuously along the transport path 10b through the image acquisition areas 3a, 3a' of the cameras 3, 3'. Upon reaching the defined calibration positions 7, a control signal is transmitted to the respective associated camera 3, 3' in order to capture at least one calibration image 14 at each calibration position 7, in which the control points 9 of the calibration body 8 are depicted. The rotational position φ of the calibration body 8 with respect to the transport path 10b can remain constant during the calibration.

[0054] The calibration images 14 are transmitted to the processing unit 4 for image evaluation. The image coordinates u, v of the control points 9 are determined separately for each calibration image 14. From the known size and shape of the calibration object 8 and its known rotational position φ and position xw, yw, zw during recording, the world coordinates xw, yw, zw of the control points 9 can be determined separately for each calibration position 7. The cameras 3, 3' are preferably stationary, so that the world coordinates xw, yw, zw of the cameras 3, 3' preferably enter the evaluation as a constant. In general, however, any relative movements between the cameras 3, 3' and the calibration object 8 are conceivable, as long as the world coordinates xw, yw, zw of the calibration object 8 and the cameras 3, 3', including their orientation, can be determined and processed with the associated image data.

[0055] A system of equations is solved using at least fifteen coordinate pairs, each consisting of the world coordinates xw, yw, zw and the image coordinates u, v of a control point 9, essentially based on the described mathematical mapping model. This allows the unknowns of the system of equations to be determined, and thus the parameters of the camera's internal orientation and its external orientation between the camera coordinate system 15 and the world coordinate system 16 to be ascertained. The parameters of the external orientation are preferably determined from a single calibration image 14 and the corresponding world coordinates xw, yw, zw of the control points 9. The parameters of the internal orientation of the camera 3, 3' are preferably calculated from several calibration images 14 of a camera 3, 3' to increase the accuracy of the parameter calculation.

[0056] The parameters of the inner orientation include, for example, the camera constant or lens focal length fx, fy, the principal point cx, cy of the optical axis, the affinity of the camera's image sensor 3, 3', optical distortions, and the like. The parameters of the outer orientation include, for example, the translation and rotation of the camera coordinate system with respect to the world coordinate system.

[0057] To determine the unknowns from correction functions of affinity and / or optical distortions within the system of equations used, preferably more than 15 control points per calibration image 14 are evaluated. For this purpose, preferably at least 50 control points per calibration image 14 are evaluated, and in particular at least 100 control points 9 per calibration image 14. Advantageously, the calibration positions 7 are identical to the measurement positions 6 for determining the actual rotational position φi of the containers 2. However, this is not strictly necessary. For example, it would be conceivable to provide a larger number of calibration positions 7 in order to achieve close coverage of the entire imaging area 3a, 3a' of the cameras 3, 3' when acquiring the measurement images 13 by interpolating between the calibration positions 7.For this purpose, the calibration object 8 could, for example, be moved past the cameras 3, 3' at a reduced speed compared to the subsequent measurement of the actual rotational position φi. This would allow a large number of calibration images 14 to be provided for image evaluation.

[0058] The shape of the calibration block 8 and the distribution of the control points 9 can be adapted as desired to the given measurement task. The representation in the Fig. Figure 4 is merely an example and schematic representation. In principle, containers 2 of any shape can be aligned, especially containers 2 whose characteristic shape parameters are known. However, the depicted cylindrical and conical sections of the calibration body 8 are generally particularly well suited for calibrating and aligning rotationally symmetric containers 2.

[0059] The containers 2 can be aligned using the alignment unit 1 according to the invention as follows: In the computing unit 4, at least one algorithm based on the mathematical mapping model for coordinate transformation from a camera coordinate system 15, for example the image coordinate system, into the world coordinate system 16 of the alignment unit 1 is provided for each measurement position 6.

[0060] Furthermore, a set of shape parameters characteristic of each container type is provided for each container 2 to be aligned, to characterize the container shape and size. Preferably, the shape parameter sets can be retrieved from a database, for example, from the storage unit 5. In particular, the associated shape parameters are automatically adapted to the container 2 to be aligned. For a cylindrical container 2, this could, for example, be the container radius rb. For more complex container shapes, an outline could be stored to represent a rotationally symmetric container contour. The shape parameters characterizing the respective container type essentially define the actually possible world coordinates xw, yw, zw on the container surface 2a at the individual measuring positions 6.

[0061] The transformation algorithm uniquely and reliably assigns world coordinates xw, yw, zw to the image coordinates u, v of the characteristic image points 17. This allows all imaging errors of the cameras 3, 3' that occur in practice, including inaccuracies caused by manufacturing, assembly, and components, to be taken into account separately for each camera 3, 3'. Furthermore, only a one-time calibration of the cameras 3, 3' is necessary to subsequently determine the actual rotational position φi of different containers 2, especially those with known contours. The quality of the error correction then depends essentially on the number of control points 9 in the previously acquired calibration images 14 and the mathematical imaging model used.

[0062] For the alignment of containers 2 to be labeled, these are guided as a continuous product stream into the alignment unit 1 according to the invention, which is preferably located directly upstream of a labeling unit, along the transport path 10b. Upon reaching the first measuring position 6, a first measurement image 13 of the container 2 is captured by the first camera 3. The capture can be triggered in a known manner. The first measurement image 6 is captured during the continuous transport of the container 2. After the first measurement image 13 has been captured, the container 2 is rotated by a predetermined angle, for example 30°, and after reaching the new rotational position φ, it is imaged by the first camera 3 in a second measurement image 13. Changing the rotational position φ of the container 2 by a predetermined angle can be ensured, for example, by a corresponding rotational position locking mechanism for the containers 2 on the alignment means 12.For example, the first camera 3 can thus capture three consecutive measurement images 13 of the container 2 at different rotary bearings φ of the container 2. Similarly, a complete image of the container 2 could be achieved, for example, by four cameras 3, 3' arranged one behind the other along the transport track 10b (not shown).

[0063] A complete image of container 2 is generally desirable, but not strictly necessary depending on the application. It goes without saying that a complete image of container 2 can be achieved with any combination of sequentially acquired measurement images 13, whereby the number of cameras 3, 3' required can vary depending on the path of the transport route 10b, the size of the image acquisition areas 3a, 3a', the transport speed of the containers 2, and the required accuracy of the container alignment.

[0064] The image data of the individual measurement images 13 can be automatically evaluated, for example by searching for characteristic contrast differences in the images 13 in order to identify the characteristic pixels 17. For example, the in the Fig. 3. The indicated press seam 2b is a vertically running brightness boundary in those measurement images 13 in which the press seam is facing camera 3, 3'. The image coordinates u, v of the press seam can be extracted from the image data.

[0065] In particular, after inputting the corresponding shape parameters of the imaged container 2, it is possible to assign at least one world coordinate xw, yw, zw, and especially a rotational position φ of the container 2, to the image coordinates of the press seam 2b. Here, the transformation algorithm enables an accurate assignment of image coordinates u, v and world coordinates xw, yw, zw despite optical distortions and varying object distances in front of the cameras 3, 3', for example, when imaging and orienting containers 2 of different diameters.

[0066] Preferably, prior to the measurement, a world coordinate xw, yw, zw is calculated as a possible measurement result for each pixel 17 of the measurement images 13, which corresponds to a surface area of ​​the container type to be aligned, and stored, for example, in the form of a table of values ​​or the like. When measuring individual containers 2, the corresponding previously stored world coordinate xw, yw, zw can then be uniquely assigned to a pixel 17 of interest, i.e., a characteristic object point, and the actual rotational position φi of the container 2 can be calculated from this.

[0067] It goes without saying that the optical imaging model previously determined during calibration is used for the preparatory coordinate transformation to ensure a fast and accurate assignment of image coordinates u, v and world coordinates xw, yw, zw during the measurement and alignment of the individual containers 2. This takes advantage of the fact that the orientation of cameras 3, 3' and container 2 or measurement position 6 relative to each other, at least one shape parameter of the container type, and thus also the optical imaging model for each camera 3, 3' and measurement position 6 are essentially constant and / or reproducible during the measurement of individual containers 2.

[0068] Alternatively, world coordinates xw, yw, zw could also be calculated for individual pixels 17 of particular interest during the actual measurement of container 2. In this case, saving tables of values ​​or the like prior to the measurement is unnecessary.

[0069] In any case, for characteristic features 2b on the container surface 2a, world coordinates xw, xy, xz are obtained, which are corrected with respect to the respective optical imaging conditions and container types. The coordinate transformation according to the invention enables a considerable simplification both in the calibration and maintenance of the alignment unit and in production operations, for example, in the case of frequent product changes.

[0070] After determining the world coordinates xw, yw, zw of the characteristic features 2b, such as press seams, in the measurement images 13, the actual rotational position φi of the container 2 with respect to the transport path 3b is determined. Then, in a known manner, the target rotational position φa of the container 2 is approached for subsequent labeling or the like.

[0071] For a particularly precise determination of the rotational position φ, it is only necessary to inform the processing unit 4 of the container type 2 to be aligned and an associated set of shape parameters. For this purpose, position markers are assigned to the containers 2 to be aligned, for example, in order to automatically select the corresponding set of shape parameters for the calculation. Such position markers can be attached directly to the containers 2 and detected upon entry into the alignment unit 1, or they can be provided electronically as position markers to identify the position of the container 2 within the product flow.

[0072] The calibration and alignment methods according to the invention are particularly suitable for setting an initial rotational position φa for subsequent container labeling. However, the methods are also suitable for other production steps where the alignment of containers, especially their rotational position φ, is required. High alignment accuracy is possible with the described method. For example, the world coordinates xw, yw, zw can be calculated from the image data of the measurement images 13 with an accuracy corresponding to half the dimension of the pixels used by the image sensor, i.e., half the resolution of the image coordinate system 15. This allows, for example, the rotational position φ of the containers 2 to be set with an accuracy of at least one degree. This is sufficient for the requirements of container labeling.However, it would also be conceivable to achieve higher accuracy in container alignment, for example with reduced machine power.

[0073] According to the invention, containers of any shape made of plastic, such as PET, glass, metal, composite materials, and the like, can be aligned. The alignment unit and the described methods are particularly advantageous for use in beverage bottling plants, especially in labeling machines. However, any filled or empty bottles and the like can generally be aligned.

Claims

[1] Method for aligning containers (2) in an alignment unit (1), comprising the steps: e) Providing a container to be aligned (2) at at least one measuring position (6) and imaging the container positioned in this way with at least one camera (3, 3') provided for container control on the alignment unit; f) Determining image coordinates (u, v) of at least one characteristic object point (17) of the depicted container; g) Providing at least one shape parameter (rb) characteristic of the surface shape of the container; h) Providing a coordinate transformation algorithm calculated using a method for calibrating the alignment unit (1) for the camera (3, 3'); and i) Transforming the world coordinates (xw, yw, zw) of the container into image coordinates (u, v) using the algorithm; and / or transforming the image coordinates (u, v) of the container into world coordinates (xw, yw, zw) using the algorithm, wherein the procedure for calibrating the alignment unit (1) comprises the following steps: a) Providing a calibration body (8) with several control points (9) at at least one calibration position (7) and imaging the control points positioned in this way with at least one camera (3, 3') provided for container control on the alignment unit; b) Determining world coordinates (xw, yw, zw) of the mapped control points; c) Determining image coordinates (u, v) of the depicted control points; d) Substituting the world coordinates and the image coordinates into a mathematical model of the camera image and calculating at least one algorithm for coordinate transformation from a camera coordinate system (15) of the camera (3, 3') into a world coordinate system (16) of the alignment unit (1), and wherein the value of the characteristic shape parameter (rb) is retrieved from a storage unit (4) to adapt the coordinate transformation to the type of container (2) to be aligned, wherein the retrieval is triggered automatically, in particular by a marker coupled to a container to be aligned. [2] Method according to claim 1, wherein the mathematical model is based on a projection matrix (PM) with parameters of the inner orientation of the camera (3, 3') and the outer orientation of the control points (9) and the camera, and in particular comprises at least one correction function for correcting image distortions and / or the affinity of the camera. [3] Method according to claim 1 or 2, wherein the algorithm is configured to assign world coordinates (xw, yw, zw) to object points (17) imaged by the camera (3, 3') on containers (2) to be aligned which have a defined surface shape and are provided at a defined measuring position (6). [4] Method according to at least one of the preceding claims, wherein the calibration position (7) of the calibration body (8) is located in the area of ​​a transport track (10) of the containers (2) to be aligned, and is in particular identical with a measuring position (6) for mapping the containers. [5] Method according to at least one of the preceding claims, wherein at least 15 control points (9) are mapped in each calibration image (14), in particular at least 50 control points. [6] Method according to at least one of the preceding claims, wherein in step a) the control points (9) are mapped at at least two different calibration positions (7) of the calibration body (8) and at least one parameter (fx, fy, cx, cy) of the inner orientation of the camera (3, 3') is calculated on the basis of the differently mapped control points. [7] Method according to at least one of the preceding claims, wherein, based on the mathematical model of the camera image, an algorithm for coordinate transformation is calculated which is essentially independent of the position of the control points (9) relative to each other. [8] Method according to at least one of the preceding claims, further comprising a step j) for determining an actual orientation of the container (2), in particular an actual rotational position (cpi), based on the coordinates (u, v, xw, yw, zw) determined in step i), and a step k) for approaching a target orientation of the container, in particular a target rotational position (φa) for subsequent labeling of the container. [9] Method according to at least one of the preceding claims, wherein the container (2) is transported during step e), in particular along a circular path. [10] Method according to claim 9, wherein the camera (3, 3') is assigned at least two measurement positions (6) located one behind the other with respect to the transport path (10b) of the container (2) and the container is rotated between the measurement positions about its main axis (2c) in order to take at least two measurement images (13) of the container in different rotational positions (φ) with the camera. [11] Method according to at least one of the preceding claims, wherein the container (2) is moved past at least two cameras (3, 3') arranged one behind the other with respect to the transport path (10b) of the container in order to image the container in at least four measurement images (13) overlapping with respect to its rotational position (φ), and in particular completely. [12] Alignment unit for aligning containers (2), comprising: - a transport device (10) in a particularly carousel shape for the containers (2), wherein alignment means (12) are provided on the transport device to align the containers individually during transport, in particular to rotate them about their main axis (2c); - at least one camera (3.3') for monitoring the containers during transport; and - at least one computing unit (4) for evaluating image coordinates (u, v) and for transforming the image coordinates into world coordinates (xw, yw, zw) and / or vice versa according to the method according to one of the preceding claims, in particular for calculating an actual rotational position (φi) of the containers and for calculating a rotational position correction, and in particular for approaching a target rotational position (φa) of the containers for subsequent labeling. [13] Labeling device for containers, with the alignment unit according to claim 12.

Citation Information

Patent Citations

  • Device for aligning containers and labeling machine with such a device

    DE102005050902A1

  • Test container and test arrangement for a container control device and method for calibrating container control devices

    DE102006022492A1

  • Three dimensional optical measurement of surface of objects

    DE19502459A1

  • Three-dimensional measurement method for dynamic spatial regions

    DE19604977A1

  • Adjusting system for bottles on turntable comprises cameras which detect orientation of bottles at different positions and control unit which compares data obtained with desired orientation and controls adjustment of bottles

    DE202005017180U1