Image recognition-based prefabricated wall mold quality detection and positioning system

CN122989618APending Publication Date: 2026-10-27江西鑫山建设有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611163049.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-03
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0004]本发明的目的在于提供基于图像识别的装配式墙体模具质量检测与定位系统,以解决上述背景中问题

Benefits of technology

(1)本发明通过采集多角度偏振图像并解算偏振态参数,能够从物理原理上区分并剥离高度偏振的镜面反射分量,从而重建出反映表面本征材质属性的漫反射特征图像。这使得后续的图像分析过程不再受光照条件剧烈变化的制约,提升了在复杂工业现场环境下对锈蚀、划痕等缺陷进行像素级精确分割的鲁棒性与准确性,解决了长期困扰该领域的关键技术瓶颈。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122989618A_ABST
    Figure CN122989618A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of image recognition, and particularly discloses an assembly type wall mold quality detection and positioning system based on image recognition, which irradiates a mold surface at multiple angles through a linear polarized light source, and synchronously collects a plurality of polarization state image sequences; the image sequences are analyzed to generate a polarization degree graph and a polarization angle graph representing the polarization characteristics of the surface, an adaptive weight function is constructed, a specular reflection component is separated from total light intensity, and a demetallized reflection characteristic image reflecting inherent material properties of the surface is reconstructed; the characteristic image is subjected to color space conversion, dynamic threshold segmentation, texture consistency verification and region growth, a rust defect region is accurately segmented, and a binary defect segmentation graph is generated; the accurate parallax and three-dimensional space coordinates of the defect region are calculated by combining binocular stereo vision principles and calibration parameters, the quantification and positioning of the defect are realized, and the application overcomes the interference of strong specular reflection on defect recognition and realizes the integration of quality detection and three-dimensional space positioning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image recognition technology, and more specifically to a prefabricated wall mold quality inspection and positioning system based on image recognition. Background Technology

[0002] In the industrialized production of prefabricated buildings, the molding quality of precast concrete components is highly dependent on the condition of their steel molds. After long-term use, molds are prone to defects such as rust, wear, and deformation. These defects are directly replicated on the component surface, affecting component quality, structural durability, and appearance. Therefore, regular and precise quality inspection and maintenance of the molds are crucial. Currently, the industry is gradually adopting automated inspection technology based on machine vision to replace traditional manual visual inspection. The mainstream method typically uses high-resolution industrial cameras to acquire two-dimensional color (RGB) images of the mold surface and utilizes image processing algorithms or deep learning models (such as convolutional neural networks) for defect identification and classification.

[0003] The existing technology has the following shortcomings: When the mold surface has a highly heterogeneous micro-geometry and mixed material state, the macroscopic polarization parameters (degree of polarization, polarization angle) obtained by active polarization imaging analysis may produce a nonlinear "decoupling failure" between the target surface and the actual physical reflection properties. The serious consequence of the "decoupling failure" is that in the reconstructed "de-specular reflection feature image", the real rust diffuse reflection signal that should be separated may be incorrectly weakened or erased, while the non-uniform background noise that should be retained and coexist with rust (such as the interference color of oil stains) is incorrectly enhanced. Summary of the Invention

[0004] The purpose of this invention is to provide an image recognition-based quality inspection and positioning system for prefabricated wall molds to solve the problems mentioned above.

[0005] The objective of this invention can be achieved through the following technical solutions: A prefabricated wall formwork quality inspection and positioning system based on image recognition includes: The multi-polarization state image acquisition module is used to control the linear polarization light source to illuminate the mold surface in sequence with four different preset polarization angles, and to acquire a corresponding polarization image of the mold surface using the polarization-sensitive imaging unit under each preset polarization angle, thereby obtaining a set of multi-polarization state image sequences. The polarization characteristic analysis module is used to analyze the pixel values ​​at the same pixel position in a multi-polarization state image sequence, calculate the polarization degree parameter and polarization angle parameter corresponding to each pixel position, and generate a polarization degree map and a polarization angle map characterizing the polarization characteristics of the entire mold surface. The specular reflection stripping and feature reconstruction module calculates the light intensity component at each pixel position based on the polarization degree map and polarization angle map, separates the specular reflection light intensity component from the total light intensity, and reconstructs a specular reflection feature image that can reflect the inherent material properties of the mold surface based on the remaining diffuse reflection light intensity component. The surface defect identification and segmentation module is used to input the despecimen reflection feature image into the preset image analysis unit. The image analysis unit performs pixel-level analysis and classification on the despecimen reflection feature image, identifies and segments the rust defect area on the mold surface, and generates the corresponding binary defect segmentation map. The defect quantization and spatial positioning module calculates the geometric parameters and image coordinates of each rust defect region based on the binary defect segmentation map; combined with the pre-calibrated imaging system parameters, it transforms the image coordinates to the world coordinate system of the mold, and outputs the three-dimensional spatial position information and quantized geometric parameters of each rust defect region in the world coordinate system.

[0006] As a further aspect of the present invention: the generation of a polarization degree map and a polarization angle map characterizing the polarization characteristics of the entire mold surface specifically includes: Pixel-level spatial registration is performed on the polarization images of the mold surface acquired under different preset polarization angles to ensure that the pixel positions representing the same physical point in the multi-polarization image sequence are accurately aligned. For each registered pixel location, select light intensity values ​​at least four different polarization angles, calculate the light intensity difference between pairs of orthogonal polarization directions, and weight and fuse the light intensity differences according to preset weight coefficients to form a weighted vector of light intensity difference for the corresponding pixel location. Based on the weighted vector of light intensity difference at each pixel location and the total light intensity value at the corresponding point, the polarization angle parameter and polarization degree parameter are calculated pixel by pixel through the arctangent function and the square root operation of the sum of squares, and a polarization degree map and polarization angle map covering the entire mold surface are generated simultaneously.

