Dimensional detection method of pump metal casing based on image analysis

By synchronously collecting visible light and near-infrared images, combined with multi-frequency heterodyne algorithms and polarizer technology, the problem of detecting highly reflective areas of the pump's metal casing was solved, and high-precision three-dimensional reconstruction and dimensional detection were achieved.

CN120279080BActive Publication Date: 2025-09-16JINING ANTAI MINING EQUIP MFG CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510753437.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-06
Publication Date
2025-09-16
Estimated Expiration
2045-06-06

AI Technical Summary

Technical Problem

Existing methods for detecting the size of pump metal casings are prone to information loss, texture bleaching, and brightness overexposure in highly reflective areas, resulting in poor three-dimensional reconstruction quality. It is also difficult to accurately separate highly reflective and diffusely reflective areas, affecting the accuracy of size detection.

Method used

Visible light and near-infrared images are collected synchronously, combined with dynamic exposure control and multi-frequency heterodyne algorithm. The diffuse reflection component is extracted by rotating the linear polarizer, and a dense three-dimensional point cloud model of multispectral texture is constructed. Brightness suppression and texture enhancement are performed in the CIE-Lab color space. Finally, the regional size features are extracted based on the geometric information.

Benefits of technology

It achieves highly robust depth recovery in complex reflection scenes, improves the visual performance and registration effect of 3D models, significantly enhances texture detail retention, improves detection accuracy and stability, and adapts to different lighting and viewing conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120279080B_ABST
    Figure CN120279080B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of industrial measurement technology and discloses a method for detecting the size of a pump metal casing based on image analysis, comprising the following steps: synchronously collecting image data of the pump metal casing in the visible light band and the near-infrared band; optimizing the contrast of the image data by means of a dynamic exposure control technology to obtain a high dynamic range multispectral image; obtaining three-dimensional geometric information of the pump metal casing, registering and fusing it with the high dynamic range multispectral image, constructing a dense three-dimensional point cloud model with multispectral texture, and processing high-reflection areas in the dense three-dimensional point cloud model by means of a multi-frequency heterodyne algorithm; collecting multi-angle reflection images of the pump metal casing by means of a rotating linear polarizer, calculating the Stokes vector to extract the diffuse reflection component, constraining the diffuse reflection component and suppressing the brightness of the high-reflection area based on the CIE-Lab color space, and outputting a dense three-dimensional point cloud model with texture enhancement; and improving the detection accuracy of the size of the pump metal casing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of industrial measurement, and more particularly to a method for detecting the size of a metal casing of a pump based on image analysis. Background Art

[0002] Patent publication number CN104165591A discloses a fully automated optical dimension inspection method and system for metal casings. The system comprises an image management module, a data management module, a system management module, and a main control module. The image management module includes an image acquisition submodule, an image enhancement submodule, a feature recognition submodule, an image registration submodule, an image fusion submodule, an edge extraction submodule, an image filtering submodule, and an identification control submodule. The data management module includes a data operation submodule, a data storage submodule, and a data transmission submodule. The system management module includes an I / O submodule and a system maintenance submodule. The main control module includes an indicator detection submodule, a signal conversion submodule, and a communication control submodule. These functional modules and submodules are interconnected via a data transmission bus or various conversion and control circuits to achieve data communication. This invention provides a high-precision, highly automated platform that meets the needs of industries such as molds and high-tech.

[0003] The existing method for detecting the size of the metal casing of a pump has the following defects:

[0004] In the method for detecting the size of the metal casing of the pump, the multi-frequency heterodyne assumes that the surface of the object is a Lambertian reflector or a modelable phase response body, but the metal curved surface is mostly non-uniform mirror reflection, and the light may completely deviate from the image at certain angles, resulting in serious information loss; at this time, heterodyne recovery is difficult to rely on the principle to restore the true depth. Traditional structured light relies on the Lambertian reflection assumption. On metal or mirror-reflective objects, the pattern will be saturated or completely lost, causing serious phase jumps or depth blind spots. Although the heterodyne method can improve anti-interference performance, its premise is that the target surface is a modelable reflector. Low-frequency envelope distortion or inability to decode is likely to occur in the mirror-reflective area. Existing technologies often simply merge multi-source data in a maximum confidence selection or global weighting manner, which is difficult to adapt to various boundary conditions; in highly reflective areas, visible light images are prone to saturation and distortion, affecting the quality of point cloud three-dimensional reconstruction;

[0005] Existing structured light or multi-frequency heterodyne systems are prone to problems such as highlight saturation and texture bleaching on metal surfaces, resulting in the lack of effective texture information in some areas of the texture map after three-dimensional reconstruction, and overexposure of some areas, which affects the true restoration and causes serious distortion of the three-dimensional point cloud texture mapping; most traditional methods can only perform segmentation based on brightness thresholds or simple reflection characteristics, and cannot accurately separate high-reflection areas from diffuse reflection areas, especially in high-brightness spots and blurred edges, which are prone to misjudgment.

[0006] In view of this, the present invention proposes a pump metal casing size detection method based on image analysis to solve the above problem. Summary of the Invention

[0007] In order to overcome the above-mentioned defects of the prior art and to achieve the above-mentioned purpose, the present invention provides the following technical solution: a method for detecting the size of a pump metal casing based on image analysis, comprising:

[0008] S1. Synchronously collect image data of the pump metal casing in the visible light band and near-infrared band; optimize the contrast of the image data through dynamic exposure control technology to obtain high dynamic range multispectral images;

[0009] S2. Obtain the 3D geometric information of the pump metal casing and perform registration and fusion with the high dynamic range multispectral image to construct a dense 3D point cloud model with multispectral texture. Use a multi-frequency heterodyne algorithm to process the highly reflective areas in the dense 3D point cloud model.

[0010] S3: Collect multi-angle reflection images of the pump's metal casing by rotating the linear polarizer, calculate the Stokes vector to extract the diffuse reflection component, constrain the diffuse reflection component and suppress the brightness of the highly reflective area based on the CIE-Lab color space, and output a dense 3D point cloud model with texture enhancement.

[0011] S4, combining the 3D geometric information of the pump metal shell and the dense 3D point cloud model after texture enhancement to extract the regional size features of the pump metal shell;

