Self-adaptive system for imaging of industrial line-scan digital camera

By designing an adaptive system for industrial linear array camera imaging, using machine vision and control algorithms to adjust the camera's position and angle in real time, the problem of poor image quality of industrial linear array cameras under different working conditions is solved, and efficient Stable image acquisition.

CN119450189APending Publication Date: 2025-02-14武汉钢铁有限公司
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411352908.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

It is difficult for industrial linear array cameras to maintain parallel overlap between linear light sources, the surface of the measured object and the camera picture under different operating conditions, resulting in poor image quality and low manual fine-tuning efficiency.

Method used

Design an adaptive system for industrial linear array camera imaging, including machine vision acquisition module, control algorithm module, communication control module and electrical structure adjustment module. By analyzing image quality in real time, control instructions are generated to adjust the three-dimensional electric adjustment structure and X-axis The position of the linear module realizes independent adjustment and optimization of the image.

Benefits of technology

It improves the image quality and stability of industrial line array cameras under different working conditions, reduces the need for manual fine-tuning, and improves work efficiency and system reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119450189A_ABST
    Figure CN119450189A_ABST
Patent Text Reader

Abstract

The invention discloses a self-adaptive system for industrial line-scan digital camera imaging, and relates to the technical field of imaging calibration, and the system comprises a machine vision collection module which is used for obtaining an image obtained by collecting a detected object through an industrial line-scan digital camera in a continuous steel belt production detection process; the control algorithm module is used for analyzing the image to obtain an analysis result; the communication control module is used for generating a target instruction for controlling the three-dimensional electric adjusting structure to move according to the analysis result; and the electrical structure adjusting module is used for adjusting the moving state of the three-dimensional electric adjusting structure according to the target instruction, so that the industrial line-scan digital camera acquires the image of the measured object at the target position. According to the invention, the control algorithm module performs optimization in real time according to the adjusted state while automatic correction is performed, the quality of the output image is ensured, and when the quality of the output image meets the design requirement, self-adaption is stopped.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of imaging calibration technology, and in particular to an adaptive system for industrial linear array camera imaging. Background Art

[0002] Machine vision is a device that automatically receives and processes an image of a real object through optical devices and non-contact sensors to obtain the required information for control, analysis and identification. It mainly involves image acquisition, image preprocessing, image segmentation, target detection, target tracking and other technologies. With the continuous development of artificial intelligence in the field of vision, the industrial application scenarios of machine vision are increasing.

[0003] At present, the main image acquisition method in the field of industrial applications of machine vision is through industrial cameras, which are mainly divided into area array cameras and line array cameras. Industrial area array cameras obtain image information through frame triggering, that is, according to the trigger signal, a whole photo is taken each time, and the matching is the area array light source, which must cover the entire image; industrial line array cameras use the external trigger signal of the camera to complete the shooting of a linear image, and then according to the camera's own capabilities and post-settings, after completing a certain number of linear images, they are pieced together into a completed recognition image. Due to different working conditions, the application scenarios of these two types of industrial cameras are also different.

[0004] Industrial line array cameras use a linear array light source, that is, the light source is also a linear bright band, and the camera's single main field of view is also a line graph, which means that the two straight lines in space must be parallel and overlapped to achieve a good application effect.

[0005] In summary, it is necessary to propose an adaptive system for industrial line array camera imaging to solve the above problems. Summary of the invention

[0006] A series of simplified concepts are introduced in the Summary of the Invention section, which will be further described in detail in the Detailed Description of the Invention section. The Summary of the Invention section of this application does not mean to attempt to define the key features and essential technical features of the claimed technical solution, nor does it mean to attempt to determine the scope of protection of the claimed technical solution.

[0007] This application proposes an adaptive system for industrial linear array camera imaging, including:

[0008] The machine vision acquisition module is used to obtain images of the object under test by an industrial linear array camera during the continuous steel strip production inspection process;

[0009] A control algorithm module, used for analyzing the image to obtain an analysis result;

[0010] A communication control module, used for generating a target instruction for controlling the movement of the three-dimensional electric adjustment structure according to the analysis result;

[0011] The electrical structure adjustment module is used to adjust the movement state of the three-dimensional electric adjustment structure according to the target instruction, so that the industrial linear array camera can collect the image of the object to be measured at the target position.

[0012] In a feasible implementation manner, the control algorithm module is further used to:

[0013] The image acquired by the industrial linear array camera at the target position is analyzed in real time until the quality of the image meets the preset requirements, and the communication control module is controlled to generate an end instruction; wherein the end instruction is an instruction to stop each module in the adaptive system of the industrial linear array camera imaging from continuing to work.

[0014] In a feasible implementation manner, the control algorithm module further includes an image conversion module, an edge finding module, a coarse adjustment module, a centering module, a fine adjustment module and a verification module, wherein:

[0015] The image conversion module is used to convert the image collected by the machine vision acquisition module into a GBA array, so as to analyze the image through pixel values;

[0016] The edge finding module is used to find the left and right edges of the image when the camera field of view is insufficient;

[0017] The coarse adjustment module is used to perform preliminary calibration on the image to obtain the target angle position of the Ryz axis of the three-dimensional electric adjustment structure;

[0018] The fine adjustment module is used to accurately calibrate the image after the preliminary calibration to obtain the target positions of the Rxz axis and the Rxy axis of the three-dimensional electric adjustment structure;

[0019] The centering module is used to horizontally move the image after preliminary calibration or precise calibration to the center position of the camera field of view;

[0020] The verification module is used to verify whether the quality of the target image meets the preset requirements. The target image is an image that has been centered again by the centering module after precise calibration.

[0021] In a feasible implementation manner, the edge finding module performs left and right edge finding on an image when the camera field of view is insufficient, including:

[0022] Starting from the upper left corner of the image, traverse a single row of pixel values ​​from left to right. When the first pixel difference reaches or exceeds the preset threshold, locate the horizontal position of the current pixel, and average the single row edge finding and positioning results of all images to determine the exact position of the left line;

[0023] Starting from the upper right corner of the image, traverse a single row of pixel values ​​from right to left. When the first pixel difference reaches or exceeds the preset threshold, locate the horizontal position of the current pixel and average the single row edge finding results of all images to determine the exact position of the right edge line.

[0024] In a feasible implementation manner, the centering module horizontally moves the image to the center position of the camera field of view, including:

[0025] When there are left and right double edges, the mean of the positions of the left and right lines is obtained, and the center line mean is calculated. When the difference between the center line mean and the horizontal pixel center point is within 1% of the total horizontal pixel width, the image is centered.

[0026] When there is a left or right single edge, the left or right line position is obtained, and the proportion of the low gray area in the image is calculated. When the proportion of the low gray area reaches 20% to 40%, the image is centered.

[0027] When the entire image has no borders, the left and right boundaries of the image are defined as the left and right edge lines to complete the image centering.

[0028] In a feasible implementation manner, the rough adjustment module performs preliminary calibration on the image to obtain the target angle position of the Ryz axis of the three-dimensional electric adjustment structure, including:

[0029] Obtaining the rotation angle range of the three-dimensional electric adjustment structure on the Ryz axis;

[0030] Find the target angle position with the maximum image gray value within the rotation angle range;

[0031] The Ryz-axis rotation of the three-dimensional electric adjustment structure is locked to the target angular position.

[0032] In a feasible implementation manner, the fine adjustment module accurately calibrates the image after preliminary calibration to obtain the angular position of the Rxz axis and the Rxy axis of the three-dimensional electric adjustment structure, including:

[0033] Rotating the Rxz axis of the three-dimensional electric adjustment structure and capturing images at different angles;

[0034] Calculate the mean deviation of the image pixel array at each angular position and compare them to obtain the angular position with the minimum mean deviation;

[0035] Rotating the Rxz axis of the three-dimensional electric adjustment structure to an angular position where the mean deviation is minimum;

[0036] According to the left and right edge positioning of the image, the grayscale mean of the left and right half images are calculated respectively, and the Rxy axis of the three-dimensional electric adjustment structure is rotated until the grayscale mean difference of the left and right half images is less than 2%, and the angular position of the Rxy axis is obtained.

[0037] In a feasible implementation manner, the verification module verifies whether the quality of the target image meets the preset requirements, including:

[0038] Extracting a verification area block in the target image;

[0039] Calculating the grayscale mean of the verification area block and outputting the relative annotation deviation of the grayscale mean;

[0040] When the relative annotation deviation is within 5%, it is confirmed that the quality of the target image meets the preset requirements, and the target image is output.

[0041] In a feasible implementation manner, the target image includes 9 verification area blocks.

[0042] In a feasible implementation manner, the calculation formula of the relative annotation deviation is:

[0043] Relative standard deviation = (deviation / overall mean) × 100%;

[0044] Deviation = | grayscale mean of verification area block - overall mean |.

[0045] In summary, the adaptive system of industrial linear array camera imaging proposed in this application, the control algorithm module reads the image state collected by machine vision in real time, analyzes and judges, and issues instructions to the PLC. The PLC controls the angle to select the movement state of the three-dimensional electric adjustment structure (Rxy axis, Ryz axis, Rxz axis) to complete the three-dimensional position adjustment of the imaging, and the linear module of the X-axis completes the centering correction. While automatically correcting, the control algorithm module will optimize in real time according to the adjustment state to ensure the output image quality. When the output image quality meets the design requirements, the adaptation stops. This application can efficiently complete the autonomous adjustment of the imaging effect based on the visual effect through the cooperation of various modules.