[0007] As a further aspect of the present invention: the step of calculating the polarization angle parameter and polarization degree parameter pixel by pixel specifically includes: Based on the component ratio of the weighted vector of light intensity difference, the initial polarization angle is obtained by iteratively searching the pre-stored angle mapping table, and the quadrant in which the component is located is determined according to the positive and negative sign relationship of the components. The initial polarization angle is then corrected by circular angle to obtain the polarization angle parameter. The original degree of polarization value is obtained by taking the ratio of the squares of each component of the weighted vector of light intensity difference to the square of the total light intensity value. Based on the preset brightness range where the total light intensity value is located, the corresponding nonlinear compensation function is selected to adaptively enhance the original polarization degree value, thereby obtaining the optimized polarization degree parameter. The calculated polarization angle parameter and the optimized polarization degree parameter are logically correlated and verified. If the polarization degree parameter is lower than the first threshold and the polarization angle parameter changes drastically, the polarization characteristic data of the corresponding pixel is determined to be invalid and replaced with the interpolation result of the adjacent valid pixel data. Finally, high-quality polarization degree map and polarization angle map are generated synchronously.

[0008] As a further aspect of the present invention: the reconstructing of the destigmoreflection feature image that reflects the inherent material properties of the mold surface specifically includes: Correlation analysis was performed on the polarization degree parameter and polarization angle parameter of each pixel position to identify continuous regions where the polarization degree parameter is higher than the set threshold and the polarization angle parameter changes slowly, which were initially identified as potential regions dominated by specular reflection. Based on the initially determined specular reflection dominant region, an adaptive weight function that is positively correlated with the polarization degree parameter of the corresponding pixel is constructed. The total light intensity is proportionally divided using the weight function, and the specular reflection light intensity component to be separated is directly calculated. The diffuse reflection intensity component is obtained by subtracting the specular reflection intensity component from the total light intensity; and based on the continuity of the diffuse reflection components between adjacent pixels, the diffuse reflection intensity of the area obscured by specular reflection is spatially interpolated and restored to generate the final de-specular reflection feature image.

[0009] As a further aspect of the present invention: the construction of an adaptive weight function that is positively correlated with the polarization degree parameter of the corresponding pixel, and the use of the weight function to proportionally divide the total light intensity, specifically includes: Using the polarization degree parameter of a pixel as input, a first threshold and a second threshold are defined; when the polarization degree parameter is lower than the first threshold, the weight output is zero; when the polarization degree parameter is between the first and second thresholds, the weight increases with the polarization degree parameter according to a preset first non-linear curve; when the polarization degree parameter is higher than the second threshold, the weight remains at a constant maximum value. A local neighborhood is defined centered on the pixel to be processed, and the standard deviation of all weight values ​​within the local neighborhood is calculated. If the standard deviation exceeds a preset fluctuation threshold, the median of the weight values ​​within the local neighborhood is used to replace the original calculated weight of the center pixel. The corrected weight value is directly multiplied by the total light intensity value at the corresponding pixel position, and the product is the specular reflection light intensity component of the pixel.

[0010] As a further aspect of the present invention: the generation of the corresponding binary defect segmentation map specifically includes: The pixels of the despecimen feature image are converted from the original color space to a preset defect-sensitive color space. Within this space, a threshold is dynamically calculated based on the global statistical characteristics of the image, and each pixel is binarized for initial classification to obtain an initial defect mask. Within the potential defect region identified by the initial defect mask, local texture descriptors at multiple scales are extracted, and the spatial continuity measure of the texture descriptors is calculated. Regions with continuity below a preset threshold are removed from the initial defect mask to generate an intermediate mask that has passed texture verification. The edges of each independent connected region in the intermediate mask are detected and closed. Then, with the closed edges as constraints, adaptive region growth is performed in the color space corresponding to the despecimen feature image. Adjacent pixels that conform to the growth rules are added in to output a binarized defect segmentation map.

[0011] As a further aspect of the present invention: the calculation of the spatial continuity measure of the texture descriptor specifically includes: For each pixel in the potential defect area, a set of preset directions and convolution kernels of different sizes are used to perform convolution operations to obtain the texture response values ​​of the pixel in multiple scales and directions. These response values ​​are arranged to form the multi-scale orientation texture matrix of the corresponding pixel. For each pixel within a potential defect region, the pixel multi-scale orientation texture matrix is ​​used as a feature vector. The cosine similarity between the pixel and the feature vectors of all other pixels within a predefined neighborhood window is calculated to generate a local neighborhood similarity matrix for the pixel. Analyze the local neighborhood similarity matrix of each pixel, count the number of pixel connections with similarity higher than a set threshold, and calculate the ratio of this number to the total number of pixels in the connected region to which the pixel belongs in the initial defect mask. This yields a continuity measure that characterizes the consistency of the texture space in the corresponding region.

[0012] As a further aspect of the present invention: the output of the three-dimensional spatial location information and quantized geometric parameters of each corrosion defect region in the world coordinate system specifically includes: For each independent connected region in the binarized defect segmentation map, calculate the minimum bounding rectangle of the independent connected region; based on the set of pixels within the independent connected region box, construct the convex hull polygon of the corresponding defect region, and calculate the geometric center of the convex hull polygon as the centroid image coordinates of the defect. Centered on the coordinates of each centroid image, and based on the pre-calibrated binocular imaging system parameters, local virtual stereo projection grids are constructed on the destigination feature images of the left and right views respectively. By matching the intensity distribution patterns of the two grids, the precise disparity value of the centroid in the disparity space is calculated. Based on the accurate parallax value and the baseline distance and focal length parameters of the binocular imaging system, the three-dimensional spatial depth value corresponding to the centroid is calculated; combined with the centroid image coordinates and camera intrinsic parameters, the three-dimensional spatial position of the centroid of the defect region in the world coordinate system is calculated, and a quantitative report including the three-dimensional spatial position and the area of ​​the convex hull polygon is output.