[0012] S5. Compare the regional size features with the preset regional size features, automatically calculate the size error, obtain the geometric error index, and generate real-time alarm information and SPC reports based on the geometric error index to the size detection intelligent terminal.

[0013] Preferably, the method for acquiring image data in the visible light band and the near-infrared band includes:

[0014] Two spectrally sensitive cameras are configured to collect visible light and near-infrared wavelengths respectively. A coaxial optical path design is adopted to guide light of different wavelengths to the corresponding spectrally sensitive cameras through a beam splitter prism, thus achieving multi-band imaging in the same field of view.

[0015] A synchronous trigger controller is configured to uniformly control the timing of the spectrum-sensitive cameras, using a wide-spectrum LED array covering the visible light band and near-infrared band. A light source modulation control circuit is configured to dynamically control the luminous intensity and timing of the wide-spectrum LED array in different bands according to the working status of the spectrum-sensitive cameras.

[0016] Through external hardware trigger signals, all spectrally sensitive cameras acquire images at the same time. Exposure time and gain parameters are set according to the reflectivity characteristics of different bands. Image data of the pump metal casing in the visible light band and near-infrared band are cached in the DMA cache connected to the data interface of the spectrally sensitive cameras, and a unified timestamp is bound to each frame of the image.

[0017] The factory calibration method is used to obtain the intrinsic and extrinsic parameter matrices between cameras with different spectral sensitivities. Geometric transformation is applied to unify the image data in the visible light band and near-infrared band into the same spatial coordinate system, thereby obtaining image data with spatiotemporal synchronization and spatial registration.

[0018] Preferably, the method for acquiring the high dynamic range multispectral image comprises:

[0019] Perform brightness histogram analysis on the collected image data, and combine the image gradient and texture features to perform regional segmentation on the image data using a regional segmentation algorithm, with a preset first brightness threshold and a second brightness threshold. If the image brightness is less than the preset first brightness threshold, it is determined to be a low-brightness area; if the image brightness is greater than or equal to the preset first brightness threshold and less than the preset second brightness threshold, it is determined to be a medium-brightness area; if the image brightness is greater than the preset second brightness threshold, it is determined to be a high-brightness area.

[0020] Identify low-brightness areas, medium-brightness areas, and high-brightness areas, calculate local contrast and saturation indicators for different brightness areas, dynamically set regional adaptive exposure time and gain parameters, and perform regional exposure adjustment. Based on the set regional exposure parameters, sample images under different exposure settings for the same field of view. Based on the local feature response, perform HDR fusion processing on the images of each region through a local dynamic weighting strategy to generate a high dynamic range image with optimal regional contrast.

[0021] Based on the spectral response characteristics, highly reflective metal areas in image data are identified and detected using the brightness threshold method. The transmission characteristics and reflection suppression capabilities of near-infrared band images are combined to perform pixel-level compensation on the highlight areas in the visible light band images. The halo suppression filter is used to enhance the texture and suppress the highlights in the highlight areas to obtain a high dynamic range multispectral image.

[0022] Preferably, the three-dimensional geometric information of the pump metal shell includes spatial coordinate point cloud data, key structural feature data, surface curvature information and geometric dimension parameter data of the pump metal shell surface.

[0023] Preferably, the method for constructing the dense three-dimensional point cloud model with multispectral texture includes:

[0024] For each 3D point in the same spatial coordinate system, it is mapped to the multispectral image plane based on the intrinsic and extrinsic parameter matrices between cameras with different spectral sensitivities, obtaining a projection function from point cloud space to image space. Based on this projection function, a pinhole camera model is used to project each 3D point to the corresponding 2D coordinate position in the multispectral image, and the multispectral texture value of the image pixel at this position is extracted.

[0025] If the two-dimensional coordinate position is not an integer coordinate, bilinear interpolation is used to extract the multispectral texture value from the multispectral image; the conversion from spatial geometric points to multispectral texture points is completed to form a texture point cloud with multi-channel image properties; the texture point cloud is spectrally normalized and densely organized using an octree index structure to construct all the texture point clouds into a dense three-dimensional point cloud model with multispectral texture.

[0026] Preferably, the method for processing high-reflective areas in a dense three-dimensional point cloud model comprises:

[0027] A threshold value for texture value in the visible light band and a threshold value for the rate of change in brightness gradient are preset. If the texture value in the visible light band corresponding to any point in the dense 3D point cloud model is greater than the threshold value for texture value in the visible light band, and the rate of change in brightness gradient is greater than the threshold value for change in brightness gradient, then the point is marked as a high-reflection point, and the area formed by all high-reflection points is defined as a high-reflection area.

[0028] The multi-frequency coded light source mechanism is introduced, and the preset m groups of spatial frequency patterns are projected in sequence through the structured light projection device to form a spatial frequency set For high reflective areas, multi-frequency heterodyne phase recovery is used to calculate the difference between spatial frequency pairs. , construct low-frequency envelope auxiliary decoding; based on spatial frequency set The spatial frequency in and spatial frequency The combination of pairs generates heterodyne synthesis phase ;

[0029] For different spatial frequency combinations, different heterodyne synthesis phases are weighted and fused to obtain the final phase ;After obtaining the final phase, it is converted into depth coordinates in the dense point cloud through the phase-depth inverse function;

[0030] Near-infrared texture compensation and multispectral fusion rules are used to repair locations where the texture value of the visible light band is greater than the preset visible light band texture value threshold. When there is a blind spot in the near-infrared structured light or it is limited by the occlusion reflection angle, a TOF lidar is introduced for supplementary measurement. The depth value corresponding to any location point in the dense 3D point cloud model is calculated based on the pulse flight time.

[0031] For each 3D point position in the dense 3D point cloud model, multi-source depth fusion is performed using a piecewise fusion function based on the confidence of different depth sources, and finally a dense 3D point cloud model with restored depth information is obtained.

[0032] Preferably, the method for extracting the diffuse reflection component includes:

[0033] A linear polarizer was installed and set to rotate continuously at different angles, capturing a reflection image of the pump's metal casing at each angle. For each pixel in the multi-angle reflection image, a Stokes vector was constructed using the captured multi-angle reflection images, and the degree of polarization and polarization angle of each pixel were further calculated using the Stokes vector. A polarization threshold was preset, and the areas corresponding to pixels with a polarization degree less than the preset threshold were extracted and marked as diffuse reflection components.

