Light source pose calibration system, light source pose calibration method, controller and medium
By combining a projection board and an image acquisition device, and utilizing the diffraction effect and gradient feature analysis of photometric patterns, the problem of low accuracy in existing light source pose calibration systems has been solved, achieving efficient and accurate light source pose calibration.
Patent Information
- Application Number
- CN202511275525.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-08
- Publication Date
- 2026-01-09
AI Technical Summary
Existing light source pose calibration systems rely on high-precision mechanical equipment or human experience, resulting in low calibration accuracy and efficiency, which cannot meet the needs of high-precision scenarios.
A combination of a projection board and an image acquisition device is used. The projection board includes a transparent plate, an upper surface shielding layer, and a lower surface projection imaging layer. A projected image is formed on the lower surface through the diffraction of the photometric pattern. The image acquisition device is used to perform gradient feature analysis to determine the pose adjustment parameters of the light source.
It enables light source pose calibration without the need for high-precision mechanical equipment and human experience, improving the accuracy and efficiency of calibration and ensuring the consistency of light source installation.
Smart Images

Figure CN121304783A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of light source pose calibration technology, specifically to a light source pose calibration system, a light source pose calibration method, a controller, and a medium. Background Technology
[0002] In fields such as machine vision measurement and precision inspection, the pose accuracy of the light source directly affects the imaging quality and the reliability of the measurement results. Therefore, accurate calibration of the light source pose is a crucial step in system construction. Traditional light source pose calibration systems often rely on high-precision mechanical adjustment equipment, constraining the position and angle of the light source through preset mechanical parameters. However, this approach is costly and susceptible to mechanical wear and installation errors, leading to decreased calibration accuracy. Other solutions rely on manual adjustment based on experience, repeatedly correcting the light source by visually observing the illumination effect or using test data. This is not only inefficient but also suffers from high subjectivity and poor consistency, making it difficult to meet the demands of high-precision scenarios. Therefore, existing calibration systems suffer from relatively low accuracy. Summary of the Invention
[0003] The purpose of this application is to provide a light source pose calibration system, a light source pose calibration method, a controller, and a medium to solve the problem of low accuracy in existing calibration systems.
[0004] To achieve the above objectives, the first aspect of this application provides a light source pose calibration system, the light source pose calibration system comprising: A projection board is positioned below the light source to be adjusted. The projection board includes a transparent plate, an upper surface shielding layer, and a lower surface projection imaging layer. The upper surface shielding layer is positioned on the upper surface of the transparent plate, and the lower surface projection imaging layer is positioned on the lower surface of the transparent plate. Multiple light metering patterns are provided on the upper surface shielding layer. When the light source to be adjusted is turned on, the light metering patterns form a projected image on the lower surface projection imaging layer. An image acquisition device is positioned above the light source to be adjusted, and is used to acquire images of the projection panel when the light source is turned on.
[0005] In this embodiment of the application, the number of metering patterns is at least four, any three of the metering patterns are not collinear, and any one metering pattern is located outside the triangular area formed by the other three metering patterns.
[0006] In this embodiment of the application, the outline of the photometric pattern is a closed smooth curve.
[0007] In this embodiment, the surface of the photometer pattern in the upper surface shielding layer is covered with a coating, and the surface of the upper surface shielding layer other than the photometer pattern is not covered with a coating; or, the surface of the photometer pattern in the upper surface shielding layer is not covered with a coating, and the surface of the upper surface shielding layer other than the photometer pattern is covered with a coating; or, a predetermined area of the surface of the photometer pattern in the upper surface shielding layer is not covered with a coating, and the surface of the upper surface shielding layer other than the predetermined area is covered with a coating; or, a predetermined area of the surface of the photometer pattern in the upper surface shielding layer is covered with a coating, and the surface of the upper surface shielding layer other than the predetermined area is not covered with a coating.
[0008] A second aspect of this application provides a light source pose calibration method, applied to the aforementioned light source pose calibration system. The light source pose calibration method includes: Acquire sample images captured by the image acquisition device, which contain projections of various photometric patterns; The projection images of each photometric pattern in the sample image onto the lower surface projection imaging layer are identified using target recognition technology. Gradient feature analysis is performed on the projected images of each photometric pattern to obtain the actual feature vector corresponding to each photometric pattern. Based on the actual feature vector and target feature vector corresponding to each photometric pattern, the pose adjustment parameters of the light source to be adjusted are determined.
[0009] In this embodiment, gradient feature analysis is performed on the projected images of each metering pattern to obtain the actual feature vector corresponding to each metering pattern. This includes: performing Gaussian smoothing filtering on the projected image to determine the maximum gradient direction and corresponding gradient value of each pixel in the projected image; filtering out pixels in the projected image whose gradient values are greater than a preset noise threshold to obtain a connected component image; determining the median value of the grayscale value of the connected component image based on the grayscale value of each pixel; traversing all pixels on the contour line of the connected component image, marking pixels on the contour line with grayscale values greater than the median value as bright area contour points, and marking pixels on the contour line with grayscale values less than the median value as dark area contour points; determining multiple candidate curves in the connected component image based on a linear programming algorithm, wherein the tangent direction of each pixel on the candidate curve is consistent with the maximum gradient direction of each pixel, and the starting point of the candidate curve is the bright area contour point, and the ending point of the candidate curve is the dark area contour point; determining the target curve from the multiple candidate curves, wherein the target curve is the longest candidate curve among the multiple candidate curves; and determining the actual feature vector corresponding to the metering pattern based on the target curve.
[0010] In this embodiment of the application, determining the actual feature vector corresponding to the metering pattern based on the target curve includes: determining the average gradient value of each pixel on the target curve as the vector modulus of the actual feature vector; and determining the average gradient direction of each pixel on the target curve as the vector direction of the actual feature vector.
[0011] In this embodiment, the pose adjustment parameters of the light source to be adjusted are determined based on the actual feature vector and target feature vector corresponding to each photometer pattern, including: determining the orientation angle corresponding to each photometer pattern based on the actual feature vector and target feature vector corresponding to each photometer pattern; determining the position deviation of the light source to be adjusted based on the actual feature vector, target feature vector and orientation angle of each photometer pattern; determining the rotation angle deviation of the light source to be adjusted based on the actual feature vector and target feature vector corresponding to each photometer pattern; and determining the pose adjustment parameters of the light source to be adjusted based on the position deviation and rotation angle deviation.
[0012] A third aspect of this application provides a controller, comprising: The memory is configured to store instructions; The processor is configured to retrieve instructions from memory and, when executing the instructions, to implement the aforementioned light source pose calibration method.
[0013] The fourth aspect of this application provides a machine-readable storage medium on which a program or instruction is stored, and when the program or instruction is executed by a processor, it implements the above-described light source pose calibration method.
[0014] The above technical solution provides a light source pose calibration system, including a light source to be adjusted, a projection board, and an image acquisition device. The projection board is positioned below the light source to be adjusted and includes a transparent plate, an upper surface shielding layer, and a lower surface projection imaging layer. The upper surface shielding layer is located on the upper surface of the transparent plate, and the lower surface projection imaging layer is located on the lower surface of the transparent plate. Multiple photometric patterns are arranged on the upper surface shielding layer. When the light source to be adjusted is turned on, the photometric patterns form a projected image on the lower surface projection imaging layer. The image acquisition device is positioned above the light source to be adjusted and is used to acquire images of the projection board when the light source to be adjusted is turned on. The projection board in this application adopts a double-layer structure. The photometric patterns of the upper surface shielding layer form a clear projection on the lower projection imaging layer, facilitating accurate capture by the image acquisition device. This eliminates the need for high-precision equipment or manual experience. Through the projection correspondence of the double-layer structure, the accuracy and efficiency of light source pose calibration are improved.
[0015] Other features and advantages of the embodiments of this application will be described in detail in the following detailed description section. Attached Figure Description
[0016] The accompanying drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the following detailed description to explain the embodiments of this application, but do not constitute a limitation on the embodiments of this application. In the drawings: Figure 1 This is a schematic diagram of the structure of a light source pose calibration system provided in an embodiment of this application; Figure 2 This is a schematic diagram of the structure of a projection panel provided in an embodiment of this application; Figure 3 A schematic diagram illustrating the diffraction principle of the coating on incident light according to an embodiment of this application; Figure 4 A schematic diagram illustrating the diffraction principle of the coating on incident light, provided in another embodiment of this application; Figure 5 A schematic diagram of shadow grayscale from the perspective of an image acquisition device provided in a specific embodiment of this application; Figure 6 This is a schematic diagram of the design of an upper surface shielding layer provided in an embodiment of this application; Figure 7 A schematic diagram of the design of an upper surface shielding layer provided in another embodiment of this application; Figure 8 A schematic diagram of the design of an upper surface shielding layer provided in another embodiment of this application; Figure 9 A schematic diagram illustrating the non-collinearity rule of multiple photometric patterns provided in a specific embodiment of this application; Figure 10 A schematic diagram showing the regularity outside multiple photometric triangular regions provided in a specific embodiment of this application; Figure 11 A flowchart illustrating a light source pose calibration method provided in an embodiment of this application; Figure 12 A schematic diagram illustrating the design principle of an upper surface shielding layer provided in a specific embodiment of this application; Figure 13 This is a schematic diagram illustrating the principle of determining the curve Ln. Figure 14 This is a structural block diagram of a controller provided in an embodiment of this application.
[0017] Explanation of reference numerals in the attached figures Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only for illustration and explanation of the embodiments of this application and are not intended to limit the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0019] It should be noted that if the embodiments of this application involve directional indicators (such as up, down, left, right, front, back, etc.), the directional indicators are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicators will also change accordingly.
[0020] Furthermore, if the embodiments of this application involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, features defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.
[0021] It is understood that visual measurement and inspection systems typically include image acquisition equipment, a light source, and a transmission mechanism. The transmission mechanism is used to transfer the product, and the light source is used to provide illumination to the product, ensuring that the product being photographed can be clearly observed within the imaging field of view of the image acquisition equipment during visual measurement or inspection. To ensure the consistency of products of the same model after inspection, after calibrating the pose of the image acquisition equipment, the position and orientation of the light source also need to be calibrated to ensure that the light source is installed in the target pose, thus providing the same illumination conditions for all products. Currently, the calibration of the light source in existing technologies usually relies on the precision of the mechanical structure or is directly adjusted based on manual experience. This results in low reliability and low efficiency of system debugging results, failing to guarantee the consistency of products of the same model after inspection. Therefore, this application provides a light source pose calibration system and a light source pose calibration method to achieve accurate calibration of the light source.
[0022] Figure 1 This is a schematic diagram of a light source pose calibration system provided in an embodiment of this application. Figure 1 As shown, this application provides a light source pose calibration system, which may include: Projection plate 2 is positioned below the light source 1 to be adjusted. Projection plate 2 includes a transparent plate, an upper surface shielding layer, and a lower surface projection imaging layer. The upper surface shielding layer is positioned on the upper surface of the transparent plate, and the lower surface projection imaging layer is positioned on the lower surface of the transparent plate. Multiple light metering patterns are provided on the upper surface shielding layer. When the light source 1 to be adjusted is turned on, the light metering patterns form a projected image on the lower surface projection imaging layer. Image acquisition device 3 is positioned above the light source 1 to be adjusted and is used to acquire images of the projection panel 2 when the light source 1 to be adjusted is turned on.
[0023] The light source pose calibration system of this application embodiment includes a light source 1 to be adjusted, a projection board 2, and an image acquisition device 3. The projection board 2 and the image acquisition device 3 are used to calibrate the light source 1 to be adjusted. The contour shape of the projection board 2 is consistent with the actual product being measured or inspected. The projection board 2 is fixed on the transmission mechanism of the system according to the clamping and transporting method used by the vision measurement and inspection system during normal operation, and is transported to the reference position for detection or measurement. The light source 1 to be adjusted can be a coaxial light source, such as a ring light source or other standard machine vision-specific light source, or a non-coaxial light source, such as a surface light source or other standard machine vision-specific light source.
[0024] Figure 2 This is a schematic diagram of a projection panel provided in an embodiment of this application. Figure 2 As shown, the projection panel 2 consists of a transparent panel 21, an upper surface shielding layer 22, and a lower surface projection imaging layer 23. The transparent panel 21 is a transparent sheet material with a certain thickness. The upper surface shielding layer 22 has multiple photometric patterns to diffract the emitted light from the light source and project it onto the lower surface projection layer. The lower surface projection layer forms the projected image after diffraction by the light source under the action of the upper surface shielding layer 22. For example, the lower surface projection layer can be a diffuse reflection film layer, which is adhered to the lower surface of the transparent panel 21.
[0025] The image acquisition device 3 is positioned above the light source to be adjusted, and its pose has been pre-calibrated and has reached the target pose state. When the light source to be adjusted is turned on, the image acquisition device 3 can observe the projected image on the projection imaging layer 23 on the lower surface of the projection plate 2 within its field of view.
[0026] In this embodiment of the application, the outline of the photometric pattern is a closed smooth curve.
[0027] Specifically, the metering pattern exists within the upper surface shading layer and is a pattern composed of one or more closed smooth curves. Preferably, the metering image can be circular.
[0028] In addition, to ensure the continuity of the shadow pattern projected onto the lower projection layer, the photometric pattern in this application is a convex pattern. The convex contour can ensure that the shadow pattern it projects is continuous, which makes it easier to find the direction of the maximum gradient of gray in the projection area and thus perform light source pose calibration.
[0029] In this embodiment, the surface of the photometer pattern in the upper surface shielding layer is covered with a coating, and the surface of the upper surface shielding layer other than the photometer pattern is not covered with a coating; or, the surface of the photometer pattern in the upper surface shielding layer is not covered with a coating, and the surface of the upper surface shielding layer other than the photometer pattern is covered with a coating; or, a predetermined area of the surface of the photometer pattern in the upper surface shielding layer is not covered with a coating, and the surface of the upper surface shielding layer other than the predetermined area is covered with a coating; or, a predetermined area of the surface of the photometer pattern in the upper surface shielding layer is covered with a coating, and the surface of the upper surface shielding layer other than the predetermined area is not covered with a coating.
[0030] It is understood that, in order to induce diffraction of the emitted light from the light source to project an image onto the lower surface of the projection plate, embodiments of this application may partially cover the upper surface shielding layer with a coating. This ensures that the light rays tangent to the contour line of the metering aperture in the emitted light from each point on the light-emitting surface of the light source will be diffracted by the edge of the coating. The method of coating can be selected according to requirements, such as chrome plating. Figure 3 This is a schematic diagram illustrating the diffraction principle of the coating on incident light provided in one embodiment of this application. Figure 4 This is a schematic diagram illustrating the diffraction principle of the coating on incident light according to one embodiment of this application. Figure 3 and Figure 4 As shown, the two images represent the asymptotic light intensity distribution produced by the diffraction of the light emitted by the light source under adjustment on the coating on the upper surface shielding layer when the light source to be adjusted is in different positions. Since diffraction is superimposed, the final image projected onto the lower surface projection imaging layer is a superposition of the diffraction distributions of the incident fiber response in different directions. The superposition result has the monotonicity of the grayscale distribution and the demodulation of the distribution function. Figure 5 This is a schematic diagram of the shadow grayscale from the perspective of an image acquisition device provided in a specific embodiment of this application. For example... Figure 5 As shown, when the overall pose of the light source changes, the corresponding image on the lower surface projection imaging layer will be presented with macroscopic grayscale gradients and positional changes. Based on this, the light source can be calibrated using the aforementioned projection board and image acquisition device.
[0031] It is understood that there are various ways to partially cover the upper surface with a coating. This application example uses a circular light metering pattern and a chrome-plated coating as an example for illustration.
[0032] Figure 6 This is a schematic diagram of a design for an upper surface shielding layer provided in an embodiment of this application. (See attached diagram.) Figure 6 As shown, in one example, the inner area of the metering pattern of the upper surface shielding layer is chrome-plated, while the outer area is not chrome-plated.
[0033] Figure 7 This is a schematic diagram of a design for an upper surface shielding layer provided in another embodiment of this application. (See attached diagram.) Figure 7 As shown, in another example, the inner area of the metering pattern on the upper surface shielding layer is not chrome-plated, while the outer area is chrome-plated.
[0034] Figure 8 This is a schematic diagram of a design for an upper surface shielding layer, provided as another embodiment of this application. (See attached diagram.) Figure 8 As shown, in another example, the upper surface shielding layer can be designed by combining the two examples above. In the upper surface shielding layer, the local area inside the metering pattern is not chrome-plated, while the other areas are chrome-plated.
[0035] In this embodiment of the application, the number of metering patterns is at least four, any three of the metering patterns are not collinear, and any one metering pattern is located outside the triangular area formed by the other three metering patterns.
[0036] It is understood that this application can determine the six-DOF attitude parameters of the light source based on the light source pose calibration system, and the number of photometric patterns in the upper surface shading layer can be set according to actual needs. However, considering the smooth continuity of the light field of the light source and the similar light intensity in adjacent areas, a single sampling point cannot meet the positioning accuracy requirements. In addition, local noise may cause numerical inconsistencies during actual operation, leading to errors in the results. Therefore, to ensure the accuracy of the final result, at least four photometric patterns are required to accurately calculate the six-DOF attitude parameters of the light source.
[0037] Furthermore, the setting of multiple metering patterns in this embodiment must also meet the following constraints: any three metering patterns are not collinear, and any one metering pattern is located outside the triangular area formed by the other three metering patterns, such as... Figure 9 and Figure 10 As shown. Figure 9 This is a schematic diagram illustrating a rule for multiple non-collinear photometric patterns provided in a specific embodiment of this application. Figure 10 This is a schematic diagram of the outer rules of multiple photometric triangular regions provided in a specific embodiment of this application.
[0038] Thus, by forming a photometric pattern on the upper surface of the transparent plate with a partial overlay coating and setting a projection image reflection layer on the lower surface of the transparent plate, a grayscale gradient image can be formed on the projection imaging layer on the lower surface by utilizing the diffraction of the light field emitted from the light source at the edge of the photometric pattern. Then, by capturing this image with an image acquisition device, the relative position and attitude parameter deviation of the light source can be analyzed.
[0039] The above technical solution provides a light source pose calibration system, including a light source to be adjusted, a projection board, and an image acquisition device. The projection board is positioned below the light source to be adjusted and includes a transparent plate, an upper surface shielding layer, and a lower surface projection imaging layer. The upper surface shielding layer is located on the upper surface of the transparent plate, and the lower surface projection imaging layer is located on the lower surface of the transparent plate. Multiple photometric patterns are arranged on the upper surface shielding layer. When the light source to be adjusted is turned on, the photometric patterns form a projected image on the lower surface projection imaging layer. The image acquisition device is positioned above the light source to be adjusted and is used to acquire images of the projection board when the light source to be adjusted is turned on. The projection board in this application adopts a double-layer structure. The photometric patterns of the upper surface shielding layer form a clear projection on the lower projection imaging layer, facilitating accurate capture by the image acquisition device. This eliminates the need for high-precision equipment or manual experience. Through the projection correspondence of the double-layer structure, the accuracy and efficiency of light source pose calibration are improved.
[0040] Figure 11 This is a flowchart illustrating a light source pose calibration method provided in an embodiment of this application. Figure 11 As shown, this application provides a light source pose calibration method, applied to the light source pose calibration system in the above embodiments. The light source pose calibration method may include the following steps: Step 101: Obtain sample images acquired by the image acquisition device. The sample images contain projections of various photometric patterns.
[0041] Specifically, after the light source to be adjusted is activated in the light source pose calibration system, the calibrated image acquisition device located above the light source can capture images of the projection board, obtaining a projected image, i.e., a sample image, which includes all the photometric patterns in the upper surface occlusion layer and projected onto the lower surface imaging layer. The sample image records the projection state under the current light source pose, providing a data basis for subsequent analysis.
[0042] Step 102: Identify the projection images of each photometric pattern in the sample image onto the lower surface projection imaging layer using target recognition technology.
[0043] Specifically, the target recognition algorithm can be template recognition based on contour matching, etc. The processor can use the target recognition algorithm to locate the projection area corresponding to each metering pattern in the sample image and distinguish the projection boundaries of different patterns. Since the projection of the metering pattern has a geometric relationship with the original pattern, the projection position can be quickly matched and extracted by using a preset metering pattern template, eliminating background interference.
[0044] Step 103: Perform gradient feature analysis on the projected images of each photometric pattern to obtain the actual feature vector corresponding to each photometric pattern.
[0045] It is understandable that changes in the light source pose alter the incident angle and distance of the light rays, causing regular changes in the gradient characteristics of the projection. For example, moving the light source to the left will cause the overall projection to tilt to the right, and tilting the light source will cause asymmetry in the gradient direction at the projection edges. Therefore, by performing gradient feature analysis on the projected images of each metering pattern, the actual feature vector corresponding to each metering pattern can be obtained, and the pose adjustment parameters of the light source to be adjusted can be determined accordingly. The actual feature vector reflects the projection state, including the rate of change of brightness at the projection edges, edge orientation, and shape distortion parameters.
[0046] Step 104: Determine the pose adjustment parameters of the light source to be adjusted based on the actual feature vector and target feature vector corresponding to each photometric pattern.
[0047] It can be understood that the target feature vector refers to the projection features corresponding to the projected images of each photometric pattern when the light source is in the target pose, which is determined experimentally and preset. Specifically, in the embodiments of this application, the pose adjustment parameters of the light source to be adjusted can be determined by comparing the difference between the actual feature vector and the target feature vector. Among them, the pose adjustment parameters can be the six-degree-of-freedom attitude parameters of the light source in the preset three-dimensional coordinate system, including the position deviation and rotation deviation of the light source in the X, Y, and Z axis directions in the preset three-dimensional coordinate system.
[0048] In one example, the offset of the projection center corresponds to the translational deviation of the light source on the X and Y axes, the asymmetry in the gradient direction corresponds to the rotational deviation of the light source around the X and Y axes, the overall blur or size change of the projection corresponds to the distance deviation of the light source along the Z axis, and the rotational distortion of the projection shape corresponds to the rotational deviation of the light source around the Z axis. Therefore, the pose adjustment parameters of the light source to be adjusted can be calculated by combining the above differences.
[0049] In this way, the three-dimensional pose deviation of the light source is transformed into quantifiable image feature differences. Non-contact calibration is achieved through the optical constraints of the double-layer projection plate, which does not rely on human experience and can output multi-dimensional adjustment parameters at the same time, greatly improving the efficiency and accuracy of light source pose calibration.
[0050] In this embodiment, gradient feature analysis is performed on the projected images of each metering pattern to obtain the actual feature vector corresponding to each metering pattern. This may include: performing Gaussian smoothing filtering on the projected image to determine the maximum gradient direction and corresponding gradient value of each pixel in the projected image; filtering out pixels in the projected image whose gradient values are greater than a preset noise threshold to obtain a connected component image; determining the median value of the grayscale value of the connected component image based on the grayscale value of each pixel; traversing all pixels on the contour line of the connected component image, marking pixels on the contour line with grayscale values greater than the median value as bright area contour points, and marking pixels on the contour line with grayscale values less than the median value as dark area contour points; determining multiple candidate curves in the connected component image based on a linear programming algorithm, wherein the tangent direction of each pixel on the candidate curve is consistent with the maximum gradient direction of each pixel, and the starting point of the candidate curve is the bright area contour point, and the ending point of the candidate curve is the dark area contour point; determining the target curve from the multiple candidate curves, wherein the target curve is the longest candidate curve among the multiple candidate curves; and determining the actual feature vector corresponding to the metering pattern based on the target curve.
[0051] It is understood that the embodiments of this application can accurately extract the edge gradient change pattern of the projected image corresponding to the photometric pattern, and convert the two-dimensional image features into quantifiable vector parameters, so as to facilitate the calculation of the pose adjustment parameters of the light source.
[0052] Specifically, for the projected images corresponding to each metering pattern, a Gaussian smoothing filter is first applied to reduce noise interference and ensure the accuracy of gradient calculation. Then, the gradient value and maximum gradient direction of each pixel are calculated using a gradient operator. The gradient value reflects the magnitude of brightness changes in the image, and the maximum gradient direction is the direction of the most drastic brightness change. The gradient value is largest at the edges of the projected image, and its direction is perpendicular to the edge direction, reflecting the contour features of the projection.
[0053] Furthermore, pixels with gradient values greater than a preset noise threshold are selected to preserve valid edge information. Then, through connectivity analysis, such as a region growing algorithm, these points are aggregated into a connected component image, i.e., the edge regions of the projection. This removes background noise and weak gradient interference, focusing on the valid edges of the projection. Next, the grayscale values of all pixels in the connected component image are calculated, and the median value is used as the threshold for distinguishing between bright and dark areas. Since the grayscale difference between bright and dark areas in the projected image is significant, the median value can stably segment the two types of regions, avoiding threshold deviations caused by uneven illumination.
[0054] Furthermore, by traversing all pixels on the contour lines of the connected component image, pixels with gray values greater than the median are marked as bright contour points, and those with gray values less than the median are marked as dark contour points, thus clarifying the brightness and darkness attributes of the edges and providing start and end point constraints for subsequent curve tracing. Then, based on a linear programming algorithm, multiple candidate curves are fitted within the connected component. Each candidate curve must satisfy the following conditions: the tangent direction of a pixel point is consistent with the direction of its maximum gradient, and its starting point is a bright contour point and its ending point is a dark contour point. Finally, the longest curve among the multiple candidate curves is selected as the target curve. The target curve can most completely reflect the projection edge features, and its parameters are extracted and integrated into the actual feature vector of the metering pattern projection.
[0055] Thus, by accurately capturing the microscopic features of the projection edges through gradient analysis and extracting macroscopic contour patterns using mathematical programming methods, the geometric and optical properties of the projection are ultimately transformed into structured feature vectors. This method is robust to illumination changes and slight noise, and can stably reflect projection distortion caused by changes in the light source pose, providing high-precision input for subsequent pose parameter calculations.
[0056] In this embodiment of the application, determining the actual feature vector corresponding to the photometric pattern based on the target curve may include: determining the average gradient value of each pixel on the target curve as the vector modulus of the actual feature vector; and determining the average gradient direction of each pixel on the target curve as the vector direction of the actual feature vector.
[0057] It is understandable that vector modulus can reflect the overall sharpness of the projected edge. The larger the modulus, the steeper the brightness transition between the bright and dark areas, indirectly reflecting the focusing degree and vertical distance of the light source. If the light source is too far away, it will cause the projected edge to be blurry, and the modulus will decrease. Vector direction reflects the overall direction of the projected edge. Directional deviation is directly related to the rotational attitude of the light source. For example, if the light source is tilted around the X-axis, it will cause the gradient direction of the projected edge to shift as a whole, forming an angle with the target direction.
[0058] Specifically, the arithmetic mean of the gradient values of all pixels on the target curve is taken, and this average is used as the vector magnitude of the actual feature vector. Simultaneously, the average of the maximum gradient directions of all pixels on the target curve is taken, and this average direction is used as the vector square of the actual feature vector. This feature vector extraction method preserves core pose information while reducing the computational complexity of subsequent comparisons with the target feature vector, thus balancing accuracy and efficiency.
[0059] In this embodiment, determining the pose adjustment parameters of the light source to be adjusted based on the actual feature vector and target feature vector corresponding to each photometer pattern may include: determining the orientation angle corresponding to each photometer pattern based on the actual feature vector and target feature vector corresponding to each photometer pattern; determining the position deviation of the light source to be adjusted based on the actual feature vector, target feature vector, and orientation angle of each photometer pattern; determining the rotation angle deviation of the light source to be adjusted based on the actual feature vector and target feature vector corresponding to each photometer pattern; and determining the pose adjustment parameters of the light source to be adjusted based on the position deviation and rotation angle deviation.
[0060] Specifically, based on each metering pattern, the angle between the actual feature vector and the target feature vector, i.e., the orientation angle, is calculated. Calculating the orientation angle quantifies the deviation of a single projected edge, providing fundamental data for subsequent calculations of the overall rotational deviation.
[0061] Furthermore, since the mapping model can be calibrated experimentally, changes in the light source position will cause a regular deviation in the overall sharpness (modulus) and local orientation (direction angle) of the projection. Therefore, the embodiments of this application can combine the modulus difference and direction angle between the actual feature vector and the target feature vector, and calculate the positional deviation of the light source in the X, Y, and Z axes, i.e., the translational deviation, through a mapping model of preset feature deviation and spatial position. In this way, the influence of single-point errors can be reduced by fusing multiple graphic data, thereby improving the accuracy of the calculation results.
[0062] Meanwhile, considering that the rotation of the light source will cause the overall direction of the projection edge to become consistent or gradient-like, the direction angles of all photometric patterns can be statistically analyzed. For example, by taking the average or fitting the main direction, the overall direction deviation can be obtained, which is the rotation angle deviation of the light source around the X, Y, and Z axes.
[0063] Finally, by combining positional deviations (translation amounts along the X, Y, and Z axes) and rotational angular deviations (rotation angles around the X, Y, and Z axes), complete pose adjustment parameters, i.e., six-DOF pose parameters, are formed. Thus, by utilizing the differences in eigenvectors from multiple photometric images, a comprehensive analysis of the light source's six-DOF pose is achieved. The fusion of multi-image data not only improves the robustness of deviation calculations but also distinguishes between projection changes caused by translation and rotation, ensuring the accuracy of the adjustment parameters.
[0064] Figure 12 This is a schematic diagram illustrating the design principle of an upper surface shielding layer according to a specific embodiment of this application. Figure 12 As shown in a specific embodiment of this application, the light metering pattern is a circular light metering aperture, and the upper surface shielding layer includes four circular light metering apertures. The area outside each light metering aperture is chrome plated. Taking this hardware design scheme as an example, the workflow of light source calibration is explained.
[0065] At the specific location, the light source to be adjusted illuminates the projection panel, enabling the image acquisition device, in conjunction with the lens, to observe the projected images of each circular metering hole on the lower surface of the projection panel.
[0066] The accompanying software acquires sample images from the projection board 2 in real time using an image acquisition device and outputs corresponding adjustment direction prompts in real time. This helps the setup personnel adjust the position and orientation of the light source to be adjusted to the target position based on the locations of the projection board and the image acquisition device. The operating logic of the accompanying software is as follows: S1 captures a real-time sample image from the camera.
[0067] S2 uses known target recognition technology, combined with position and shape information in the image, to identify the image of each light metering aperture projected onto the lower surface projection imaging layer in the sample image, and names it the projection image Sn.
[0068] S3, after applying Gaussian smoothing filter to Sn, calculate the maximum gradient direction and corresponding gradient value for each pixel. Filter out the pixels whose gradient values are greater than a preset noise threshold to form the connected component image SAn.
[0069] S4. Find the median value T of the grayscale value of the connected component image SAn. Traverse the contour line of SAn. Pixels with grayscale values greater than T are marked as bright area contour points, and pixels with grayscale values less than T are marked as dark area contour points.
[0070] S5. Based on the linear programming algorithm, find a curve Ln in SAn. The requirements are: the tangent direction at each point on curve Ln is consistent with the direction of the maximum gradient at that point; curve Ln is continuous; the start and end points of curve Ln correspond to a bright area contour point and a dark area contour line on the SAn contour line, respectively; and curve Ln is the longest among all curves in SAn that satisfy these conditions. Figure 13 This is a schematic diagram illustrating the principle of determining the curve Ln. (For example...) Figure 13 As shown, from left to right are the projected image Sn, the connected component image ASN, and the curve Ln in the connected component image.
[0071] S6. Calculate the average gradient value at each point on Ln, and use it as the vector magnitude of the actual feature vector Vn. Then calculate the average gradient direction at each point on Ln, and use it as the vector direction of the actual feature vector Vn, thus obtaining the actual feature vector Vn.
[0072] S7, the software retrieves the pre-saved target feature vector Vn0. The target feature vector is the ideal value of each photometer aperture obtained by actual measurement or calculation when the light source is at the target position. Based on the actual feature vector Vn and the target feature vector Vn0, the corresponding orientation angle θn can be determined, such as... Figure 11As shown, let the four metering apertures be the first metering aperture, the second metering aperture, the third metering aperture, and the fourth metering aperture, which correspond to the actual feature vectors V1, V2, V3, and V4, the target feature vectors V10, V20, V30, and V40, and the orientation angles θ1, θ2, θ3, and θ4, respectively.
[0073] The pose adjustment parameters of the light source are calculated as follows: X-axis position deviation of the light source: Xd=|V1-V10|*cosθ1+|V2-V20|*cosθ2+|V3-V30|*cosθ3+|V4-V40|*cosθ4.
[0074] Y-axis position deviation of the light source: Yd=|V1-V10|*sinθ1+|V2-V20|*sinθ2+|V3-V30|*sinθ3+|V4-V40|*sinθ4.
[0075] Z-axis position deviation of the light source: Zd=|V1+V2+V3+V4|-|V10+V20+V30+V40|.
[0076] X-axis rotation deviation of the light source: θxd=|V1+V4|-|V10+V40|-|V2+V3|+|V20+V30|.
[0077] Y-axis rotation deviation of the light source: θyd=|V1+V2|-|V10+V20|-|V3+V4|+|V30+V40|.
[0078] Z-axis rotation deviation of the light source: θzd=|V1+V3|-|V10+V30|-|V2+V4|+|V20+V40|.
[0079] S8, refresh and display the above calculation results on the human-machine interface: Xd, Yd, Zd, θxd, θyd, θzd. After adjusting the position and attitude of the light source accordingly based on the calculation results, start the cycle again from step S1 until the light source reaches the predetermined position and the calibration is completed.
[0080] Thus, based on the projected images of each photometric pattern on the lower surface of the projection board, the deviation directions of all six degrees of freedom position and attitude parameters of the light source are calculated, guiding the assembly personnel to accurately and efficiently adjust the position and attitude of the light source. This avoids relying on personnel experience to analyze and judge the deviation directions of the light source position and attitude parameters without direct evidence, thereby improving the accuracy of the calibration results.
[0081] Figure 14This is a structural block diagram of a controller provided in an embodiment of this application. Figure 14 As shown in the figure, this application provides a controller that may include: Memory 110 is configured to store instructions; The processor 120 is configured to retrieve instructions from the memory 110 and to implement the aforementioned light source pose calibration method when executing the instructions.
[0082] This application also provides a machine-readable storage medium on which a program or instruction is stored. When the program or instruction is executed by a processor, it implements the above-described light source pose calibration method.
[0083] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0084] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0085] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0086] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0087] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0088] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, like read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0089] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0090] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0091] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A light source pose calibration system, characterized in that, The light source pose calibration system includes: A projection panel is positioned below the light source to be adjusted. The projection panel includes a transparent plate, an upper surface shielding layer, and a lower surface projection imaging layer. The upper surface shielding layer is positioned on the upper surface of the transparent plate, and the lower surface projection imaging layer is positioned on the lower surface of the transparent plate. Multiple light metering patterns are provided on the upper surface shielding layer. When the light source to be adjusted is turned on, the light metering patterns form a projected image on the lower surface projection imaging layer. An image acquisition device is positioned above the light source to be adjusted, and is used to acquire images of the projection panel when the light source to be adjusted is turned on.
2. The light source pose calibration system according to claim 1, characterized in that, The number of metering patterns is at least four, and any three of the metering patterns are not collinear, with any one metering pattern located outside the triangular area formed by the other three metering patterns.
3. The light source pose calibration system according to claim 1, characterized in that, The outline of the photometric pattern is a closed, smooth curve.
4. The light source pose calibration system according to claim 1, characterized in that, The surface of the photometric pattern in the upper surface shielding layer is covered with a coating, and the surfaces in the upper surface shielding layer other than the photometric pattern are not covered with a coating; Alternatively, the surface of the photometer pattern in the upper surface shielding layer is not covered with a coating, and the surfaces of the upper surface shielding layer other than the photometer pattern are covered with a coating; Alternatively, a predetermined area of the surface of the photometric pattern in the upper surface shielding layer is not covered with a coating, and the surface of the upper surface shielding layer other than the predetermined area is covered with a coating. Alternatively, a predetermined area of the surface of the photometric pattern in the upper surface shielding layer is covered with a coating, and the surface of the upper surface shielding layer other than the predetermined area is not covered with a coating.
5. A method for calibrating the pose of a light source, characterized in that, The light source pose calibration method, applied to the light source pose calibration system according to any one of claims 1 to 4, comprises: Acquire sample images captured by the image acquisition device, wherein the sample images contain projections of each of the photometric patterns; The projection images of each photometric pattern in the sample image onto the lower surface projection imaging layer are identified using target recognition technology. Gradient feature analysis is performed on the projected images of each of the aforementioned photometric patterns to obtain the actual feature vectors corresponding to each of the aforementioned photometric patterns; Based on the actual feature vector and target feature vector corresponding to each of the aforementioned photometric patterns, the pose adjustment parameters of the light source to be adjusted are determined.
6. The light source pose calibration method according to claim 5, characterized in that, The step of performing gradient feature analysis on the projected images of each of the photometer patterns to obtain the actual feature vector corresponding to each of the photometer patterns includes: The projected image is subjected to Gaussian smoothing filtering to determine the maximum gradient direction and corresponding gradient value of each pixel in the projected image. Pixels in the projected image whose gradient values are greater than a preset noise threshold are selected to obtain a connected component image; Based on the grayscale values of each pixel, determine the median value of the grayscale values of the connected component image; Traverse all pixels on the contour line of the connected component image, mark pixels on the contour line with gray values greater than the median value as bright area contour points, and mark pixels on the contour line with gray values less than the median value as dark area contour points. Based on the linear programming algorithm, multiple candidate curves are determined in the connected component image. The tangent direction of each pixel on the candidate curve is consistent with the maximum gradient direction of each pixel. The starting point of the candidate curve is the bright area contour point, and the ending point of the candidate curve is the dark area contour point. A target curve is determined from the plurality of candidate curves, wherein the target curve is the candidate curve with the longest length among the plurality of candidate curves; The actual feature vector corresponding to the photometric pattern is determined based on the target curve.
7. The light source pose calibration method according to claim 6, characterized in that, Determining the actual feature vector corresponding to the photometric pattern based on the target curve includes: The average gradient value of each pixel on the target curve is determined as the vector magnitude of the actual feature vector; The average gradient direction of each pixel on the target curve is determined as the vector direction of the actual feature vector.
8. The light source pose calibration method according to claim 5, characterized in that, The step of determining the pose adjustment parameters of the light source to be adjusted based on the actual feature vector and target feature vector corresponding to each of the photometric patterns includes: Based on the actual feature vector and target feature vector corresponding to each of the photometer patterns, determine the orientation angle corresponding to each of the photometer patterns; The positional deviation of the light source to be adjusted is determined based on the actual feature vector, the target feature vector, and the direction angle of each photometric pattern. Based on the actual feature vector and target feature vector corresponding to each of the aforementioned photometric patterns, the rotation angle deviation of the light source to be adjusted is determined; The pose adjustment parameters of the light source to be adjusted are determined based on the position deviation and the rotation angle deviation.
9. A controller, characterized in that, include: The memory is configured to store instructions; as well as The processor is configured to retrieve the instructions from the memory and, when executing the instructions, to implement the light source pose calibration method according to any one of claims 5 to 8.
10. A machine-readable storage medium on which a program or instructions are stored, characterized in that, When the program or the instructions are executed by the processor, the light source pose calibration method according to any one of claims 5 to 8 is implemented.
Citation Information
Patent Citations
Method and device for generating light source position
CN113587810A
Visual system calibration method and device, computer equipment and storage medium
CN114359371A
Illumination angle calibration device, method and system
CN114445489A
Mask base plate for projection type photoetching, photomask and preparation method of photomask
CN114839834A