A machine vision recognition method for flatness detection of prefabricated road components
Through machine vision recognition methods, images of road prefabricated components are collected and optimized, combined with three-dimensional models and anti-slip chutes or shrinkage contours, the problems of low detection efficiency and manual operation requirements in the prior art are solved, and efficient and autonomous flatness detection is achieved.
Patent Information
- Application Number
- CN202411355012.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-09-27
AI Technical Summary
The prior art is less efficient when detecting the flatness of road prefabricated components and requires professional and technical personnel to operate it. Ink paste and white paper methods are easily affected by moisture, the patterns are unclear, and it is difficult to accurately adjust the equipment level.
By uploading the prefabricated specifications and parameters, a three-dimensional model of the prefabricated parts is constructed, the image acquisition area and path is designed, the image acquisition is collected and optimized, and the image is converted into grayscale images, and the flatness is analyzed in combination with anti-slip chute or shrinkage contour.
It realizes efficient and autonomous detection of flatness of road prefabricated components, reduces the demand for manual control, improves detection efficiency, and can realize census and avoids spot checks.
Smart Images

Figure CN119228766B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of prefabricated component detection, and in particular to a machine vision recognition method for detecting the flatness of prefabricated road components. Background Art
[0002] Road smoothness is one of the important indicators to measure road quality. It reflects the smoothness of the road surface and directly affects the comfort and safety of driving. Roads with high smoothness can reduce vehicle bumps, reduce tire wear, and increase driving speed. Good road smoothness also helps reduce traffic noise and vehicle fuel consumption.
[0003] The invention patent with application number 202011531013.3 discloses a flatness detection device, including: a nozzle standard part having a flat lower surface; a detection platform having an upper surface and a lower surface parallel to each other; a light outlet hole exposed on the upper surface of the detection platform; a light source arranged in the light outlet hole; the detection platform includes a groove exposed on the upper surface of the detection platform, the light outlet hole is exposed to the groove and is concentrically arranged with the groove; the peripheral wall of the groove and / or the inner wall of the light outlet hole have a smooth surface; the peripheral wall of the groove has a keyway array for quantifying the direction and / or angle of the flatness defect; the keyway array is regularly arranged along the peripheral wall of the groove; the keyway array has an angle scale value along the peripheral wall direction of the groove.
[0004] This application aims to solve the problem that "after taking into account the influence of the thickness of the pressure-sensitive paper, the technicians adopted another method to cancel the pressure-sensitive paper, that is, to use ink pad to print the bottom of the suction nozzle, and to use ordinary white paper to judge the horizontal state of the equipment and components, that is, the ink pad prints a corresponding pattern on the white paper, and the clear distribution of the pattern is used to judge the horizontal state and make adjustments. However, ink pad and ordinary white paper bring another problem, that is, both ink pad and white paper are easily affected by moisture. White paper easily absorbs moisture, and ink pad has a certain amount of moisture. After the bottom of the suction nozzle contacts the white paper, the pattern is easily blurred, and the printed graphics are qualified. This obviously cannot be used as the main method to adjust the equipment level."
[0005] However, for prefabricated road components (prefabricated road slabs), their flatness is also very important in the manufacturing process. At present, most of them use the three-meter ruler method or laser flatness meter to test the flatness. The testing process is inefficient and requires professional technicians to operate the testing equipment.
[0006] To this end, we proposed a machine vision recognition method for flatness detection of prefabricated road components. Summary of the invention
[0007] In view of the above-mentioned shortcomings of the prior art, the present invention provides a machine vision recognition method for flatness detection of prefabricated road components, which solves the problems raised in the above-mentioned background technology.
[0008] To achieve the above objectives, the present invention is implemented through the following technical solutions:
[0009] A machine vision recognition method for detecting the flatness of a prefabricated road component, comprising:
[0010] Upload the prefabricated part specification parameters, build the prefabricated part 3D model based on the prefabricated part structure parameters, and design the prefabricated part image acquisition area and image acquisition path on the prefabricated part 3D model;
[0011] The prefabricated image is collected based on the prefabricated image collection area and the collection path, the collected prefabricated image is optimized, and the optimized prefabricated image is further converted into a grayscale image;
[0012] When the optimized prefabricated image is converted into a grayscale image, the optimized prefabricated image is input into the Python OpenCV library, and the corresponding grayscale image is output based on the OpenCV library processing;
[0013] The optimization processing logic of the prefab image is expressed as:
[0014] ;
[0015] Where: To optimize the pixel value of the output pixel; is the pixel value of pixel (x, y) in the original prefab image; is the brightness of pixel (x, y); is the average brightness of the original preform image; is centered at pixel (x, y) The local contrast of the window; is the global contrast of the original preform image; is the saturation value of pixel (x, y); is the average saturation value of the original prefab image; is the noise level of the original preform image;
[0016] Among them, based on the above output prefabricated component image of each pixel , apply each group Adjusting and optimizing the prefabricated component image to obtain an optimized prefabricated component image;
[0017] The obtained grayscale images are arranged and combined according to the positions of the corresponding preform images in the acquisition path to obtain a complete preform grayscale image, the preform grayscale image is symmetrically segmented based on the midline of the preform grayscale image, and the two segmented sub-preform grayscale images are decomposed again into an arrangement and combination state to obtain two groups of grayscale image groups;
[0018] The prefabricated part flatness analysis logic is set, the two groups of grayscale images are applied to the prefabricated part flatness analysis logic, and the flatness of the prefabricated part is analyzed based on the prefabricated part flatness analysis logic.
[0019] Furthermore, the model construction ratio applied when constructing the prefabricated three-dimensional model is 1:1, the prefabricated image acquisition area is the area defined by the largest surface on the prefabricated three-dimensional model, the prefabricated image acquisition path is S-shaped, and the acquisition area size of a single prefabricated image is subject to the requirement that the higher the flatness of the prefabricated part, the smaller the prefabricated image acquisition area, and vice versa;
[0020] The size of the single prefabricated part image acquisition area is customized by the user end, the starting point and the end point of the prefabricated part image acquisition path are the center points of two diagonal groups of prefabricated part images in the prefabricated part image acquisition area, and each group of prefabricated part images has the same size and shape;
[0021] Wherein, the surface of the preform corresponding to the preform image acquisition area is provided with an anti-slip groove or a shrinkage joint.
[0022] Furthermore, the preform image is collected by a collection module, which includes a frame, a truss, and a high-precision industrial camera. The truss is installed on the top of the frame through an electric slide rail, and the high-precision industrial camera is installed on the bottom of the truss through an electric slide rail. Two sets of electric slide rails connected to the integrated components of the collection module drive the truss and the high-precision industrial camera to operate based on the preform image collection path, so that each time the high-precision industrial camera moves to a length distance equal to the length or width of a single preform image, the preform image is collected once, and the collected preform images are marked with collection position coordinates and stored synchronously in the high-precision industrial camera;
[0023] The acquisition position coordinates used for the prefabricated image mark are obtained in the prefabricated three-dimensional model construction space, and the high-precision industrial camera in the acquisition module traverses the acquisition position coordinates of the prefabricated image mark stored internally in real time. When the acquisition position coordinates of the prefabricated image mark traverse to the point where the starting point and the end point of the prefabricated image acquisition path are included, the acquisition module ends operation;
[0024] The preforms are transported to the bottom of the collection module by the transport device, and the top edges of the preforms are all within the space defined by the frame in the collection module.
[0025] Furthermore, the high-precision industrial camera performs continuous acquisition of prefabricated images at the same position during the prefabricated image acquisition stage, and the continuous acquisition is subject to: the acquisition time is 0.5 to 1 second, the number of prefabricated images acquired is not less than 30, and the amount of information contained in each prefabricated image is further identified, and a group of prefabricated images with the highest amount of information is selected as the prefabricated images finally acquired at the acquisition position;
[0026] The determination logic of the amount of information contained in the prefab image is expressed as:
[0027] ;
[0028] Where: is the information content of the prefab image; is the number of color types in the prefab image; is the probability of the i-th color appearing in the preform image; is the prefab image resolution; is the average value of the grayscale difference between adjacent pixels in the preform image; is the number of edge pixels of the prefab image; is the total number of pixels of the prefab image; is the contrast of the preform image; is the energy of the prefab image; is the entropy of the prefab image; , , is the weight;
[0029] The sum of the three weights is 1, and the information content of the prefabricated image is The larger the value, the more information the prefabricated image contains, and vice versa, the less information the prefabricated image contains.
[0030] Furthermore, the local contrast The window size centered at pixel (x, y) applied when determining the value follows:
[0031] ;
[0032] Where: The total amount of prefabricated part images collected by the collection module; is a constant;
[0033] in, The value is rounded up, constant ≥1, and is customized by the user, and the value of q is further determined based on formula (2).
[0034] Furthermore, when the grayscale image of the preform is segmented based on its midline, the midline used is the midline of the grayscale image of the preform in a direction parallel to the anti-slip groove or the shrinkage joint, and after the grayscale image of the preform is segmented, any one of the two groups of grayscale images of the sub-preforms obtained by segmentation is selected to perform mirror processing, and the grayscale images of the sub-preforms that have been subjected to the mirror processing are fully covered with the position coordinates of the other group of grayscale images of the sub-preforms that have not been subjected to the mirror processing.
[0035] The position coordinates of each grayscale image in the two grayscale image groups correspond one to one.
[0036] Furthermore, before the flatness of the preform is analyzed based on the analysis logic, a Sobel template is synchronously applied to each grayscale image in the two grayscale image groups to output a contour image, and the flatness of the preform is further analyzed based on the contour image corresponding to each grayscale image in the two grayscale image groups. The preform flatness analysis logic is expressed as:
[0037] ;
[0038] Where: is the flatness performance value of the prefabricated part; is the set of corresponding coordinates of the contour image; is the contour overlap ratio in the contour images corresponding to the two sets of grayscale images corresponding to the vth set of coordinates in the two sets of grayscale images; is a set of contours representing anti-skid grooves or contraction joints in the contour image; is the profile rate of the jth group of contours representing the anti-slip groove or shrinkage joint in the contour image a corresponding to the grayscale image corresponding to the vth group of coordinates; is the profile rate of the jth group of contours representing the anti-slip groove or shrinkage joint in the contour image b corresponding to the grayscale image corresponding to the vth group of coordinates;
[0039] in, Table pair The average, Table pair Average, flatness performance value of prefabricated parts The larger the value is, the flatter the preform is, and vice versa, the worse the flatness of the preform is. The corresponding coordinates of the grayscale image are the center coordinates of the grayscale image.
[0040] Furthermore, the overlap rate of the two sets of contour images is expressed as: ;
[0041] Where: is the total number of pixels in the intersection of the pixels representing the contours in contour a and contour b; It is the total number of pixels in the union of the pixels representing the contours in contour a and contour b.
[0042] Furthermore, the profile rate of the profile of the anti-slip groove or the shrinkage joint in the profile image is calculated by the following formula:
[0043] ;
[0044] Where: The number of pixels on the contour representing the anti-skid groove or the shrinkage joint that do not fall on the straight line connecting the two end points of the contour representing the anti-skid groove or the shrinkage joint; The total number of pixels on the outline representing the anti-slip groove or shrinkage joint.
[0045] Furthermore, the flatness performance value of the preform After obtaining the result based on the analysis logic, the prefabricated part flatness judgment threshold is further set based on the prefabricated part flatness performance value. The prefabricated part is compared with the prefabricated part flatness determination threshold to determine whether the prefabricated part is flat.
[0046] Compared with the known public technology, the technical solution provided by the present invention has the following beneficial effects:
[0047] The present invention provides a machine vision recognition method for flatness detection of prefabricated road components. During the execution of the method, the surface image of the prefabricated road component is collected as a basis for flatness detection. During the flatness detection process, the surface image of the prefabricated road component is further optimized, grayscale converted and contour extracted, and the anti-skid groove and shrinkage joint contours on the surface of the prefabricated road component are combined as references to make a final judgment on the flatness of the prefabricated road component. The process has a low demand for manual control, can complete the autonomous detection of the flatness of the prefabricated road component, and has higher efficiency than the prior art, can realize a census, and avoid the situation where spot checks based on the prior art are carried out to improve the detection results. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0049] Figure 1 A schematic diagram of a process flow of a machine vision recognition method for detecting the flatness of prefabricated road components;
[0050] Figure 2 It is a structural schematic diagram of the acquisition module in the present invention;
[0051] Figure 3This is a schematic diagram of an example of a preform image acquisition path in the present invention;
[0052] The numbers in the figure represent: 1. frame; 2. truss; 3. high-precision industrial camera. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0054] The present invention will be further described below in conjunction with the embodiments. Example
[0055] A machine vision recognition method for detecting the flatness of a prefabricated road component in this embodiment is as follows: Figure 1 As shown, including:
[0056] Upload the prefabricated part specification parameters, build the prefabricated part 3D model based on the prefabricated part structure parameters, and design the prefabricated part image acquisition area and image acquisition path on the prefabricated part 3D model;
[0057] The prefabricated image is collected based on the prefabricated image collection area and the collection path, the collected prefabricated image is optimized, and the optimized prefabricated image is further converted into a grayscale image;
[0058] When the optimized prefabricated image is converted into a grayscale image, the optimized prefabricated image is input into the OpenCV library of Python, and the corresponding grayscale image is output based on the processing of the OpenCV library;
[0059] The optimization processing logic of prefab images is expressed as:
[0060] ;
[0061] Where: To optimize the pixel value of the output pixel; is the pixel value of pixel (x, y) in the original prefab image; is the brightness of pixel (x, y); is the average brightness of the original preform image; is centered at pixel (x, y) The local contrast of the window; is the global contrast of the original preform image; is the saturation value of pixel (x, y); is the average saturation value of the original prefab image; is the noise level of the original preform image;
[0062] Among them, based on the above output prefabricated component image of each pixel , apply each group Adjusting and optimizing the prefabricated component image to obtain an optimized prefabricated component image;
[0063] Local contrast The window size centered at pixel (x, y) applied when determining the value follows:
[0064] ;
[0065] Where: The total amount of prefabricated part images collected by the collection module; is a constant;
[0066] in, The value is rounded up, constant ≥1, and is customized by the user, and the value of q is further determined based on formula (2);
[0067] The obtained grayscale images are arranged and combined according to the positions of the corresponding preform images in the acquisition path to obtain a complete preform grayscale image, the preform grayscale image is symmetrically segmented based on the midline of the preform grayscale image, and the two segmented sub-preform grayscale images are decomposed again into an arrangement and combination state to obtain two groups of grayscale image groups;
[0068] Setting the prefabricated part flatness analysis logic, applying the two groups of grayscale images to the prefabricated part flatness analysis logic, and analyzing the flatness of the prefabricated part based on the prefabricated part flatness analysis logic;
[0069] Before the flatness of the prefabricated part is analyzed based on the analysis logic, the Sobel template is applied to each grayscale image in the two grayscale image groups to output the contour image, and the flatness of the prefabricated part is further analyzed based on the contour image corresponding to each grayscale image in the two grayscale image groups. The logic of the prefabricated part flatness analysis is expressed as:
[0070] ;
[0071] Where: is the flatness performance value of the prefabricated part; is the set of corresponding coordinates of the contour image; is the contour overlap ratio in the contour images corresponding to the two sets of grayscale images corresponding to the vth set of coordinates in the two sets of grayscale images; is a set of contours representing anti-skid grooves or contraction joints in the contour image; is the profile rate of the jth group of contours representing the anti-slip groove or shrinkage joint in the contour image a corresponding to the grayscale image corresponding to the vth group of coordinates; is the profile rate of the jth group of contours representing the anti-slip groove or shrinkage joint in the contour image b corresponding to the grayscale image corresponding to the vth group of coordinates;
[0072] in, Table pair The average, Table pair Average, flatness performance value of prefabricated parts The larger the value is, the flatter the preform is. Conversely, the smaller the value is, the worse the flatness of the preform is. The corresponding coordinates of the grayscale image are the center coordinates of the grayscale image.
[0073] The overlap rate of two sets of contour images is expressed as:
[0074] ;
[0075] Where: is the total number of pixels in the intersection of the pixels representing the contours in contour a and contour b; is the total number of pixels in the union of the pixels representing the contours in contour a and contour b;
[0076] The profile ratio of the profile representing the anti-slip groove or shrinkage joint in the profile image is calculated by the following formula:
[0077] ;
[0078] Where: The number of pixels on the contour representing the anti-skid groove or the shrinkage joint that do not fall on the straight line connecting the two end points of the contour representing the anti-skid groove or the shrinkage joint; The total number of pixels on the outline representing the anti-skid groove or shrinkage joint;
[0079] Prefabricated parts flatness performance value After obtaining the result based on the analysis logic, the prefabricated part flatness judgment threshold is further set based on the prefabricated part flatness performance value. The prefabricated part is compared with the prefabricated part flatness determination threshold to determine whether the prefabricated part is flat.
[0080] In this embodiment, through the execution of the method in the above embodiment, a method for detecting the flatness of prefabricated road components based on machine vision is provided. Compared with the existing technology, the detection efficiency and accuracy are better, the manual management cost is lower, and quality control is provided for the production and manufacturing of prefabricated road components.
[0081] Embodiment 2:
[0082] In terms of specific implementation, based on Example 1, this example refers to Figure 2~3The machine vision recognition method for detecting the flatness of prefabricated road components in Example 1 is further described in detail:
[0083] The model construction ratio applied when constructing the prefabricated 3D model is 1:1. The prefabricated image acquisition area is the area defined by the largest surface on the prefabricated 3D model. The prefabricated image acquisition path is S-shaped. The acquisition area of a single prefabricated image is subject to the requirement of the flatness of the prefabricated. The higher the flatness requirement of the prefabricated, the smaller the prefabricated image acquisition area is. On the contrary, the larger the prefabricated image acquisition area is.
[0084] The size of a single prefabricated part image acquisition area is customized by the user end. The starting point and the end point of the prefabricated part image acquisition path are the center points of two diagonal groups of prefabricated part images in the prefabricated part image acquisition area. Each group of prefabricated part images has the same size and shape.
[0085] Wherein, the surface of the preform corresponding to the preform image acquisition area is provided with an anti-slip groove or a shrinkage joint;
[0086] The prefabricated part image is collected by the acquisition module, which is integrated with a frame, a truss, and a high-precision industrial camera. The truss is installed on the top of the frame through an electric slide rail, and the high-precision industrial camera is installed on the bottom of the truss through an electric slide rail. Two sets of electric slide rails connected to the integrated components of the acquisition module drive the truss and the high-precision industrial camera to operate based on the prefabricated part image acquisition path, so that each time the high-precision industrial camera moves to the length or width of a single prefabricated part image, the prefabricated part image is collected once. The collected prefabricated part images are marked with the acquisition position coordinates and are synchronously stored in the high-precision industrial camera;
[0087] The acquisition position coordinates used for the prefabricated image mark are obtained in the prefabricated three-dimensional model construction space. The high-precision industrial camera in the acquisition module traverses the acquisition position coordinates of the prefabricated image mark stored internally in real time. When the acquisition position coordinates of the prefabricated image mark traverse to the point where the starting point and the end point of the prefabricated image acquisition path are included, the acquisition module ends operation.
[0088] The prefabricated parts are transported to the bottom of the collection module by the transport device, and the top edges of the prefabricated parts are all within the space defined by the frame in the collection module;
[0089] During the prefabricated part image acquisition stage, the high-precision industrial camera performs continuous acquisition of prefabricated part images at the same position. The continuous acquisition is subject to the following requirements: the acquisition time is 0.5 to 1 second, and the number of prefabricated part images acquired is not less than 30. The amount of information contained in each prefabricated part image is further identified, and the group of prefabricated part images with the highest amount of information is selected as the final prefabricated part images acquired at the acquisition position.
[0090] The logic for determining the amount of information contained in a prefab image is expressed as:
[0091] ;
[0092] Where: is the information content of the prefab image; is the number of color types in the prefab image; is the probability of the i-th color appearing in the preform image; is the prefab image resolution; is the average value of the grayscale difference between adjacent pixels in the preform image; is the number of edge pixels of the prefab image; is the total number of pixels of the prefab image; is the contrast of the preform image; is the energy of the prefab image; is the entropy of the prefab image; , , is the weight;
[0093] The sum of the three weights is 1, and the information content of the prefabricated image is The larger the value, the more information the prefabricated image contains, and vice versa, the less information the prefabricated image contains.
[0094] Through the above arrangement, further step execution data support is provided for the method in Example 1, and the amount of information contained in the preform image is limited to calculate the logic formula;
[0095] See also Figure 2 As shown, this figure further shows the structure in the acquisition module;
[0096] See also Figure 3 As shown, the square box in the figure represents the preform image, and the dotted S-shaped arrow in the figure represents the preform image acquisition path.
[0097] Embodiment 3:
[0098] In terms of specific implementation, based on Example 1, this example refers to Figure 1 The machine vision recognition method for detecting the flatness of prefabricated road components in Example 1 is further described in detail:
[0099] When the grayscale image of the preform is segmented based on its center line, the center line used is the center line of the grayscale image of the preform in a direction parallel to the anti-slip groove or the shrinkage joint. After the grayscale image of the preform is segmented, any one of the two groups of grayscale images of the sub-preform obtained by segmentation is selected to perform mirror processing. The grayscale images of the sub-preforms that have been subjected to the mirror processing are fully covered by the position coordinates of the other group of grayscale images of the sub-preforms that have not been subjected to the mirror processing.
[0100] The position coordinates of each grayscale image in the two grayscale image groups correspond one to one.
[0101] Through the above settings, further preparation is made for the preform flatness analysis of the method in Example 1, ensuring that the conditions for preform flatness analysis are finally met based on the execution of the above steps in Example 1.
[0102] In summary, during the execution of the method in the above embodiment, the surface image of the prefabricated road component is collected as the basis for flatness detection. During the flatness detection process, the surface image of the prefabricated road component is further optimized, grayscale converted and contour extracted, and the anti-skid groove and shrinkage joint contours on the surface of the prefabricated road component are used as a reference to make a final judgment on the flatness of the prefabricated road component. The process has a low demand for manual control, can complete the autonomous detection of the flatness of the prefabricated road component, and has higher efficiency than the existing technology, can realize a census, and avoid spot checks based on the existing technology to improve the detection results.
[0103] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements will not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A machine vision recognition method for flatness detection of prefabricated road components, characterized in that: include: Upload the prefabricated part specification parameters, build the prefabricated part 3D model based on the prefabricated part structure parameters, and design the prefabricated part image acquisition area and image acquisition path on the prefabricated part 3D model; The prefabricated image is collected based on the prefabricated image collection area and the collection path, the collected prefabricated image is optimized, and the optimized prefabricated image is further converted into a grayscale image; When the optimized prefabricated image is converted into a grayscale image, the optimized prefabricated image is input into the Python OpenCV library, and the corresponding grayscale image is output based on the OpenCV library processing; The optimization processing logic of the prefab image is expressed as: Where: I′(x, y) is the pixel value of the optimized output pixel; I(x, y) is the pixel value of the pixel (x, y) in the original preform image; L(x, y) is the brightness of the pixel (x, y); is the average brightness of the original preform image; C q*q (x, y) is the local contrast of the q*q window centered at the pixel (x, y); C is the global contrast of the original preform image; S(x, y) is the saturation value of the pixel (x, y); is the average saturation value of the original preform image; dB is the noise level of the original preform image; wherein, based on I′(x, y) of each pixel in the output preform image, each group of I′(x, y) is applied to adjust and optimize the preform image to obtain an optimized preform image; The obtained grayscale images are arranged and combined according to the positions of the corresponding preform images in the acquisition path to obtain a complete preform grayscale image, the preform grayscale image is symmetrically segmented based on the midline of the preform grayscale image, and the two segmented sub-preform grayscale images are decomposed again into an arrangement and combination state to obtain two groups of grayscale image groups; The prefabricated part flatness analysis logic is set, the two groups of grayscale images are applied to the prefabricated part flatness analysis logic, and the flatness of the prefabricated part is analyzed based on the prefabricated part flatness analysis logic.
2. A machine vision recognition method for flatness detection of prefabricated road components according to claim 1, characterized in that: The model construction ratio applied when constructing the prefabricated three-dimensional model is 1:1, the prefabricated image acquisition area is the area defined by the largest surface on the prefabricated three-dimensional model, the prefabricated image acquisition path is S-shaped, and the size of the single prefabricated image acquisition area is subject to the requirement of the flatness of the prefabricated. The higher the flatness requirement of the prefabricated, the smaller the prefabricated image acquisition area, and vice versa; The size of the single prefabricated part image acquisition area is customized by the user end, the starting point and the end point of the prefabricated part image acquisition path are the center points of two diagonal groups of prefabricated part images in the prefabricated part image acquisition area, and each group of prefabricated part images has the same size and shape; Wherein, the surface of the preform corresponding to the preform image acquisition area is provided with an anti-slip groove or a shrinkage joint.
3. The machine vision recognition method for flatness detection of prefabricated road components according to claim 2, characterized in that: The prefabricated part image is collected by a collection module, which includes a frame, a truss, and a high-precision industrial camera. The truss is installed on the top of the frame through an electric slide rail, and the high-precision industrial camera is installed on the bottom of the truss through an electric slide rail. Two sets of electric slide rails connected to the integrated components of the collection module drive the truss and the high-precision industrial camera to operate based on the prefabricated part image collection path, so that each time the high-precision industrial camera moves to a length distance equal to the length or width of a single prefabricated part image, the prefabricated part image is collected once, and the collected prefabricated part images are marked with collection position coordinates and stored synchronously in the high-precision industrial camera; The acquisition position coordinates used for the prefabricated image mark are obtained in the prefabricated three-dimensional model construction space, and the high-precision industrial camera in the acquisition module traverses the acquisition position coordinates of the prefabricated image mark stored internally in real time. When the acquisition position coordinates of the prefabricated image mark traverse to the point where the starting point and the end point of the prefabricated image acquisition path are included, the acquisition module ends operation; The preforms are transported to the bottom of the collection module by the transport device, and the top edges of the preforms are all within the space defined by the frame in the collection module.
4. The machine vision recognition method for flatness detection of prefabricated road components according to claim 3, characterized in that: The high-precision industrial camera performs continuous acquisition of prefabricated images at the same position during the prefabricated image acquisition stage. The continuous acquisition is subject to: the acquisition time is 0.5 to 1 second, the number of prefabricated images acquired is not less than 30, and the amount of information contained in each prefabricated image is further identified, and a group of prefabricated images with the highest amount of information is selected as the prefabricated images finally acquired at the acquisition position; The determination logic of the amount of information contained in the prefab image is expressed as: Where: M is the information content of the preform image; n is the number of color types in the preform image; p(i) is the probability of the i-th color appearing in the preform image; R is the resolution of the preform image; K is the average grayscale difference of adjacent pixels in the preform image; N edge N is the number of edge pixels of the prefab image; total is the total number of pixels of the preform image; C is the contrast of the preform image; E is the energy of the preform image; E′ is the entropy of the preform image; ω1, ω2, ω3 are weights; The sum of the three groups of weights is 1. The larger the value of the information amount M of the prefabricated image is, the more information the prefabricated image contains. Conversely, the smaller the value is, the less information the prefabricated image contains.
5. The machine vision recognition method for flatness detection of prefabricated road components according to claim 1, characterized in that: The local contrast C q*q The window size centered at pixel (x, y) applied when determining (x, y) follows: Where: g is the total amount of prefabricated part images collected by the acquisition module; η is a constant; The value of q is rounded up, the constant η ≥ 1, and is customized by the user end. The value of q is further determined based on formula (2).
6. The machine vision recognition method for flatness detection of prefabricated road components according to claim 1, characterized in that: When the grayscale image of the preform is segmented based on its midline, the midline used is the midline of the grayscale image of the preform in a direction parallel to the anti-slip groove or the shrinkage joint. After the grayscale image of the preform is segmented, any one of the two groups of grayscale images of the sub-preforms obtained by segmentation is selected to perform mirror processing, and the grayscale images of the sub-preforms that have been subjected to the mirror processing are fully covered by the position coordinates of the other group of grayscale images of the sub-preforms that have not been subjected to the mirror processing. The position coordinates of each grayscale image in the two grayscale image groups correspond one to one.
7. The machine vision recognition method for flatness detection of prefabricated road components according to claim 1, characterized in that: Before the flatness of the preform is analyzed based on the analysis logic, a Sobel template is applied to each grayscale image in the two grayscale image groups to output a contour image, and the flatness of the preform is further analyzed based on the contour image corresponding to each grayscale image in the two grayscale image groups. The preform flatness analysis logic is expressed as: Where: F is the flatness performance value of the preform; u is the set of corresponding coordinates of the contour image; R(a v ,b v ) is the contour overlap ratio in the contour image corresponding to the two grayscale images corresponding to the vth set of coordinates in the two grayscale image groups; m is the set of contours representing the anti-slip groove or shrinkage joint in the contour image; ε j (a v ) is the profile ratio of the jth group of anti-slip grooves or shrinkage joints in the contour image a corresponding to the grayscale image corresponding to the vth group of coordinates; ε j (b v ) is the profile rate of the jth group of contours representing the anti-slip groove or shrinkage joint in the contour image b corresponding to the grayscale image corresponding to the vth group of coordinates; in, Express The mean value of Express The average value of the preform flatness performance value F is obtained. The larger the preform flatness performance value F is, the flatter the preform is. Conversely, the worse the flatness of the preform is. The corresponding coordinates of the grayscale image are the center coordinates of the grayscale image.
8. The machine vision recognition method for flatness detection of prefabricated road components according to claim 7, characterized in that: The overlap rate of two sets of contour images is expressed as: Where: is the total number of pixels in the intersection of the pixels representing the contours in contour a and contour b; It is the total number of pixels in the union of the pixels representing the contours in contour a and contour b.
9. The machine vision recognition method for flatness detection of prefabricated road components according to claim 7, characterized in that: The profile rate of the profile of the anti-slip groove or shrinkage joint in the profile image is calculated by the following formula: Where: q not is the number of pixels on the contour of the anti-skid groove or contraction joint that do not fall on the straight line connecting the two end points of the contour of the anti-skid groove or contraction joint; q all The total number of pixels on the outline representing the anti-slip groove or shrinkage joint.
10. The machine vision recognition method for flatness detection of prefabricated road components according to claim 7, characterized in that: After the preform flatness performance value F is obtained based on the analysis logic, a preform flatness determination threshold is further set, and whether the preform is flat is determined based on the comparison between the preform flatness performance value F and the preform flatness determination threshold.
Citation Information
Patent Citations
Flatness detection device, system and method
CN114659473A
Part surface quality detection method and system based on machine vision
CN118608504A
Image processing-based insulator defect detection method and system
WO2018086299A1