[0046] The adaptive system for industrial linear array camera imaging proposed in this application, and other advantages, objectives and features of this application will be reflected in part through the following description, and in part will be understood by technicians in this field through research and practice of this application. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present specification. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0048] Figure 1 A schematic diagram of the structure of an adaptive system for industrial linear array camera imaging provided in an embodiment of the present application;

[0049] Figure 2 A schematic diagram of a three-dimensional electric adjustment structure provided in an embodiment of the present application;

[0050] Figure 3 A front view of a three-dimensional electric adjustment structure provided in an embodiment of the present application;

[0051] Figure 4 A schematic diagram of the position definition of a three-dimensional coordinate system provided in an embodiment of the present application;

[0052] Figure 5 A schematic diagram of the shooting state of an industrial line array camera provided in an embodiment of the present application;

[0053] Figure 6 A schematic diagram illustrating the motion state of the Ryz axis in the coarse adjustment of the camera provided in an embodiment of the present application;

[0054] Figure 7 A schematic diagram of the division of verification areas of the verification module provided in an embodiment of the present application;

[0055] Figure 8 A flowchart of the operation of the control algorithm module provided in an embodiment of the present application. DETAILED DESCRIPTION

[0056] In order to better understand the technical solutions provided by the embodiments of this specification, the technical solutions of the embodiments of this specification are described in detail below through the accompanying drawings and specific embodiments. It should be understood that the embodiments of this specification and the specific features in the embodiments are detailed descriptions of the technical solutions of the embodiments of this specification, rather than limitations on the technical solutions of this specification. In the absence of conflict, the embodiments of this specification and the technical features in the embodiments can be combined with each other.

[0057] In this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or equipment. In the absence of more restrictions, the elements limited by the statement "comprise one..." do not exclude the existence of other identical elements in the process, method, article or equipment including the elements. The term "more than two" includes two or more than two situations.

[0058] In the process of continuous strip production inspection, the industrial linear array camera theoretically requires that the linear image of the linear array camera and the linear light source can overlap on the surface of the object to be inspected and be parallel in space. However, through the inspection of multiple actual scenes, it is found that the plane where the inspected position of the object to be inspected, the light source line, and the plane where the linear image of the linear array camera is located are difficult to reasonably maintain in a state of visual requirements and obtain a good visual image. At the same time, for visual engineers, when the camera is distorted or offset and the collected image cannot meet the requirements, they must go to the site in person to manually fine-tune to restore the image quality. When the business volume is large, it is very challenging. In addition, many installation locations are above the running units. It is forbidden to go up to work during the production process, which also leads to a serious decline in work efficiency and affects the normal online visual inspection work.

[0059] Based on the above problems, the present application provides an adaptive system for industrial linear array camera imaging, which can be an adaptive system for high-quality imaging of linear array cameras based on visual images as feedback. The system includes a corresponding visual algorithm structure and a control structure, and can efficiently complete autonomous adjustment of imaging effects based on visual effects.

[0060] See also Figure 1 , which is a schematic diagram of the structure of an adaptive system for industrial linear array camera imaging provided in an embodiment of the present application, and may specifically include:

[0061] The machine vision acquisition module 11 is used to acquire images of the object to be tested by an industrial linear array camera during the continuous steel strip production inspection process;

[0062] For example, an industrial linear array camera is used to collect images of the object to be measured. Furthermore, the modules are usually development samples provided by camera manufacturers, and can be used by directly calling or fine-tuning the output acquisition.

[0063] A control algorithm module 12 is used to analyze the image to obtain an analysis result;

[0064] Exemplarily, the control algorithm module 12 reads the image status acquired by the machine vision acquisition module in real time, analyzes and determines the quality of the image, and determines the adjustment strategy according to a preset algorithm.

[0065] A communication control module 13, used to generate a target instruction for controlling the movement of the three-dimensional electric adjustment structure according to the analysis result;

[0066] Exemplarily, the control algorithm module 12 sends the result of analyzing and judging the image to the PLC in the communication control module 13 to issue instructions. Specifically, the PLC (programmable logic controller) receives the target instruction generated based on the analysis result of the control algorithm module and controls the motor and the linear module to adjust the position.

[0067] The electrical structure adjustment module 14 is used to adjust the moving state of the three-dimensional electric adjustment structure according to the target instruction, so that the industrial linear array camera can collect the image of the object to be measured at the target position.

[0068] Exemplarily, the moving state of the angle-selecting three-dimensional electric adjustment structure is controlled by PLC, and the three-dimensional electric adjustment structure includes an angle selection motor (Rxy axis, Ryz axis, and the angle of the Rxz axis), which is used to complete the three-dimensional position adjustment of the imaging, and change the angle of the camera by rotating in different directions, as well as an X-axis linear module, which is used to complete the centering correction to ensure the accurate position of the camera in the X-axis direction.