[0034] Preferably, the method for obtaining the texture-enhanced dense three-dimensional point cloud model includes:

[0035] Based on multi-angle reflection images, pixel-level polarization information is extracted and a polarization vector is constructed to calculate the degree of polarization at each location point. , according to the preset polarization threshold, identify and extract the diffuse reflection area and generate a binary mask ; Convert the multi-angle reflection image to CIE-Lab color space, and use the diffuse reflection mask to suppress the brightness of the high-reflection area in the CIE-Lab color space. , whose brightness value is , construct a brightness control function under diffuse reflection constraints, and reduce the brightness of high-reflection areas through the brightness control function;

[0036] The processed multi-angle reflectance image in the CIE-Lab color space is converted back to the RGB color space and re-projected into the dense three-dimensional point cloud model. The texture value is reassigned to each point cloud to form a dense three-dimensional point cloud model after texture enhancement.

[0037] Preferably, the method for obtaining the regional size characteristics of the pump metal casing includes:

[0038] The K-nearest neighbor statistical filtering algorithm is used to identify and remove outliers in the dense 3D point cloud model after texture enhancement, and the moving least squares method is used to smooth the surface of the dense 3D point cloud.

[0039] The dense 3D point cloud model after texture enhancement is automatically segmented using the region growing and RANSAC algorithms. The metal casing of the pump is decomposed into N geometric regions. The basic geometric parameter data of each geometric region and the regional size characteristics of the metal casing of the pump are obtained and output in the form of structured vectors.

[0040] Preferably, the geometric error indicators include linear size error, angular error, form and position error, surface feature error and boundary contour error.

[0041] The technical effects and advantages of the pump metal casing size detection method based on image analysis of the present invention are as follows:

[0042] The present invention achieves highly robust depth recovery in complex reflection scenes through a three-stage compensation mechanism of visible light, infrared, and TOF. Compared with single structured light, the recovery rate of the scheme in highly reflective or occluded areas is greatly improved. By setting a confidence threshold and a corresponding processing strategy for each type of depth source, the inadaptability caused by a global unified strategy is avoided. Multi-source point cloud data can be adaptively fused in the case of inconsistent quality, thereby improving the consistency and accuracy of the overall point cloud. A near-infrared texture replacement compensation mechanism is introduced in the visible light overexposed area to ensure the visual performance and alignment effect of the three-dimensional model. Compared with traditional methods, this method can achieve higher texture restoration on strongly reflective surfaces. It can be adapted to a variety of industrial materials and has high stability in environments such as production lines, light interference, and complex object morphology.

[0043] Through the diffuse reflection mask calculated based on polarization information, high-reflective areas are effectively identified, and brightness suppression is implemented in the CIE-Lab color space to reduce the brightness of high-reflective areas to within the set threshold, suppress highlight artifacts, and significantly enhance the retention of texture details. In the point cloud texturing stage, the re-projection assignment is based on the processed multi-angle image to ensure the registration accuracy of the texture-enhanced image and the three-dimensional geometric structure, and achieve high consistency between the texture map and the three-dimensional structure. The reflection type is identified through the polarization mechanism, which is not affected by external factors such as color and material. High-reflective areas can be stably extracted under different lighting and viewing angle conditions, effectively improving the adaptability and robustness of the texture enhancement processing. The three-dimensional point cloud model after brightness suppression and texture enhancement significantly improves the visualization effect and edge clarity, so that subsequent algorithms such as region segmentation, structure extraction, and boundary recognition can also run stably on highly reflective surfaces. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 The figure is a flow chart of the method for detecting the size of the metal casing of a pump based on image analysis;

[0045] Figure 2 This is a schematic diagram of the pump metal casing size detection system based on image analysis;

[0046] Figure 3 This is a flow chart of the method for extracting diffuse reflection components provided by the present invention. DETAILED DESCRIPTION

[0047] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only 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 making creative efforts are within the scope of protection of the present invention.

[0048] Example 1

[0049] See also Figure 1 and Figure 3 As shown, this embodiment 1 further illustrates the method for detecting the size of the metal casing of a pump machine based on image analysis proposed by the present invention, including:

[0050] With the continuous advancement of intelligent industrial manufacturing, the structural integrity and geometric dimensional accuracy inspection of metal casings for key equipment such as pumps is gradually shifting from manual spot checks to non-contact automated inspection methods. Among these, dimensional inspection methods based on image analysis and 3D reconstruction have gained widespread application in surface inspection scenarios involving complex and free-form surfaces due to their non-destructive, high-precision, and adaptable nature.

[0051] Currently commonly used non-contact 3D reconstruction technologies include structured light measurement, multi-frequency heterodyne coding, and shape light projection. These methods generally rely on the Lambertian reflection model, which assumes that the surface of the object being measured is isotropically diffusely reflects the incident light, thereby ensuring that the optical coding pattern can be stably projected onto the surface of the object and accurately captured by the imaging system. However, the metal casing of the pump is mostly made of metal, and the surface has strong specular reflection characteristics. Its reflection behavior deviates significantly from the ideal Lambertian body, showing non-uniformity and anisotropy. On such surfaces, the incident light may be strongly directionally reflected, causing the pattern information at certain angles to completely deviate from the imaging path, resulting in serious information loss, pattern saturation, or even pattern disappearance.

[0052] Especially when using multi-frequency heterodyne encoding methods, although it has strong noise resistance and encoding and decoding robustness, its recovery accuracy depends on the target surface having a modelable phase response. When the target area is highly specular, the coding envelope frequency is often distorted in these areas, and the low-frequency envelope signal is blurred or undecodable, resulting in the inability to recover depth information. In addition, structured light methods are prone to phase jumps, reflection overexposure, and texture bleaching in metal mirror areas, which not only affects the integrity of the surface geometry reconstruction, but also causes subsequent texture mapping distortion and inaccurate dimensional analysis.