[0013] As a further aspect of the present invention: the construction of a local virtual stereoscopic projection mesh specifically includes: The major axis of the minimum bounding rectangle of the convex hull polygon of the defect region is calculated as the main axis of the mesh, and the size of the bounding rectangle is scaled according to a preset ratio to determine the initial range of the virtual stereoscopic projection mesh. Within the initial range, a regular sampling point matrix aligned with the principal axis is established; based on the local gradient intensity of the despecimen feature image in the vicinity of the sampling points, the density of the sampling points is dynamically adjusted, increasing the number of sampling points in textured areas and sparsely sampling in flat areas. On the despecular reflection feature image of the left view, an adaptive sampling point matrix is ​​placed with the centroid image coordinates as the center; according to the pre-calibrated epipolar constraint relationship, each sampling point of the left view is projected onto the corresponding epipolar line of the right view to form the corresponding matching grid of the right view, thus completing the bidirectional grid construction.

[0014] The beneficial effects of this invention are: (1) By acquiring multi-angle polarization images and calculating polarization state parameters, this invention can distinguish and separate highly polarized specular reflection components from a physical perspective, thereby reconstructing diffuse reflection feature images that reflect the intrinsic material properties of the surface. This makes the subsequent image analysis process no longer constrained by drastic changes in lighting conditions, improving the robustness and accuracy of pixel-level precise segmentation of defects such as rust and scratches in complex industrial environments, and solving the key technical bottleneck that has long plagued this field.

[0015] (2) This invention integrates polarization vision and binocular stereo vision. Based on a high-quality segmentation image, it uses adaptive local mesh matching to calculate the precise parallax and three-dimensional coordinates of the defect area and outputs a complete quantitative report including location and area. This provides direct and accurate input data for robot-guided rust removal, painting, or digital management of mold status, thereby elevating visual inspection from "discovering problems" to "guiding solutions," and improving the automation and intelligence level of prefabricated building production lines. Attached Figure Description

[0016] The invention will now be further described with reference to the accompanying drawings.

[0017] Figure 1 This is a system block diagram of the present invention. Detailed Implementation

[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] Please see Figure 1 As shown, this invention is a prefabricated wall mold quality inspection and positioning system based on image recognition, comprising: The multi-polarization state image acquisition module is used to control the linear polarization light source to illuminate the mold surface in sequence with four different preset polarization angles, and to acquire a corresponding polarization image of the mold surface using the polarization-sensitive imaging unit under each preset polarization angle, thereby obtaining a set of multi-polarization state image sequences. The polarization characteristic analysis module is used to analyze the pixel values ​​at the same pixel position in a multi-polarization state image sequence, calculate the polarization degree parameter and polarization angle parameter corresponding to each pixel position, and generate a polarization degree map and a polarization angle map characterizing the polarization characteristics of the entire mold surface. The specular reflection stripping and feature reconstruction module calculates the light intensity component at each pixel position based on the polarization degree map and polarization angle map, separates the specular reflection light intensity component from the total light intensity, and reconstructs a specular reflection feature image that can reflect the inherent material properties of the mold surface based on the remaining diffuse reflection light intensity component. The surface defect identification and segmentation module is used to input the despecimen reflection feature image into the preset image analysis unit. The image analysis unit performs pixel-level analysis and classification on the despecimen reflection feature image, identifies and segments the rust defect area on the mold surface, and generates the corresponding binary defect segmentation map. The defect quantization and spatial positioning module calculates the geometric parameters and image coordinates of each rust defect region based on the binary defect segmentation map; combined with the pre-calibrated imaging system parameters, it transforms the image coordinates to the world coordinate system of the mold, and outputs the three-dimensional spatial position information and quantized geometric parameters of each rust defect region in the world coordinate system.

[0020] In the multi-polarization state image acquisition module, a linear polarization light source is used to sequentially illuminate the mold surface at four different preset polarization angles. At each preset polarization angle, a corresponding polarization image of the mold surface is acquired using a polarization-sensitive imaging unit, thereby obtaining a set of multi-polarization state image sequences, specifically including: A programmable linearly polarized light source is employed, consisting of a light-emitting unit with a specific wavelength and a rotatable linear polarizer. The control unit drives the polarizer to rotate sequentially to four preset polarization angles: 0 degrees, 45 degrees, 90 degrees, and 135 degrees. At each angle, the light source illuminates the surface of the mold to be inspected with uniform and stable light intensity.

[0021] A polarization-sensitive imaging unit, operating synchronously with the light source, is used to receive reflected light from the surface. This imaging unit includes an area array image sensor with a fixed-angle analyzer mounted at its front end. At each light source polarization angle, the imaging unit exposes once, acquiring a grayscale image reflecting the surface light intensity distribution at that angle. Four images are acquired sequentially over time, forming an image sequence containing information about different polarization states.

[0022] During the acquisition process, it is necessary to ensure that the relative positions of the mold and the imaging unit are fixed, and that the light intensity of the light source is consistent with the ambient lighting conditions during each exposure. The four images obtained are spatially perfectly registered, meaning that the same pixel corresponds to the same physical point on the surface of the mold in each image. This yields a multi-polarization state image sequence that can be used for subsequent polarization state calculations.

[0023] The polarization characteristic analysis module is used to analyze the pixel values ​​at the same pixel position in a multi-polarization state image sequence, calculate the polarization degree parameter and polarization angle parameter corresponding to each pixel position, and generate a polarization degree map and a polarization angle map characterizing the polarization characteristics of the entire mold surface. Specifically, it includes: To extract surface polarization characteristics from a multi-polarization image sequence, spatial registration of the images is first performed. Four polarization images of the mold surface acquired at different polarization angles are aligned at the pixel level. This operation is accomplished by identifying fixed physical feature points in the images and calculating and applying a geometric transformation matrix that ensures the coordinates of these feature points are consistent across all images. This step ensures that pixels in the same row and column in the image sequence precisely correspond to the same physical point on the mold surface, laying the foundation for subsequent pixel-level calculations.