[0069] Specifically, Figure 2 and Figure 3 As shown in FIG. 1 , a linear module parallel to the X-axis is set on the base of the Rxy axis of the three-dimensional electric adjustment structure to control the horizontal movement of the camera. The electric adjustment structure mainly includes the motion states of the four axes (the orientation of the three-dimensional structure is referenced by Figure 4 The three-dimensional position definition shown in the figure) is shown in the figure, wherein the Rxy axis drives the camera to rotate and move in the xy plane, the Ryz axis drives the camera to rotate and move in the yz plane, and the Rxz axis drives the camera to rotate and move in the xz plane. The linear module of the X axis can directly drive the three-dimensional electric adjustment structure as a whole to move linearly in the X axis direction (parallel to the direction of the linear light source).

[0070] In summary, if Figure 5 As shown, Figure 5 This is a schematic diagram of the shooting status of an industrial line array camera. Figure 5There are an industrial linear array camera 1, a linear array light source 2, and a detected position 3. In the actual composition state, the linear light source and the object to be measured at the imaging position, as well as the imaging area of ​​the camera are all linear. The three must maintain a high degree of consistency to obtain good image quality. Different position states will cause different imaging effects in the actual sampling process. Usually, because it is an external device, the position of the object to be measured cannot be adjusted, and the light source will no longer change after the initial installation. Therefore, the adjustment of the detection effect can only be completed by adjusting the camera position. In response to the above problems, the present application designs an adaptive system for industrial linear array camera imaging that can use visual images as feedback, including the development of corresponding visual algorithm structures and control structures, which can efficiently complete the autonomous adjustment of imaging effects based on visual effects.

[0071] In some examples, the control algorithm module 12 is further configured to:

[0072] The image acquired by the industrial linear array camera at the target position is analyzed in real time until the quality of the image meets the preset requirements, and the communication control module is controlled to generate an end instruction; wherein the end instruction is an instruction to stop each module in the adaptive system of the industrial linear array camera imaging from continuing to work.

[0073] Exemplarily, during the automatic correction, the control algorithm module 12 will perform real-time optimization according to the adjustment status to ensure the quality of the final output image, and stop the self-adaptation when the output image quality reaches the preset requirement.

[0074] In some examples, the control algorithm module 12 further includes an image conversion module, an edge finding module, a coarse adjustment module, a centering module, a fine adjustment module, and a verification module, wherein:

[0075] The image conversion module is used to convert the image collected by the machine vision acquisition module into a GBA array, so as to analyze the image through pixel values;

[0076] The edge finding module is used to find the left and right edges of the image when the camera field of view is insufficient;

[0077] The coarse adjustment module is used to perform preliminary calibration on the image to obtain the target angle position of the Ryz axis of the three-dimensional electric adjustment structure;

[0078] The fine adjustment module is used to accurately calibrate the image after the preliminary calibration to obtain the target positions of the Rxz axis and the Rxy axis of the three-dimensional electric adjustment structure;

[0079] The centering module is used to horizontally move the image after preliminary calibration or precise calibration to the center position of the camera field of view;

[0080] The verification module is used to verify whether the quality of the target image meets the preset requirements. The target image is an image that has been centered again by the centering module after precise calibration.

[0081] Exemplarily, the control algorithm module 12 divides the adaptive process into an image conversion module, an edge finding module, a coarse adjustment module, a centering module, a fine adjustment module and a verification module, each of which performs different actions. The image collected by the machine vision acquisition module is converted into a GBA array, analyzed and judged by pixel values, and outputs the control and detection adaptive situation, and defines the upper left corner of the image as the origin position of the pixel coordinates. That is, the coordinates of the upper left corner pixel of the image are (0,0), and as it moves to the right, the X coordinate increases; as it moves downward, the Y coordinate increases.

[0082] In some examples, the edge finding module performs left and right edge finding on an image when the camera field of view is insufficient, including:

[0083] Starting from the upper left corner of the image, traverse a single row of pixel values ​​from left to right. When the first pixel difference reaches or exceeds the preset threshold, locate the horizontal position of the current pixel, and average the single row edge finding and positioning results of all images to determine the exact position of the left line;

[0084] Starting from the upper right corner of the image, traverse a single row of pixel values ​​from right to left. When the first pixel difference reaches or exceeds the preset threshold, locate the horizontal position of the current pixel and average the single row edge finding results of all images to determine the exact position of the right edge line.