[0053] Existing technologies typically compensate for highly reflective areas on metal surfaces using multi-source fusion strategies, such as maximum confidence selection and local weighted averaging. However, these methods, which mostly rely on unified processing of global or semi-global features, struggle to adapt to complex conditions such as blurred boundaries and drastic changes in local reflectivity. This leads to unstable texture fusion, inaccurate boundary recognition, and severe distortion of point cloud structures. Furthermore, in highly reflective areas, visible light images often lose key texture details due to overexposure, resulting in noticeable artifacts such as gray blocks, light spots, and bleached bands in the 3D point cloud model during texture mapping, directly impacting the accuracy and stability of dimensional detection.

[0054] Therefore, in order to effectively solve the above problems, the present invention proposes a method for detecting the size of a pump metal casing based on image analysis, comprising:

[0055] S1. Synchronously collect image data of the pump metal casing in the visible light band and near-infrared band; optimize the contrast of the image data through dynamic exposure control technology to obtain high dynamic range multispectral images;

[0056] S2. Obtain the 3D geometric information of the pump metal casing and perform registration and fusion with the high dynamic range multispectral image to construct a dense 3D point cloud model with multispectral texture. Use a multi-frequency heterodyne algorithm to process the highly reflective areas in the dense 3D point cloud model.

[0057] S3: Collect multi-angle reflection images of the pump's metal casing by rotating the linear polarizer, calculate the Stokes vector to extract the diffuse reflection component, constrain the diffuse reflection component and suppress the brightness of the highly reflective area based on the CIE-Lab color space, and output a dense 3D point cloud model with texture enhancement.

[0058] S4, combining the 3D geometric information of the pump metal shell and the dense 3D point cloud model after texture enhancement to extract the regional size features of the pump metal shell;

[0059] S5. Compare the regional size features with the preset regional size features, automatically calculate the size error, obtain the geometric error index, and generate real-time alarm information and SPC reports based on the geometric error index to the size detection intelligent terminal.

[0060] Methods for acquiring image data in the visible light band and near-infrared band include:

[0061] Two spectrally sensitive cameras are configured to collect visible light and near-infrared wavelengths respectively. A coaxial optical path design is adopted to guide light of different wavelengths to the corresponding spectrally sensitive cameras through a beam splitter prism, thus achieving multi-band imaging in the same field of view.

[0062] A synchronous trigger controller is configured to uniformly control the timing of the spectrum-sensitive cameras, using a wide-spectrum LED array covering the visible light band and near-infrared band. A light source modulation control circuit is configured to dynamically control the luminous intensity and timing of the wide-spectrum LED array in different bands according to the working status of the spectrum-sensitive cameras.

[0063] Through external hardware trigger signals, all spectrally sensitive cameras acquire images at the same time. Exposure time and gain parameters are set according to the reflectivity characteristics of different bands. Image data of the pump metal casing in the visible light band and near-infrared band are cached in the DMA cache connected to the data interface of the spectrally sensitive cameras, and a unified timestamp is bound to each frame of the image.

[0064] The factory calibration method is used to obtain the intrinsic and extrinsic parameter matrices between cameras with different spectral sensitivities. Geometric transformation is applied to unify the image data in the visible light band and near-infrared band into the same spatial coordinate system, thereby obtaining image data with spatiotemporal synchronization and spatial registration.

[0065] Methods for acquiring high dynamic range multispectral images include:

[0066] Perform brightness histogram analysis on the collected image data, and combine the image gradient and texture features to perform regional segmentation on the image data using a regional segmentation algorithm, with a preset first brightness threshold and a second brightness threshold. If the image brightness is less than the preset first brightness threshold, it is determined to be a low-brightness area; if the image brightness is greater than or equal to the preset first brightness threshold and less than the preset second brightness threshold, it is determined to be a medium-brightness area; if the image brightness is greater than the preset second brightness threshold, it is determined to be a high-brightness area.

[0067] Identify low-brightness areas, medium-brightness areas, and high-brightness areas, calculate local contrast and saturation indicators for different brightness areas, dynamically set regional adaptive exposure time and gain parameters, and perform regional exposure adjustment. Based on the set regional exposure parameters, sample images under different exposure settings for the same field of view. Based on the local feature response, perform HDR fusion processing on the images of each region through a local dynamic weighting strategy to generate a high dynamic range image with optimal regional contrast.

[0068] Based on the spectral response characteristics, highly reflective metal areas in image data are identified and detected using the brightness threshold method. The transmission characteristics and reflection suppression capabilities of near-infrared band images are combined to perform pixel-level compensation on the highlight areas in the visible light band images. The halo suppression filter is used to enhance the texture and suppress the highlights in the highlight areas to obtain a high dynamic range multispectral image.

[0069] The three-dimensional geometric information of the pump metal casing includes the spatial coordinate point cloud data of the pump metal casing surface, key structural feature data, surface curvature information and geometric dimension parameter data.

[0070] Key structural feature data include flange surface, bolt hole position, flange and sealing groove recess; surface curvature information includes the curvature radius of each area of ​​the pump metal casing; geometric dimension parameter data includes the length, width, height, aperture, flatness, roundness and position of the pump metal casing.

[0071] The method for constructing a dense 3D point cloud model with multispectral texture includes:

[0072] For each 3D point in the same spatial coordinate system, it is mapped to the multispectral image plane based on the intrinsic and extrinsic parameter matrices between cameras with different spectral sensitivities, obtaining a projection function from point cloud space to image space. Based on this projection function, a pinhole camera model is used to project each 3D point to the corresponding 2D coordinate position in the multispectral image, and the multispectral texture value of the image pixel at this position is extracted.

[0073] If the two-dimensional coordinate position is not an integer coordinate, bilinear interpolation is used to extract the multispectral texture value from the multispectral image; the conversion from spatial geometric points to multispectral texture points is completed to form a texture point cloud with multi-channel image properties; the texture point cloud is spectrally normalized and densely organized using an octree index structure to construct all the texture point clouds into a dense three-dimensional point cloud model with multispectral texture.

[0074] Methods for handling highly reflective areas in dense 3D point cloud models include:

[0075] A threshold value for texture value in the visible light band and a threshold value for the rate of change in brightness gradient are preset. If the texture value in the visible light band corresponding to any point in the dense 3D point cloud model is greater than the threshold value for texture value in the visible light band, and the rate of change in brightness gradient is greater than the threshold value for change in brightness gradient, then the point is marked as a high-reflection point, and the area formed by all high-reflection points is defined as a high-reflection area.

