Method for ascertaining at least one degree of freedom of a camera, computer program, machine-readable storage medium, and electronic control unit or automation assembly

EP4690113A1Pending Publication Date: 2026-02-11ROBERT BOSCH GMBH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
EP2024712464
Authority / Receiving Office
EP · EP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-04-05
Filing Date
2024-03-15
Publication Date
2026-02-11

AI Technical Summary

Technical Problem

Current methods for determining the position of a camera relative to a code arrangement in manufacturing and other applications are limited in accuracy, complexity, and cost-effectiveness, particularly in detecting multiple degrees of freedom in a non-contact manner.

Method used

A method using a camera with an optical sensor unit and imaging optics to capture a two-dimensional code arrangement, which includes base symbols arranged in a periodic grid, allowing for the determination of camera position in up to six degrees of freedom by decoding the code arrangement from the camera image, enabling precise localization and identification of objects in a workspace.

Benefits of technology

The method provides high measurement accuracy, reliability, and cost-effectiveness for localizing objects in six degrees of freedom, with a large measuring range and high measurement rate, suitable for various applications including automation and real-time position control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure EP2024057052_10102024_PF_FP_ABST
    Figure EP2024057052_10102024_PF_FP_ABST
Patent Text Reader

Abstract

The invention relates to a method for ascertaining at least one degree of freedom of a camera (1) relative to a code arrangement (2) from a camera image of the camera (1). The code arrangement (2) has a point grid with a plurality of base symbols (20), wherein a coarse position of the base symbols (20) is coded in the code arrangement (2), and the base symbols (20) define a first main direction and a second main direction, which is independent of the first main direction, along the point grid. The following values are determined as characteristic values from the camera image in a reference point: - a rotational angle phiz of the camera (1) about the optical axis of the camera (1); - a first and / or second local grid dimension gco / gdc of the point grid in the camera image in the first main direction or in the second main direction; and - a first and a local angular divergence dalphac0 / dalphac1 of the point grid in the camera image in the first or second main direction, wherein the local angular divergence dalphac0 / dalphac1 describes the differential angle between two adjacent straight lines in the respective main direction in the point grid; and the following three degrees of freedom of the camera (1) relative to the code arrangement (2) are determined on the basis of the characteristic values: - the distance rz between the code arrangement (1) and the camera (1); and - two independent pitch angles phix; phy of the optical axis relative to the code arrangement (2).
Need to check novelty before this filing date? Find Prior Art

Description