[0085] Exemplarily, edge finding is a commonly used image processing technology used to determine the position of a specific edge in an image. Edge finding is generally divided into left edge finding and right edge finding. If the camera field of view is insufficient, only left or right edge finding may be required. If the panorama is within the field of view, no edge finding is required. The default field of view edges are the left and right edge lines. The left edge finding traverses a single row of pixel values ​​from left to right. When the first pixel difference reaches or exceeds a preset threshold dl (for example, an experimental range of 40-100, which can be adjusted according to actual conditions), the horizontal position of the pixel is located, and the single-row edge finding positioning results of the entire image are averaged, that is, the left side is located and detected. The same method is used to determine the right edge, but the traversal direction is from right to left.

[0086] It should be noted that the edge-finding operation is usually performed on a single line, which can simplify the algorithm and reduce the amount of calculation. The selection of the preset threshold dl is very critical, and it needs to be adjusted according to the contrast and noise level of the actual image. The accuracy of edge positioning can be improved by averaging, and the error caused by image noise or local changes can be reduced. Through this edge-finding method, the edge-finding module can accurately identify and locate the edges in the image, which is crucial for subsequent image analysis and processing steps.

[0087] In some examples, the centering module horizontally moves the image to the center of the camera field of view, including:

[0088] When there are left and right double edges, the mean of the positions of the left and right lines is obtained, and the center line mean is calculated. When the difference between the center line mean and the horizontal pixel center point is within 1% of the total horizontal pixel width, the image is centered.

[0089] When there is a left or right single edge, the left or right line position is obtained, and the proportion of the low gray area in the image is calculated. When the proportion of the low gray area reaches 20% to 40%, the image is centered.

[0090] When the entire image has no borders, the left and right boundaries of the image are defined as the left and right edge lines to complete the image centering.

[0091] For example, centering an image can ensure that a specific object or feature in the image is located at the center of the camera's field of view.

[0092] Specifically, when there are two sides, the mean of the left and right positions is obtained. First, the positions of the left and right lines are determined by left and right edge search operations; the mean of the left and right line positions is calculated to obtain a value representing the center line of the image. Then the difference with the horizontal pixel center point is calculated, and the obtained center line mean is compared with the horizontal pixel center point (i.e., half of the image width); the difference between the two is calculated, and when the difference is within 1% of the total horizontal pixel width, the image is considered to have been centered.

[0093] When only one side exists, first locate the sideline and determine the position of the existing side (left or right) through edge finding operation. Then calculate the proportion of low grayscale areas and analyze the proportion of low grayscale areas (usually background or non-target areas) in the image. The proportion of low grayscale areas is calculated by counting the number of pixels below a specific grayscale threshold. Finally, a judgment is made. When the proportion of low grayscale areas reaches 20-40%, the image is considered to have been centered.

[0094] When the whole image is borderless, if there is no obvious bilateral or unilateral feature in the image, the image is considered to be borderless. In this case, the left and right boundaries of the image can be directly regarded as the left and right edges.

[0095] The centering module ensures that the image is correctly centered in all situations. Centering is essential for subsequent image analysis and processing steps, especially when it is necessary to accurately measure or locate specific features in the image. The centering enables the adaptive system of industrial line scan cameras to adapt to different image conditions and automatically adjust to achieve the best centering effect.

[0096] In some examples, the coarse adjustment module performs preliminary calibration on the image to obtain the target angle position of the Ryz axis of the three-dimensional electric adjustment structure, including:

[0097] Obtaining the rotation angle range of the three-dimensional electric adjustment structure on the Ryz axis;

[0098] Find the target angle position with the maximum image gray value within the rotation angle range;

[0099] The Ryz-axis rotation of the three-dimensional electric adjustment structure is locked to the target angular position.

[0100] For example, Figure 6 As shown, according to the actual situation, the rotation range angle θ° of the Ryz axis is searched for the angle state with the maximum view grayscale in the entire angle range and locked.

[0101] Specifically, first, it is clear that the rotation range angle of the Ryz axis is θ°. This angle range can be determined based on factors such as the actual equipment structure, imaging requirements, and experience. Secondly, find the angle state with the maximum view grayscale, and gradually adjust the angle of the Ryz axis within the range of θ° with a certain step size. For example, you can start from the starting angle and increase a small angle value each time until the maximum angle is reached; at each angle position, the linear array camera captures the image, and the control algorithm module 12 analyzes the image and calculates the grayscale value of the image. Different grayscale calculation methods can be used, such as average grayscale, weighted grayscale, etc.; compare the grayscale values ​​calculated at each angle. Record the angle state corresponding to the maximum grayscale value. Finally, lock the angle state. When the angle state with the maximum view grayscale is found, the control algorithm module PLC issues an instruction to let the PLC control the motor of the Ryz axis to lock at this angle position. This ensures that in the subsequent imaging process, the angle state with the best image quality is always maintained.

[0102] The coarse adjustment module automatically searches and optimizes to find the angle that best suits the current imaging conditions, thereby improving image quality and stability. At the same time, by locking the angle state, it can avoid angle changes caused by external interference or equipment vibration, which may affect image quality.