[0076] The multi-frequency coded light source mechanism is introduced, and the preset m groups of spatial frequency patterns are projected in sequence through the structured light projection device to form a spatial frequency set ;

[0077] In actual acquisition, some areas may experience pattern saturation or phase jumps due to the high reflectivity of the surface, resulting in significant errors in the directly acquired phase map. Therefore, a multi-frequency heterodyne method is used to restore the stable phase.

[0078] For highly reflective areas, multi-frequency heterodyne phase recovery is used to calculate the difference between spatial frequency pairs. , construct low-frequency envelope auxiliary decoding; based on spatial frequency set The spatial frequency in and spatial frequency The combination of pairs generates heterodyne synthesis phase ; ;in, Indicates the spatial frequency Next, position point The phase value of Indicates the spatial frequency Next, position point The phase value of and represents the index of spatial frequency and satisfies ; Represents the total number of spatial frequencies; Indicates the horizontal coordinate of the location point; Indicates the vertical coordinate of the location point;

[0079] For different spatial frequency combinations, different heterodyne synthesis phases are weighted and fused to obtain the final phase ; After obtaining the final phase (recovering the reliable phase), it is converted into the depth coordinate in the dense point cloud through the phase-depth inverse function ;in, Indicates location point The corresponding depth value; represents the phase-depth conversion constant; represents the reference spatial frequency;

[0080] In highly reflective areas, the reflected light may be too strong, causing the texture (such as brightness and color) of certain areas of the image to be overexposed. That is, the brightness values ​​of some pixels exceed the representable range (greater than the preset visible light band texture value threshold). Such areas will lack detailed information, affecting the quality of the point cloud.

[0081] Adopting near-infrared texture compensation and multi-spectral fusion rules, we repair the position points where the texture value of the visible light band is greater than the preset threshold value of the visible light band texture value. ;in, Represents the texture value after fusion; Represents the texture value of the near-infrared image; Represents the visible light image texture value; Represents the fusion coefficient, controls the weight ratio of near infrared and visible light, according to the expert experience method, The value range is from 0 to 1;

[0082] Multi-frequency heterodyning assumes that the surface of an object is a Lambertian reflector or a modelable phase response body, but most metal surfaces have non-uniform specular reflections, and the light may completely deviate from the image at certain angles, resulting in serious information loss. In this case, heterodyne recovery is difficult to rely on principles to restore the true depth.

[0083] In cases where highly reflective areas cannot be fully recovered, incoherent light sources or other sensing mechanisms are introduced; Time of Flight (TOF) LiDAR is introduced to supplement depth information, which is then integrated into the main point cloud through multi-source fusion; and depth information loss or error accumulation caused by highly reflective metal areas in dense 3D point cloud models is addressed.

[0084] When near-infrared structured light has a blind spot or is limited by the occlusion reflection angle, TOF lidar is introduced for supplementary measurement, and the depth value corresponding to any position point in the dense 3D point cloud model is calculated based on the pulse flight time; ;in, represents the speed of light; Represents the laser round trip time difference;

[0085] For each 3D point position in the dense 3D point cloud model, multi-source depth fusion is performed using a piecewise fusion function based on the confidence of different depth sources, and finally a dense 3D point cloud model with restored depth information is obtained.

[0086] The piecewise fusion function is:

[0087] ;in, Indicates the depth value after multi-source depth fusion; Indicates the depth value measured by near-infrared structured light; Indicates the depth value measured by visible light; Indicates the depth value measured by TOF laser; Represents the confidence-weighted average of the three depth values; Represents the confidence of near-infrared structured light; Indicates visible light confidence; Indicates TOF laser confidence; Indicates the preset near-infrared structured light confidence threshold; Indicates the preset visible light confidence threshold; Indicates the preset TOF laser confidence threshold; Indicates the current location The confidence levels of the three depth sources, near-infrared, visible light, and TOF laser, did not reach any preset threshold. , , In this case, all single depth sources are unreliable, so a multi-source weighted average approach is used; according to expert experience, , , The value range of is between 0 and 1; .

[0088] It should be noted that the piecewise function dynamically selects the most reliable data source based on the quality evaluation (i.e., confidence) of the three depth measurement methods, with the priority being: near-infrared structured light has the highest priority; if it fails, it degenerates to visible light structured light; if both the first two fail, it degenerates to TOF lidar; if the confidence of all sensors is insufficient, all information is fused; this hierarchical processing mechanism is consistent with the cognitive model in industrial-grade 3D reconstruction scenarios, giving priority to the use of sensing methods with high precision and strong detail expression, degenerating step by step to ensure a balance between integrity and robustness.

[0089] The following problems existing in existing technologies are solved: Traditional structured light relies on the Lambertian reflection assumption. On metal or mirror-reflecting objects, the pattern will be saturated or completely lost, resulting in severe phase jumps or depth blind spots. Although the heterodyne method can improve anti-interference performance, its premise is that the target surface is a modelable reflector (such as diffuse reflection). Low-frequency envelope distortion or inability to decode is prone to occur in the mirror-reflection area. Existing technologies often simply merge multi-source data in a maximum confidence selection or global weighting manner, which is difficult to adapt to various boundary conditions; in highly reflective areas, visible light images are prone to saturation and distortion, affecting the quality of point cloud 3D reconstruction;

[0090] Compared with the existing technology, the beneficial effects are as follows: through the three-stage compensation mechanism of visible light-infrared-TOF, highly robust depth recovery is achieved in complex reflection scenes; compared with single structured light, the recovery rate of the scheme in highly reflective or occluded areas is greatly improved; by setting a confidence threshold and corresponding processing strategy for each type of depth source, the inadaptability caused by a global unified strategy is avoided; multi-source point cloud data can be adaptively fused in the case of inconsistent quality, thereby improving the consistency and accuracy of the overall point cloud. The near-infrared texture replacement compensation mechanism is introduced in the visible light over-exposed area to ensure the visual performance and alignment effect of the three-dimensional model; compared with traditional methods, this method can achieve higher texture restoration on strongly reflective surfaces. It can be adapted to a variety of industrial materials and has high stability in production lines, light interference, complex object morphology and other environments.

[0091] Methods for extracting the diffuse component include:

