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.