[0103] In some examples, the fine adjustment module accurately calibrates the image after the preliminary calibration to obtain the angular position of the Rxz axis and the Rxy axis of the three-dimensional electric adjustment structure, including:

[0104] Rotating the Rxz axis of the three-dimensional electric adjustment structure and capturing images at different angles;

[0105] Calculate the mean deviation of the image pixel array at each angular position and compare them to obtain the angular position with the minimum mean deviation;

[0106] Rotating the Rxz axis of the three-dimensional electric adjustment structure to an angular position where the mean deviation is minimum;

[0107] According to the left and right edge positioning of the image, the grayscale mean of the left and right half images are calculated respectively, and the Rxy axis of the three-dimensional electric adjustment structure is rotated until the grayscale mean difference of the left and right half images is less than 2%, and the angular position of the Rxy axis is obtained.

[0108] Exemplarily, the fine-tuning module mainly consists of two steps. The first step is to rotate Rxz and record the angle position. The rotation process calculates the mean deviation of the pixel array at each position. After analysis, Rxz returns to the position with the minimum mean deviation. The second step is to calculate the grayscale mean of the left and right half images based on the left and right edge positioning, and rotate the Rxy axis. When the grayscale mean difference between the left and right half images is less than 2%, the second step of fine-tuning is completed.

[0109] Specifically, the first step is the Rxz axis rotation and mean deviation calculation. First, the Rxz axis rotates: the system controls the Rxz axis motor to rotate. During the rotation process, the angle can be gradually adjusted according to a certain step size to cover the possible optimal angle range. At the same time, the linear array camera continues to collect images to ensure that the corresponding image data can be obtained at different angle positions. Secondly, record the angle position and calculate the mean deviation of the pixel array: during the rotation of the Rxz axis, the system records each angle position. For each image collected at each angle position, the control algorithm module 12 calculates the mean deviation of the pixel array of the image. The mean deviation can reflect the uniformity and stability of the image. A smaller mean deviation usually means that the image is more uniform in pixel value distribution, which may represent better imaging quality. Finally, return to the minimum mean deviation position: after calculating and comparing the mean deviations of different angle positions, determine the angle position with the minimum mean deviation. The control algorithm module 12 enables the PLC to issue an instruction to control the Rxz axis motor to return to this minimum mean deviation position. This can make the imaging in the Rxz axis direction in a relatively good state.

[0110] The second step is left and right edge positioning and Rxy axis rotation. First, left and right edge positioning and grayscale mean calculation: first, left and right edge positioning are performed to determine the left and right boundaries of the image. This can be achieved through edge detection algorithms or other image processing methods. Then, the image is divided into left and right halves. For the left and right halves of the image, their grayscale means are calculated respectively. The grayscale mean can reflect the brightness and contrast characteristics of the image. Secondly, rotate the Rxy axis and judge the completion condition: the system controls the Rxy axis motor to rotate. During the rotation process, the grayscale mean difference between the left and right halves of the image is continuously monitored. When the grayscale mean difference between the left and right halves is less than 2%, it means that the left and right halves of the image are very close in brightness and contrast, and the imaging has also reached a good state in the Rxy axis direction. At this point, the second step of fine-tuning is completed.

[0111] The two-step operation of the fine-tuning module can effectively improve the accuracy and stability of imaging. Through fine adjustment of the Rxz and Rxy axes, the image can meet high quality requirements in different dimensions and meet various needs in practical applications.

[0112] In some examples, the verification module verifies whether the quality of the target image meets preset requirements, including:

[0113] Extracting a verification area block in the target image;

[0114] Calculating the grayscale mean of the verification area block and outputting the relative annotation deviation of the grayscale mean;

[0115] When the relative annotation deviation is within 5%, it is confirmed that the quality of the target image meets the preset requirements, and the target image is output.

[0116] For example, Figure 7 As shown, nine verification area blocks are taken from the effective area of ​​the image, and the grayscale mean of each area A, B...K is calculated. If the relative annotation deviation of the output nine values ​​is controlled within 5%, it is considered that the adaptive requirement is met, otherwise it is considered that the adaptive requirement is not met.

[0117] In some examples, the target image includes 9 verification area blocks.

[0118] In some examples, the relative annotation deviation is calculated as:

[0119] Relative standard deviation = (deviation / overall mean) × 100%;

[0120] Deviation = | grayscale mean of verification area block - overall mean |.