[0092] A linear polarizer was installed and set to rotate continuously at different angles, capturing a reflection image of the pump's metal casing at each angle. For each pixel in the multi-angle reflection image, a Stokes vector was constructed using the captured multi-angle reflection images, and the degree of polarization and polarization angle of each pixel were further calculated using the Stokes vector. A polarization threshold was preset, and the areas corresponding to pixels with a polarization degree less than the preset threshold were extracted and marked as diffuse reflection components.

[0093] The method for obtaining the dense 3D point cloud model after texture enhancement includes:

[0094] Based on multi-angle reflection images, pixel-level polarization information is extracted and a polarization vector is constructed to calculate the degree of polarization at each location point. , according to the preset polarization threshold, identify and extract the diffuse reflection area and generate a binary mask ; Convert the multi-angle reflection image to CIE-Lab color space, and use the diffuse reflection mask to suppress the brightness of the high-reflection area in the CIE-Lab color space. , whose brightness value is , construct a brightness control function under diffuse reflection constraints, and reduce the brightness of high-reflection areas through the brightness control function;

[0095] The brightness control function is ;in, Indicates the brightness value of the position point after brightness suppression; Indicates that the location point belongs to the diffuse reflection area; Indicates that the location point belongs to a high-reflection area; Represents the brightness suppression coefficient, which is used to control the degree of brightness suppression in high-reflective areas. According to expert experience, The value range is from 0 to 1;

[0096] It should be noted that the highly reflective area (specular reflection) usually appears saturated and bright in the image. Suppresses false highlights. Diffuse reflections require no adjustment, preserving true texture restoration. The piecewise function is simple and efficient, facilitating rapid hardware implementation and embedded deployment. It also preserves boundary continuity, preventing sudden changes between high-reflectivity and low-reflectivity areas.

[0097] The processed multi-angle reflectance image in the CIE-Lab color space is converted back to the RGB color space and re-projected into the dense three-dimensional point cloud model. The texture value is reassigned to each point cloud to form a dense three-dimensional point cloud model after texture enhancement.

[0098] The following problems existing in the existing technology are solved: the existing structured light or multi-frequency heterodyne systems are prone to problems such as highlight saturation and texture bleaching on metal surfaces, resulting in the lack of effective texture information in some areas of the texture map after 3D reconstruction, and the brightness of some areas is overexposed, affecting the true restoration and causing serious distortion of the 3D point cloud texture mapping; most traditional methods can only perform segmentation based on brightness thresholds or simple reflection characteristics, and cannot accurately separate high-reflection areas and diffuse reflection areas, especially in high-brightness spots and blurred edges, which are prone to misjudgment.

[0099] Advantageous effects compared to existing technologies: Through the diffuse reflection mask calculated based on polarization information, high-reflective areas are effectively identified, and brightness suppression is implemented in the CIE-Lab color space to reduce the brightness of high-reflective areas to within the set threshold, suppress highlight artifacts, and significantly enhance the retention of texture details. In the point cloud texturing stage, the re-projection assignment is based on the processed multi-angle image to ensure the registration accuracy of the texture-enhanced image and the three-dimensional geometric structure, and achieve high consistency between the texture map and the three-dimensional structure. The reflection type is identified through the polarization mechanism, which is not affected by external factors such as color and material. High-reflective areas can be stably extracted under different lighting and viewing angle conditions, effectively improving the adaptability and robustness of the texture enhancement processing. The three-dimensional point cloud model after brightness suppression and texture enhancement significantly improves the visualization effect and edge clarity, so that subsequent algorithms such as region segmentation, structure extraction, and boundary recognition can also run stably on highly reflective surfaces.

[0100] The method for obtaining the regional dimensional characteristics of the pump metal shell includes:

[0101] The K-nearest neighbor statistical filtering algorithm is used to identify and remove outliers in the dense 3D point cloud model after texture enhancement, improving the density and stability of the point cloud. The moving least squares method is combined to smooth the surface of the dense 3D point cloud to obtain a smoother point cloud surface, providing a good foundation for subsequent feature extraction.

[0102] The dense three-dimensional point cloud model after texture enhancement is automatically segmented using the region growing and RANSAC algorithms, and the pump metal casing is decomposed into N geometric regions, such as planes, cylinders, spheres, edges, holes, etc., to obtain the effect of clearly dividing the different geometric structure regions of the pump metal casing; for the segmented geometric regions, the basic geometric parameter data of each geometric region is obtained by geometric parameter fitting; the basic geometric parameter data include: linear dimensions (such as the distance between two parallel planes, the distance between the center of the hole, the length, width, height of a single region, etc.), angular parameters (the angle between two planes, the perpendicularity / parallelism between the edge and the axis, etc.) and curve / surface parameters (arc surface radius, free surface curvature radius, surface roughness, etc.), to obtain the effect of accurately calculating the basic geometric parameters of each region; and the regional size characteristics of the pump metal casing are output in the form of structured vectors.

[0103] Geometric error indicators include linear size error, angular error, form and position error, surface feature error and boundary contour error.

[0104] Linear dimensional errors include length error, width error, height error, hole spacing error and thickness error; angular errors include the angle error between two planes, the inclination deviation of the inclined plane, and the parallelism or perpendicularity error between the edge and the reference axis;

[0105] Geometric errors include flatness error, straightness error, roundness error, cylindricity error, coaxiality error and symmetry error; surface feature errors include curvature radius deviation and surface warping error; boundary contour errors include boundary offset error and corner arc deviation.

[0106] The preset polarization degree threshold is set by the staff, and different polarization degrees are collected through the end, and the average value of multiple polarization degrees is taken as the preset polarization degree threshold; similarly, the preset brightness first threshold, the preset brightness second threshold, the preset visible light band texture value threshold and the preset brightness gradient change rate threshold are set.

[0107] This embodiment achieves highly robust depth recovery in complex reflective scenes through a three-stage compensation mechanism of visible light, infrared, and TOF. Compared with single structured light, the recovery rate of the scheme in highly reflective or occluded areas is greatly improved. By setting a confidence threshold and corresponding processing strategy for each type of depth source, the inadaptability caused by a global unified strategy is avoided. Multi-source point cloud data can be adaptively fused in the case of inconsistent quality, improving the consistency and accuracy of the overall point cloud. A near-infrared texture replacement compensation mechanism is introduced in the visible light overexposed area to ensure the visual performance and alignment effect of the three-dimensional model. Compared with traditional methods, this method can achieve higher texture restoration on strongly reflective surfaces. It can be adapted to a variety of industrial materials and has high stability in environments such as production lines, light interference, and complex object morphology.