[0001] R.405034 - 1 - Description Title Procedure for determining at least one a camera, and electronic control unit or State of the art The invention relates to a method for determining at least one degree of freedom of a camera relative to a code arrangement in the camera image of the camera according to claim 1. The invention also relates to a computer program, a machine-readable storage medium with the computer program and an electronic control unit or an automation arrangement with the electronic control unit. In modern manufacturing applications and other applications, it is necessary to detect the position of a moving body relative to its surroundings. For this purpose, there are a variety of sensors, such as displacement sensors, coded positions which are read out, etc. All existing sensor systems have specific advantages for the respective application, which can be based on accuracy, simplicity, cost-effective integration, robustness or other properties.In the applicant's publication DE 10 2016 216 221 A1, which represents the closest prior art, a method for positioning and / or determining the position of objects in a space and / or on a surface is proposed, which method uses a two-dimensional code arrangement. The two-dimensional code arrangement has base symbols, wherein the base symbols are arranged on a surface, and the base symbols on the surface form a two-dimensional, periodic grid. Based on the R.405034 - 2 - code arrangement, the position of a camera relative to the code arrangement can be determined. The applicant's publication DE 10 2016 216 196 A1 discloses a sensor system, wherein the sensor system uses the method for positioning and / or determining the position of the preceding publication.Disclosure of the invention A method for determining at least one degree of freedom of a camera relative to a code arrangement from a camera image of the camera with the features of claim 1, an electronic control unit or an automation arrangement with the electronic control unit, a computer program and a machine-readable storage medium with the features of the independent claims are proposed. Preferred or advantageous embodiments of the invention emerge from the subclaims, the following description and the attached figures. The method according to the invention serves to determine at least one degree of freedom of a camera relative to a code arrangement from a camera image of the camera. The method is based on the method of the document DE 102016216221 A1 and / or the application of the document DE 102016216196 A1, the disclosure of which is integrated into the present disclosure via referencing.Definition of camera: The camera comprises, in particular, an optical sensor unit (also referred to as an imaging sensor element, camera chip, or image recorder) for recording the camera image and imaging optics. In particular, the camera is designed as a color camera or a black-and-white camera. The optical sensor unit is designed to provide a single camera image of a section of the code arrangement and / or a sequence of camera images, for example in the form of a video. The camera has an image recorder as the optical sensor unit. The camera can comprise a lens R.405034 - 3 -, wherein the lens is preferably designed as a wide-angle lens. In particular, the camera implements a vanishing perspective and / or a central perspective. In this case, parallel edges, in particular, are not represented as parallel to the image when viewed at an angle, but rather optically converge at an imaginary point, the so-called vanishing point.In particular, the camera, especially comprising the lens, implements a perspective distortion desired for the application. Definition of optical axis 5: The imaging optics is ideally a rotationally symmetrical optical system, with the axis of symmetry being the optical axis. It is characterized in that a light beam along the optical axis does not experience any deflection when passing through the optics. Definition of image center 7: The intersection point of the optical axis 5 with the optical sensor unit 12 is referred to as the image center 7. This can, but does not necessarily have to, coincide with the geometric center of the optical sensor unit 12. Definition of camera image: The camera image of the camera is designed in particular as a matrix which has image points, such as 8-bit grayscale points or color points, at the matrix points.Definition of code arrangement: The code arrangement can in particular be imaged by the camera, wherein on the basis of the camera image, for example, the absolute position of a machine or a machine part can be measured in one to six degrees of freedom. In particular, the code arrangement is designed to be detected by the camera by contactless reading, wherein a multi-dimensional actual position determination can be carried out by the contactless detection by the camera. The two-dimensional code arrangement can preferably be used in a production and / or testing system in which workpieces and / or testing and / or work equipment must be positioned. Definition of basic symbol: R.405034 - 4 - The two-dimensional code arrangement comprises basic symbols, wherein the basic symbols are arranged on a surface and the basic symbols on the surface form a two-dimensional periodic grid, a dot grid.The base symbols are preferably geometric figures, such as circles, squares, triangles, or lines. The base symbols are particularly preferably designed as circles. The base symbols are also referred to as dots. They preferably represent digits of a number system. In particular, the two-dimensional code arrangement comprises at least two different base symbols. In one possible embodiment of the invention, the two-dimensional periodic grid comprises empty spaces at grid locations and / or grid locations that are not occupied by base symbols, as parcel symbols. The base symbols are arranged on the surface, wherein the surface can be a curved or non-curved surface. For example, the surface is the floor of a production and / or testing facility. The base symbols are arranged in the surface to form a two-dimensional grid, wherein the center of gravity of the base symbols preferably forms grid points in the dot grid.Definition of dot matrix of the code arrangement: The raster points are also referred to below as raster locations and / or grid locations. In particular, the two-dimensional periodic dot matrix forms a two-dimensional grid. Definition of parcel: The area is preferably divided into similar, regularly arranged parcels, wherein the parcels have, for example, a square, rectangular, triangular or hexagonal basic shape. Similar parcels are understood in particular to be parcels of the same size and / or shape. Preferably, each parcel comprises n base symbols. The parcels comprise in particular an integer number of base symbols and in particular an even number of base symbols. Preferably, the parcels comprise more than ten base symbols, in particular more than twenty base symbols and in particular more than forty base symbols.Furthermore, the number of base symbols in a parcel is preferably less than one hundred. The parcels formed by the base symbols R.405034 - 5 - can be visually indicated in the code arrangement, such as by a border, or not visually indicated and only form a conceptual and / or logical unit. Definition of parcel area: The parcels have at least a first and a second parcel area. An X-parcel area comprises the first parcel area and a Y-parcel area comprises the second parcel area. In particular, each parcel area occupies a contiguous area or several distributed, non-contiguous sub-areas within the parcel. Each parcel area comprises several base symbols. In particular, the X-parcel area and the Y-parcel area comprise the same number of base symbols.In particular, the at least two parcel areas are arranged in the parcel such that they have a p-fold rotational symmetry with respect to the center of the parcel as the pivot point, wherein the p-fold rotational symmetry is, for example, a two-fold, three-fold, or four-fold rotational symmetry. Definition of parcel symbol: The parcels each have at least one parcel symbol, which represents a fixed reference point within each parcel. The parcel symbol enables the reading and / or decoding of the basic symbols in a specified order. The parcel symbols are, in particular, arranged regularly and / or periodically in the two-dimensional periodic grid of the basic symbols. The parcel symbols can lie on or next to the grid points. The parcel symbols are, in particular, each arranged at the same position within a parcel, such as, for example, in the center of a parcel.The parcel symbols are, for example, different graphic elements than the base symbols, such as triangles, hexagons, or lines. Alternatively and / or additionally, the parcel symbols are represented by omitting one or more base symbols in a parcel. In one possible embodiment, the parcel symbol forms the point of symmetry of the p-fold rotational symmetry of the parcel. In particular, the reading direction and / or decoding sequence, i.e. the sequence in which the base symbols must be read within the X-parcel area and / or within the Y-parcel area, is specified. Preferably, the reading direction and / or R.405034 - 6 - decoding sequence corresponds to the specification of which base symbols are to be read and / or decoded one after the other. Definition of coding: In the X-parcel area, an X-coordinate value is encoded by the base symbols, and a Y-coordinate value is encoded in the Y-parcel area by the base symbols.In particular, the X-coordinate value and the Y-coordinate value are the coordinates of a base symbol in the parcel, wherein the coordinate is specified in a Cartesian coordinate system of the area spanned by the base symbols. Alternatively and / or additionally, the X-coordinate value and the Y-coordinate value can also specify a position within the area as coordinates in another coordinate system, such as an oblique-angle coordinate system, in cylindrical coordinates, or spherical coordinates. Definition of a preferred embodiment of the point grid: In a particularly preferred embodiment of the invention, the two-dimensional periodic grid is a rectangular grid, wherein the parcels are also rectangular. In particular, the rectangular grids and the rectangular parcels are square grids and / or square parcels.Preferably, the spacing of the base symbols is equal along a length and width axis of the rectangular grid. For example, for a square grid with square plots, the number of base symbols in the X and Y directions of the planar two-dimensional periodic grid is equal. In particular, the X-plot area and the Y-plot area each consist of two spatially separated, rectangular partial areas within a plot, wherein the partial areas have a longitudinal extent. The longitudinal extent of the partial areas of the X-plot area is preferably perpendicular to the longitudinal extent of the partial areas of the Y-plot area. Preferably, the area occupied by the X-plot area can be converted into the area occupied by the Y-plot area by a 90° rotation. In a particularly preferred embodiment of the invention, the periodic grid has a grid length and a grid width.The grid length extends in the X direction of a Cartesian coordinate system, the R.405034 - 7 - grid width in the Y direction. The coordinate system thus formed assigns a uniquely defined position vector (X, Y) to each point of the coding area. A number of g consecutive base symbols forms, in particular, an overall sequence. The overall sequence is entered into the X-plot areas, in particular into several plots adjacent in the X direction. The base symbols are entered into the X-plot areas, in particular according to their order in the overall sequence, preferably in ascending X direction of the plots, within each plot in a previously defined reading and / or decoding order. The number g is sufficiently large so that the X-plot areas of all plots adjacent in the X direction can be completely filled.In particular, g is greater than fifty, in particular greater than a thousand, and especially greater than one million. The contents of the X-plot areas of neighboring plots in the Y-direction are identical. It is particularly preferred that a section of t consecutive base symbols in the overall sequence forms a subsequence. In particular, each section of t consecutive base symbols of the overall sequence forms a subsequence, wherein the consecutive base symbols follow one another in decoding and / or reading order. In particular, the overall sequence is designed such that each subsequence of t consecutive base symbols is contained only once in the overall sequence when read forward, and each subsequence read backward is not contained in the overall sequence when read forward.A partial sequence preferably comprises at least five consecutive base symbols, in particular at least twenty consecutive base symbols, and especially at least thirty base symbols. Furthermore, the partial sequence preferably comprises fewer than fifty base symbols, and especially fewer than thirty base symbols. In particular, t < g applies. In a particularly preferred embodiment of the invention, the base symbols are designed to encode digits to a number base b. The number base b is preferably the base of a place value system. Preferably, the number base b = 2, the base of a binary system, where the digits of the binary system include 0 and 1. Furthermore, it is possible for the number base b = 10 and to form the base of a decimal system, where the decimal system includes the digits 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. Alternatively, the number base b = 16, R.405034 - 8 - the base of a hexadecimal system, wherein the hexadecimal system comprises the digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F. In particular, the number base b can be selected arbitrarily, wherein the digits of the number base comprise the elements 0, 1, ... b - 1. Alternatively and / or additionally, the number base b is the base of an additive number system, such as the Roman numeral. In a particularly preferred embodiment of the invention, the number base b = 2 is selected. In particular, the selected number base b = 2 forms a binary system. The binary system and / or the number system with the number base b = 2 comprises two digits, in particular the digit 0 and the digit 1. Preferably, two different base symbols encode the digits 0 and 1 of the binary system. The two different base symbols are formed by two circles, a first circle with a radius R1 and a second circle with a radius R2.In particular, the radius R1 is chosen to be smaller than the radius R2. In particular, the ratio of radius R2 to radius R1 is greater than the square root of 2. For example, the radius R2 is chosen to be smaller than half the grid dimension of the code grid, so that two adjacent circles with R2 in the periodic grid do not tangent to each other. This embodiment is based on the consideration that, on the one hand, a particularly high information density is achieved, and on the other hand, reliable readability is achieved with standard image processing methods such as segmentation by means of blob analysis. In one possible embodiment of the invention, the overall sequence is designed such that a checksum of a subsequence is less than half the maximum possible checksum of a subsequence. In particular, the checksum for any subsequence selected from the overall sequence is less than half the maximum possible checksum of a subsequence.For example, the checksum of each partial sequence with length t for a number system with base b is less than t*(b – 1) / 2. In a particularly preferred embodiment of the invention, the two-dimensional code arrangement comprises an inverted overall sequence. The inverted overall sequence preferably represents an inversion of the overall sequence. Preferably, the inverted overall sequence is entered into the Y-plot areas of a plurality of plots adjacent in the Y direction. The base symbols are entered into the Y-plot areas in particular according to their order in the R.405034 - 9 - inverted overall sequence, preferably in ascending Y direction of the plots, within each plot in the previously determined reading and / or decoding order. The number g is sufficiently large so that the Y-plot areas of all plots adjacent in the Y direction can be completely filled.In particular, the contents of the Y-plot areas of neighboring plots in the X-direction are identical. In one possible embodiment of the invention, the base symbol at the k-th position of the inverted overall sequence is the coded digit m(k), where the digit m(k) satisfies the relationship with the digit n(k) coded by the base symbol at the k-th position in the overall sequence: m(k) = b – n(k) – 1. For example, the inverted overall sequence and the overall sequence for the selection of a dual system with base b = 2 form the relationship: m(k) = 1 – n(k). Definition of reference point: The section particularly preferably comprises a reference point. The reference point is, for example, the intersection point of the optical axis of the camera with the plane in which the code arrangement lies.Preferably, the method is designed to determine the position of the camera in relation to the work area on the basis of the image recorded by the sensor unit, such as the X coordinate (rx) and the Y coordinate (ry) of the reference point in a coordinate system spanned by the work area and / or the base symbols and / or the code arrangement. Initially, within the scope of the method, only the rough position in the form of the coded X coordinate and the coded Y coordinate is determined as two degrees of freedom. The rough position alone results in a reliable and usable position for the rough positioning of the camera. By determining the X coordinate and the Y coordinate in the code arrangement as a rough position, conclusions can be drawn about the relative position of the camera in relation to the code arrangement.If, for example, the coarse position is determined in the immediate vicinity of the reference point, the position of the camera can be deduced from the knowledge of the course of the optical axis of the camera. A quasi-exact position of the camera is obtained if the reference point is equal to the coded position and the R.405034 - 10 - angle of the optical axis to the code arrangement is known. The simplest case is that the optical axis is aligned perpendicular to the code arrangement. Definition of degrees of freedom: In a particularly preferred embodiment of the invention, the method is designed to determine the position and / or attitude of the work module with respect to the work area in up to six degrees of freedom. The degrees of freedom are in particular: rx: spatial coordinate in the coordinate system of the code arrangement (as coarse position and / or fine position). ry: spatial coordinate in the coordinate system of the code arrangement (as coarse position and / or fine position).In particular, rx and ry refer to the reference point, in particular the point at which the optical axis passes through the code arrangement. rz: distance from the reference point to the camera along the optical axis. phiz: Z-rotation angle of the camera about the optical axis. phix: first pitch angle of the optical axis to the code arrangement, in particular with respect to the first main direction. phiy: second pitch angle of the optical axis to the code arrangement, in particular with respect to the second main direction. Definition of X, Y coordinate (rx, ry): For example, the six degrees of freedom of the position and / or attitude of the camera relative to the workspace include the coordinates X and Y with respect to the Cartesian coordinate system spanned by the base symbols, in particular in a coordinate system (XC, YC) of the code arrangement in the plane of the code arrangement.Definition of distance between reference point and optical center of the camera (rz): The 6 degrees of freedom also include the distance Z or rz of the camera to the reference point along the optical axis, where the distance denotes, for example, the distance between the reference point and, for example, the optical center of the camera lens. R.405034 - 11 - Definition of angle of rotation: The three independent angles of rotation of the camera are determined in a camera coordinate system. Two of the angles of rotation are defined in particular as the intermediate angles between the optical axis and the code arrangement (phix, phiy). The third angle of rotation (phiz) denotes the rotation of the camera around the optical axis. Definition of coordinate system of the code arrangement: The coordinate system (XC, YC) of the code arrangement lies in the plane of the code arrangement.Definition of the coordinate system of the camera's image sensor and / or in the camera image: The coordinate system (XI, YI) of the image sensor lies in the plane of the image sensor or in the camera image. Definition of the camera coordinate system: The coordinate system (X, Y, Z) of the camera has its origin in the optical center of the camera lens, with the negative Z direction coinciding with the optical axis of the camera. Generalization: While the coordinate systems with regard to the origin and orientation are specified here as examples, equivalent coordinate systems can also be used. Definition of the method: In some variants, the method is characterized in that the X coordinate value and the Y coordinate value are decoded and / or determined based on the camera image recorded by the camera.In a possible further development of the method, the orientation of the section of the code arrangement recorded in the image is determined with respect to three coordinate axes. In particular, the orientation of the section recorded in the image is determined with respect to the X-axis and the Y-axis of the Cartesian coordinate system spanned by the R.405034 - 12 - basic symbols. Alternatively and / or additionally, the coordinates of the position of the reference point in the code arrangement are determined by decoding the section of the code arrangement contained in the image. In a particularly preferred embodiment of the invention, the position of the work module relative to the work area is determined in up to six degrees of freedom in the method.In particular, the position of the camera in the workspace is determined in three Cartesian coordinates X, Y, Z, where X and Y are the coordinates of the coordinate system spanned by the base symbols, and Z is the distance of the work module from the workspace. Furthermore, the method determines, for example, the camera's three Euler angles. Alternatively and / or additionally, the two-dimensional code arrangement is used in areas outside of automation technology, for example, for monitoring movement sequences in nature and the environment, biology and medicine, architecture, consumer electronics, and / or sensor technology.The general advantages of the invention depend on the variant: The central task of the invention is to provide a powerful, reliable, and cost-effective method for localizing and identifying one or more objects in a workspace in up to six degrees of freedom (6D localization = simultaneous position detection in 6 degrees of freedom of movement). The method processes image data provided by an imaging measurement system, for example a camera. A smartphone, for example, can also be used to capture images and determine the position with the method according to the invention, whereby the method is implemented as an algorithm in an application that is executed by the smartphone's embedded computer or in the cloud.To determine the position of an object in up to six degrees of freedom, the camera captures a two-dimensional code arrangement that is connected to the object to be located. The inventive method offers the following properties, depending on the variant: R.405034 - 13 - - Up to full 6D position information: translation (X,Y,Z) and rotation (φ_X,φ_Y,φ_Z) - Absolute position information (not incremental), i.e. a referencing run as with incremental sensors is not necessary - Very large measuring range: - in X, Y "almost infinite", limited only by the code arrangement. Examples: Uniquely codable area using the code described in [B] and a 2.5 mm dot grid: for a parcel size of 5x5 dots: 2m x 2m; for a parcel size of 7x7 dots: 8km x 8km; for a parcel size of 9x9 dots: 550,000km x 550,000km in Z: a ​​single dimension with a boundary. Adaptable to the application via camera resolution, lens, and code grid size.in φ_X, φ_Y: currently + / - 60° in φ_Z infinite (0°-360°) - High measuring rate, e.g. 100Hz – 10,000Hz - Short latency (time from image acquisition to output of the 6D position measurement value), e.g. 10ms – 100µs. - High measurement accuracy in all six degrees of freedom: currently 1µm and 0.01° repeatability (at 3 sigma), with a code pitch of 2.5mm - Maximum reading reliability, even with local disturbances in the image or fluctuations in image brightness - Cost-effective implementation, both the sensor system and the code arrangement - Additional data can be read simultaneously with localization. For example, an ID code integrated into the code arrangement can be read to identify the object. - Scalable in terms of accuracy, measuring range in Z, redundancy and measuring rate by changing the lens, image sensor resolution, grid size, code arrangement, size of the reading field, computing power, etc.- Easy integration into existing systems, for example as a smartphone app This makes it easy to implement a wide variety of automation applications that were previously not feasible or not economically viable, for example R.405034 - 14 - - Precise localization of axes or sliders in an axis system or robot system in order to implement real-time position control in up to six dimensions. - Construction of absolute positioning systems and robots that do not require reference travel - Simplification of positioning systems, as several one-dimensional measuring sensors can be replaced by a single multi-dimensional measuring sensor. - Visual servoing, e.g. for tracking a robot gripper on a moving target. - Monitoring and tracking of several objects in space using cyclic position measurement - Recording and analysis of movement sequences - Vibration analysis of machines in 6 dimensions.- Determining the relative position of two objects. A camera, e.g. in a handheld device, captures two objects in one image, each equipped with a point code. The proposed method allows the localization of both objects in relation to the common camera coordinate system. The relative position of the two objects can be determined by forming a vector difference. The position of the camera is eliminated computationally, i.e. the method is largely independent of the camera position. - Determining the relative position of more than two objects, each equipped with cameras and / or code arrangements. - Setting up a localization network, e.g. in a production hall, to localize several stationary or moving objects relative to one another or relative to a hall coordinate system.For example, several autonomous vehicles, each equipped with a camera, locate themselves by scanning a code array mounted on the ceiling of the hall. The code array comprises a dot matrix with a plurality of base symbols, wherein a rough position of the base symbols is encoded in the code array. The base symbols define a first and an independent, second main direction along the dot matrix. Depending on the viewing angle R.405034 - 15 -, the two independent main directions are aligned perpendicularly or obliquely to one another in the camera image. A reference point is arranged in the camera image. The reference point is formed as an intersection point of the optical axis with the image sensor and / or with the camera image. The reference point is thus predetermined by the camera in the coordinate system of the camera and / or in the camera image.The dot matrix in the camera image is, in particular, perspectively distorted, so that although the rows and columns of the dot matrix are each straight, the rows and columns are not perpendicular to one another in the perspective distortion, but are arranged at an oblique angle to one another. The following values ​​are determined as characteristic values ​​from the camera image at the reference point: A rotation angle Phiz - also called the Z rotation angle - of the camera around the optical axis of the camera is determined. Furthermore, at least one local grid dimension of the dot matrix in the camera image is determined. The local grid dimension specifies the distance between two adjacent straight lines of the dot matrix in the camera image. The dot matrix in the code arrangement is regular and / or has a regular grid dimension.By recording the code arrangement with the camera, which leads to the camera image, the grid dimension is distorted so that the grid dimension changes across the camera image. The local grid dimension at the reference point is understood to be the value of the grid dimension at the reference point. Furthermore, at least a first and a second local angular divergence of the dot matrix in the camera image is determined. In principle, the straight lines in the dot matrix in the code arrangement are arranged parallel to one another. However, by mapping the code arrangement onto the camera image, the dot matrix is ​​distorted so that the straight lines each assume a difference angle other than 0 between two adjacent straight lines. The local angular divergence of the dot matrix in the camera image is understood to be the difference angle between two adjacent R.405034 - 16 - straight lines of the dot matrix at the reference point.This involves a first local angular divergence for the first principal direction and a second local angular divergence for the second principal direction. From a physical perspective, these characteristic values ​​completely describe three degrees of freedom of the camera relative to the code arrangement, namely a distance rz between the code arrangement and the camera at the reference point and / or along the optical axis, as well as two pitch angles phix and phy, which describe an intermediate angle between the optical axis and the plane of the code arrangement in the first and second principal direction. These characteristic values ​​are therefore sufficient to determine the three degrees of freedom. One idea of ​​the invention is that these characteristic values ​​can be easily determined from the camera image. In addition to a "manual" determination of the characteristic values ​​in the camera image, it is also possible to derive them using digital image processing methods.Knowing the characteristic values, the three degrees of freedom mentioned can be deduced. By selecting the characteristic values ​​mentioned, a new method for determining the degrees of freedom mentioned is proposed, which is characterized by the use of only a few characteristic values ​​to determine the degrees of freedom. This makes it possible to design the method in a computationally efficient and highly accurate manner. In a preferred embodiment of the invention, the characteristic values ​​mentioned are used in an imaging model which describes the optical imaging of the code arrangement onto the image sensor, taking into account the position and orientation of the camera relative to the code arrangement. The model describes the physical and thus analytical relationship between the characteristic values ​​mentioned as input values ​​and the three degrees of freedom mentioned as output values. This relationship thus leads to the determination of the three degrees of freedom.In one possible embodiment of the invention, three equations are determined for the three degrees of freedom, forming a system of equations. It should be emphasized that the three equations represent possible representations R.405034 - 17 - of the analytical relationships between the characteristic values ​​and the three degrees of freedom; other mathematical or analytical representations are possible. However, the physical relationship can be represented particularly simply and compactly using the three equations and / or the system of equations. The equation for determining the first pitch angle phix is ​​in particular a function of the first local angular divergence dalphac0, the distance rz between the code arrangement and the camera, and the second pitch angle phiy. In particular, the first pitch angle is determined using the following equation: ^^^ tan ^. ^^ ∙^ ^ ^ = with ^ : grid spacing of the dot grid in [m] ^ ∙ ^ ^^^^ ^^^^ ^^^ ^^ The equation for determining the second pitch angle phiy is, in particular, a function of the second local angular divergence dalphac1, the distance rz between the code array and the camera, and the first pitch angle phix. Specifically, the second pitch angle is determined using the following equation: In particular, the equation for the distance rz between the code array and the camera is a function as follows: Alt. 1: ^ ∙ ^ ^^^^ ∙ cos ^ ^ ^ ∙ ^ ^^^^ ∙ cos ^ ^ red_status ^ ^^^ = ^ ^ ∙ (cos ^ − tan ^ sin ^ sin ^^^ = ^ ^ ^ ^ ^ ^ ^ ) ^ ^^ ∙ cos ^ ^ = 0 Alt.2 ^ ∙ ^ ∙ cos ^ ^ ∙ ^ ∙ cos ^ rot_status ^ = ^^^^ ^ ^ ^^^^ ^ ^^^ ^ ∙ (− sin ^^^ = ^ ^ ^ ^ − tan ^ ^ sin ^ ^ cos ^ ^ ) ^ ^^ ∙ sin ^ ^ = 1 With b: Image distance of the camera in [m] ^ ^^ , ^ ^^: local grid size of the point grid in the camera image, in [m] R.405034 - 18 - The columns refer to two independent variants, and the rows refer to two alternatives depending on the definition and / or convention of the rotation angle Phiz. Alternatively or additionally, the distance between the code arrangement and the camera is determined as the mean of the variants and / or functions using the following equation: ^ ^^ + ^ ^ = ^ ^^^ ^2 In principle, the system of equations can be solved analytically. In a preferred development of the invention, the system of equations comprising the three equations is solved iteratively. Initial values ​​are first specified and then the degrees of freedom are determined in iterative steps in an optimization routine. Preferably, a basic symbol matrix, in particular a two-dimensional one, is determined from the camera image, with each raster point of the code arrangement being assigned an entry in the basic symbol matrix and with the center point position of the basic symbols in the camera image being entered in the basic symbol matrix. Thus, an entry in the basic symbol matrix refers to the position of the basic symbol in the assigned raster point, in particular in a coordinate system of the image recorder and / or in a coordinate system of the camera image.The dot matrix in the camera image is, in particular, perspectively distorted, so that although the rows and columns of the dot matrix are each straight, the rows and columns are generally arranged at an oblique angle to one another in the perspective distortion. In addition, optical distortion may occur, which can optionally be compensated for by rectification. From the data of the basic symbol matrix, a first straight line function is determined in a coordinate system of the camera image for a first straight line using a first R.405034 - 19 - function argument. Regardless of the first function argument, the first straight line is always parallel to the first principal direction of the dot matrix if the first straight line is mentally transferred into the coordinate system of the code arrangement.By changing the first function argument, the first straight line is shifted parallel in the second main direction in the coordinate system of the code arrangement. Thus, by changing the first function argument, the straight line can, for example, be placed on a row of the dot matrix, both in the coordinate system of the code arrangement and in the coordinate system of the camera image. In particular, this can be implemented as follows: Initial situation: a) The centers of the basic symbols form a two-dimensional dot matrix in the code plane with regularly arranged straight rows and columns. b) The camera images the code plane onto the image sensor with a distorted perspective. In the camera image, the rows generally appear as fanned-out lines that have a common vanishing point. The same applies to the columns. c) Due to distortion of the lens, the rows and columns appear as curved lines in the camera image.Process steps in the camera coordinate system: a) Lens distortion is mathematically eliminated by rectification, and curved lines are converted into straight lines. b) Linear interpolation is used to fit straight lines to the rows and number them according to their sequence, using an integer index as the function argument. They form a first bundle of straight lines. The columns are processed in the same way; they form a second bundle of straight lines. c) Each straight line is described by a straight line angle and an intercept value. The straight line angles of a bundle form a numerical sequence that is approximated by quadratic interpolation. The integer straight line index serves as the function argument. The polynomial has three interpolation parameters. The intercept value R.405034 - 20 - is used accordingly, resulting in three further interpolation parameters.Each bundle of straight lines is therefore completely and compactly described by six interpolation parameters. d) By inserting rational function values ​​into the interpolation function, straight lines that lie between two rows or columns can also be calculated. Alternatively or additionally, a second straight line function is determined for a second straight line in a coordinate system of the camera image using a second function argument on the basis of the basis symbol matrix. Regardless of the second function argument, the second straight line is always parallel to the second principal direction of the dot matrix when the second straight line is transferred to the coordinate system of the code arrangement. By changing the second function argument, the second straight line is shifted parallel in the first principal direction in the coordinate system of the code arrangement. Thus, by changing the second function argument, the straight line can, for example,be placed on a row of the dot matrix, both in the coordinate system of the code arrangement and in the coordinate system of the camera image. It should be noted that the terms row and column are for naming purposes only and do not imply a specific orientation of the dot matrix. The local angular divergence and / or the local grid dimension can be determined from the straight line functions. In particular, these are determined by determining the neighboring straight lines to the reference point and deriving the characteristic values ​​from the neighboring straight lines. A further consideration is that on the way from the camera image to the at least one degree of freedom, the amount of data should be reduced in order to enable faster and / or more efficient calculation of the at least one degree of freedom. While the camera image, for example, with an image size of 200 x 200 pixels still has 40.000 values, the basic symbol matrix is ​​already reduced to the position and accordingly has a section of the camera image, e.g. with an edge length of the point matrix R.405034 - 21 - of 15 basic symbols only 225 values ​​for the positions. By deriving the at least one straight line function, the amount of data is reduced to the parameters of the straight line function. It has been shown that 6 parameters per straight line function, optionally plus one piece of data, are sufficient to transfer the essential information content of the basic symbol matrix or the camera image to the at least one degree of freedom, so that the amount of data in the example is reduced from 225 entries to 12 or 14 entries. This significantly reduces the effort required to calculate the at least one degree of freedom.A further advantage of the implementation is that the rows and columns of the basic symbol matrix in the code arrangement are arranged parallel to one another and regularly spaced, so that the derivation of the straight line function in the camera image also carries out a type of averaging over the basic symbol matrix, with the straight line functions describing averaged information of the basic symbol matrix. The straight line functions compress the information while simultaneously improving the information content. The method according to the invention thus allows a computationally efficient implementation of the method for determining at least one degree of freedom of the camera relative to the code arrangement from the camera image. From an application perspective, the determination can be carried out, for example, on a microcontroller which can determine the at least one degree of freedom at least 100 times per second.In this way, it is possible to carry out real-time applications with the method, for example in production. In a preferred development, the first straight line function is determined on the basis of at least two rows, preferably more than two rows, in particular on the basis of all rows of the basic symbol matrix. Alternatively or additionally, the second straight line function is determined on the basis of at least two columns, preferably more than two columns and in particular on the basis of all columns of the basic symbol matrix. This development underlines that the straight line function carries averaged and / or condensed information over a plurality of rows or columns. R.405034 - 22 - In a preferred embodiment of the invention, a first best-fit line is formed for each row along the first main directions. The first straight line function is formed on the basis of a plurality of the first best-fit lines.By forming a first best-fit line for a row, this first best-fit line can be adapted to the course of the series, so that the first best-fit line already forms averaged and / or condensed information of the underlying series. The first straight line function is formed on the basis of a plurality of the first best-fit lines, wherein a second averaging or condensing takes place here, so that the first straight line function is formed by a double averaging of the original information. Alternatively or additionally, a second best-fit line is formed for each column along the second main directions. The second straight line function is formed on the basis of a plurality of the second best-fit lines.By forming a second best-fit line through a column, this second best-fit line can be adapted to the course of the column, so that the second best-fit line already forms averaged and / or condensed information of the underlying column. The second straight line function is formed on the basis of a plurality of the second best-fit lines, wherein a second averaging or condensing takes place here, so that the second straight line function is formed by a double averaging of the original information. In a preferred implementation, the first function argument is designed as an integer first count value of the rows and / or the second function argument is designed as an integer second count value of the columns. For an integer first count value in the first straight line function, the first straight line thus corresponds to a first best-fit line.Similarly, with an integer second count value as the second function argument in the second straight line function, the second straight line corresponds to one of the columns of the base symbol matrix. However, the first straight line and / or the second straight line is not exactly the first best-fit line or the second best-fit line, since the straight line function has undergone the second averaging / compression, so that it is a corrected first best-fit line or corrected second best-fit line. In a preferred implementation, the best-fit lines are described by a line angle as the intersection angle and at least one axis intersection point with one or the coordinate system of the image recorder and / or of the camera image. For the best-fit line, the line angle and the axis intersection point of at least or exactly one coordinate axis of the coordinate system are sufficient to uniquely determine the best-fit line in the coordinate system.Through this implementation, the positions of the best-fit lines in the point grid of the associated row or column are reduced to two values. In a preferred development, the straight line function is formed by a combination of a straight line angle function of the straight line angle depending on the function argument of the straight line function and an axis intersection function of the axis intersection depending on the function argument of the straight line function. The straight line function is thus also determined by the straight line angle and at least one axis intersection. It is preferred that the straight line angle function is designed as a second-degree polynomial and / or the axis intersection function is designed as a second-degree polynomial, wherein the polynomials have the function argument of the respective straight line function as the function argument. This ensures that the straight line angle and / or the axis intersection can be determined depending on the function argument.By choosing a second-degree polynomial, the approximation can be carried out particularly easily, thus further increasing computational efficiency. In a preferred implementation, depending on the straight line angle of the straight line function with the coordinate system, the axis intersection point of the coordinate system's coordinate axis is selected which leads to a smaller intermediate angle to a perpendicular to the respective coordinate axis. Furthermore, the straight line function is assigned a datum, R.405034 - 24 - which encodes the selected coordinate axis. The idea here is that to describe the straight line, only the axis intersection point of a single coordinate axis is necessary, but not the axis intersection points with both coordinate axes. To achieve the greatest possible expressiveness, the axis intersection point is selected whose assigned crossing angle is more perpendicular to the crossed coordinate axis.In a further development of the invention, the rough position of at least one of the base symbols in the code arrangement is determined based on the base symbols of the base symbol matrix or a subset thereof. In particular, a reading field is defined in the camera image and / or two-dimensional dot matrix, and a corresponding base symbol matrix is ​​formed, with each point in the reading field being assigned an entry in the base symbol matrix, with the position and, in particular, the standardized area or the datum of the base symbols being entered in the base symbol matrix, with the rough position of the coordinate system of the dot matrix and / or of at least one base symbol in the code arrangement being determined as the two degrees of freedom based on the base symbol matrix. A first axis intersection function is preferably formed in the coordinate system of the camera image from a first straight line.The first straight line is aligned parallel to the first main direction of the dot matrix in the coordinate system of the code arrangement. The axis intersection function has a first function argument, wherein changing the first function argument shifts the first straight line in the coordinate system of the code arrangement parallel in the second main direction. The first axis intersection function defines, depending on the first function argument, a first axis intersection along a first axis of the coordinate system of the camera image, wherein the first axis runs through the reference point. By shifting the first straight line by changing the first function argument in the coordinate system of the code arrangement, the first straight line is shifted—with perspective distortion—in the coordinate system of the camera and / or the camera image such that the axis intersection moves along the first axis. R.405034 - 25 - Furthermore, a second axis intersection function is preferably formed by a second straight line in the coordinate system of the camera image. The second straight line is aligned parallel to the second main direction of the dot matrix in the coordinate system of the code arrangement. The axis intersection function has a second function argument, wherein changing the second function argument causes the second straight line in the coordinate system of the code arrangement to be shifted parallel in the second main direction. The second axis intersection function defines, depending on the second function argument, a second axis intersection along a second axis of the coordinate system of the camera image, wherein the second axis runs through the reference point.By shifting the second straight line by changing the second function argument in the coordinate system of the code arrangement, the second straight line is shifted—with a perspective distortion—in the coordinate system of the camera and / or the camera image such that the axis intersection moves along the second axis. Based on the axis intersection functions, the first and second function arguments are determined such that the reference point forms the first and second axis intersection points. Figuratively speaking, the first function argument is varied until the first straight line in the coordinate system of the camera and / or the camera image passes through the reference point and / or the first axis intersection lies on the reference point.In the same way, the second function argument is varied until the second straight line in the coordinate system of the camera and / or the camera image runs through the reference point and / or the second axis intersection point lies on the reference point. Subsequently, on the basis of the first and second function arguments and the coarse position, the fine position of the reference point in the coordinate system of the code arrangement in the plane of the code arrangement is determined as a further degree of freedom. In theory, the coarse position of the base symbol in the coordinate system of the code arrangement is first determined and then a shift of the base symbol to the reference point is determined based on the function arguments. R.405034 - 26 - The method has the advantage that the coarse position of the base symbol can be determined by decoding the code arrangement.Subsequently, the displacement up to the reference point is calculated based on the axis intersection functions. By using the axis intersection functions, the calculation can be carried out with few calculation values ​​and thus computationally efficient. This has the advantage that the method can be carried out in real-time applications, even with digital data processing devices, in particular microcontrollers, with low computing power. In a preferred embodiment of the invention, the first function argument is designed as a count value of the rows and / or the second function argument is designed as a count value of the columns in the dot matrix. Figuratively speaking, the position of the base symbol, whose coarse position is known, is shifted to the reference point by whole steps or partial steps in the grid dimension of the dot matrix.As already discussed, the reference point is particularly preferably formed as an intersection point of the optical axis of the camera with the image sensor. The reference point is thus defined as a constructive position in the coordinate system of the camera and / or the camera image. However, it is not absolutely necessary for the reference point and / or the intersection point to be located exactly centrally in the camera image and / or on the camera's image sensor. Rather, the position of the reference point can be defined via calibration. In one possible embodiment of the invention, the axis intersection point function is formed as a straight line function for describing the straight line, in particular as described above. In this case, the axis intersection point function comprises a complete mathematical description of the straight line depending on the respective function arguments.Alternatively, a straight line function is used, in particular as previously described, which is formed by a combination of a straight line angle function of the straight line angle as the angle of intersection of the straight line with one of the axes of the coordinate system of the camera image depending on the R.405034 - 27 - function argument and the axis intersection function. The straight line is thus completely described by an axis intersection and by a straight line angle. This division has the advantage that to determine the fine position, only the axis intersection function needs to be determined and / or evaluated, without information on the straight line angle. This configuration further increases the efficiency of the method. The fine position can then be determined based on the function arguments and a known grid dimension of the point grid.Figuratively speaking, the fine position is determined such that, for example, starting from the position of the base symbol with the known coarse position, a fraction of a grid dimension in the first main direction and a fraction of the grid dimension in the second main direction must be traveled to arrive at the reference point in the coordinate system of the code arrangement. This representation is particularly computationally efficient. It is preferably proposed that the first and / or second function argument of the straight line function be determined such that the first and / or second straight line intersects the reference point. For example, the first and second straight lines are shifted by varying the function argument such that they intersect the reference point.A rotation angle Phiz of the camera around the optical axis is derived as a degree of freedom of the camera relative to the code arrangement based on the first and / or second straight lines that intersect the reference point. The derivation is possible because the straight line functions are defined in the camera image. Thus, it is possible to determine the rotation angle Phiz as a straight line angle in the coordinate system of the camera and / or the camera image. Theoretical considerations have shown that the straight line angle in the coordinate system of the camera and / or the camera image corresponds to the rotation angle Phiz of the camera around the pan axis, without having to perform a transformation of the coordinate systems from the coordinate system of the camera and / or the camera image to the coordinate system of the code arrangement. Thus, it is possible to easily determine the rotation angle Phiz based on at least one straight line function.This development thus shows a way in which the angle of rotation Phiz can be determined with the utmost precision and without great computational effort. It should be emphasized that the determination is particularly simple if the intersection point of the optical axis of the camera with the camera image or with the image sensor is selected as the reference point. In this special constellation, the angle of rotation Phiz can be derived particularly easily. The method thus allows a simple and at the same time highly precise determination of the angle of rotation Phiz from the camera image, which is then available as a degree of freedom of the camera relative to the code arrangement. In a preferred embodiment of the invention, the basic symbol matrix is ​​determined from the camera image, wherein the position of the basic symbols in the camera image is entered in the basic symbol matrix.Thus, a location in the base symbol matrix refers to the position of the base symbol in the point grid, in particular in a coordinate system of the image recorder and / or in a coordinate system of the camera image. The first and / or the second straight line function is preferably determined on the basis of the base symbol matrix. Particularly preferably, a straight line function is used in each case which is formed by a combination of a straight line angle function of the straight line angle as the angle of intersection of the straight line with one of the axes of the coordinate system of the camera image, depending on the function argument, and an axis intersection point function. The axis intersection point function defines an axis intersection point along an axis of the coordinate system of the camera image, depending on the first function argument, wherein the axis runs through the reference point.By shifting the straight line by changing the first function argument in the coordinate system of the code arrangement, the straight line is shifted—perspectively distorted—in the coordinate system of the camera and / or the camera image in such a way that the axis intersection point moves along the axis. One straight line function or combination of the straight line angle function and the axis intersection point function is assigned to the first main direction, and the other straight line function or combination of the straight line angle function is assigned to the second main direction. The advantage of this division is that the function argument can be determined via the axis intersection point function, and the angle of rotation Phiz can then be read from the straight line angle function based on the determined function argument. R.405034 - 29 - In a preferred development of the invention, a first value for the angle of rotation Phiz is determined from the first straight line function and a second value for the angle of rotation Phiz is determined from the second straight line function, and the angle of rotation Phiz is subsequently determined as the mean of the two values. Because the angle of rotation Phiz can be determined independently from both straight line functions, two independent values ​​result, which can then be averaged to determine the angle of rotation Phiz in order to improve measurement accuracy. Alternatively, a plausibility check can be carried out and one of the two values ​​can be rejected if it is not plausible or valid. Preferably, a start field is determined within the scope of the method. The start field has at least three, preferably adjacent, basic symbols that are arranged at an angle to one another.The connecting lines between the base symbols of the start field define two independent main directions along the dot matrix in the camera image. If the start field has exactly three base symbols, these are arranged, for example, at an angle to one another. They define a coordinate system of the planar dot matrix, with one of the at least three base symbols forming the origin of the coordinate system. In a preferred embodiment of the invention, the start field has nine base symbols arranged in a square and / or rectangular shape. In particular, the start field has an edge length of three base symbols. The base symbols of the start field are valid base symbols.Valid basic symbols are understood to mean, in particular, those basic symbols which are either defined as valid within the scope of the method or classified as valid basic symbols based on image features and / or set as valid by finding the basic symbols and successfully processing the basic symbols with a usable processing result. Image structures which are not classified as valid basic symbols are interpreted as image noise and excluded from further processing. In the method, in a search step, starting from at least one valid basic symbol, further, particularly valid basic symbols are searched for along the main directions. R.405034 - 30 - In the event of a successful search, in particular if further basic symbols are found, the further basic symbols are marked as valid basic symbols. It is intended that the search step is carried out several times.If additional new base symbols are found as valid base symbols in a search step, the search step is carried out either from the base symbol of the starting field or from the newly discovered, valid base symbols. In this way, the dot matrix is ​​gradually supplemented with additional valid base symbols, starting from the starting field with valid base symbols. The search step is repeated until a sufficient number of valid base symbols have been found, in particular so that decoding can take place. Based on the valid base symbols or a selected subset thereof, in particular by decoding the valid base symbols, the rough position of at least one of the base symbols in the code arrangement is determined as two degrees of freedom of the camera relative to the code arrangement.In particular, the valid base symbols or a subset thereof are decoded, whereby at least one degree of freedom of the camera relative to the code arrangement is determined from the decoded coarse position and, optionally, the coarse orientation of the coordinate system of the point matrix in the camera image. A further consideration is that the base symbols can be searched for and found in the code arrangement and / or in the camera image, for example, using areal image processing functions. However, finding base symbols, for example, using blob analysis or pattern-based search (pattern matching), requires frequent access to the pixels of the camera image and thus leads to complex image processing.By searching exclusively in the main directions starting from the search field, which defines the two main directions of the point grid and thus the point grid, in particular the coordinate system of the point grid, in the camera image, the a priori knowledge about the structure R.405034 - 31 - of the point grid can be used, so that the search is not area-oriented, but line-oriented along the main directions. In practical terms, it is sufficient to search for another base symbol starting from a valid base symbol in the main direction along a line. It is obvious that by reducing an area search to a line search, the number of pixel accesses and / or the effort required for image processing is significantly reduced. The method according to the invention thus enables a very efficient implementation of the method.In a preferred development of the invention, the respective center point position, in particular the center of gravity position of the base symbol in the camera image, is determined for the base symbols. This allows a plurality of intersection points in the dot matrix to be determined based on the valid base symbols. Provision is made for the search step to be carried out starting from the center point position of the respective valid base symbol, in particular a line-oriented search in a predetermined search direction, specifically along one of the main directions. While finding a base symbol initially only allows an approximate determination of the position of the base symbol in the dot matrix and / or camera image, detecting the center point position allows the exact position in the dot matrix and / or camera image to be determined, thus specifying the dot matrix.It is advantageous that the particularly line-oriented search step is carried out from the center position of the base symbol, as this prevents inadvertently missing neighboring base symbols. In a preferred development of the invention, two connection vectors are determined in the two independent main directions along the point grid in the camera image based on the starting field and / or on other valid base symbols. By determining the connection vectors, the position of the nearest and / or neighboring base symbol being sought can be estimated by extrapolation based on the known valid base symbol within the framework of a linear combination of the connection vectors. R.405034 - 32 - Particularly preferably, the determination of the center point position of a base symbol is carried out in such a way that a starting point in the base symbols is shifted over several intermediate steps to a center point position along the main directions, until the position in which the center point position is centrally located in the base symbol in the main directions is found as the center point position. Because the starting position is shifted to the center point position in such a way that it is always centrally located in the main directions, it is only necessary to search for the boundary of the base symbol in the main directions for each shifting step and subsequently shift the starting position to the center point between the boundaries.In the example of a circular base symbol, starting from an initial position within the base symbol, the boundary of the base symbol is searched for by a linear search in a first main direction of the camera image. Subsequently, the boundary of the base symbol is searched for in the negative first main direction. Averaging the boundaries leads to a more precise position estimate. This step is repeated analogously for the second main direction, and then again for the first main direction. In this way, the shift from the initial position to the center position is carried out computationally efficiently through a sequence of line evaluations along the main directions. In a subsequent step, the area of ​​the base symbols in the camera image is determined, whereby the area forms a datum for the coding of the code arrangement. In particular, the area is used to classify the base symbol.The datum can, for example, be a 0 or a 1 in the binary system, with the base symbols being, for example, circular areas of different sizes. If the respective center point position and, due to the shift steps, the extent of the base symbol in the main directions are known, these values ​​can be used to easily determine the area of ​​the base symbol. This way, the center point position in the point matrix is ​​first determined, and then the area of ​​the base symbol is determined in a very computationally efficient manner. R.405034 - 33 - The area of ​​the base symbol in the camera image is strongly influenced by perspective distortion. For example, the area decreases with increasing distance of the camera from the base symbol and with increasing tilt angle of the camera (elliptical distortion).These influences can lead to incorrect classification, for example, if similar basic symbols appear in a camera image with greatly different distances from the camera. Therefore, the normalized area of ​​the basic symbol is preferably used to classify the basic symbol. To calculate the normalized area, a reference surface is determined that is subject to approximately the same perspective distortions as the basic symbol. A parallelogram is used as the reference surface, which is spanned by the two vectors from the grid position of the basic symbol to the neighboring grid positions in the direction of the main axis. The reference area is the absolute value of the cross product of both vectors. The normalized area of ​​the basic symbol is calculated as the quotient of the area of ​​the basic symbol and the reference area.In a preferred embodiment of the invention, a reading field is defined in the camera image and / or in the planar dot matrix, and a corresponding two-dimensional base symbol matrix, in particular a dot matrix, is formed, wherein each point in the reading field is assigned an entry in the base symbol matrix, and wherein the position and area and / or the datum of the base symbols are entered in the base symbol matrix. From the data in the base symbol matrix, the rough position and, optionally, additionally, the orientation of the coordinate system of the dot matrix can be decoded, and / or the rough position of at least one base symbol in the code arrangement can be determined as the two degrees of freedom. In a preferred development of the invention, at least one start position is defined in a preliminary step for creating the start field. The start position is defined arbitrarily.The starting position is preferably arranged near or adjacent to the reference point. In the event that the starting position happens to be within a base symbol, the starting position is taken as the initial position for a starting base symbol. In the event that the starting position lies outside a base symbol, a neighboring base symbol is searched for as the starting base symbol along search rays starting from the starting position. Thus, no computationally intensive area-oriented image processing takes place in the preliminary step; rather, a base symbol is searched for only along the search rays starting from the starting position. The boundary of the base symbol can be detected, for example, by a change in contrast along the search direction in the camera image.It is possible for the method to use at least or exactly 8 or 16 search beams, which begin in the start position and are arranged in regular angular steps over 360°. A minimum radius can be defined for the search beams, from which radius a further base symbol is searched for. Optionally, a maximum search radius can be specified; if the maximum search radius is reached without finding a neighboring base symbol, the start position is discarded and an alternative start position is selected. In a subsequent step, starting from the position of the start base symbol, a neighboring base symbol is searched for as the first auxiliary start base symbol along further search beams. The search from the first auxiliary start base symbol can be carried out with the same distribution of search beams as previously described.In a subsequent step, starting from the starting base symbol and the first auxiliary starting base symbol, a second auxiliary starting base symbol is searched for in a direction that is angled to the connection (and / or along a first main direction) between the starting base symbol and the first auxiliary starting base symbol. However, fewer search beams can be used than before, which are distributed over a smaller angular range, so that the search is accelerated. This exploits the fact that the first three base symbols should be arranged at an angle to one another, so that there is a priori knowledge of the direction in which the second auxiliary starting base symbol is being searched for. For example, only one, two, or three to six search beams are used, which are distributed around a main search direction that is oriented perpendicular to the connection between the starting base symbol and the first auxiliary starting base symbol. R.405034 - 35 - To complete the process, starting from the starting base symbol, all base symbols of the starting base symbol, in particular those immediately adjacent to it in the main axis direction or diagonal direction of the point grid, are searched for based on the connection between the starting base symbol and the first auxiliary starting base symbol and the connection between the starting base symbol and the second auxiliary starting base symbol by linear combination of the connections. In particular, the connection vectors and / or main directions can be derived from the first three found base symbols. These form a two-dimensional coordinate system of the point grid. To improve the process, the center point positions can be determined in order to define the connection vectors as precisely as possible. The result is a starting field with 3 x 3 valid base symbols.In the search step, neighboring base symbols are searched for, starting from the starting field and / or from the other valid base symbols found in an earlier search step. The method preferentially searches for base symbols at raster points that have at least two valid neighbors in the main or diagonal directions. All neighbors of a raster point provide independent position estimates through extrapolation, which, when averaged, lead to a more accurate position estimate of the raster point. The requirement that only raster points and / or those with at least two valid base symbols as neighbors are searched for also promotes a planar expansion of the detected area and avoids linear expansion in the form of lances, dendrites, or spikes. Planar expansion is more robust and more tolerant to disturbances in the image than linear expansion.Based on the valid basic symbols, the basic symbol matrix, in particular of the reading field, is determined. In particular, the method can provide that a camera image is first captured by the camera, then at least one degree of freedom of the camera relative to the code arrangement is determined, and then, for example, an actuator of the automation arrangement is controlled. For example, the at least one degree of freedom can be output on an optical output device, such as a display. The R.405034 - 36 - at least one degree of freedom can be used for position control and / or regulation of the actuator of the automation arrangement by using it as the actual value.A robot with the sensor unit of the automation arrangement can, for example, determine its absolute position relative to the code arrangement and output this as actual information or move to a predefinable further position, wherein the robot continues to orient itself to the code arrangement with regard to its actual position. A further subject matter of the invention relates to a control unit and / or an automation arrangement with the control unit, which is designed to carry out the method as described above. Optionally, the control unit comprises the camera and / or is connected to it via data technology. A further subject matter of the invention relates to a computer program which is designed to carry out the method described above when the computer program is executed on a digital data processing device and / or on the control unit.A further subject matter of the invention relates to a machine-readable storage medium with the computer program. Further features, advantages, and effects of the invention will become apparent from the following description of preferred exemplary embodiments and the accompanying figures. These show: Fig. 1 a flowchart of the overall method with an exemplary embodiment of the method according to the invention; Fig. 2 a schematic representation of the optical model in 3D; Fig. 3 a schematic representation of the optical model in 2D; Fig. 4 a schematic representation of the optical model in 2D; Figs. 5, 6, 7 a schematic illustration of the coordinate systems; Fig. 8 a schematic illustration of the coordinate system for the imaging model; Fig. 9 the imaging model in Fig. 8 with a tilted code plane; Fig. 10 an illustration of the code arrangement; Fig. 11 a further illustration of the code arrangement; R.405034 - 37 - Fig.12 a dot matrix of a code arrangement with two exemplary reading fields drawn in; Fig. 13 different angular positions of the reading field; Fig. 14 an example of a reading field; Fig. 15 an exemplary structure of a parcel in the code arrangement; Fig. 16 further exemplary structures of a parcel in the code arrangement; Fig. 17 flowchart of a validity check; Fig. 18 details of the validity check; Fig. 19 an example of a camera image with an identified starting base and the reading field; Fig. 20 an example of a base symbol matrix with entered datum of the area; Fig. 21 a flowchart for determining the starting base; Fig. 22 several predefined starting positions in the image field of the camera; Fig. 23 illustration of the method for determining the starting base; Fig. 24 illustration of the method for determining the starting base; Fig. 25 flowchart of the function Center_Pos; Fig. 26 illustration of the function Center_Pos; Fig.27a,b Illustration of the Nearest_dot function; Fig.28 Flowchart of the process for detecting all dots / basic symbols in the reading field; Fig.29 ad Illustration of the process for detecting all dots / basic symbols in the reading field; Fig.30 Illustration of the detection of basic symbols in a distorted grid; Fig.31 Illustration of the rectification; Fig.32 Flowchart for classifying the basic symbols; Fig.33 Flowchart for determining the coarse position; Fig.34a,b Basic symbol matrix with entered date and with reading traces; Fig.35 Illustration of the decoding of the coarse position; R.405034 - 38 - Fig.36 Illustration of the best-fit line for the straight line function; Fig.37 Illustration of the straight line angle; Fig. 38a-c Illustration of the best-fit line and the straight line function; Fig. 39 Illustration of the determination of the fine position and the rotation angle phiz (Z-rotation angle); Fig. 40 Flowchart for determining the camera distance and the pitch angle.A method is disclosed as an implementation of an algorithm for precisely determining the absolute 6D position of a camera 1 with respect to a planar code array 2 recorded by the camera 1, wherein the algorithm receives a camera image 3 as input information. The code array 2 serves simultaneously as an analog and digital scale in two dimensions, X and Y. It consists of symbols arranged in a regular grid. Preferably, it is a binary code with two symbols arranged in a square grid: a small round dot for a digital 0 and a large dot for a 1. The dot type contains the digital information, while the dot center contains the analog information. The camera 1 captures a section of the code array 2 and transmits the camera image 3 to a computer or any data processing device.The algorithm selects a reading field in the camera image 3 with the minimum size of a code cell (e.g., 7 x 7 dots) and uses this to calculate the position of the camera 1 with respect to the code arrangement 2 in six dimensions. To do so, the method uses both the digitally coded position information and the precisely measured center positions of all dots in the measurement field or reading field. These form a grid that is distorted by the camera perspective and the lens distortion. R.405034 - 39 - The position detection method comprises the following steps (see Fig. 1): Step 100: Reading the camera image 3 into the computer's RAM. Step 200: Optional: Initial image quality check based on key data such as brightness and contrast.Step 300: XY coarse position evaluation and optionally z coarse angle evaluation Step 310: Search for a launch pad of 3x3 dots in the reading field Step 320: Detection of the dots in a reading field in the camera image Step 330: Precise measurement of the center point position and area of ​​the dots Step 340: Optional: Mathematical correction of the lens distortion by rectifying the dot positions. This converts the curved lines of the dot raster in camera image 3 into straight lines Step 350: Area-based classification of the dots, assignment to the binary digits 0 and 1 Step 360: Reading the digital code in the X and Y axes, determination of the absolute coarse position in X, Y and optionally ^. ^-Direction as coarse z-angle evaluation. Step 400: Distortion evaluation. Step 410: Adaptation of a best-fit line (beam) to each row and each column of the dot raster of the reading field. Step 420: Adaptation of a best-fit function to a first bunch of lines by interpolating all lines in the rows and a second best-fit function by interpolating all lines in the columns of the code raster. Each bunch of lines is completely described by 6 interpolation parameters (bunch data). Using the interpolation function, interpolated lines can also be calculated that lie between two measured lines. Calculation of the 6D camera position from key values ​​obtained from the measured dot positions, which describe the distorted raster in the camera image.The equations for calculating the position result from an inverse optical imaging model of camera 1 and the laws of geometric optics: Step 500: XY fine position evaluation: The position in the X and Y directions is calculated from the XY coarse position and the position of the grid in relation to the position of the optical axis (image center). R.405034 - 40 - Step 600: Z angle evaluation from the angle of the (interpolated) straight line in the image center Step 700: Z position and XY angle evaluation Step 710: Derivation of interpolated characteristic values ​​from the bunch data which describe the perspectively distorted grid in the image center: - Grid dimension of the straight lines of both straight line bundles - Angular divergence of the straight lines of both straight line bundles The camera position in Z direction is mainly determined from the grid dimension of the straight line in the image center The camera angles ^. ^ and ^ ^are determined mainly from the angular divergence of the two straight line bundles at the image center. An iterative algorithm numerically solves the system of equations with which the quantities Z, ^ ^ and ^ ^are linked. Step 800: Output of the 6D position information and the optional validity information, which results from the results of numerous diagnostic functions in the process. With minimal computational effort, the algorithm concentrates the camera image data on a few pieces of data relevant for position determination, increasing accuracy through interpolation and being robust in the face of camera image disturbances. The following run positions are of particular importance (numerical values ​​as an example): Run position I: input data camera image (e.g. 200x200 pixels) 40,000 values ​​Run position II (step 300): converts the camera image data into dot data 2,250 values ​​Run position III (step 400 / 500): converts the dot data into beam data 90 values ​​Run position IV (step 400 / 500): converts the beam data into bunch data 12 values ​​Run position V (step 500 / 600 / 700): converts the bunch data into a 6D position R.405034 - 41 - 6 Values ​​The process positions II - V have the following special features. Process position II: a) Fast location of the dots in camera image 3 by mathematical modeling of the perspectively distorted code grid in code arrangement 2. The method is based on the previously measured dot positions. Advantages: Fast location of the dots, the time-consuming search in the pixel grid is eliminated. Robust against disturbances in the camera image: Dots are classified as "invalid" if they are not found at the expected position. Invalid dots are not processed further, but generally do not hinder the further process. b) Stack-based algorithm for the fast and robust search for dots in the code grid of code arrangement 2. Advantage: Fault-tolerant, as the search process does not abort at faulty dots, but encloses them on all sides.Precise (high yield of found dots per reading field) and robust (through prioritized detection of dots with many valid neighbors) c) Center_Pos function: fast method for subpixel-accurate position and area determination of dots in the camera image. Advantage: fast (few pixel accesses), accurate (through subpixeling), robust (use of dynamic contrast thresholds instead of gray value thresholds) d) Rectification of the dot positions instead of the entire camera image. Advantage: fast (rectification of only 225 positions instead of all 40,000 pixels in the camera image) e) Local normalization of the dot area to the area of ​​the dot raster cell. The normalized dot area is used to classify the dots. Advantage: robust reading of the digital code (dot classification is tolerant to perspective distortion and to changes in the distance between the camera and the dot) f) Redundant reading of the digital codes, error detection and, in some cases,Error correction Advantage: Low error rate due to disturbances in the camera image, correct reading despite invalid dots. Process positions III and IV: R.405034 - 42 - g) Compressed and precise representation of the dot positions extracted from camera image 3 as bunch parameters (only 12 values). Advantage: Fast (due to small data volume), precise (through averaging and best-fit interpolation in two stages: dots to best-fit lines and best-fit lines to bundles of lines), error-tolerant and robust (through exclusion of invalid dots from further processing). Process position V: h) Mathematical method for transforming the 12 bunch parameters into a 6D position. The advantages are some or all of the following improvements: ^ Full 6D position measurement, absolute position information ^ Simultaneous recording of all dimensions with one measurement process (in one camera image). ^ High position measurement rate and low latency.The process requires only a small number of computer calculation steps. With an embedded computer, typical measurement rates of around 100 Hz – 10,000 Hz are achieved, meaning the sensor can also be used in a closed position control loop, for example. The process achieves high reading speed by minimizing the number of accesses to camera pixels. No time-consuming, area-wide camera image operations are performed. Furthermore, the amount of data is significantly reduced with each processing step. ^ High reading reliability through redundant reading of the point code. Position detection is also possible in the event of disturbances in the camera's field of view, such as local occlusions, invalid dots, or under unfavorable lighting conditions. A validity check of the processing steps detects faulty states and prevents the output of unreliable position values.^ High accuracy of position measurement in all degrees of freedom. This is achieved through various measures such as oAveraging over numerous dots per camera image 3, for example more than 100 or 1000 R.405034 - 43 - oClassification of dots according to validity, exclusion of invalid dots from further processing oSubpixel-accurate position determination of the edges of the dots oUse of contrast thresholds instead of gray value thresholds, thus high robustness against local changes in image brightness oRound dots, therefore hardly any center error when tilting or rotating the code plane ^ Unlimited measurement range in ^. ^ ^ Virtually unlimited measuring range in X and Y. For example, using a code with a code cell of 9 x 9 dots and a dot pitch of 2.5 mm, a measuring range of 550,000 km x 550,000 km is achieved. ^ Large angular measuring range ^ ^ , ^ ^of approximately + / - 50°, with high accuracy. Extension to 360° through spatially distributed code arrangements on the object. ^ An inverse imaging model based on geometric optics is used to calculate the camera position from the camera image data. ^ The method does not require active illumination, so that camera images taken in ambient light, for example with a smartphone, can be processed. ^ Minimal error rate. The method determines the validity of a position measurement by checking each processing step for errors and plausibility using various diagnostic methods. The validity is output together with the position measurement. The aim is to only output valid measurement values ​​for further processing. Further advantages are: ^ A single measuring sensor, in particular designed as camera 1, records the position of one or more objects in six dimensions.Compared to a system with many distributed sensors for detecting individual degrees of freedom, the installation effort and complexity of the overall system are reduced, which leads to cost advantages. ^ Saving on system components by detecting all 6 degrees of freedom. For example, a rotary angle encoder usually requires a pivot bearing for the measuring axis so that lateral position deviations of the code disk do not lead to measurement errors. With the proposed method, the mechanical R.405034 - 44 - guide can be omitted, since the full 6D position information of the code disk is detected simultaneously as a code arrangement. A lateral position deviation of the sensor does not lead to an error in the angle measurement. This reduces the costs and mechanical complexity of the position measuring system. ^ A positioning system can be implemented in which the distribution of the position sensors across multiple axes is structurally impossible.For example, a levitating planar robot can be realized that can be positioned in six dimensions without a structural connection between the robot and the stator underneath. ^ The simultaneous recording of several dimensions reduces measurement errors that can arise in distributed sensor systems due to different measurement times. ^ The cost of the sensor is largely independent of the number of degrees of freedom recorded. Therefore, it can also be used advantageously in applications that require fewer than 6 degrees of freedom. The additional information provided enables additional functions, such as self-diagnosis of systems or permanent observation of the operating state (“condition monitoring”). ^ The method is scalable, e.g. by varying the grid dimension of the code arrangement and adapting the imaging optics to the code arrangement.The resolution can vary over many orders of magnitude, for example from the nanometer range (application example: nanometer positioning system) to the m-range (application example: automated landing of an aircraft or drone at an airfield, where the airfield is marked with a code arrangement). ^ The ratio of resolution to measuring range can span many orders of magnitude. For example, if a position measuring system with 10nm resolution is combined with a 10m long code arrangement, the ratio of resolution to measuring range is 1:109. ^ A sensor using this method has a high level of application flexibility because it is easy to install and can be configured for specific applications through parameterization. This is particularly advantageous when operating conditions change frequently. ^ The method can read additional information contained in the position code.For example, object identification data can be read in addition to the position. R.405034 - 45 - ^ With cyclic image acquisition, the method provides an independent position estimate for each individual image; it is not dependent on prior information from previous images. Therefore, the measuring rate corresponds to the frame rate. The method enables the localization of the at least one camera 1 in relation to at least one object 8 in six degrees of freedom, with at least one code arrangement applied to the surface of each object 8. A camera 1 captures the code arrangements 2 on the objects 8 and displays them completely or in sections in the camera image 3. Using the proposed method and other conventional mathematical / technical methods, the 6D position of the objects 8 is calculated from the camera image 3. The code arrangement 2 forms a two-dimensional, digitally coded scale.It contains several different symbols, preferably circular symbols (dots), which are arranged in a regular, preferably square grid and enable position determination in 6 degrees of freedom. The camera 1 comprises at least ^ one imaging sensor element, usually a camera chip, in particular the image sensor 12. ^ An imaging system which images the scale sharply and with high contrast onto the sensor element, in particular the lens 9. The imaging system comprises in particular a wide-angle lens as lens 9, since a central perspective image is required to determine all six degrees of freedom. ^ An interface for outputting the camera image data and / or the camera image 3. Optionally, the camera system of the camera 1 ^ comprises an illumination system, in particular for illuminating the code arrangements. This makes the camera 1 more independent of the lighting conditions in the environment.In flash mode, short measurement times are possible so that even fast-moving objects can be detected. Light-emitting diodes, for example, are used as light sources. ^ Means for shielding from extraneous light, e.g. an aperture or optical filter. A spectral filter can be present in the beam path of the imaging system so that only light from a limited wavelength range reaches the sensor element. R.405034 - 46 - Ideally, single-color light sources with the same wavelength characteristics as the color filter are used. In addition, a computer system as a digital data processing device for information processing, e.g. designed as a control unit, is required. It receives the digitized camera image data of camera image 3 as input information, and at the output it provides the determined 6D positions of the identified objects and, optionally, an evaluation of the validity of the position measurement values.The method is implemented as an algorithm in the computer system. The algorithm is executed either on external request or cyclically, for example, in a fixed time grid to record the movement paths of objects (tracking). The computer system can be implemented, for example, as an embedded system, parallel computer, GPU, FPGA, ASIC, or cloud system. A smartphone can also be used as the overall system for position detection, with the integrated camera 1, possibly with active lighting, being used to capture images. The method can be implemented in a smartphone application and executed embedded in the smartphone or in the cloud. Figure 2 shows a typical arrangement for determining the absolute position in 6 degrees of freedom. The camera 1 records the camera image 3 of a planar code arrangement 2.From the perspectively distorted camera image 3, the method according to the invention calculates the 6D position of the camera in the coordinate system of the code arrangement 2 and outputs it as a position vector (^. ^ , ^ ^ , ^ ^ ) and angle vector (^ ^ , The coordinates ^ ^ and ^ ^ are specified in the rectangular coordinate system (XC, YC) of the code arrangement 2. They indicate the intersection point 4 of the optical axis 5 of the camera 1 with the plane in which the code arrangement lies. Since the optical axis 5 is perpendicular to the plane of the image sensor 12, it can be designated by a point 7 in the camera image 3. R.405034 - 47 - The method determines the intersection point (X,Y) even if the code arrangement 2 is only shown at the edge of the image field and not at the location of the optical axis 5. The distance ^ ^lies on the optical axis 5 and extends from the intersection point 4 to the optical center of the lens of the camera 1. Since the optical axis 5 is not always perpendicular to the code arrangement 2, ^ ^ with (X C , Y C ) is generally a non-orthogonal coordinate system. Using the angle vector, the position vector (^ ^ , ^ ^ , ^ ^) into a rectangular coordinate system. Using this method, several simultaneously recorded objects 8 can be localized in the camera's field of view, even if they partially overlap. In order to read the position, at least an area the size of a code parcel (e.g. 7x7 dots) must be recognizable in the camera image 3. Fig. 3 and 4 show a schematic of the beam path of the camera 1. Figure 3 shows the camera 1 with a lens 9 and an image sensor 12, with the line of sight directed downwards onto the code plane of the code arrangement 2. The optical axis 5 is shown as a dash-dotted vertical line, the focal points of the lens 9 as points 10, 11. A vector arrow G on the code plane of the code arrangement 2 is projected onto the image sensor 12 as a vector arrow B according to the laws of ray optics.A visual ray 14 intersects the optical axis 5 at a point, which is referred to here as the optical center 13 of the objective 9. Figure 4 shows the complete ray path, with the objective 9 simplified to a lens. Ray optics with the ray theorem and the lens equation forms the basis for the mathematical method for determining position. The following applies: B / G = b / g and 1 / f = 1 / b + 1 / g with: B image size b image distance R.405034 - 48 - G object size g object distance f focal length Figures 5, 6, 7 illustrate the coordinate systems involved: The two-dimensional coordinate system 15 of the image sensor 12 is defined by the axes (X. I , Y I) of the camera chip. A position on the image sensor 12 is specified in image points [pixels], with the pixel rows and columns of the camera chip being consecutively numbered. In this example, an image sensor 12 with 200 x 200 pixels is assumed. The numbering results in an integer X and Y position value for each pixel. Due to subpixeling, a method for interpolating gray values ​​between neighboring pixels, real numbers can also appear as the camera position during the evaluation. To convert the unit of the position from [pixels] to [m], the position is multiplied by the distance between neighboring pixels ^ ^^^^ on the camera chip in the unit [m / pixel]. The pixel pitch ^ ^^^^is a property of the image sensor 12. Each pixel provides an integer gray value. The coordinate system 16 of the code arrangement 2 (XC, YC) is spanned by the main axes of the code arrangement 2, which correspond to the square grid of dots. It is extended by a third axis ZC to a three-dimensional coordinate system, which is perpendicular to the code arrangement 2, with the code arrangement 2 arranged at ZC=0. The unit is either [dots], i.e. the consecutive numbering of the dot rows and columns, or [m] – after multiplication by the dot grid spacing ^ ^^^^ in [m / Dot]. Code arrangement 2 uniquely encodes the local position in the coordinate system (X C , Y CThe three-dimensional camera coordinate system (X, Y, Z) 17 is firmly connected to the camera 1. Its origin lies on the optical axis 5 between the image sensor 12 and the code arrangement 2, at a distance of twice the image width b from the image sensor 12. The optical axis 5 forms the Z-axis, and the camera 1 faces in the direction of -ZR405034 - 49 - The coordinate system for the imaging model in Fig. 8 corresponds to the camera coordinate system 17 (X, Y, Z). Here, b is the image distance of camera 1. The image plane is located at the height (0, 0, 2b) and is parallel to the X / Y plane of the camera coordinate system 17. As a model, another "virtual" image plane 18 can be constructed in the (X,Y) plane of the coordinate system 17, with the virtual image being mirrored point-symmetrically relative to the real image on the image sensor 12 with respect to the image center. The code plane of code arrangement 2 is located at the height (0, 0, z0) with (z0<0).With the camera orientation (0°, 0°, 0°) the code plane is parallel to the X / Y plane of the camera coordinate system 17 and the axes (X. C , Y C ) of the coordinate system 16 of the code arrangement 2 point in the same direction as the axes (X I , Y I ) of the coordinate system 15 of the image sensor 12. The method determines the 6D position of the camera ^ in translation: (^ ^ , ^ ^ , ^ ^ ) and ^ in rotation: (^ ^ , ^ ^ , ^ ^ ). The center of rotation, to which the tilt and rotation angles phix and phy of camera 1 refer, lies at the point (0, 0, z0). The roll angle phiz is measured around the optical axis 5. Fig. 9 shows the imaging model with a tilted code plane of code arrangement 2. The value ^ ^ is the distance between the rotation center (0, 0, z0) and the optical center (0, 0, b) of the lens, so that: ^ ^ = ^ − ^ ^Based on the ray theorem and geometric optics, the mapping of a point (x0, y0) in the code plane to a point (BX, BY) in the image plane can be mathematically described as a mapping equation in the camera coordinate system 17: ^ Optical center 13 of the lens 9: R.405034 - 50 - ^ Two-dimensional coordinates of dots or points in the plane of the code arrangement in coordinate system 16 of the code arrangement 2 m it ^ ^ ^ = (^ ^ , ^ ^ )the centroid of a selected base symbol and i, j integers ^ Spatial coordinates of dots or points in the camera coordinate system 17: with the rotation matrix for vectors in three-dimensional space: Image point in the virtual image plane in the camera coordinate system 17: ^ Intersection of the visual ray with the virtual image plane 18: R.405034 - 51 - b^ ^ Virtual image of the point or dot: ^ For the real image, the negative sign must be omitted: For the intersection point 4 with the index (i=0; j=0) one obtains the image coordinates in the real image: 2.4.3 Code Arrangement The method requires a surface-coded scale in the code arrangement 2, a partial area of ​​which is read using an imaging sensor, for example, the camera 1, so that the position of the sensor and / or the camera 1 with respect to the scale in up to six spatial directions can be determined from the image information. Further details on the code arrangement 2 can be found in the applicant's publication DE 102016216221 A1, the content of which is incorporated into the present disclosure via referencing, particularly with regard to the design of the code arrangement as well as the decoding and variants. The coded scale is designed as a sensor-readable marking, applied as a code arrangement 2 to a surface that extends essentially in two dimensions, but may also have curvatures.For the sake of clarity, it is assumed below that the coded scale is printed as an optically readable pattern on a flat surface, without limiting the application of other marking and sensor principles and curved surfaces. The coded scale of code arrangement 2 is formed by arranging different base symbols in a regular grid. The base symbols carry two pieces of information: their shape encodes digital information, and their centroid marks a specific position on the surface. In a simple case, the digital information is encoded in a binary number system with base b=2. In this case, only two base symbols 20 are used, e.g., a small and a large circle, which symbolize the values ​​"0" and "1." Their centroid (center of the circle) marks a grid point on the surface.The centroids of the base symbols 20 form a periodic two-dimensional pattern on the scale plane of the code arrangement 2, for example in a square grid as in Fig. 10 with the same base spacing ^. ^^^^neighboring symbols in the X and Y directions. By dividing the plane into equally sized, area-filling parcels 19, the basic symbols within a parcel 19 are combined to form a logical unit. Square parcels 19 are preferably used. Fig. 10 shows a dot matrix with square parcels 19, each of which can accommodate 7 x 7 binary symbols, which corresponds to a maximum information content of 49 bits. The lines and squares drawn in Figure 10 are for illustrative purposes only and are not shown in the actual code arrangement 2. Fig. 11 shows an exemplary code arrangement 2 without lines with the basic symbols 20 in the parcels 19. The regular arrangement of the basic symbols 20 is overlaid by a regular arrangement of parcel symbols 21, with each parcel 19 being marked in the same way with a parcel symbol 21.The parcel symbol 21 can be represented, for example, by omitting a base symbol 20. In Fig. 10, 11, the parcel symbol 21 consists of a blank space in the dot matrix located in the center of each parcel 19. The parcel symbol 21 allows the position of the parcel 19 to be identified, thereby allowing the base symbols 20 to be read out in the correct order along a reading track. Since the parcel symbol 21 occupies a raster location, the information content of a parcel 19 is reduced to 48 bits in this example. R.405034 - 53 - A reading field 22 is a field on the coded scale of the code arrangement 2 that is at least the size of a parcel 19. It is bound to the dot matrix, but not to the grid of the parcels 19. Fig. 12 shows a dot matrix of a code arrangement 2 with two exemplary reading fields 22.The position of reading field 2 in the coordinate system of the point grid is defined by its center position 23. It can be set in integer steps of the base distance ^. ^^^^vary. In addition, the reading field 22 has an angular position with respect to the coordinate system of the dot matrix, which can vary in steps of 90° for a square matrix. In Fig. 12, the angular position is visualized by marking a corner of the reading field. The possible angular positions are shown in Fig. 13. The reading fields 22 shown as examples in Fig. 12 are clearly described by the following information: ^ Reading field 22, left: Position = (4,11); Angular position = 0° ^ Reading field 22, right: Position = (12,6); Angular position = 90° The code of the code arrangement 2 is constructed such that the basic symbols 20 in a reading field 22 contain sufficient information to digitally encode the location (X,Y) and the direction of the reading field 22 in the coordinate system 16 of the code arrangement 2. X and Y are integer multiples of the basic distance ^ ^^^^ (coarse position). The fine position in fractions of the base distance ^ ^^^^as well as the exact angle in fractions of 90° is not digitally encoded; it is determined by precisely determining the location of the base symbols 20 in the camera coordinate system 17. Fig. 14 shows an example of a reading field 22 with 15x15 spaces for base symbols 20. It provides more information than the minimum required reading field 22 for the size of a parcel 19, here 7x7 symbols. The redundant information is used for error detection and / or error correction. Fig. 15 shows an example of the structure of a parcel 19 with 7x7 grid points. In the center of the parcel 19 is the parcel symbol 21. The two fields 24 mark the X-parcel areas in which the continuous code for the position R.405034 - 54 - is displayed in the X-direction. The X-parcel areas comprise 24 grid points; accordingly, they represent a code with a length of 24 bits.To read the code, the basic symbols 20 are read column by column from left to right and within each column from top to bottom. The reading order in the X-plot areas 24 (reading track) is specified in grid point coordinates (X. C ,Y C): (0.6); (0.5); (0.4); (1.6); (1.5); (1.4); (2.6); (2.5); (2.4); (3.6); (3.5); (3.4); (3.2); (3.1); (3.0); (4.2); (4.1); (4.0); (5.2); (5.1); (5.0); (6.2); (6.1); (6.0). The two fields 25 mark the Y-plot areas in which the consecutive code for the position in the Y-direction is displayed. The reading order corresponds to that of the X-plot areas 24, but is rotated 90° counterclockwise. The reading track therefore runs line by line from bottom to top and within each line from left to right. The code from the X-plot areas 24 (X-code) is a subsequence with a length of t=24 digits from a total sequence of g digits, where g is much larger than t. The number g is sufficiently large so that the X-plot areas 24 of all adjacent plots 19 in the X direction can be completely filled. In particular, g is greater than fifty, in particular greater than one thousand, and especially greater than one million.The contents of the X-parcel areas 24 of parcels adjacent in the Y-direction are identical. The overall sequence is designed such that each subsequence of t consecutive basic symbols 20, read forward, is contained exactly once in the overall sequence, and each subsequence read backward is not contained in the overall sequence read forward. The code from the Y-parcel areas 25 (Y-code) is represented inverted, i.e., each digit z is replaced by the digit (b-1-z). For the binary system with b=2, this corresponds to a bit-wise inversion. The inverted Y-code is a subsequence with a length of t=24 bits from an overall sequence, whereby the same overall sequence can be used as for the X-code. The inverted Y-code also occurs only once in the overall sequence and, read backward, does not appear in the overall sequence. The contents of the Y-parcel areas 25 of parcels 19 adjacent in the X-direction are identical. R.405034 - 55 - The overall sequence is designed such that a checksum of a partial sequence is less than half the maximum possible checksum of a partial sequence. In particular, the checksum for any partial sequence selected from the overall sequence is less than half the maximum possible checksum of a partial sequence. For example, the checksum of each partial sequence with length t for a number system with base b is less than q = t·(b – 1) / 2. The partial sequences of the overall sequence encode a coordinate value, for example the X coordinates of the starting position of the reading process. Likewise, a partial sequence of the inverted overall sequence encodes a Y coordinate, for example the position from which the partial sequence is read. The X code read in a plot 19 and the Y code are assigned to the X and Y coordinates of a reference point in the plot 19, for example the center of the reading field.Each reading field 22 contains exactly one parcel symbol 21, t basic symbols from X-parcel areas 24 and t basic symbols from Y-parcel areas 25. From the position of the parcel symbol 21, the position of the parcel grid and thus the position of the X and Y-parcel areas 24, 25 in the reading field 22 as well as the associated reading sequence can be derived. The basic symbols 20 read according to the reading sequence result in a digit sequence with t positions, which - if necessary after inversion - is a partial sequence of the overall sequence. If the orientation of a reading field 22 is unknown, it is initially not known which of the two axes is the X-axis and which is the Y-axis. This is determined by calculating the cross sum of the read code and comparing it with q: the cross sum of an X-code is less than q, the cross sum of a Y-code is greater than q.The direction of the coordinate axes of the reading field 22 relative to the coordinate axes of the code arrangement 2 is uniquely derived from the direction of the read codes relative to the overall sequence (forward or backward). In this way, the position and orientation of a reading field 22 in the coordinate system 16 of the code arrangement 2 can be determined, the position in integer steps of the grid width and the orientation in integer steps of 90°. R.405034 - 56 - In Fig. 16, on the left, parcels 19 with 9 rows and 9 columns are shown. In addition to the parcel areas X and Y 24, 25, which represent the position code for the respective axis of the coordinate system 16, a parcel area for additional data 26 is provided. It comprises (5x5) grid points, with the middle grid point left out for the parcel symbol 21, so that 24 grid points remain, each of which can accommodate a base symbol 20.In this way, 24 bits of additional information can be displayed in each parcel 19, which is not required for positioning and is read in a fixed order. Fig. 16, right, shows another code arrangement 2 with additional data. Here, four parcel areas 26, each with 10 grid points, are provided for additional data, so that a total of 40 bits of additional information are available for each parcel 19. The algorithm for determining the position is shown in Fig. 1 as a sequence of data processing steps, which are explained in detail below using exemplary embodiments. Standard methods of mathematics and image processing, as well as those for diagnostics and error detection, are not explained in detail. The method is optimized in particular for high accuracy in determining the position and for rapid execution. The sequence of steps quickly reduces the data volume, which supports rapid execution.In process position I in step 100, the digital image data is transferred from camera 1 to the computer as a grayscale matrix. Step 200 is used to roughly check the validity of the image data using key values. Further image processing steps may follow, e.g., to prepare the image data or to segment it into individual code areas. These are not shown in detail here. The data volume for a 200x200 camera image 3 is 40,000 pixels, and therefore 40,000 bytes in grayscale. In the process position, the symbols (dots) contained in the image are located and entered into a dot matrix according to their arrangement in the dot code grid; this dot matrix corresponds to the size of a reading field (here: 15x15 dots). Each symbol is measured with regard to its position and area. The positions are rectified to correct lens distortions. The areas of the symbols are R.405034 - 57 - standardized to eliminate the influence of perspective distortion. The symbol type is classified based on the standardized area. This reduces the data volume to 225 dots with metadata, or 9000 bytes. To classify unoccupied raster points or incorrectly displayed symbols as such, a local model of the dot code raster in the camera image is created from the positions of the successfully identified symbols. Within the reading field, symbols are searched for at all raster points of the model. Due to local occlusions, image errors, or the image field limitation, not all symbols can always be identified. The corresponding raster positions are then classified as "invalid." In process position III, best-fit lines (beams) are adjusted to the rows and columns of valid dots in the reading field 22.Each best-fit line is described by a line angle in the image field of camera 1 and an intersection point with the X or Y axis of the image field coordinate system. Each reading field 22 provides two bundles of best-fit lines, corresponding to the two main axis directions of the code arrangement 2. In this example, each bunch of lines comprises up to 15 lines. Thus, the position data of 15 x 15 = 225 dots is reduced to the data of 15 + 15 = 30 best-fit lines. In process position IV, the lines of each bunch are interpolated by two second-degree polynomials: one polynomial describes the line angles, a second the axis intersection points of the lines in a bundle of lines. The polynomial parameters of the two bunches are represented by 12 real values, which corresponds to a reduction by a factor of 5 compared to the straight line representation.In process step V, an inverse mathematical imaging model is also used to calculate the 6D position of camera 1 from the polynomial parameters of the two straight line bundles. In addition, the validity of the position value is estimated by evaluating a large number of diagnostic results from the individual steps of the program sequence. The 6D camera position and validity are output to the higher-level system in step 800. Step 200 – Check / Validity Test of the Image Data R.405034 - 58 - Statistical key data is used to check whether an evaluable camera image 3 is present (see flow chart in Fig. 17). In this example, the image brightness ^ and the contrast C are estimated and checked for compliance with specified limit values. If the specified limit values ​​are exceeded, further evaluation is aborted and the result is classified as invalid.To save computing time, only a small number of pixels are included in the determination of the key figures, for example, the gray values ​​at the intersection points of the straight lines and circles in the intersection pattern 27 (Fig. 18). In sub-step 210, a set of pixels is selected, which are determined according to an arbitrary intersection pattern 27. The pixels at the intersection points in the intersection pattern 27 are used. Thus, Gi is a grayscale value of the pixels at positions i, i = 1...n. In sub-step 220, the image brightness ^ and the contrast C are estimated:. In sub-step 230, the image brightness ^ and the contrast C are evaluated with the following conditions: If one of the conditions is met, further evaluation is aborted and the result is classified as invalid. Acquisition of dot data / steps 310 to 350: The aim is to identify, measure and classify the dots as basic symbols 20 in a reading field 22 of specified size (here: 15 x 15 grid points). The result is a two-dimensional dot matrix 29 or generally basic symbol matrix with the dot data, whereby the indices of the matrix 29 are assigned to the rows and columns of the code arrangement 2. Characteristic values ​​are determined for each dot. R.405034 - 59 - The variable Dot.Typ contains the classification result. If Dot.Typ is positive, the dot was assessed as valid: ^ Dot.Typ = 2: large dot; logical "1" ^ Dot.Typ = 1: small dot; logical "0" ^ Dot.Typ = 0: missing dot; Parcel symbol 21 If Dot.Typ is negative, the dot could not be clearly identified.In sub-step 310, a launch pad 28 is first searched for in the image area and / or in the reading field 22 of the camera image 3 with the dot code of the code arrangement 2. This is understood here as a field of, for example, 3x3 adjacent dots of type 1 or 2. Fig. 19 shows, as an example, a camera image 3 with an identified launch pad 28 and the reading field 22, in which—starting from the launch pad 28—the dots are searched for as base symbols 20. In sub-step 320, the launch pad 28 is used to build a local model of the point grid in the vicinity of the launch pad 28. At the neighboring grid locations predicted by the model, additional dots are searched for, precisely measured if successful, and entered into the dot matrix 29 as valid dots. This process is repeated cyclically so that more and more valid dots are registered around the starting base 28 until the reading field 22 of 15x15 dots is completely covered.The search process is robust against local reading errors: if individual dots are not clearly identifiable or exceed the edge of the image field, they are marked as invalid in the dot matrix 29 and excluded from further processing. Fig. 20 shows the result of a successfully classified dot matrix 29 based on the camera image 3 in Figure 19. In sub-step 330, the center positions and areas of the dots are measured. Sub-step 340 converts the measured positions of all valid dot positions in the reading field 22 into rectified coordinates. This step serves to compensate for the distortion errors of the wide-angle lens (barrel distortion). After rectification, points that lie on a straight line in the code coordinate system 16 also lie on a straight line in the rectified image in the coordinate system of the image sensor 15.Instead of computer-assisted rectification, optical rectification with a corresponding lens 9 can also be carried out, so that sub-step 340 is optional. Based on the measured data, the dots are classified in sub-step 350. Then, in sub-step 360, the digital code is read in both spatial directions and, with the help of the code table, converted into an integer position specification and a rough direction specification in 90° steps. The determination of the rough position in the upper step 300 is thus completed. Sub-step 310 - Determination of the starting base The process for determining the starting base 28 is shown in the flow chart Fig. 21. Sub-step 310.1: First, a starting position 30 is defined for searching for the first dot of the starting base 28. Fig. 22 shows several predefined starting positions 30 in the image field of camera 1. The search begins at one of these starting positions. If the process fails (e.g.due to a disturbance in the image field), a second search is started at the second starting position, and so on, until sub-step 310.1 can be successfully completed. If all starting positions have been used and no search was successful, sub-step 310.1 is aborted with a negative result. Sub-step 310.2: Starting from the starting position ^. ^ ^^^^^ / 30 the nearest dot is searched. In Fig. 23 a dot is found at position ^ ^ ^ as the starting base symbol. Substep 310.3: Then, starting from ^ ^ ^ the nearest dot is searched and with ^ ^ ^ referred to as the first auxiliary starting base symbol. Substep 310.4: After that, a connection vector ^ ^ ^ = ^^ ^ ^ − ^ ^ ^ ^ formed. Substep 310.5: Starting from ^ ^ ^ the nearest dot in the orthogonal direction to the connection vector ^ ^ ^= − ^ ^ ^ ^ searched and with ^ ^ ^ referred to as the second auxiliary start base symbol. R.405034 - 61 - Substep 310.6: The three dots ^ ^ ^ , ^ ^ ^ and ^ ^ ^ span an oblique coordinate system with the axes ^ ^ ^ = − ^ ^ ^ ^ and ^ ^ ^ = where ^ ^ ^ is the origin of the coordinate system. Substep 310.7: If the coordinate system is left-handed (condition: × ^ ^ ^ ^ < 0), it is replaced by exchanging the axes ^ ^ ^ and ^ ^ ^ converted into a right-handed coordinate system, see Fig. 24, left. Substep 310.8: By linear combination of the vectors ^ ^ ^ and ^ ^ ^ all eight become ^ ^ ^neighboring dot positions are estimated (Fig. 24, second from left) and used as a starting field 28 for searching and measuring dots. As a result, a starting base 28 of 3x3 dots is available (Fig. 24, second from right, right). Substep 310.9: If a dot is not found during this process, it is assumed to be a parcel symbol 21 (missing dot). In substep 310.10, ^ ^ ^ shifted by one dot position in the direction opposite to the missing dot and the process is continued with the search of ^ ^ ^ and ^ ^ ^continued. In the second run, it can be assumed that all 3x3 dots will be identified, since the next parcel symbol 21 is one parcel 19 away (here: 7 dots) and the starting base is only 3x3 dots in size. Subsequently, a sub-step 310.11 can be carried out for error detection, whereby if an error is detected in a sub-step 310.12, a new starting position 30 is used and the procedure is repeated starting from sub-step 310.2. As part of the previously described process, the challenge is to identify a dot in the image field of camera 1 starting from an estimated starting position and to measure its position and area with sub-pixel accuracy. In order to achieve a short measuring time, this process must be carried out very quickly, since a total of 225 dots must be identified in a reading field 22. R.405034 - 62 - For this purpose, the Center_Pos function described below is used, which is optimized for a minimal number of pixel accesses. Fig. 25 shows the flowchart. When the Center_Pos function is called, the estimated center position of the dot ^ is calculated. ^ ^ handed over. If ^ ^ ^ is outside the search range, the search is aborted and a negative result is returned. Otherwise, the 8 steps a) – h) are executed, see also Fig.26 a - h: a) Using a gray-value-based two-dimensional gradient method, ^ ^ ^ an optimized starting point ^ ^ ^ which is closer to the center of the dot. Calculating the gradient requires only 4 pixel accesses in the vicinity of the starting point ^ ^ ^ required. b) Starting from the optimized point ^ ^ ^The edge of the dot is searched for in the +X and –X directions using edge detection methods. The distance from ^ ^ ^ to the right edge is ^0, to the left edge is ^1. c) ^ ^ ^ is centered on the X-axis with respect to the left and right edges, resulting in the optimized point ^ ^ ^ . d) Starting from point ^ ^ ^ The edge of the dot is searched for in the +Y and –Y directions using edge detection methods. The distance from ^ ^ ^ to the upper edge is ^2, to the lower edge ^3. e) ^ ^ ^ is centered on the Y-axis with respect to the top and bottom edges, resulting in the optimized point ^ ^ ^ . f)Starting from point ^ ^ ^ The edge of the dot is again searched for in the +X and –X directions using edge detection methods. The distance from ^ ^ ^ to the right edge is ^ ^ , to the left margin ^ ^. g) ^ ^ ^ is centered on the X-axis with respect to the left and right edges. This results in the optimized point ^ ^ ^ , which is output as the center position of the dot with subpixel accuracy. h) The area of ​​the dot is calculated as the area of ​​the surrounding rectangle, multiplied by the factor to convert the square area into a circular area or elliptical area: R.405034 - 63 - As part of the previously described process, there is also the challenge of determining in camera image 3 the starting position ^ ^ ^ to find the nearest dot. This task can be solved using the Nearest_dot function described below. The function receives the input data ^ ^ ^ Starting position ^ ^^^ minimum search radius ^ ^^^Maximum search radius ND Boolean value (ND = "neighbor dot"): If the starting position is within a dot and ND = false, the dot at the starting position is output. If ND = true, the dot at the starting position is ignored and the nearest neighboring dot is output. Starting from the starting point ^ ^ ^ The function scans the image field along 16 search beams 31 at an angular spacing of 22.5° (Fig. 27a, b). The radius of all search beams 31 is increased step by step, starting with the radius ^ ^^^ , up to the maximum radius ^ ^^^ If ND = false (Fig. 27a), both edges leading into and out of a dot are searched for. If ND = true (Fig. 27b), only edges leading into a dot are searched for. As soon as an edge is found, the search is aborted. The edge is located at position ^ ^ ^, it belongs to the nearest dot. Starting from ^ ^ ^The center point position and the area of ​​the found dot are determined and output using the Center_Dot function. Sub-step 320 - Detecting the dots in the reading field The flow chart in Fig. 28 shows the process for detecting all dots in the reading field 22. The previously determined starting base 28 of, for example, 3x3 dots serves as input information. In addition, step 330: Precise measurement of the center point position and area of ​​the dots is integrated into sub-step 320. In the first sub-step 320.1, the center point position 32 of the reading field 22 is determined. This is selected such that the reading field 22 has the greatest possible R.405034 - 64 - overlap with the image area in which the code is displayed, so that as many valid dots as possible can be detected. This is usually the case when the center point of the reading field 22 lies in the center of the code area.If the code area occupies the entire image area, as in the present example, the center position 32 of the reading field is placed as close to the image center as possible (see Fig. 29a). At the beginning of the process, only the 3x3 dots of the starting base 28 are known. All other dots in the reading field 22 are still unknown, i.e., their exact position and area have not yet been measured. The goal of the process is to gradually measure and classify the unknown dots. Sub-step 320.2: For each known dot, the vectors ^^^. ^. ^ and ^^^. ^ ^ (Fig.30), which point to the nearest neighboring dot in the principal axis directions 1 and 2. Due to the perspective distortion, they form an oblique coordinate system. By linear combination of the vectors ^^^. ^ ^ and ^^^. ^ ^the grid positions of the unknown neighboring dots can be estimated. The position estimation for an unknown dot can be improved by extrapolating and averaging the estimates from several valid neighbors. The more valid neighbors an unknown dot has, the better its position can be estimated. To increase the reliability of the reading process, only unknown dots that have at least two valid neighbors are examined. For each unknown dot, the number of valid neighbors is counted. This can be between 0 and 8, see Fig. 29c): the middle dot position has 8 neighboring positions (dark). At the beginning of the search, only the 3x3 dots of the starting base are valid. The only unknown dots with 2 or more valid neighbors are highlighted in Fig. 29b). Fig. 29d) schematically shows the unknown dots with 2 valid neighbors (20a) and with 3 valid neighbors (20b).All other unknown dots (20c) do not yet have any valid neighbors. R.405034 - 65 - The algorithm is based on a stack, whereby in sub-step 320.3 all unknown dots with at least two valid neighbors are entered into the stack. The stack is processed in a loop: ^ Sub-step 320.3: The top entry is fetched from the stack as an unknown dot and processed in the following steps. ^ Sub-step 320.4: The position of the unknown dot is estimated by averaging the extrapolated positions of all valid neighbors. If the unknown dot lies outside the expected reading field 22, it is not processed further. If the unknown dot lies within the expected reading field 22, it is identified and measured at the estimated position using the Center_Pos function. ^ Sub-step 320.5: If the unknown dot cannot be identified, it is classified as defective (sub-step 320.6) and the next unknown dot is popped from the stack. ^ Step 330 / Substep 320.7: If the dot has been identified, its position and area are measured using the Center_Pos function, and it is entered into dot matrix 29 as a valid new dot. Also, the vectors ^^^. ^. ^ and ^^^. ^ ^are calculated and entered for this dot. ^ Sub-step 320.8: For all 8 neighbors of the new valid dot, the number of valid neighbors is increased by 1. If this means that an unknown dot has two or more valid neighbors, it is placed on the stack for measurement. ^ Sub-step 320.9: This process is repeated until the stack is empty. At this point, all dots in the reading field have been processed. ^ Sub-step 320.10: If not enough dots were found to determine the position, the reading process is assessed as invalid. To sub-step 340 - Rectification Imaging with the wide-angle lens can result in barrel-shaped distortion of the image field. Lines of dots that lie on a straight line in the code plane of code arrangement 2 may lie on a curved line in camera image 3. This curvature can be eliminated using a mathematical process, rectification. For reasons of computing time, rectification is only applied to the R.405034 - 66 - The center positions 32 of the dots are applied, not to all pixels of the input image. Fig. 31 shows an example of a non-rectified grid (33) and a rectified grid (34). The center of the distortion. ^ ^ ^^ ^ ^ lies at the intersection point of the optical axis 5 with the camera chip of the image sensor 12. If the camera 1 is perfectly mounted, this is usually the center of the camera chip. Otherwise, the center is determined by a one-time calibration process of the camera 1. Using a second-order polynomial, a position ^ ^ in the image field of camera 3 into the rectified position ^ ^ converted: ^ ^ = ( ^ ^ + ^ ^ ^ + ^ ^ ^ ^ ) ∙ ^ ^⃗ + ^ ^^^ ^ ^ mit ^ ^⃗ = ^^ ^ − ^ ^ ^^ ^ ^^ Position relative to the center of distortion D = Distance to the center of distortion The distortion only changes the length of the vector ^ ^⃗ , not its direction. The polynomial parameters ^ ^ , ^ ^ , ^ ^are specific to lens 9 and are adjusted to it in a calibration process. Alternatively, a distortion-free lens 9 can be used. Sub-step 350 – Classification of the dots The small and large dots symbolize the values ​​"0" and "1" of the binary number system. The dots are classified based on a threshold value for the normalized area of ​​the dots. The process is shown in the flow chart Fig. 32. Perspective distortion has a strong influence on the area of ​​the dots in the image field. For example, dots further away are imaged smaller, circular dots on an inclined plane are imaged as an ellipse. Sub-step 350.1: To compensate for these effects, the area of ​​the dots is normalized with respect to the area of ​​their dot cell. The dot cell is understood to be the parallelogram containing the vectors ^^^. ^ ^ and ^^^. ^ ^at the location of the dot, i.e. the distance vectors from the dot to the neighboring dots in the principal axis directions 1 and 2. R.405034 - 67 - Fig. 30 shows a perspectively distorted dot in a distorted grid, which is locally defined by the vectors ^^^. ^ ^ and ^^^. ^ ^ The area of ​​the cell is ^^^^. ^ ^ × ^^^. ^ ^ ^. The normalized area of ​​the dot is calculated as follows: Substep 350.2: The threshold value is calculated using statistical methods from the normalized areas ^^^. ^^^^ ^^^^^^of all dots is determined. Sub-step 350.3: All dots are then classified: ^ Missing dot: Type 0 ^ Normalized area smaller than threshold: Type 1; otherwise: Type 2. Sub-step 350.3: If errors occur, the status is set to invalid; if no errors occur, the dot is valid. To sub-step 360 – Reading the code: After the dots have been classified, the dot matrix 29 contains all the information needed to determine the 6D position. The dot matrix 29 contains the following information: Dot data Description Data is provided by the following steps: ^^^ ^,^ . ^ ^Exact dot centers in substeps 310 and 320, the original function: Center_Pos: Image coordinates subpixel accurate detection of the dot center R.405034 - 68 - ^^^ ^,^ . ^ ^Dot centers in substep 340, Function: rectified image coordinates Rectify: Rectification of the ^^^ ^,^ . ^ ^ ^^ ^,^ . ^ ^ ^^^ 1 ^^^^,^ . ^ ^^^^2Local distance vector (sub-steps 310 and 320) between neighboring dots, calculated from the dot centers in the first and second raster directions. Original image coordinates ^^^ ^,^ . ^ ^ ^,^ . ^^^^ Dot area in the original substep 310 and 320, image coordinates [pixels] Center_Pos: Dot area detection ^,^ . ^^^ Classified DotType Substep 340, Dot classification based on the dot area ^,^. ^^ Number of valid sub-steps 310 and 320, neighboring dots Counting the valid neighbors The flow chart for this is shown in Fig. 33. The digital coarse position in the X and Y directions is determined by reading the X and Y bit chains in the dot matrix. Sub-step 360.1: The parcel symbol 21 "empty dot" (type 0) serves as a reference point to identify the position of the bit chains in the dot matrix 29. If there are several entries with type 0, these can be checked against each other because the "empty dot" repeats regularly in the parcel grid (here: 7x7 dots). Sub-step 360.2: Starting from the parcel symbol 21, the position of the reading tracks for the codes in the two axes of the code plane is determined. It is initially unknown which of the sequences are assigned to the X-axis and which to the Y-axis R.405034 - 69 - and in which direction (forward or backward) the code is read.The codes are read along the reading track and saved as Code_0 and Code_1. Fig. 34a) shows examples of the dot types entered in the dot matrix. The parcel symbol (type 0) is highlighted in gray. In Fig. 34b) the reading track for the two axes is also shown. The reading tracks of the two axes are rotated 90° to each other, with the parcel symbol 21 forming the center of rotation. Since the reading field (15x15 dots) is significantly larger than a parcel (7x7), the code can be read redundantly: A copy of Code_0 is located in the parcels adjacent in the j-direction (35a), and a copy of Code_1 is located in the parcels adjacent in the i-direction (36a). Redundancy also exists in the length of the readable code. A code length of 24 bits in each direction, i.e. the content of a 7x7 parcel, is sufficient for location determination. However, the larger reading field with 15x15 dots delivers 51 or 54 bits in each direction.The redundant information is used to detect and correct individual incorrectly read bits in Code_0 and Code_1. In this example, the following codes are read: ^ Code_0: 111.111.011.111.011.111.111.111.111.111.111.011.011.111.111.111.111 ^ Code_1: 000.000.000.101.000.001.000.000.000.000.100.110.000.000.000.000.000.000.000 Substep 360.3: An arbitrary section with t=24 consecutive bits is selected from Code_0 and checked for completeness. Substep 360.4: The checksum of Code_0 is then calculated. If this is less than t / 2 = 12, Code_0 is the X code and Code_1 is the Y code. If it is greater than t / 2, Code_0 is the Y code and Code_1 is the X code. The Y code is inverted. The X code remains unchanged. Substep 360.5: Code_0 and Code_1 are then searched for in the code table using an error-tolerant string search. The bit position with the best R is found.405034 - 70 - Match is displayed as search result; if the deviation is too large, the search result is considered invalid. In order to transform Code_0 and Code_1 into integer spatial coordinates (X, Y), the bit position of the codes is converted into a spatial position according to the code structure, as shown schematically in Fig. 35 as an example: - Any section with t = 24 consecutive bits is selected and checked for completeness: 000100000000001010100000 This is searched for in the code table in the forward direction and found at bit position 37 as underlined: 010101010000000010000000001000100000000001000000000010000000000100000000010100000000010000 00001000101000000001 … - Each X-dot is assigned a bit position within the code table. - The bit position corresponds to the starting point of the reading sequence within a parcel. - Each Y-dot is assigned a bit position within the code table. 360.6 Validation Check According to Figure 35, this corresponds to the dot position Xc=10=Pos0. The Yc value for Pos1 is determined analogously. The reading direction (Dir_0 and Dir_1) is also determined for both codes by searching the codes in both directions in the code table: 0 = found in the forward direction, 1 = found in the reverse direction. From the reading directions of Code_0 and Code_1, the rough orientation of the reading window 22 is determined in 90° increments according to the following table. ^^^. ^ 0 1 0 0° 270° ^ ^ ^ ^ 1 90° 180° R.405034 - 71 - The result of substep 360 is the integer coarse position (^ ^,^^^ , ^ ^,^^^) and the orientation of the reading window 22. Step 400 – Determination of the beam data. To determine the fine position, the rectified position data of the valid dots in the dot matrix 29 are evaluated. Fig. 36 shows an example of the dots of a reading field in the camera image after rectification. Step 410: Adjustment of best-fit lines. For this purpose, best-fit lines (beams) are adjusted to the rows and columns of valid dots in the reading field 22. The best-fit line is calculated using standard mathematical methods for error minimization from the position data of the valid dots in the respective row or column. Invalid dots are excluded from the process. Each best-fit line ^ of the bunch ^ = 0..1 is described by the following parameters (Fig. 37): o^^ ^^ Intersection with the XI axis o^^ ^^ Intersection with the Y I -axis o^ ^^Angle of the line i in the image field The best-fit lines fitted to the dot rows form a first bundle of lines (^^^^ℎ ^ ) 36, where the lines are parallel to the YC axis. The lines of the dot columns form a second bundle of lines (^^^^ℎ ^ ) 37, where the straight lines parallel to the X C -axis. Thus, the position data of 15 x 15 = 225 dots are reduced to the data of 15 + 15 = 30 best-fit lines. Interpolation also has the effect of averaging the dot positions on each line, so that the best-fit lines are robust against individual fluctuations of the individual dot positions. This increases the stability and accuracy of the 6D position value. Fig. 36 shows the best-fit lines for a reading field with 15x15 dots; the lines from ^^^^ℎ ^ than 36 and the straight lines from ^^^^ℎ ^as 37. R.405034 - 72 - Step 420 – Determination of the bunch data In this step, the three straight line parameters ^^ ^^ , ^^ ^^ , ^ ^^ Each bundle of best-fit lines 36, 37 is interpolated with a second-degree polynomial. The interpolation procedure considers only valid lines. Invalid lines, for which too few valid dots are available for interpolation, are excluded from the bunch interpolation. For this purpose, a weighted interpolation is performed using standard mathematical methods, based on the minimization of squared errors. Valid lines are assigned a weight of 1.0, while invalid lines are assigned a weight of 0.0 and thus ignored. Approach interpolation function: ^ ^^ ^ (^) = ^^^ ^^ + ^ ∙ ^^^ ^^ + ^ ^ ∙ ^^^ ^^ ^ ^^ ^ (^) = ^^^ ^^ + ^ ∙ ^^^ ^^ + ^ ^ ∙ ^^^ ^^ ^ ^ ^ (^) = ^^ ^^+ ^ ∙ ^^ ^^ + ^ ^ ∙ ^^ ^^ Where i is the consecutive number of the line (line index) in the respective bundle of lines. General approach for interpolating the line parameters: ^ ^ (^) = ^ ^^ + ^ ∙ ^ ^^ + ^ ^ ∙ ^ ^^ ; with ^ ^ (^) = ^^ ^ (^), ^^ ^ (^) or ^ ^ (^) For a mathematically unique description of a straight line, it is sufficient to use only one of the two axes intersection points ^^ ^^ or ^^ ^^ together with the straight line angle ^ ^^Ideally, the intersection point is specified with the axis that is as perpendicular as possible to the straight line: for flat straight lines, the intersection point with the Y-axis is preferably specified, for steep straight lines, the intersection point with the X-axis. Therefore, the following procedure is used: ^ In bundle 1, a reference line is selected that is close to the center point 32 of the reading field 22. ^^ ^ ^ ^ ^ If the angle of the reference line is in the range [ ^ ^, ^ ^] or [ ^ ^, ^ ^] (sectors on the X I -axis in Fig. 38a)), it is a flat line. Then for all lines in bundle 0 (36) the intersection point ^^ ^^ with the X-axis and for all lines in bundle 1 (37) the intersection point ^^ ^^ with the Y-axis (Fig. 38b)). As a marker, rot_status is set to 0. R.405034 - 73 - ^ If the angle of the reference line lies outside the specified range (sectors on the Y I-axis in Fig. 38 a)), it is a steep straight line. Then for all lines in bundle 0 (36) the intersection point ^^ ^^ with the Y-axis and for all lines in bundle 1 (37) the intersection point ^^ ^^ with the X-axis (Fig. 38c)). As a flag, rot_status is set to 1. This step further reduces the data volume: a bundle of straight lines is described by only 6 parameters, three parameters for ^ ^^ and three parameters for one of the axis intersection points, ^^ ^^ or ^^ ^^. For two bundles, there are 12 parameters plus the marker rot_status. Thus, two bundles 36, 37 are always described by 12 parameters and the Boolean variable rot_status, regardless of the number of lines or the size of the measurement field. From these parameters, the 6D position is calculated in the next step. The interpolation also has the effect of averaging over the lines of each bundle and thus over all dots, so that the interpolated values ​​are robust against individual fluctuations of individual lines or dots. This increases the stability and accuracy of the 6D position value. Step 6 – Calculating the 6D Camera Position The 6 coordinates of the camera position are calculated from the 12 interpolation parameters of the line bundles (Table 9.1), in the following order: ^ Substep 500: Position ^ ^ and ^ ^ ^ Substep 710: Calculation of parameters of the distorted grid ^ Substep 600: Camera angle ^ ^^ Substep 700: Position ^ ^ ^ Substep 700: Camera angle ^ ^ and ^ ^ ^ Substep 700: Iterative algorithm for solving the system of equations for ^ ^ , ^ ^ and ^ ^ The calculation involves deriving parameters that describe the measured grid at the location of the optical axis 5. These parameters are linked to the 6D camera position R.405034 - 74 - via a system of equations derived from the imaging model and the laws of ray optics. The camera position is determined by solving the system of equations. In addition, the validity of the position values ​​is estimated by evaluating a large number of diagnostic results from the individual steps of the program sequence. To substep 500 – Calculating the camera position ^ ^ and ^ ^ The camera position in X and Y is calculated as the sum of the integer coarse position (^ ^,^^^, and a real fraction [0..1] (fine position), multiplied by the dot grid spacing: ; Unit: [m] ; Unit: [m] with (^ ^,^^^ , ^ ^,^^^ ) : Integer position of the reading field in [Dot], as determined in step 300 (^ ^,^^^^^ , ^ ^,^^^^^ ) : real fraction of the reading field position in [Dot] ^ ^^^^ : Dot grid spacing in [m / dot]. The reference point for measuring the camera position is the intersection point 4 of the optical axis 5 with the code arrangement 2; in the camera image 3, this is the intersection point of the optical axis 5 with the image sensor 12 (Fig. 2, point (4) or illustration of the intersection point 4 image center / image center 4 in Fig. 39). This image center ^^ (4) is determined by the position of the lens 9 relative to the camera chip; it does not have to be identical to the center of the camera chip. It is determined in a calibration process and stored as a constant two-dimensional vector (^^ ^ , ^^ ^) in the program. The fractions ^ ^,^^^^^ and ^ ^,^^^^^ we calculate as the intersection point of the interpolated straight line with the image center 4. For the two beams k = 0 and k = 1 (36, 37) the interpolation equation for the axis intersection point applies: ^ ^ ( ^ ) = ^^ ^^ + ^ ∙ ^^ ^^ + ^ ^ ∙ ^^ ^^ ; with ^ ^ ( ^ ) = ^^ ^ ( ^ ) or ^^ ^ (^), depending on rot_status. R.405034 - 75 - Figure 39 shows the center lines for both bundles of lines ^ = 0 and ^ = 1. The following applies: By appropriate choice of the interpolation parameters (^, ^) the axis intersection point for both center lines is placed in the image center ^ ^ ^^ ^ ^ This is fulfilled by the equations The solution of the equations leads to the desired fractions of the line indices To substep 710 – Calculating parameters of the distorted grid. Further parameters that characterize the distorted grid are obtained from the interpolation equations. The fine positions ^ ^,^^^^^ and ^ ^,^^^^^ are inserted into the interpolation equations to obtain the parameters in the image center. The parameters are used to determine the position in the dimensions ^ ^ , ^ ^ , ^ ^ and ^ ^ required. a) Grid size of the axes intersection points of the lines for both bundles of lines: ^ ^^ , ^ ^^ . The grid dimension is determined by deriving the interpolation function for the axis intersection point ^ ^ ( ^ ) determined according to the dimensionless straight line index ^ at the location of the image center: for R.405034 - 76 - ^ ^,^^ ^^^ ^ = 0 with ^ ^ ^^^ ^^^^^ = ^ ^,^^^^^ ^^^ ^ = 1 b) Straight line angle in the center of the image: ^ ^^ , ^ ^^(see Fig. 37), results from the interpolation function for the straight line angle: for c) Angular divergence of the straight line bundles in the image center: ^^ ^^ , ^^ ^^ This is the angle difference between adjacent lines close to the image center. It results from the derivative of the interpolation function for the line angle with respect to the dimensionless line index ^ at the location of the image center: for To substep 600 – Calculating the camera angle ^ ^ We determine the straight line angle ^ ^ from the mapping equation derived in 2.4.2: ; with ^ ^ = ^ ^ − ^ : Distance code level / opt. center by deriving the image coordinates ^ ^ and ^ ^ according to the code grid coordinate ^ ^ we receive The gradient of a straight line of the bundle of lines ^^^^ℎ ^ in the camera image is We consider the slope in the center at ^^ = 0 and get ^ ^ | ^^^^ = − tan ( ^^ ) . ^ ^ | ^^^^ is the slope of the line from ^^^^ℎ ^ in the image center. It corresponds to the characteristic value ^ ^^ from 6.2 b), ie This leads to the equation for the camera angle ^ ^ : ^ ^ = ^ ^^ To sub-step 700 – Calculating the camera position ^ ^ R.405034 - 77 - The camera position ^ ^ is calculated from the grid spacing of the axis intersection points ^ ^^ for both straight line bundles b^^^ℎ ^ Since there are two straight line bundles in each image, two ^ ^ Positions are determined. With the cases rot_status = ^ four values ​​result ^ ^^^ with (^, ^ = 0..1). The mapping equation for Fig.9 applies: ; with ^ ^ = ^ − ^ ^ : Distance code level / opt. center For example, the value ^ ^^^from the measured grid spacing ^ ^^ the axis intersection points on the ^ ^ Axis for rot_status = 0. On the ^ ^ Axis applies: ^ ^ = 0, from the mapping equation follows ^ ^^ ^ ^ + ^ ^^ ^ ^ = 0 ⇒ ^ ^ ^^ ^ = − ^ ^^ ^ ^ By inserting this term into the equation for ^ ^ we get ^ ^ = The grid spacing ^ corresponds to the derivative ^ ^ ^ ^ ^^ ^ ^ ^^ at ^ ^ = 0 ; with ^ ^ = ^ ^^^^ Line index in [dots] From this, resolved at ^ By inserting the matrix elements we get the equation for ^^^^ In the same way, the position ^ ^^^ calculated for rot_status=1, approach: ^ ^^ = from ^ ^^ derived, approach for ^ ^^^: ^ ^^ = ^^ ^ ^ ^ ^^ ^ ; ^ ^ ^^ The results are summarized in Table 10.1. R.405034 - 78 - rot_status ^ ^^^ ^ ^^^ (derived from ^^^^ℎ ^ ) (derived from ^^^^ℎ ^ ) ^ ^^^ ^ ∙ ^ ^ ^^^^ ∙ cos ^ ^ 0 ^^^ = ^ ∙ ^ ^^^^ ∙ cos ^ ^ ^ ^^ ∙ cos ^ ^ = ^ ^^ ∙ (cos ^ ^ − tan ^ ^ sin ^ ^ sin ^ ^ ) ^ ^^^ ^ ∙ ^ ^ ^^^^ ∙ cos ^ ^ 1 ^^^ = ^ ∙ ^ ^^^^ ∙ cos ^ ^ ^^ ∙ sin ^ ^ = ^ ^ ^^ ∙ (− sin ^ ^ − tan ^ ^ sin ^ ^ cos ^ ^ ) Table: Calculation of camera position values ​​^ ^^^ ^ By introducing the angle ^ = ^^^_^^^^^^ ∙ ^ the equations can be summarized: To only one value ^ ^per image, the mean of both z-values ​​is calculated: ^ ^ = ^ ^^^ ^^ ^^^ ^ To sub-step 700 – Calculating the camera angles ^ ^ , ^ ^ The angles ^ ^ , ^ ^ are derived from the angular divergence ^^ ^ (^) ^ ^ of the two straight line bundles ^^^^ℎ ^ in the image center. In step 600 we have the straight line gradient ^ ^ for the straight line bundle ^^^^ℎ ^ as a function of the line index ^ ^ derived: (^^^ ^ ^ ^^^ ^ ^ ^^^^ ^ ^ ^^^ ^ ^ ^^^ ^ ^ ) ∙^ ^ ^^^^ ^ ^ ^^^ ^ ∙^ ^ (^ ) = ^ ^ ^ ^ ( ^^^^ ^ ^ ^^^ ^ ^ ^^^^ ^ ^ ^^^ ^ ^ ^^^ ^ ^ ) ∙^ ^ ^^^^ ^ ^ ^^^ ^ ^ ∙^ ^ From this we calculate the straight line angle ^ ^( ^ ^ ) = tan( ^ ^ (^ ^ )) and derive this to ^ = ^^^^^ [dots] to calculate the angle divergence ^ In the image center ^ = 0 the angular divergence is R.405034 - 79 - ^ Equate with the measured angular divergence ^^ ^^ gives the equation for In the same way, the angle ^ ^ from the slope ^ ^ a straight line in ^^^^ℎ ^ Analogous to the calculation in 600 we get ^ We direct the angle ^ ^ ( ^ ^ ) = tan( ^ ^ (^ ^ )) after ^^ ^ = ^ ^ ^^^^^ and obtain the angle divergence ^ ^ ^^^ ^ In the image center ^ = 0 is ^^ ^ (^ ^ ) ^^ ^^^^ ∙^^^ ^ ^ ^ ^ the angular divergence ^^ ^^ ^ = ^ ^ ^^ ^ ^^ Equate with the measured angular divergence ^^ ^^ gives the equation for To substep 700 – Iterative calculation of the camera position Z and the camera angle ^ ^ , ^ ^ Between the functions ^ ^ , ^ ^ and Z there are mutual dependencies: Therefore, the equations are solved iteratively. With each iteration, the accuracy of the camera position Z and the camera angle ^ increases. ^ and ^ ^ The algorithm is shown in the flowchart Fig.40. Substep 700.1: Calculation of the real fractions of the reading field position in [Dot] (^ ^,^^^^^ , ^ ^,^^^^^ ) Substep 700.2: Calculation of position r x and r y Substep 700.3: Calculating the camera rotation / camera angle ^ ^Substep 700.4: Initialize the camera angles phix = 0; phiy = 0 Substep 700.5: Initialize a counter for iterations with eg4 Substep 700.6: Calculate rZ0k and rZ1k and finally rZ=(rZ0k+ rZ1k) / 2 Substep 700.7: Calculate camera angles phix, phiy Substep 700.8: Counter = 0? Recalculate, otherwise abort the iteration R.405034 - 80 - Substep 700.9: Error query The algorithm converges quickly; after about 4 iterations, the result is sufficiently stable. Finally, the following results are output: ^ Camera position (^ ^ , ^ ^ , ^ ^ ) ^ Camera angle (^ ^ , ^ ^ , ^ ^) ^ Validity information List of reference symbols: 1 Camera 2 Code arrangement 3 Image 4 Intersection point of the optical axis 5 with the code arrangement 2; Focal point; 5 Optical axis 6 Empty 7 Intersection point of the optical axis with the image sensor 8 Objects with at least one code arrangement 2 9 Lens 10 Focal point of the lens 9 11 Focal point of the lens 9 12 Image sensor 13 Optical center of the lens 9 14 Visible ray 15 Coordinate system (X I , Y I ) of the image sensor 12 in the plane of the image sensor 12 16 coordinate system (X C , Y C) of the code arrangement 2 in the plane of the code arrangement 2 17 Coordinate system (X, Y, Z) of the camera 1 18 Virtual image plane 19 Parcel 20 Base symbol 21 Parcel symbol 22 Reading field 23 Center point position R.405034 - 81 - 24 X-parcel areas 25 Y-parcel areas 26 Parcel area for additional data 27 Intersection point pattern 28 Start field / start base / launch pad 29 Dot matrix 30 Start positions 31 Search beams 32 Center point position of the reading field 22 33 Non-rectified dot matrix 34 Rectified dot matrix 35 Reading track in a first code direction 36 Reading track in a second code direction 37 First straight line bundle / bunch0 38 Second straight line bundle / bunch1

Claims

R.405034 - 82 - Claims 1. Method for determining at least one degree of freedom of a camera (1) relative to a code arrangement (2) from a camera image of the camera (1), wherein the code arrangement (2) has a dot matrix with a plurality of base symbols (20), wherein in particular a coarse position of the base symbols (20) is encoded in the code arrangement (2), wherein the base symbols (20) define a first and an independent second main direction along the dot matrix, wherein a reference point is arranged in the camera image, wherein the reference point is formed as an intersection point of the optical axis of the camera (1) with the image recorder and / or the camera image, wherein the following values ​​are determined as characteristic values ​​from the camera image at the reference point: - an angle of rotation (phiz) of the camera (1) about the optical axis of the camera (1);- a first local grid dimension (gco) of the point grid in the camera image in the first main direction and / or a second local grid dimension (gc1) of the point grid in the camera image in the second main direction; - a first local angular divergence (dalphac0) of the point grid in the camera image in the first main direction, wherein the first local angular divergence (dalphac0) describes the difference angle between two adjacent straight lines in the first main direction in the point grid; - a second local angular divergence (dalphac1) of the point grid in the camera image in the second main direction, wherein the second local angular divergence (dalphac1) describes the difference angle between two adjacent straight lines in the second main direction in the point grid; R.405034 - 83 - wherein, based on the characteristic values, the following three degrees of freedom of the camera (1) relative to the code arrangement (2) are determined: - a distance (rz) between the code arrangement (1) and the camera (1); - two independent pitch angles (phix; phy) of the optical axis to the code arrangement (2).

2. Method according to claim 1, characterized in that the characteristic values ​​are inserted into an optical ray model of the camera and the code arrangement (2) based on the three degrees of freedom in order to determine the three degrees of freedom.

3. Method according to claim 1 or 2, characterized in that the reference point is formed as an intersection point of the optical axis of the camera with the image recorder and / or the camera image.

4. Method according to one of the preceding claims, characterized in that the first pitch angle (phix) is determined using the following equation: ^ ^ = f(^^ ^^ ; ^ ^ ; ^ ^) and / or that the second pitch angle (phiy) is determined using the following equation: ^ ^ = f(^^ ^^ ; ^ ^ ; ^ ^ ) and / or that the distance between the code arrangement and the camera is determined using one of the following equations: ^ ^^^ / ^ = ^(^ ^ ; ^ ^^ ; ^ ^ ; ^ ^ ) and / or R.405034 - 84 - 5. Method according to claim 4, characterized in that the system of equations for determining the three degrees of freedom is solved iteratively.

6. Method according to one of the preceding claims, characterized in that a base symbol matrix is ​​determined from the camera image, wherein the position of the base symbols (20) in the camera image is entered in the base symbol matrix, wherein, on the basis of the base symbol matrix, a first straight line function with a first function argument is derived for a first straight line in a coordinate system of the camera image, wherein the first straight line is aligned parallel to the first main direction in the coordinate system of the code arrangement (2), wherein, by changing the first function argument, the first straight line is shifted parallel in the coordinate system of the code arrangement (2) in the second main direction,and / or a second straight line function is derived with a second function argument in a coordinate system of the camera image for a second straight line, wherein the second straight line is aligned parallel to the second main direction in the coordinate system of the code arrangement (2), wherein by changing the second function argument, the second straight line is shifted parallel in the coordinate system of the code arrangement (2) in the first main direction, wherein the local angular divergence and / or the local grid dimension is determined from the straight line functions.

7. Method according to claim 6, characterized in that the coarse position of at least one of the basic symbols in the code arrangement is determined based on the basic symbols (20) or a subset thereof of the basic symbol matrix, and the fine position of two degrees of freedom of the camera relative to the code arrangement is determined based on the first and second straight line functions.

8. Method according to claim 7, characterized inthat a reference point is arranged in the camera image, with a first axis intersection function in the coordinate system of the camera image of a first straight line, wherein the first straight line in the coordinate system (XC, YC) of the code arrangement is aligned parallel to the first main direction (2) of the dot matrix, with a first function argument, wherein by changing the first function argument the first straight line in the coordinate system (XC, YC), R.405034 - 85 - the code arrangement is shifted parallel in the second main direction, wherein the first axis intersection function, depending on the first function argument, determines a first axis intersection point along a first axis of the coordinate system (XI, YI) of the camera image, wherein the first axis runs through the reference point, with a second axis intersection function in the coordinate system of the camera image of a second straight line, wherein the second straight line in the coordinate system (XC, YC) of the code arrangement is aligned parallel to the second main direction, with a second function argument, wherein by changing the second function argument, the second straight line in the coordinate system (XC, YC) of the code arrangement is shifted parallel in the first main direction, wherein the second axis intersection function, depending on the second function argument, determines a second axis intersection point along a second axis of the coordinate system (XI,YI) of the camera image, wherein the second axis runs through the reference point, wherein the first and second function arguments are determined on the basis of the axis intersection functions such that the reference point forms the first and second axis intersection points, wherein the fine position of the reference point in the coordinate system (XC, YC) of the code arrangement (2) in the plane of the code arrangement (2) is determined as at least one further degree of freedom on the basis of the first and second function arguments and the coarse position.

9. Method according to one of the preceding claims 6 to 8, characterized in that the first and / or the second function argument is determined such that the first and second straight lines intersect the reference point, respectively.wherein a rotation angle (phiz) of the camera about the optical axis is derived as a degree of freedom of the camera (1) relative to the code arrangement (2) on the basis of the first and / or the second straight line.

10. Method according to one of the preceding claims, characterized in that a start field (28) with base symbols (20) is determined, wherein the start field (28) has at least three base symbols (20), wherein two independent main directions along the point grid in the camera image are estimated via the base symbols (20) of the start field (28), wherein the base symbols (20) of the start field form valid base symbols, wherein in a search step, starting from at least one valid base symbol (20) along, R.405034 - 86 - further base symbols (20) are searched for from at least one of the main directions, and if the search is successful, the further base symbols (20) are marked as valid base symbols (20), the search step being carried out multiple times, the base symbol matrix being determined on the basis of the valid base symbols (20) or a subset thereof.

11. Electronic control unit or automation arrangement with the electronic control unit, the control unit being designed in terms of programming and / or circuitry to carry out the method according to one of the preceding claims.

12. Computer program, the computer program being designed to carry out the method according to one of claims 1 to 10 when the computer program is executed on a computer or on a control unit according to claim 11.

13. Machine-readable storage medium, the computer program according to claim 12 being stored on the storage medium.