[0121] Specifically, the effective area of ​​the image is divided into nine verification area blocks, marked as A, B, C, D, E, F, G, H, and K. This division can analyze the characteristics of different parts of the image in more detail; for each area block, calculate its grayscale mean, which can be calculated by summing the grayscale values ​​of all pixels in the area and then dividing it by the total number of pixels; calculate the relative standard deviation, first calculate the overall mean of the grayscale means of the nine verification area blocks. Add the grayscale means of the nine verification area blocks from A to K, and then divide it by 9 to get the overall mean. Then calculate the deviation between the grayscale mean of each verification area block and the overall mean. The calculation formula of the deviation is: deviation = | grayscale mean of the verification area block - overall mean |. Then calculate the relative standard deviation. The calculation formula of the relative standard deviation is: relative standard deviation = (deviation / overall mean) × 100%; judge the adaptive requirements, if the relative standard deviation of the nine values ​​is controlled within 5%, it is considered that the adaptive requirements are met. This means that the grayscale distribution of each area of ​​the image is relatively uniform and the imaging quality is relatively stable. If the relative standard deviation exceeds 5%, it is considered that the adaptive requirement is not met and the system may need to further adjust the camera position, angle or other parameters to optimize the image quality.

[0122] The verification module can quantitatively evaluate the uniformity of the image to ensure that the image meets certain quality standards in different areas, thereby improving the reliability and stability of the system.

[0123] In summary, the adaptive system for industrial linear array camera imaging provided by the present application reads the image state collected by the machine vision acquisition module 11 in real time through the control algorithm module 12, and sends instructions to the PLC in the communication control module 12 after analysis and judgment. The PLC controls the movement state of the three-dimensional electric adjustment structure (Rxy axis, Ryz axis, Rxz axis) controlled by the angle selection electrical structure adjustment module 14 to complete the three-dimensional position adjustment of the imaging, and the linear module of the X-axis completes the centering correction. While automatically correcting, the control algorithm module 12 will optimize in real time according to the adjustment state to ensure the output image quality. When the output image quality meets the design requirements, the adaptation is stopped. The present application can efficiently complete the autonomous adjustment of the imaging effect according to the visual effect through the cooperation of various modules.

[0124] The technical solution of the present application is further described in detail below through specific embodiments.

[0125] The adaptive system for industrial linear array camera imaging provided by this application is based on the completion of the hardware foundation of machine vision detection, that is, before the operation of the adaptive system of this application, the hardware must be built, including the preliminary installation of the light source, the object to be measured, and the linear array camera. The object distance, aperture, and focal length of the camera must be manually calibrated during the first installation, and basically no adjustment is required afterwards. This application is aimed at the precise adaptive adjustment after the completion of this basic process and the subsequent abnormal strain adjustment. The operation logic of the control algorithm module 12 is as follows: Figure 8 shown.

[0126] The specific implementation process is:

[0127] Step 1: The program terminal gives a start adaptive command, the system starts the adaptive coarse adjustment module, and finds the maximum brightness position of the linear array camera and the light source.

[0128] Step 2: Start the alignment module.

[0129] Step 3: Start the fine-tuning module 3-10 times to slightly correct the brightness uniformity of the entire image.

[0130] Step 4: Start the centering module and move the calibrated image horizontally to the center of the image.

[0131] Step 5, start the verification module to determine whether the nine verification areas meet the requirement of controlling the relative annotation deviation within 5%. If not, proceed to the fine-tuning mode and repeat steps 3 to 5 until the verification module confirms that the standard is met.

[0132] Step 6: Output the completed image and manually confirm whether it meets the requirements.

[0133] The adaptive system for industrial linear array camera imaging provided in this application can be controlled through program fine-tuning at each stage, greatly reducing the on-site workload of vision engineers and improving work efficiency.

[0134] It should be noted that the above embodiments are only the best examples and are not limitations on the implementation methods of the present application.

[0135] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

[0136] Although the preferred embodiments of this specification have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of this specification.

[0137] Obviously, those skilled in the art can make various changes and modifications to this specification without departing from the spirit and scope of this specification. Thus, if these modifications and variations of this specification fall within the scope of the claims of this specification and their equivalents, this specification is also intended to include these modifications and variations.

Claims

1. An adaptive system for industrial linear array camera imaging, characterized in that: include: The machine vision acquisition module is used to obtain images of the object under test by an industrial linear array camera during the continuous steel strip production inspection process; A control algorithm module, used for analyzing the image to obtain an analysis result; A communication control module, used for generating a target instruction for controlling the movement of the three-dimensional electric adjustment structure according to the analysis result; The electrical structure adjustment module is used to adjust the movement state of the three-dimensional electric adjustment structure according to the target instruction, so that the industrial linear array camera can collect the image of the object to be measured at the target position.

2. The adaptive system for industrial linear array camera imaging according to claim 1, characterized in that: The control algorithm module is also used for: The image acquired by the industrial linear array camera at the target position is analyzed in real time until the quality of the image meets the preset requirements, and the communication control module is controlled to generate an end instruction; wherein the end instruction is an instruction to stop each module in the adaptive system of the industrial linear array camera imaging from continuing to work.