[0024] After spatial registration, a weighted vector of light intensity difference is calculated for each pixel. For each pixel, the light intensity value at its corresponding position in the four images is extracted. The first light intensity difference is calculated using light intensity values ​​at polarization angles of 0 degrees and 90 degrees, and the second light intensity difference is calculated using light intensity values ​​at polarization angles of 45 degrees and 135 degrees. The preset weighting coefficients are set based on the relative response sensitivity of the imaging unit to light with different polarization directions, and are usually obtained through calibration experiments to obtain a set of fixed coefficients. The first and second light intensity differences are multiplied by their respective weighting coefficients and then summed to obtain the two components of the weighted vector of light intensity difference for that pixel. This calculation is performed on all pixels to form a vector field covering the entire field of view.

[0025] Subsequently, based on the weighted vector of light intensity difference for each pixel and the total light intensity value, the polarization angle parameter and polarization degree parameter are calculated. The calculation process for the polarization angle parameter is as follows: First, calculate the ratio of the second component to the first component of the weighted vector of light intensity difference for that pixel. Second, obtain the initial angle value corresponding to this ratio by looking up a pre-stored angle mapping table. This mapping table stores the correspondence between ratios and angle values ​​and is pre-filled using the arctangent function. Next, based on the positive and negative signs of the first and second components, determine the quadrant in which the vector lies, and perform corresponding additions or subtractions of 90 degrees or 180 degrees on the initial angle value, ultimately obtaining an accurate polarization angle parameter ranging from 0 degrees to 180 degrees. The calculation process for the polarization degree parameter consists of two steps: First, calculate the squares of the first and second components of the weighted vector of light intensity difference for that pixel, add the two squares, and then perform a square root operation on the sum to obtain an intermediate value. Then, this intermediate value is divided by the total light intensity value of the pixel, which is the sum of the light intensity values ​​at 0 degrees and 90 degrees polarization angle, to obtain the original polarization degree value.

[0026] To optimize parameter quality, the original polarization degree values ​​need to be adaptively enhanced. Based on the total pixel light intensity, it is divided into different preset brightness ranges. For example, a total light intensity value below 50 can be defined as a low brightness range, above 200 as a high brightness range, and in between as a medium brightness range. Different nonlinear compensation functions are used for different ranges. In the low brightness range, a quadratic function with an upward opening is used to process the original polarization degree values ​​to suppress noise amplification; in the high brightness range, a logarithmic function is used to compress the value range of overexposed areas; in the medium brightness range, the original value is maintained or linearly fine-tuned. The processed result is the optimized polarization degree parameter.

[0027] Finally, parameter validity verification and data repair are performed. A first threshold is set, for example, 0.1. For any pixel, if its optimized polarization degree parameter is lower than this first threshold, the standard deviation of its polarization angle parameter with that of its eight neighboring pixels is calculated. If the standard deviation is greater than 15 degrees, the polarization characteristic data of that pixel is considered invalid. For invalid pixels, both their polarization angle parameter and polarization degree parameter are replaced by bilinear interpolation results of the surrounding valid pixel data. After completing the above calculation, optimization, verification, and replacement operations for all pixels, the polarization angle parameter value and the optimized polarization degree parameter value are arranged into a matrix with the same size as the original image according to the pixel position, thus simultaneously generating the final polarization degree map and polarization angle map.

[0028] In the specular reflection stripping and feature reconstruction module, the light intensity component at each pixel location is calculated based on the polarization degree map and polarization angle map. The specular reflection light intensity component is separated from the total light intensity, and based on the remaining diffuse reflection light intensity component, a de-speckled feature image that reflects the inherent material properties of the mold surface is reconstructed. Specifically, this includes: To separate specular reflections from polarization data and reconstruct images characterizing intrinsic surface properties, the first step is to identify regions dominated by specular reflections. For each pixel in the input image, its polarization degree parameter and polarization angle parameter are correlated. A threshold for determining high polarization is set, typically determined by analyzing the statistical distribution of polarization degrees from a large number of known material samples; for example, the 80th percentile of all pixel polarization degree parameter values ​​is used as the threshold, with the specific value depending on the actual imaging conditions and surface condition. Simultaneously, the standard deviation of the polarization angle parameter between each pixel and its eight neighboring pixels is calculated as a measure of the drastic change in polarization angle at that point. When the polarization degree parameter of a pixel is higher than the set threshold, and the standard deviation of its polarization angle change is lower than another preset, gradual threshold (e.g., 5 degrees), the pixel is initially marked as a potential specular reflection point. Connectivity analysis is performed on the image, and the set of spatially continuous pixels marked as potential specular reflection points is initially identified as a potential region dominated by specular reflections. This step aims to locate image regions that may produce strong specular reflections from smooth surfaces based on the spatial consistency of polarization characteristics and their physical mechanisms.

[0029] After identifying potential specular reflection-dominant regions, an adaptive weighting function needs to be constructed to quantify the proportion of specularly reflected light in each pixel. This weighting function uses the pixel's polarization parameter... As the sole input variable, the function's specific form is defined by three segments: defining two thresholds. and ,in It contributes a negligible lower limit to the degree of polarization (e.g., 0.1) to specular reflection. This represents the upper limit of polarization degree at which specular reflection tends to saturate (e.g., 0.6). When At that time, weight .when At that time, weight Follow It increases according to a preset non-linear curve, the expression of which is: ; in, An exponential coefficient greater than 1 is used to control the shape of the curve, causing it to grow faster in the middle segment. The typical value is 2. When At that time, weight This function design completely suppresses specular reflection separation in the low polarization region, assumes that almost all light intensity comes from specular reflection in the high polarization region, and smoothly transitions through a power-law relationship in the intermediate transition region. This is more in line with the characteristic of continuous change of reflection components in actual physical scenarios.