[0108] Through the diffuse reflection mask calculated based on polarization information, high-reflective areas are effectively identified, and brightness suppression is implemented in the CIE-Lab color space to reduce the brightness of high-reflective areas to within the set threshold, suppress highlight artifacts, and significantly enhance the retention of texture details. In the point cloud texturing stage, the re-projection assignment is based on the processed multi-angle image to ensure the registration accuracy of the texture-enhanced image and the three-dimensional geometric structure, and achieve high consistency between the texture map and the three-dimensional structure. The reflection type is identified through the polarization mechanism, which is not affected by external factors such as color and material. High-reflective areas can be stably extracted under different lighting and viewing angle conditions, effectively improving the adaptability and robustness of the texture enhancement processing. The three-dimensional point cloud model after brightness suppression and texture enhancement significantly improves the visualization effect and edge clarity, so that subsequent algorithms such as region segmentation, structure extraction, and boundary recognition can also run stably on highly reflective surfaces.

[0109] Example 2

[0110] See also Figure 2 As shown, for the parts not described in detail in this embodiment, please refer to the description of Example 1. A pump metal casing size detection system based on image analysis is provided, comprising:

[0111] The multispectral imaging module simultaneously collects image data of the pump metal casing in the visible light band and the near-infrared band; it optimizes the contrast of the image data through dynamic exposure control technology to obtain high dynamic range multispectral images;

[0112] The structured light 3D scanning module is used to obtain 3D geometric information of the pump metal casing and perform registration and fusion with the high dynamic range multispectral image to construct a dense 3D point cloud model with multispectral texture. The multi-frequency heterodyne algorithm is used to process the highly reflective areas in the dense 3D point cloud model.

[0113] The adaptive reflection suppression module collects multi-angle reflection images of the pump's metal casing by rotating the linear polarizer, calculates the Stokes vector to extract the diffuse reflection component, constrains the diffuse reflection component and suppresses the brightness of highly reflective areas based on the CIE-Lab color space, and outputs a dense 3D point cloud with texture enhancement.

[0114] The error index generation module extracts the regional size features of the pump metal casing by combining the 3D geometric information of the pump metal casing and the dense 3D point cloud image after texture enhancement;

[0115] The online scale detection module compares the regional size characteristics with the preset regional size characteristics, automatically calculates the size error, obtains the geometric error index, and generates real-time alarm information and SPC reports based on the geometric error index to the size detection intelligent terminal.

[0116] The above formulas are all dimensionless and numerical calculations. The formulas are obtained by collecting a large amount of data and performing software simulation to obtain the most recent real situation. The preset parameters and thresholds in the formulas are set by technicians in this field according to actual conditions.

[0117] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiment. All technical solutions based on the principles of the present invention are within the scope of protection of the present invention. It should be noted that for users of ordinary skill in the art, various improvements and modifications that do not depart from the principles of the present invention should also be considered within the scope of protection of the present invention.

Claims

1. A method for detecting the size of a pump metal casing based on image analysis, characterized in that: include: S1. Synchronously collect image data of the pump metal casing in the visible light band and near-infrared band; optimize the contrast of the image data through dynamic exposure control technology to obtain high dynamic range multispectral images; S2. Obtain the 3D geometric information of the pump metal casing and perform registration and fusion with the high dynamic range multispectral image to construct a dense 3D point cloud model with multispectral texture. Use a multi-frequency heterodyne algorithm to process the highly reflective areas in the dense 3D point cloud model. The method for constructing a dense three-dimensional point cloud model with multispectral texture includes: For each 3D point in the same spatial coordinate system, it is mapped to the multispectral image plane based on the intrinsic and extrinsic parameter matrices between cameras with different spectral sensitivities, obtaining a projection function from point cloud space to image space. Based on this projection function, a pinhole camera model is used to project each 3D point to the corresponding 2D coordinate position in the multispectral image, and the multispectral texture value of the image pixel at this position is extracted. If the two-dimensional coordinate position is not an integer coordinate, bilinear interpolation is used to extract multispectral texture values ​​from the multispectral image; the conversion from spatial geometric points to multispectral texture points is completed to form a texture point cloud with multi-channel image properties; the texture point cloud is spectrally normalized and densely organized using an octree index structure to construct all the texture point clouds into a dense three-dimensional point cloud model with multispectral texture; The method for processing high-reflective areas in a dense three-dimensional point cloud model includes: A threshold value for texture value in the visible light band and a threshold value for the rate of change in brightness gradient are preset. If the texture value in the visible light band corresponding to any point in the dense 3D point cloud model is greater than the threshold value for texture value in the visible light band, and the rate of change in brightness gradient is greater than the threshold value for change in brightness gradient, then the point is marked as a high-reflection point, and the area formed by all high-reflection points is defined as a high-reflection area. The multi-frequency coded light source mechanism is introduced, and the preset m groups of spatial frequency patterns are projected in sequence through the structured light projection device to form a spatial frequency set For high reflective areas, multi-frequency heterodyne phase recovery is used to calculate the difference between spatial frequency pairs. , construct low-frequency envelope auxiliary decoding; based on spatial frequency set The spatial frequency in and spatial frequency The combination of pairs generates heterodyne synthesis phase ; For different spatial frequency combinations, different heterodyne synthesis phases are weighted and fused to obtain the final phase ;After obtaining the final phase, it is converted into depth coordinates in the dense point cloud through the phase-depth inverse function; Near-infrared texture compensation and multispectral fusion rules are used to repair locations where the texture value of the visible light band is greater than the preset visible light band texture value threshold. When there is a blind spot in the near-infrared structured light or it is limited by the occlusion reflection angle, a TOF lidar is introduced for supplementary measurement. The depth value corresponding to any location point in the dense 3D point cloud model is calculated based on the pulse flight time. For each 3D point position in the dense 3D point cloud model, a piecewise fusion function is used to perform multi-source depth fusion based on the confidence of different depth sources, and finally a dense 3D point cloud model with restored depth information is obtained; S3: Collect multi-angle reflection images of the pump's metal casing by rotating the linear polarizer, calculate the Stokes vector to extract the diffuse reflection component, constrain the diffuse reflection component and suppress the brightness of the highly reflective area based on the CIE-Lab color space, and output a dense 3D point cloud model with texture enhancement. S4, combining the 3D geometric information of the pump metal shell and the dense 3D point cloud model after texture enhancement to extract the regional size features of the pump metal shell; S5. Compare the regional size features with the preset regional size features, automatically calculate the size error, obtain the geometric error index, and generate real-time alarm information and SPC reports based on the geometric error index to the size detection intelligent terminal.