3. The adaptive system for industrial linear array camera imaging according to claim 2, characterized in that: The control algorithm module also includes an image conversion module, an edge finding module, a coarse adjustment module, a centering module, a fine adjustment module and a verification module, wherein: The image conversion module is used to convert the image collected by the machine vision acquisition module into a GBA array, so as to analyze the image through pixel values; The edge finding module is used to find the left and right edges of the image when the camera field of view is insufficient; The coarse adjustment module is used to perform preliminary calibration on the image to obtain the target angle position of the Ryz axis of the three-dimensional electric adjustment structure; The fine adjustment module is used to accurately calibrate the image after the preliminary calibration to obtain the target positions of the Rxz axis and the Rxy axis of the three-dimensional electric adjustment structure; The centering module is used to horizontally move the image after preliminary calibration or precise calibration to the center position of the camera field of view; The verification module is used to verify whether the quality of the target image meets the preset requirements. The target image is an image that has been centered again by the centering module after precise calibration.

4. The adaptive system for industrial linear array camera imaging according to claim 3, characterized in that: The edge finding module performs left and right edge finding on the image when the camera field of view is insufficient, including: Starting from the upper left corner of the image, traverse a single row of pixel values ​​from left to right. When the first pixel difference reaches or exceeds the preset threshold, locate the horizontal position of the current pixel, and average the single row edge finding and positioning results of all images to determine the exact position of the left line; Starting from the upper right corner of the image, traverse a single row of pixel values ​​from right to left. When the first pixel difference reaches or exceeds the preset threshold, locate the horizontal position of the current pixel and average the single row edge finding results of all images to determine the exact position of the right edge line.

5. The adaptive system for industrial linear array camera imaging according to claim 4, characterized in that: The centering module horizontally moves the image to the center of the camera field of view, including: When there are left and right double edges, the mean of the positions of the left and right lines is obtained, and the center line mean is calculated. When the difference between the center line mean and the horizontal pixel center point is within 1% of the total horizontal pixel width, the image is centered. When there is a left or right single edge, the left or right line position is obtained, and the proportion of the low gray area in the image is calculated. When the proportion of the low gray area reaches 20% to 40%, the image is centered. When the entire image has no borders, the left and right boundaries of the image are defined as the left and right edge lines to complete the image centering.

6. The adaptive system for industrial linear array camera imaging according to claim 3, characterized in that: The image is preliminarily calibrated in the coarse adjustment module to obtain the target angle position of the Ryz axis of the three-dimensional electric adjustment structure, including: Obtaining the rotation angle range of the three-dimensional electric adjustment structure on the Ryz axis; Find the target angle position with the maximum image gray value within the rotation angle range; The Ryz-axis rotation of the three-dimensional electric adjustment structure is locked to the target angular position.

7. The adaptive system for industrial linear array camera imaging according to claim 6, characterized in that: The fine adjustment module accurately calibrates the image after the preliminary calibration to obtain the angular position of the Rxz axis and the Rxy axis of the three-dimensional electric adjustment structure, including: Rotating the Rxz axis of the three-dimensional electric adjustment structure and capturing images at different angles; Calculate the mean deviation of the image pixel array at each angular position and compare them to obtain the angular position with the minimum mean deviation; Rotating the Rxz axis of the three-dimensional electric adjustment structure to an angular position where the mean deviation is minimum; According to the left and right edge positioning of the image, the grayscale mean of the left and right half images are calculated respectively, and the Rxy axis of the three-dimensional electric adjustment structure is rotated until the grayscale mean difference of the left and right half images is less than 2%, and the angular position of the Rxy axis is obtained.

8. The adaptive system for industrial linear array camera imaging according to claim 3, characterized in that: The verification module verifies whether the quality of the target image meets the preset requirements, including: Extracting a verification area block in the target image; Calculating the grayscale mean of the verification area block and outputting the relative annotation deviation of the grayscale mean; When the relative annotation deviation is within 5%, it is confirmed that the quality of the target image meets the preset requirements, and the target image is output.

9. The adaptive system for industrial linear array camera imaging according to claim 8, characterized in that: The target image includes 9 verification area blocks.

10. The adaptive imaging system for industrial linear array cameras according to claim 8, characterized in that: The calculation formula of the relative annotation deviation is: Relative standard deviation = (deviation / overall mean) × 100%; Deviation = grayscale mean of validation area block - overall mean.

Citation Information

Cited By

  • Industrial imaging pose adjusting system based on large language model

    CN120635191A

  • Industrial imaging pose adjustment system based on large language model

    CN120635191B

  • Aerospace area-array camera in-orbit multi-stage real-time automatic dimming device and method

    CN120640141A