[0030] To ensure the spatial smoothness of the weight values ​​and suppress abrupt changes caused by noise, local consistency correction is required for the initially calculated weights. A square local neighborhood of 5 pixels by 5 pixels is defined centered on the pixel to be processed. The standard deviation of the initial weight values ​​calculated by the piecewise function for all pixels within this neighborhood is calculated. A fluctuation threshold is set, for example, 0.15. If the calculated standard deviation exceeds this fluctuation threshold, it indicates that the initial weight value of the central pixel may be affected by noise and inconsistent with its surrounding area. In this case, the initial weight of the central pixel itself is no longer used; instead, the median of all initial weight values ​​within the local neighborhood is taken as the corrected final weight value for the central pixel. If the standard deviation does not exceed the fluctuation threshold, the initial weight value is directly used as the final weight value. This step, by introducing neighborhood statistical constraints, effectively improves the spatial coherence of the weight map.

[0031] Obtain the final weight value after correction for each pixel. Then, the specular reflection intensity components can be calculated and separated. For each pixel, its specular reflection intensity components... The total light intensity value of this pixel With the final weight value Multiplying them together, the calculation expression is: ; Among them, the total light intensity value This is the sum of the light intensity values ​​collected by the pixel at polarization angles of 0 degrees and 90 degrees. This calculation is based on a reasonable physical assumption: under a specific imaging geometry, the observed total light intensity is a linear superposition of specular reflection and diffuse reflection intensities, while the weights... This represents the approximate proportion of the specular reflection component in the total light intensity. The specular reflection intensity component to be separated can be directly estimated through this multiplication operation.

[0032] Subtracting the specular reflection intensity component from the total light intensity yields the diffuse reflection intensity component of that pixel. ,Right now: However, in areas that were originally "annihilated" by strong specular reflection (highlights), the calculated diffuse reflection component may be unreliable due to the loss of original information. To reconstruct the surface information of these areas, spatial interpolation recovery is required. Specifically, this involves iterating through all pixels and calculating their final weight values... If the value is greater than a high threshold (e.g., 0.8), it is determined that the region was previously dominated by strong specular reflection, and its diffuse reflection component... Reconstruction is required. Centered on this pixel, within a large neighborhood window (e.g., 21 pixels by 21 pixels), find all pixels whose final weight values ​​are below a low threshold (e.g., 0.3). These pixels are considered reliable diffuse reflection region sample points with minimal specular reflection influence. Using the diffuse reflection component values ​​of these sample points, calculate the estimated diffuse reflection intensity of the center pixel using bilinear interpolation or inverse distance weighted interpolation. Replace the original subtraction result with this estimated value. Values. This interpolation restoration operation is performed on all pixels in the entire image that are determined to be high-weight regions. Finally, the diffuse intensity components of all pixels are... Arranging them according to their original positions in the image generates a destigmatized image that suppresses specular highlights and primarily reflects the diffuse reflection characteristics of the object's surface. In this image, the texture and color information of defects such as rust that were previously obscured by highlights will be significantly restored.

[0033] In the surface defect recognition and segmentation module, the destigmatized feature image is input to a preset image analysis unit. The image analysis unit performs pixel-level analysis and classification on the destigmatized feature image, identifies and segments the rust defect areas on the mold surface, and generates a corresponding binary defect segmentation map, specifically including: To identify and accurately segment corrosion defect regions from destigmatized feature images, an initial classification based on color features is performed first. The pixels of the input image are transformed from the original red, green, and blue color space to a pre-defined defect-sensitive color space that is more sensitive to changes in corrosion color. A typical example of this space includes three channels: a luminance component, the difference between the red and green components, and the difference between the red and blue components. After the transformation, a histogram of pixel values ​​for the entire image is calculated for the two color difference channels other than the luminance channel. Based on the distribution of the histogram, for example, taking the pixel value corresponding to a cumulative distribution reaching 70%, the threshold for binarization of each channel is dynamically determined. For each pixel, if its values ​​in both color difference channels exceed the corresponding dynamic thresholds, the pixel is initially classified as a defect pixel and marked as foreground; otherwise, it is marked as background. All preliminary classification results constitute an initial defect mask image, where white areas represent potential defects and black areas represent background.

[0034] After obtaining the initial defect mask, the texture consistency of the identified potential defect areas needs to be verified to filter out misjudged areas (such as oil stains or unevenly colored dirt) that are similar in color but do not conform to the rust characteristics. For each connected white area (i.e., a potential defect area) in the mask, the following operations are performed: For each pixel in the area, a set of preset edge detection operators (e.g., Sobel operators) with orientations of 0 degrees, 45 degrees, 90 degrees, and 135 degrees are used to perform convolution operations on kernel images of three different sizes (e.g., 3x3, 5x5, and 7x7), resulting in a total of 12 texture response values ​​for the pixel in four directions and three scales, forming the multi-scale directional texture matrix of the pixel. Next, a 7x7 pixel neighborhood window is defined centered on the pixel, and the cosine similarity between the texture matrix of the pixel and the texture matrices of all other pixels in the window is calculated. The cosine similarity is calculated by calculating the dot product of the two matrices after flattening them into vectors, and then dividing by the product of the magnitudes of the two vectors (i.e., the square root of the square of each element). All calculated similarity values ​​are organized into a local neighborhood similarity matrix. Then, the number of pixel pairs with similarity values ​​exceeding 0.85 is counted within this matrix. This number is then compared to the total number of pixels in the connected region of the potential defect. The resulting ratio is the continuity measure characterizing the texture spatial consistency of the region. If the continuity measure of a connected region is lower than a preset threshold of 0.6, its internal texture is considered chaotic and lacks consistency, failing to meet the uniform texture diffusion characteristics typically found in rusted areas. Therefore, this connected region is completely removed from the initial defect mask. After this verification and removal process, an intermediate mask with verified texture is generated.