2. The method for detecting the size of a pump metal casing based on image analysis according to claim 1, characterized in that: The method for acquiring image data in the visible light band and the near-infrared band includes: Two spectrally sensitive cameras are configured to collect visible light and near-infrared wavelengths respectively. A coaxial optical path design is adopted to guide light of different wavelengths to the corresponding spectrally sensitive cameras through a beam splitter prism, thus achieving multi-band imaging in the same field of view. A synchronous trigger controller is configured to uniformly control the timing of the spectrum-sensitive cameras, using a wide-spectrum LED array covering the visible light band and near-infrared band. A light source modulation control circuit is configured to dynamically control the luminous intensity and timing of the wide-spectrum LED array in different bands according to the working status of the spectrum-sensitive cameras. Through external hardware trigger signals, all spectrally sensitive cameras acquire images at the same time. Exposure time and gain parameters are set according to the reflectivity characteristics of different bands. Image data of the pump metal casing in the visible light band and near-infrared band are cached in the DMA cache connected to the data interface of the spectrally sensitive cameras, and a unified timestamp is bound to each frame of the image. The factory calibration method is used to obtain the intrinsic and extrinsic parameter matrices between cameras with different spectral sensitivities. Geometric transformation is applied to unify the image data in the visible light band and near-infrared band into the same spatial coordinate system, thereby obtaining image data with spatiotemporal synchronization and spatial registration.

3. The method for detecting the size of a pump metal casing based on image analysis according to claim 2, characterized in that: The method for acquiring the high dynamic range multispectral image comprises: Perform brightness histogram analysis on the collected image data, and combine the image gradient and texture features to perform regional segmentation on the image data using a regional segmentation algorithm, with a preset first brightness threshold and a second brightness threshold. If the image brightness is less than the preset first brightness threshold, it is determined to be a low-brightness area; if the image brightness is greater than or equal to the preset first brightness threshold and less than the preset second brightness threshold, it is determined to be a medium-brightness area; if the image brightness is greater than the preset second brightness threshold, it is determined to be a high-brightness area. Identify low-brightness areas, medium-brightness areas, and high-brightness areas, calculate local contrast and saturation indicators for different brightness areas, dynamically set regional adaptive exposure time and gain parameters, and perform regional exposure adjustment. Based on the set regional exposure parameters, sample images under different exposure settings for the same field of view. Based on the local feature response, perform HDR fusion processing on the images of each region through a local dynamic weighting strategy to generate a high dynamic range image with optimal regional contrast. Based on the spectral response characteristics, highly reflective metal areas in image data are identified and detected using the brightness threshold method. The transmission characteristics and reflection suppression capabilities of near-infrared band images are combined to perform pixel-level compensation on the highlight areas in the visible light band images. The halo suppression filter is used to enhance the texture and suppress the highlights in the highlight areas to obtain a high dynamic range multispectral image.

4. The method for detecting the size of a pump metal casing based on image analysis according to claim 3 is characterized in that: The three-dimensional geometric information of the pump metal shell includes spatial coordinate point cloud data, key structural feature data, surface curvature information and geometric dimension parameter data of the pump metal shell surface.

5. The method for detecting the size of a pump metal casing based on image analysis according to claim 4, characterized in that: The method for extracting the diffuse reflection component comprises: A linear polarizer was installed and set to rotate continuously at different angles, capturing a reflection image of the pump's metal casing at each angle. For each pixel in the multi-angle reflection image, a Stokes vector was constructed using the captured multi-angle reflection images, and the degree of polarization and polarization angle of each pixel were further calculated using the Stokes vector. A polarization threshold was preset, and the areas corresponding to pixels with a polarization degree less than the preset threshold were extracted and marked as diffuse reflection components.

6. The method for detecting the size of a pump metal casing based on image analysis according to claim 5, characterized in that: The method for obtaining the texture-enhanced dense three-dimensional point cloud model includes: Based on multi-angle reflection images, pixel-level polarization information is extracted and a polarization vector is constructed to calculate the degree of polarization at each location point. , according to the preset polarization threshold, identify and extract the diffuse reflection area and generate a binary mask ; Convert the multi-angle reflection image to CIE-Lab color space, and use the diffuse reflection mask to suppress the brightness of the high-reflection area in the CIE-Lab color space. , whose brightness value is , construct a brightness control function under diffuse reflection constraints, and reduce the brightness of high-reflection areas through the brightness control function; The processed multi-angle reflectance image in the CIE-Lab color space is converted back to the RGB color space and re-projected into the dense three-dimensional point cloud model. The texture value is reassigned to each point cloud to form a dense three-dimensional point cloud model after texture enhancement.

7. The method for detecting the size of a pump metal casing based on image analysis according to claim 6, characterized in that: The method for obtaining the regional size characteristics of the pump metal shell includes: The K-nearest neighbor statistical filtering algorithm is used to identify and remove outliers in the dense 3D point cloud model after texture enhancement, and the moving least squares method is used to smooth the surface of the dense 3D point cloud. The dense 3D point cloud model after texture enhancement is automatically segmented using the region growing and RANSAC algorithms. The metal casing of the pump is decomposed into N geometric regions. The basic geometric parameter data of each geometric region and the regional size characteristics of the metal casing of the pump are obtained and output in the form of structured vectors.

8. The method for detecting the size of a pump metal casing based on image analysis according to claim 7, characterized in that: The geometric error indicators include linear size error, angular error, shape and position error, surface feature error and boundary contour error.

Citation Information

Patent Citations

  • Fully-automatic optical size detection method and system for metal shell

    CN104165591A

  • Strong reflection inhibition method

    CN109425308A

  • Metal closed water pump impeller appearance defect detection method

    CN113298776A