[0035] Finally, edge optimization and region growing are performed on each remaining independent connected defect region in the intermediate mask to obtain accurate and complete defect segmentation boundaries. First, an edge detection algorithm (such as the Canney algorithm) is used to extract the contour of each connected region. For small gaps (break length less than 5 pixels) on the contour, they are closed by connecting the nearest neighbor edge points at both ends of the gap. Then, using this closed contour as the initial boundary constraint, adaptive region growing is performed within the defect-sensitive color space corresponding to the original destigmal feature image. The growth rule is as follows: starting from the pixel inside the contour, examine the background pixels (i.e., the black pixels in the intermediate mask) within its eight neighborhood. If the Euclidean distance between the color feature vector (composed of the three channel values ​​of the defect-sensitive color space) of a background pixel and the average color feature vector of all pixels within the current growth region is less than an adaptive dynamic threshold, then the background pixel is included in the growth region. Here, the dynamic threshold is set to 0.5 times the standard deviation of the pixel colors within the current growth region. The growth process is iterated until no new neighboring pixels that meet the rule can be added. This region growing process can re-include edge pixels or weak feature pixels that are similar in color to the main defect and were missed due to initial thresholding or texture verification. The results of growing all connected regions are then merged to output the final binarized defect segmentation map, where white pixels precisely correspond to the identified corrosion defect areas.

[0036] In the defect quantization and spatial localization module, based on the binarized defect segmentation map, the geometric parameters and image coordinates of each corrosion defect region are calculated. Combining this with pre-calibrated imaging system parameters, the image coordinates are transformed to the world coordinate system of the mold, outputting the three-dimensional spatial location information and quantized geometric parameters of each corrosion defect region in the world coordinate system. Specifically, this includes: To obtain the precise location and size information of defects in physical space from the binarized defect segmentation image, the image coordinates and basic geometric parameters of each defect region are first calculated. For each independent white connected region (representing a candidate defect) in the segmentation image, its minimum bounding rectangle is calculated. This rectangle is calculated by finding the smallest rectangle that completely encloses all pixels in the region, with edges parallel to the image coordinate axes. Based on the set of coordinates of all pixels within the connected region, the Graham scan algorithm is used to construct the convex hull polygon of the region. This polygon is the smallest convex polygon containing all pixels. Subsequently, the geometric center of this convex hull polygon is calculated, with its x-coordinate obtained by summing the x-coordinates of all vertices of the polygon and dividing by the number of vertices, and its y-coordinate obtained by summing the y-coordinates of all vertices and dividing by the number of vertices. This geometric center is defined as the centroid image coordinates of the defect region. Simultaneously, the area of ​​the convex hull polygon is calculated as the two-dimensional projected area parameter of the defect. The area of ​​the convex hull polygon is calculated using the shoelace formula, that is, by successively substituting the coordinates of the polygon vertices into a specific summation and difference multiplication operation.

[0037] After obtaining the centroid image coordinates, the 3D spatial depth needs to be calculated based on the principle of binocular stereo vision. First, a local virtual mesh for stereo matching is constructed centered on the centroid coordinates of the left view. The mesh is constructed as follows: based on the length and width of the minimum bounding rectangle of the defect convex hull polygon, the direction of the longer side is taken as the principal axis direction of the mesh. Using this direction as a reference, the length and width of the bounding rectangle are multiplied by a preset ratio of 1.5 to determine the initial mesh range of a rectangle. Within this range, a regular initial sampling point array aligned with the principal axis direction is generated, with an initial row and column spacing of three pixels. Subsequently, on the destigmoreflection feature image of the left view, the image gradient magnitude intensity within a 5x5 pixel neighborhood around each initial sampling point is calculated. If the average gradient intensity is higher than 1.5 times the average gradient of the entire image, four sampling points are added within a one-pixel radius around the initial point; if the average gradient intensity is lower than 0.5 times the average gradient of the entire image, the initial sampling point is deleted. This dynamic adjustment forms an adaptive non-uniform sampling point array. Based on the pre-calibrated epipolar constraint relationship of the binocular camera, each sampling point on the left view is projected onto the corresponding epipolar line (a straight line) on the right view. On the right view, along the epipolar line, with the horizontal coordinate of the sampling point in the left view as the center, a range of ten pixels is extended to the left and right to generate a set of matching points corresponding to the sampling points in the left view, thereby completing the construction of the bidirectional matching mesh for the left and right views.

[0038] The precise disparity is calculated by matching the intensity distribution of the left and right view grids. For each sampling point in the left view grid, the pixel values ​​of its surrounding 3x3 neighborhood in the brightness channel of the destigmation feature image are extracted to form a nine-dimensional feature vector. Similarly, a nine-dimensional feature vector is extracted for each point to be matched along the corresponding epipolar line in the right view. The sum of the absolute errors between the feature vectors of the left view points and the feature vectors of each point to be matched in the right view is calculated; this is the sum of the absolute values ​​of the differences across the nine dimensions. The right view point to be matched that minimizes the sum of absolute errors is found; the difference between this point and the left view sampling point on the horizontal coordinate is the disparity value at that sampling point. After calculating the disparity for all grid sampling points, the median of these disparity values ​​is taken as the precise disparity value representing the centroid of the defect region.

[0039] Finally, the image coordinates and disparity are converted into 3D world coordinates. According to the geometric model of binocular stereo vision, the 3D depth value is equal to the baseline distance multiplied by the focal length and divided by the precise disparity value. The baseline distance is the horizontal distance between the optical centers of the left and right cameras, and the focal length is the equivalent focal length in the camera's intrinsic parameters; both parameters are determined in the prior camera calibration. After calculating the depth value, the 3D coordinates of the point in the camera coordinate system are calculated using the inverse transformation formula of perspective projection, combined with the image coordinates of the centroid and the camera's intrinsic parameter matrix. Specifically, the calculation is as follows: subtract the x-coordinate of the camera principal point from the image x-coordinate, multiply by the depth value, and divide by the focal length to obtain the X-coordinate in the camera coordinate system; subtract the y-coordinate of the camera principal point from the image y-coordinate, multiply by the depth value, and divide by the focal length to obtain the Y-coordinate; the depth value itself is the Z-coordinate. Then, based on the pre-calibrated rotation matrix and translation vector between the camera and the world coordinate system, the coordinates in the camera coordinate system are transformed into the world coordinate system based on the mold, ultimately obtaining the 3D spatial position of the defect centroid. The output quantization report includes the 3D position in the world coordinate system and the previously calculated area of ​​the convex hull polygon. Repeating the above process for all defect areas completes the localization and quantification of all defects.

[0040] The working principle of this invention is as follows: First, a linearly polarized light source is controlled to illuminate the mold surface sequentially at four preset angles: 0 degrees, 45 degrees, 90 degrees, and 135 degrees, and corresponding polarization images are acquired simultaneously to form a multi-polarization image sequence. Then, the image sequence is analyzed at the pixel level to calculate the polarization degree map and polarization angle map, which characterize the surface polarization properties. Next, based on the polarization parameters, an adaptive weighting function is designed to calculate the total light intensity of each pixel, stripping away the interfering specular reflection light intensity component and reconstructing a de-specular reflection feature image that contains only diffuse reflection information and reflects the inherent material properties of the surface. Based on this, by performing color space conversion, dynamic threshold segmentation, multi-scale texture continuity verification, edge closure, and region growing on this feature image, the rust defect region is accurately identified and segmented, generating a binary defect segmentation map. Finally, combining the principle of binocular stereo vision with pre-calibrated system parameters, the image coordinates of the defect are transformed to the world coordinate system, achieving accurate determination of the three-dimensional spatial position of the rust region and quantified output of its geometric parameters. This solution effectively overcomes the problem of target feature annihilation caused by strong specular reflection by deeply integrating polarization physical information with image recognition algorithms, and significantly improves the robustness and reliability of automated, high-precision detection and positioning of rust defects on mold surfaces under complex industrial lighting environments.

[0041] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the claims of this invention should still fall within the patent coverage of this invention.

Claims

1. A prefabricated wall mold quality inspection and positioning system based on image recognition, characterized in that, include: The multi-polarization state image acquisition module is used to control the linear polarization light source to illuminate the mold surface in sequence with four different preset polarization angles, and to acquire a corresponding polarization image of the mold surface using the polarization-sensitive imaging unit under each preset polarization angle, thereby obtaining a set of multi-polarization state image sequences. The polarization characteristic analysis module is used to analyze the pixel values ​​at the same pixel position in a multi-polarization state image sequence, calculate the polarization degree parameter and polarization angle parameter corresponding to each pixel position, and generate a polarization degree map and polarization angle map characterizing the polarization characteristics of the entire mold surface. The specular reflection stripping and feature reconstruction module calculates the light intensity component at each pixel position based on the polarization degree map and polarization angle map, separates the specular reflection light intensity component from the total light intensity, and reconstructs a specular reflection feature image that can reflect the inherent material properties of the mold surface based on the remaining diffuse reflection light intensity component. The surface defect identification and segmentation module is used to input the despecimen reflection feature image into the preset image analysis unit. The image analysis unit performs pixel-level analysis and classification on the despecimen reflection feature image, identifies and segments the rust defect area on the mold surface, and generates the corresponding binary defect segmentation map. The defect quantification and spatial positioning module calculates the geometric parameters and image coordinates of each rust defect region based on the binary defect segmentation map; combined with the pre-calibrated imaging system parameters, it transforms the image coordinates to the world coordinate system of the mold, and outputs the three-dimensional spatial position information and quantized geometric parameters of each rust defect region in the world coordinate system.

2. The image recognition-based prefabricated wall mold quality inspection and positioning system according to claim 1, characterized in that, The generation of the polarization degree map and polarization angle map characterizing the polarization characteristics of the entire mold surface specifically includes: Pixel-level spatial registration is performed on the polarization images of the mold surface acquired under different preset polarization angles to ensure that the pixel positions representing the same physical point in the multi-polarization image sequence are accurately aligned. For each registered pixel location, select light intensity values ​​at least four different polarization angles, calculate the light intensity difference between pairs of orthogonal polarization directions, and weight and fuse the light intensity differences according to preset weight coefficients to form a weighted vector of light intensity difference for the corresponding pixel location. Based on the weighted vector of light intensity difference at each pixel location and the total light intensity value at the corresponding point, the polarization angle parameter and polarization degree parameter are calculated pixel by pixel through the arctangent function and the square root operation of the sum of squares, and a polarization degree map and polarization angle map covering the entire mold surface are generated simultaneously.

3. The image recognition-based prefabricated wall mold quality inspection and positioning system according to claim 2, characterized in that, The step-by-pixel calculation of polarization angle and degree of polarization parameters specifically includes: Based on the component ratio of the weighted vector of light intensity difference, the initial polarization angle is obtained by iteratively searching the pre-stored angle mapping table, and the quadrant in which the component is located is determined according to the positive and negative sign relationship of the components. The initial polarization angle is then corrected by circular angle to obtain the polarization angle parameter. The original degree of polarization value is obtained by taking the ratio of the squares of each component of the weighted vector of light intensity difference to the square of the total light intensity value. Based on the preset brightness range where the total light intensity value is located, the corresponding nonlinear compensation function is selected to adaptively enhance the original polarization degree value, thereby obtaining the optimized polarization degree parameter. The calculated polarization angle parameter and the optimized polarization degree parameter are logically correlated and verified. If the polarization degree parameter is lower than the first threshold and the polarization angle parameter changes drastically, the polarization characteristic data of the corresponding pixel is determined to be invalid and replaced with the interpolation result of the adjacent valid pixel data. Finally, high-quality polarization degree map and polarization angle map are generated synchronously.

4. The image recognition-based prefabricated wall mold quality inspection and positioning system according to claim 1, characterized in that, The reconstructed destigmoreflection feature image that reflects the inherent material properties of the mold surface specifically includes: Correlation analysis was performed on the polarization degree parameter and polarization angle parameter of each pixel position to identify continuous regions where the polarization degree parameter is higher than the set threshold and the polarization angle parameter changes slowly, which were initially identified as potential regions dominated by specular reflection. Based on the initially determined specular reflection dominant region, an adaptive weight function that is positively correlated with the polarization degree parameter of the corresponding pixel is constructed. The total light intensity is proportionally divided using the weight function, and the specular reflection light intensity component to be separated is directly calculated. The diffuse reflection intensity component is obtained by subtracting the specular reflection intensity component from the total light intensity; and based on the continuity of the diffuse reflection components between adjacent pixels, the diffuse reflection intensity of the area obscured by specular reflection is spatially interpolated and restored to generate the final de-specular reflection feature image.

5. The image recognition-based prefabricated wall mold quality inspection and positioning system according to claim 4, characterized in that, The construction of an adaptive weight function positively correlated with the polarization degree parameter of the corresponding pixel, and the proportional division of the total light intensity using the weight function, specifically includes: Using the polarization degree parameter of a pixel as input, a first threshold and a second threshold are defined; when the polarization degree parameter is lower than the first threshold, the weight output is zero; when the polarization degree parameter is between the first and second thresholds, the weight increases with the polarization degree parameter according to a preset first non-linear curve; when the polarization degree parameter is higher than the second threshold, the weight remains at a constant maximum value. A local neighborhood is defined centered on the pixel to be processed, and the standard deviation of all weight values ​​within the local neighborhood is calculated. If the standard deviation exceeds a preset fluctuation threshold, the median of the weight values ​​within the local neighborhood is used to replace the original calculated weight of the center pixel. The corrected weight value is directly multiplied by the total light intensity value at the corresponding pixel position, and the product is the specular reflection light intensity component of the pixel.

6. The image recognition-based prefabricated wall mold quality inspection and positioning system according to claim 1, characterized in that, The generation of the corresponding binary defect segmentation map specifically includes: The pixels of the despecimen feature image are converted from the original color space to a preset defect-sensitive color space. Within this space, a threshold is dynamically calculated based on the global statistical characteristics of the image, and each pixel is binarized for initial classification to obtain an initial defect mask. Within the potential defect region identified by the initial defect mask, local texture descriptors at multiple scales are extracted, and the spatial continuity measure of the texture descriptors is calculated. Regions with continuity below a preset threshold are removed from the initial defect mask to generate an intermediate mask that has passed texture verification. The edges of each independent connected region in the intermediate mask are detected and closed. Then, with the closed edges as constraints, adaptive region growth is performed in the color space corresponding to the despecimen feature image. Adjacent pixels that conform to the growth rules are added in to output a binarized defect segmentation map.

7. The image recognition-based prefabricated wall mold quality inspection and positioning system according to claim 6, characterized in that, The computational measure of spatial continuity of the texture descriptor specifically includes: For each pixel in the potential defect area, a set of preset directions and convolution kernels of different sizes are used to perform convolution operations to obtain the texture response values ​​of the pixel in multiple scales and directions. These response values ​​are arranged to form the multi-scale orientation texture matrix of the corresponding pixel. For each pixel within a potential defect region, the pixel multi-scale orientation texture matrix is ​​used as a feature vector. The cosine similarity between the pixel and the feature vectors of all other pixels within a predefined neighborhood window is calculated to generate a local neighborhood similarity matrix for the pixel. Analyze the local neighborhood similarity matrix of each pixel, count the number of pixel connections with similarity higher than a set threshold, and calculate the ratio of this number to the total number of pixels in the connected region to which the pixel belongs in the initial defect mask. This yields a continuity measure that characterizes the consistency of the texture space in the corresponding region.

8. The image recognition-based prefabricated wall mold quality inspection and positioning system according to claim 1, characterized in that, The output of the three-dimensional spatial location information and quantized geometric parameters of each corrosion defect region in the world coordinate system specifically includes: For each independent connected region in the binarized defect segmentation map, calculate the minimum bounding rectangle of the independent connected region; based on the set of pixels within the independent connected region box, construct the convex hull polygon of the corresponding defect region, and calculate the geometric center of the convex hull polygon as the centroid image coordinates of the defect. Centered on the coordinates of each centroid image, and based on the pre-calibrated binocular imaging system parameters, local virtual stereo projection grids are constructed on the destigination feature images of the left and right views respectively. By matching the intensity distribution patterns of the two grids, the precise disparity value of the centroid in the disparity space is calculated. Based on the accurate parallax value and the baseline distance and focal length parameters of the binocular imaging system, the three-dimensional spatial depth value corresponding to the centroid is calculated; combined with the centroid image coordinates and camera intrinsic parameters, the three-dimensional spatial position of the centroid of the defect region in the world coordinate system is calculated, and a quantitative report including the three-dimensional spatial position and the area of ​​the convex hull polygon is output.

9. The image recognition-based prefabricated wall mold quality inspection and positioning system according to claim 8, characterized in that, The construction of the local virtual stereoscopic projection mesh specifically includes: The major axis of the minimum bounding rectangle of the convex hull polygon of the defect region is calculated as the main axis of the mesh, and the size of the bounding rectangle is scaled according to a preset ratio to determine the initial range of the virtual stereoscopic projection mesh. Within the initial range, a regular sampling point matrix aligned with the principal axis is established; based on the local gradient intensity of the despecimen feature image in the vicinity of the sampling points, the density of the sampling points is dynamically adjusted, increasing the number of sampling points in textured areas and sparsely sampling in flat areas. On the despecular reflection feature image of the left view, an adaptive sampling point matrix is ​​placed with the centroid image coordinates as the center; according to the pre-calibrated epipolar constraint relationship, each sampling point of the left view is projected onto the corresponding epipolar line of the right view to form the corresponding matching grid of the right view, thus completing the bidirectional grid construction.