Hydrogen gate valve body surface defect image recognition quality control system
By employing techniques such as light source control, optical acquisition, surface unfolding, and feature fusion, the problems of identification accuracy and positioning accuracy in the detection of surface defects in hydrogen gate valves have been solved, achieving efficient and safe defect detection and quality control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- DAFENG OKAY FLUID MACHINERY
- Filing Date
- 2025-11-03
- Publication Date
- 2026-07-03
AI Technical Summary
When existing industrial vision inspection systems detect defects on the surface of hydrogen gate valves, the valve body is a complex three-dimensional curved surface, which suffers from perspective projection effects and geometric distortions, leading to a decrease in recognition and positioning accuracy. Existing deep learning models have failed to effectively solve this problem.
A combination of a light source control module, an optical acquisition module, a surface unfolding module, a feature fusion module, and a defect recognition module is adopted. By segmented static LED array illumination, fiber array optical acquisition, and laser point cloud scanning, the three-dimensional geometric shape of the valve body is established, multi-angle image acquisition and feature fusion are performed, and image standardization and defect recognition are achieved.
It significantly improves the imaging accuracy and discrimination reliability of surface defects on hydrogen gate valves, accurately distinguishes various defect types and performs spatial positioning, and realizes safe, accurate, and efficient automated detection and quality traceability.
Smart Images

Figure CN121544532B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image recognition, specifically to a quality control system for image recognition of surface defects in hydrogen gate valve bodies. Background Technology
[0002] Hydrogen gate valves are key actuators in hydrogen delivery systems. Their valve bodies are typically made of high-strength stainless steel or nickel-based alloy castings and undergo precision machining and polishing. Surface defects in the valve body can affect sealing performance and even pose safety risks. Therefore, high-precision and reliable detection of these surface defects is of great importance. Existing industrial vision inspection systems mostly use two-dimensional planar cameras to photograph the valve body surface and combine image processing or deep learning algorithms for defect identification. However, because the valve body surface is a complex three-dimensional curved surface, such as a cylinder or sphere, planar camera photography suffers from perspective projection effects, causing defects in the image to appear deformed and stretched. Defects of the same size may appear with different pixel sizes at different locations, resulting in compromised feature consistency. Furthermore, most existing deep learning models assume that the object being detected is planar, ignoring the geometric distortion caused by the curved surface of the valve body. Defects of the same type may be misclassified as different types, leading to a decrease in recognition and positioning accuracy. While some existing studies have attempted to improve performance through illumination enhancement or algorithm compensation, they generally do not systematically model and correct the three-dimensional curvature of the valve body and lack precise mapping and correction schemes that combine surface information, making it difficult to meet the needs of high-precision online defect detection. Therefore, it is necessary to design a quality control system for image recognition of defects on the surface of hydrogen gate valves to improve detection accuracy. Summary of the Invention
[0003] To address the shortcomings of existing technologies, this invention provides a quality control system for image recognition of defects on the surface of hydrogen gate valve bodies, which has the advantage of improving detection accuracy and solves the problems mentioned in the background technology.
[0004] To achieve the aforementioned goal of improving detection accuracy, this invention provides the following technical solution: a quality control system for image recognition of surface defects on hydrogen gate valve bodies, comprising:
[0005] Light source control module: Places the electronic driver, power supply and controller in the safe zone, controls the segmented static LED array to light up segment by segment, and enters the optical acquisition module;
[0006] Optical acquisition module: Optical illumination is introduced into the danger zone through a fiber optic array, a transparent window, and an inerting chamber. Images are acquired sequentially from multiple angles, and the acquired data is transmitted to the surface unfolding module.
[0007] Surface unfolding module: The three-dimensional geometric shape of the valve body is obtained by laser point cloud scanning. A surface unfolding model is established based on the three-dimensional geometric shape and curvature of the valve body. The acquired image is mapped and processed, and a standardized image is output and transmitted to the feature fusion module.
[0008] Feature fusion module: Extracts texture, edge and brightness normalized features from the corrected multi-angle image, spatially aligns the features of each angle, generates a unified defect feature description using a fusion algorithm, and outputs the fused features to the defect recognition module;
[0009] Defect identification module: Input the fused features into the deep learning algorithm to complete defect classification and position calibration on the valve body surface.
[0010] Preferably, the process of controlling the segmented static LED array to light up segment by segment is as follows:
[0011] Connect the safety zone controller to the segmented static LED array and complete the electrical interface configuration;
[0012] Program the lighting sequence, lighting order, and brightness of each LED segment;
[0013] The controller activates each LED segment sequentially, while simultaneously collecting light intensity data and correcting it according to the curvature of the valve body;
[0014] Adjust the lighting duration, light intensity, and incident angle of each LED segment;
[0015] Record the light source status, brightness curve, and lighting sequence data, and dynamically adjust the lighting sequence according to the valve body size.
[0016] Preferably, the process of introducing optical illumination into the hazardous area via a fiber optic array, a transparent window, and an inerting chamber is as follows:
[0017] Based on the output of the light source control module that lights up segment by segment, the light emitted by the light source in the safe area is introduced into the dangerous area through a fiber optic array.
[0018] A closed optical channel is formed through a transparent viewing window and an inerting chamber;
[0019] A uniform light distribution is formed on the surface of the valve body, and the light incident angle and light intensity are adjusted according to the light sequence. The optical channel status data is recorded and transmitted to the light source control module.
[0020] Preferably, the process of acquiring images in a multi-angle sequence is as follows:
[0021] The valve body is placed at the acquisition position where optical illumination is introduced through a fiber optic array, a transparent window, and an inerting chamber;
[0022] The explosion-proof camera is triggered to acquire images according to a preset angle sequence;
[0023] The acquired images are labeled with angles and stored, and the image data is transmitted to the surface unfolding module.
[0024] Preferably, the process of obtaining the three-dimensional geometric shape of the valve body using laser point cloud scanning is as follows:
[0025] In the static state of the valve body after multi-angle image acquisition, the valve body surface is scanned using a structured light or laser scanning device to generate three-dimensional point cloud data.
[0026] Filtering, registration, and noise removal are performed on point cloud data;
[0027] By combining the collected multi-angle image data, the local curvature and overall geometric features of the valve body are extracted to form a high-precision three-dimensional model that can be used for surface unfolding and image mapping.
[0028] Preferably, the process of establishing a surface development model based on the three-dimensional geometry and curvature of the valve body is as follows:
[0029] Based on the high-precision 3D model and the extracted local curvature data, the 3D point cloud is registered with the valve body CAD model;
[0030] The optimal unfolding parameters are calculated based on the local curvature and overall geometric characteristics, and the mapping relationship from the surface to the two-dimensional plane is established.
[0031] By associating multi-angle image acquisition with the surface model, the accuracy of surface unfolding is verified and corrected.
[0032] Record the unfolding parameters, model information, and image association data, and pass the surface unfolding model and mapping information to the image mapping process.
[0033] Preferably, the mapping process for the acquired image is as follows:
[0034] Based on the surface unfolding model, multi-angle acquired images are matched with the surface model;
[0035] Perform geometric mapping and distortion correction according to the unfolding parameters to correct feature stretching and dimensional deviations caused by perspective projection;
[0036] Standardized images are generated, and the acquisition angle, mapping parameters, and corresponding surface coordinates of each image are recorded. The standardized images and corresponding mapping information are then output to the feature fusion module.
[0037] Preferably, the process of extracting texture, edge, and brightness normalization features from the corrected multi-angle image is as follows:
[0038] Based on standardized images and corresponding mapping parameters, each image undergoes texture analysis, edge detection, and brightness normalization.
[0039] Extract defect-related feature vectors and label the acquisition angle and corresponding surface area information;
[0040] Record the feature extraction parameters and status information, and output the extracted feature vectors to the feature fusion module to generate a unified defect feature description.
[0041] Preferably, the process of generating a unified defect feature description using a fusion algorithm is as follows:
[0042] Based on multi-angle feature vectors, spatial alignment and multi-scale fusion processing are performed;
[0043] Eliminate feature differences caused by lighting, shooting angle, and valve body curvature to generate a unified defect feature description vector;
[0044] Record the fusion parameters and corresponding image index information, and output the fused feature vector to the defect recognition module.
[0045] Preferably, the process of completing defect classification and marking its position on the valve body surface is as follows:
[0046] Based on a unified defect feature vector, the input is processed by a deep learning algorithm;
[0047] Defect types are classified based on the trained model;
[0048] The location of the defect on the valve body surface is determined by combining surface coordinate mapping information;
[0049] Generate defect type and spatial coordinate data, and output them to the quality control system.
[0050] Compared with the prior art, the present invention provides a quality control system for image recognition of defects on the surface of a hydrogen gate valve body, which has the following advantages:
[0051] This invention achieves passive optical acquisition by placing the light source driver and control unit entirely within a safe area and introducing illumination into the hazardous environment using a fiber optic array in conjunction with a transparent window and an inerting chamber. This effectively eliminates the ignition risk in the hydrogen environment of the valve body while ensuring stable illumination. The system utilizes laser point clouds to establish a three-dimensional curvature model of the valve body and performs surface unfolding. Multi-angle acquired images are geometrically mapped and distortion corrected, ensuring a one-to-one correspondence between image information and actual surface positions. This significantly improves the imaging accuracy and discrimination reliability of defects in curved areas. Combined with multi-scale feature fusion and deep learning classification methods, it can accurately distinguish various defect types and perform spatial positioning. This solves the problems of easy distortion and high false negative rate in the recognition of complex curved surfaces by traditional planar vision methods, improving the accuracy and positioning precision of defect identification. It enables safe, accurate, and efficient automated detection and quality traceability of defects on the surface of hydrogen gate valve bodies. Attached Figure Description
[0052] Figure 1 This is a schematic diagram of the structure of the present invention. Detailed Implementation
[0053] 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.
[0054] Example 1: Please refer to Figure 1 As shown, the hydrogen gate valve body surface defect image recognition quality control system of this embodiment includes:
[0055] Light source control module: Places the electronic driver, power supply and controller in the safe zone, controls the segmented static LED array to light up segment by segment, and enters the optical acquisition module.
[0056] The process of controlling the segmented static LED array to light up segment by segment in the light source control module is as follows:
[0057] Connect the safety zone controller to the segmented static LED array and complete the electrical interface configuration;
[0058] The controller is installed in an explosion-proof electrical control cabinet in a safe area. Shielded industrial control cables are used to connect the controller output to the LED array power input. An independent circuit and terminal number are established for each LED segment. Positive and negative wiring is completed using terminal blocks, and signal control lines are connected to the control module I / O interface. Sealed cable connectors are installed at cable entry points to achieve explosion-proof sealing. Grounding copper busbars are used to connect the LED array and control cabinet to ensure that all exposed metal structures are fixed to the safe area grounding system. A multi-parameter power supply is used to test the power output voltage, insulation resistance, and grounding continuity to ensure power stability and line isolation integrity. Finally, the port number for each LED segment is defined in the controller interface.
[0059] Program the lighting sequence, lighting order, and brightness of each LED segment;
[0060] In the control system software, a lighting task script is created, defining the start-up sequence, stop-up sequence, and continuous illumination time for each LED segment. Brightness control instructions are also set, with the brightness range typically set as a percentage, such as a linear progression from 20% to 90%. Control instructions are written using a timing logic editor for an industrial PLC or embedded controller, specifying the trigger time interval for each output port in the code, for example, activating each LED segment sequentially at one-second intervals. Valve body specifications, including nominal diameter, housing height, and wall curvature, are also input to synchronize with subsequent image acquisition angles. The script is stored in the controller's internal storage, and the task scheduling function is enabled, allowing the system to execute lighting output according to a preset sequence after the lighting task start instruction is triggered.
[0061] The controller activates each LED segment sequentially, while simultaneously collecting light intensity data and correcting it according to the curvature of the valve body;
[0062] After the control system is started, it outputs electrical signals to each LED segment sequentially according to the set task script, so that each light source is lit in time sequence, and the illuminance on the valve body surface is collected in real time by a light intensity sensor. The light intensity sensor is usually installed near the optical path window or fixed on a bracket. The light intensity is converted into a digital signal by an analog-to-digital converter and transmitted to the controller. The controller compares the transmitted illuminance value with the preset target illuminance threshold, for example, comparing it with the expected illuminance range of 200 to 500 lux recorded for different curvature areas. When the collected value is higher or lower than the threshold range, the control system adjusts the output voltage or PWM duty cycle of the LED segment to bring the illuminance closer to the preset range, so that more uniform lighting can be obtained in the curved surface locations, such as convex areas and groove areas.
[0063] Adjust the lighting duration, light intensity, and incident angle of each LED segment;
[0064] During the trial operation phase, operators arrange the LED lighting components according to the valve body's position and shape. By adjusting the mechanical fixing brackets of each LED segment, the light source direction is offset from the normal direction of the valve body's outer wall by a certain angle, for example, within the range of 15 to 30 degrees, to reduce the impact of surface reflection. At the same time, the lighting duration of the LEDs is adjusted in the control software to synchronize the lighting time of each light source segment with the camera exposure, usually within the range of 200 to 500 milliseconds. During the lighting debugging, the brightness output is adjusted segment by segment, and the reflection performance of different surface areas is recorded. For example, the illuminance is measured separately for the weld area, flange corner, and arc segment, and the light intensity is fine-tuned based on the measurement values to achieve a stable distribution within the target range. This adjustment process is executed multiple times, and the light field distribution is corrected through actual lighting feedback.
[0065] Record the light source status, brightness curve, and lighting sequence data, and dynamically adjust the lighting sequence according to the valve body size;
[0066] During system operation, the controller collects real-time operating status information of all LED segments, including output current, brightness duty cycle, lighting timestamp, and sequence number, and writes this data sequentially to a data log file or industrial control computer database. Brightness change trends are stored as curves, containing the corresponding measured values of each LED segment's brightness and light intensity sensor. Before system operation, the operator inputs valve body size parameters, such as DN50 and DN150 model information. The control software switches lighting sequence templates according to different sizes. The templates include the number of light segments, lighting interval, and angle compensation, ensuring consistent illumination coverage for small-diameter and large-diameter valve bodies. When a change in valve body size is detected, the system automatically loads the corresponding illumination sequence file, replaces the execution logic, and applies the new timing and brightness table, while simultaneously writing the version number and switching time to the log.
[0067] Optical acquisition module: Optical illumination is introduced into the danger zone through a fiber optic array, a transparent window, and an inerting chamber. Images are acquired sequentially from multiple angles, and the acquired data is transmitted to the surface unfolding module.
[0068] The process of introducing optical illumination into the hazardous area through a fiber optic array, a transparent window, and an inerting chamber in the optical acquisition module is as follows:
[0069] Based on the output of the light source control module that lights up segment by segment, the light emitted by the light source in the safe area is introduced into the dangerous area through a fiber optic array.
[0070] A light source output unit is set up in the safe zone. The light source type is a high color rendering ratio white light-emitting diode module. The light output is coupled into a multi-core fiber bundle through a coupler. The fiber material is low-loss quartz glass fiber, and the single core diameter is usually 500 micrometers to 1,000 micrometers. The fiber bundle is fixed to the coupling end of the light source through fiber optic connectors. The coupling efficiency has been tested and reaches more than 80%. The fiber bundle is laid along a fixed channel on the path from the safe zone to the danger zone. The fiber is mechanically protected by a metal sheath and shielding layer at the transition interface and is provided with tensile stress support. The fiber ends are arranged in an array in the danger zone. The array spacing and arrangement are designed according to the valve body shape and recorded as configuration parameters. The fiber coupling end and the light-emitting unit are collimated by an optical lens group to control the exit divergence angle. After the entire optical path is assembled, the power is measured and the optical power loss curve is recorded.
[0071] A closed optical channel is formed through a transparent viewing window and an inerting chamber;
[0072] A transparent viewing window assembly and an inerting chamber are installed in the hazardous area. The transparent viewing window is made of high-strength optical glass or special transparent ceramic that is resistant to hydrogen permeation. The thickness and size of the viewing window are determined based on the valve body detection window and calculated according to mechanical strength. A metal flange sealing structure is used between the viewing window and the inerting chamber shell, and a fluororubber sealing ring or metal-wound graphite gasket is provided. The inerting chamber forms a closed space that can maintain positive pressure by using the shell and sealing system. The inerting gas supply is delivered from the inerting gas source in the safe area through an intrinsically safe isolation pipeline. The inerting flow rate and the pressure inside the chamber are monitored in real time by a flow meter and a pressure sensor. The inerting chamber is equipped with an inlet check valve and an overflow safety valve. During the start-up and shutdown process, the chamber is replaced according to a predetermined sequence and the replacement time and pressure curve are recorded. The fiber optic or optical port corresponding to the transparent viewing window is fixed with a sealed light-transmitting interface. After the entire closed channel is installed, leakage detection is performed and the leakage rate data is recorded.
[0073] A uniform light distribution is formed on the surface of the valve body, and the light incident angle and light intensity are adjusted according to the light sequence. The optical channel status data is recorded and transmitted to the light source control module.
[0074] The output arrangement and emission angle of the fiber optic array are designed according to the valve body shape and detection area. The required light field is formed by adding collimating lenses, diffusers, and directional optical elements to the fiber ends. The number of array units and the spacing between units are calculated based on the valve body diameter and target illuminance coverage. The illuminance target is defined in lux and written into the configuration table, for example, a target value of 200 to 500 lux. The uniformity index is expressed as the ratio of minimum illuminance to maximum illuminance and is measured during initial commissioning. If the uniformity is below 90%, it is optimized by adjusting the fiber emission angle or replacing the diffuser. The distance and tilt angle between the fiber end and the valve body surface are locked and recorded by a mechanical positioning device during installation. Illuminance measurement points are sampled on the valve body surface in a grid distribution to form an illuminance distribution matrix for subsequent comparison and calibration. The illumination sequence is issued by the safety zone controller. The sequence includes the lighting sequence, brightness setpoint, and duty cycle setting of each array unit. The controller uses a programmable current driver to digitally adjust the current of the light-emitting unit to achieve brightness changes. The light incident angle is adjusted during the installation phase via an adjustable... The positioning bracket achieves initial angle setting, and necessary angle fine-tuning is performed through mechanical adjustment of the fiber end face clamping mechanism in the safe zone. During operation, the control system modifies the target current based on real-time feedback from the light intensity sensor and adjusts the duty cycle according to a preset step size. The lighting timing is matched with the camera exposure synchronization signal, with a timing resolution of milliseconds. The lighting duration and camera exposure time are configured and stored as parameterized files in milliseconds. Light intensity sensors, pressure sensors, temperature sensors, and fiber optic port temperature monitors are arranged inside and outside the optical channel and inerting chamber, respectively. The sensor sampling frequency is set to ten times per second or synchronous sampling according to the detection cycle. After the sensor data is collected by the intrinsically safe isolation acquisition unit, it is transmitted to the safe zone controller via industrial Ethernet or fieldbus. The controller records the light source operating status, light intensity curve, chamber pressure curve, and temperature as a timing log and writes it to the local database. The record content includes timestamp, sensor number, measured value, and execution sequence number. The controller performs simple verification on the recorded data and backs up the data to an external storage device.
[0075] The process of acquiring images sequentially from multiple angles in the optical acquisition module is as follows:
[0076] The valve body is placed at the acquisition position where optical illumination is introduced through a fiber optic array, a transparent window, and an inerting chamber;
[0077] The valve body is fixed on the machine vision inspection platform, which is equipped with mechanical clamps and a positioning reference surface. The clamps adopt a bolt-locking structure and are equipped with a fine-tuning translation mechanism to achieve axial and radial fine-tuning. After the valve body is installed, the position of the reference surface is calibrated once by a contact probe and the calibration coordinates are recorded. The relative positions of the fiber array output end and the transparent window on the inspection platform are fixed according to the design coordinate system. During installation, an angle positioner is used to calibrate the relative angle between the window normal and the valve body reference axis. The angle accuracy is controlled to one decimal place in degrees. After the installation and calibration are completed, the controller reads the valve body model parameters and automatically selects the corresponding acquisition position list according to the valve body diameter and length. The acquisition position list is recorded in the form of face number and circumferential position number.
[0078] The explosion-proof camera is triggered to acquire images according to a preset angle sequence;
[0079] The explosion-proof camera is mounted on a bracket and linked to the angle scale of the positioning stage. The bracket is equipped with an angle displacement encoder to obtain the current camera viewpoint data. The controller has a built-in angle sequence table and outputs camera trigger commands sequentially according to the angle step. The trigger commands are transmitted to the camera trigger port through an isolated trigger line and simultaneously output exposure synchronization pulses to the lighting control unit to synchronize the lighting with the camera exposure. The single exposure time is configured in milliseconds and recorded in the task parameter file. The exposure time range is selectable from one to five hundred milliseconds, with a typical setting of two hundred milliseconds. The camera acquires images in the original uncompressed image format with a resolution of megapixels and writes them to the image metadata area. During the acquisition process, the camera outputs each frame image along with a timestamp, trigger sequence number, and current viewpoint angle value to the local cache. After each trigger, the controller verifies the camera's return status, including the exposure completion flag and frame integrity verification, to ensure that the image frames are written to temporary storage in order.
[0080] The acquired images are labeled with angles and stored, and the image data is transmitted to the surface unfolding module;
[0081] After image acquisition is completed, the controller reads each frame of image and metadata from the camera's local cache, names the images according to the acquisition sequence, and writes the acquisition angle number, angle value, acquisition timestamp, corresponding illumination sequence number, and reference coordinate information of the positioning stage into the file header. The images are written to the high-speed storage array in lossless data format and a check code is generated and recorded in the index database. The controller packages the image file and index metadata according to the preset data transmission channel and sends them to the receiving queue of the surface unfolding module through the industrial Ethernet interface. During the transmission, the data packets are segmented for confirmation and retransmission checks. After the receiving end completes the file reception, it returns a reception confirmation message and records the reception time, file size, and check code matching result in the reception log.
[0082] Surface unfolding module: The module uses laser point cloud scanning to obtain the three-dimensional geometric shape of the valve body, establishes a surface unfolding model based on the three-dimensional geometric shape and curvature of the valve body, performs mapping processing on the acquired images, and outputs standardized images and transmits them to the feature fusion module.
[0083] The process of obtaining the three-dimensional geometric shape of the valve body using laser point cloud scanning in the surface unfolding module is as follows:
[0084] In the static state of the valve body after multi-angle image acquisition, the valve body surface is scanned using a structured light or laser scanning device to generate three-dimensional point cloud data.
[0085] The process of performing a full-surface scan on the valve body while it is stationary after multi-angle image acquisition is as follows: The valve body is fixed to the scanning station using a positioning base. The positioning base uses a mechanical reference surface and a positioning pin structure to ensure that the valve body maintains a consistent spatial reference position during repeated loading. The structured light or laser scanning equipment is started, and the scanning head is moved by the motion control system according to a preset trajectory. The trajectory includes step-by-step scanning paths along the axial and circumferential directions of the valve body. The axial step spacing is set to the range of 0.1 mm to 1 mm according to the outer diameter of the valve body and the required spatial resolution. The working distance between the scanning head and the valve body surface is set to a range of tens of millimeters according to the equipment manual and is set before scanning begins. Distance verification is performed; the scanning light source power and receiving camera exposure time are adjusted and written to the parameter record file through the whiteboard calibration program before the initial scan; during the scanning process, the ranging unit collects surface reflection signals in the high-precision mode of the equipment, and the sampling frequency and ranging accuracy are automatically kept stable according to the equipment's technical specifications; each surface reflection signal collected is converted into a corresponding spatial coordinate point, written to the buffer in real time in the form of continuous points, and output as a raw point cloud data file frame by frame; after the scan is completed, all point cloud files are numbered and archived according to the collection sequence, and the position information, attitude data and scanning timestamp of the scanning head are recorded at the same time, finally forming a raw three-dimensional point cloud data set covering the entire outer surface of the valve body.
[0086] Filtering, registration, and noise removal are performed on point cloud data;
[0087] The original point cloud is imported into the point cloud processing flow. Outlier statistical filtering is performed on the single-frame point cloud. A statistical window with 20 to 100 neighborhood points is used to calculate the local mean and standard deviation. Points whose distance from the local mean exceeds three times the standard deviation are removed as outliers. For the point clouds of each acquisition viewpoint, a rigid registration method is used for coarse registration. The coarse registration is based on the scanning head pose and the reference coordinates of the detection stage recorded during assembly for initial alignment. The iterative nearest point registration algorithm is used for fine registration. The registration is iterated until the registration error converges to a specified threshold. In this embodiment, the average point distance error threshold is set to 0.1 mm. After registration, surface resampling and normal estimation are performed on the entire merged point cloud. The normal estimation uses 20 to 50 local neighborhood points. Distance and angle-based fusion processing is performed on the overlapping area to reduce duplicate points and generate continuous point clouds. The intermediate data and registration residuals generated by all processing steps are recorded together.
[0088] By combining the acquired multi-angle image data, the local curvature and overall geometric features of the valve body are extracted to form a high-precision three-dimensional model that can be used for surface unfolding and image mapping.
[0089] The registration point cloud is mapped to the pose and angle metadata of the multi-angle images. The point cloud is first meshed to generate a triangular mesh surface. The maximum side length of the triangular mesh is set to twice the point spacing according to the point cloud resolution. Local curvature is calculated on the mesh. The curvature calculation is based on the neighborhood surface fitting of each mesh vertex. The number of neighborhood points is between thirty and one hundred. The principal curvature and average curvature values are calculated and the curvature results are mapped back to the two-dimensional unfolding parameter table. The pixel coordinates of the image are mapped to the corresponding mesh surface positions through known camera intrinsic parameters and acquisition pose. Image intensity and texture information are used as mesh vertex attributes for texture mapping. Finally, a high-precision 3D model file containing vertex coordinates, normals, curvature and image texture attributes is output. The model file is stored in a standard format and the generation parameters and model accuracy indicators are recorded.
[0090] The process of creating a surface unfolding model based on the three-dimensional geometry and curvature of the valve body in the surface unfolding module is as follows:
[0091] Based on the high-precision 3D model and the extracted local curvature data, the 3D point cloud is registered with the valve body CAD model;
[0092] Import the 3D point cloud data of the valve body and the corresponding digital model of the valve body structure, place them under the same coordinate reference, and use the feature contour boundary extraction method to extract the feature points of the flange end face, outer circle generatrix and connection parts in the point cloud as reference curves. Identify the corresponding feature lines and reference planes in the CAD geometric model, and use the center of the flange end face and the main axis direction as the initial alignment reference. Through coarse registration, the point cloud and the 3D design model are overlapped within a fixed tolerance range. The iterative nearest point algorithm is called for fine registration, and the translation and rotation matrices of the point cloud are gradually adjusted so that the error between the surface of the point cloud and the surface of the design model is controlled between tens of micrometers and hundreds of micrometers. During the registration process, the transformation matrix of each iteration is recorded and the registration error curve is output. Finally, the unified coordinate system point cloud model and the calibrated valve body geometric reference are output.
[0093] The optimal unfolding parameters are calculated based on the local curvature and overall geometric characteristics, and the mapping relationship from the surface to the two-dimensional plane is established.
[0094] The point cloud surface is sliced at a fixed step size. The cross-sectional contour of each slice is extracted and the normal variation curve is calculated. The local curvature value is obtained by second-order differentiation. The curvature data is divided into straight pipe sections, transition fillet sections and valve body shell regions according to the external surface feature regions. In the computing environment, the mean and extreme value range of the curvature distribution are extracted to determine the surface unfolding strategy. Low curvature regions are set as quasi-unfolded surfaces, and high curvature regions are set as local unfolded regions. The unfolding coordinates are corrected by an area preservation algorithm. The unfolding parameters include the curvature coefficient, unfolding ratio, unfolding direction and grid step size of each region. Based on these parameters, a mathematical relationship is generated to map the three-dimensional surface to the two-dimensional plane, forming a surface unfolding function and mapping matrix for image mapping, which are saved to the parameter file.
[0095] By associating multi-angle image acquisition with the surface model, the accuracy of surface unfolding is verified and corrected.
[0096] First, the shooting angle and camera posture record corresponding to each image are read. The camera optical axis is projected onto the 3D point cloud surface to determine the spatial range of the image coverage area. Each pixel is projected onto the curved coordinate system according to the camera intrinsic and extrinsic parameters. The pixel coordinates in the image are mapped to the corresponding points on the 3D point cloud surface through point-by-point inverse calculation. These points are transformed into 2D unfolded plane coordinates according to the unfolding mapping matrix. During the process, the unfolding accuracy is judged by comparing the back projection error and the edge alignment error. If the difference exceeds the set pixel threshold range, the mapping matrix is locally corrected and re-projected and calculated until the geometric accuracy requirements are met. After the correction is completed, the image texture area is mapped one-to-one with the curved unfolded mesh.
[0097] Record the unfolding parameters, model information, and image association data, and pass the surface unfolding model and mapping information to the image mapping processing;
[0098] Finally, the unfolding parameters, model coordinate relationships, image correlation matrix, and error verification records are written to a data file. This file contains a 3D point cloud index, unfolded mesh index, mapping matrix data, camera pose file, error statistics table, and unfolded region annotations. This record file, along with the unfolded model data, is output to the subsequent image mapping processing module for image geometric correction and standardized image generation.
[0099] The mapping process for the acquired image in the surface unfolding module is as follows:
[0100] Based on the surface unfolding model, multi-angle acquired images are matched with the surface model;
[0101] Images acquired from multiple angles are imported into the image processing system, and the corresponding surface unfolding model and unfolding parameters are read. Based on the shooting angle information and camera pose data of each image, the projection position of the image in three-dimensional space is determined. The image pixels are matched with the corresponding three-dimensional points on the surface mesh. The spatial ray of each pixel is calculated according to the camera intrinsic parameter matrix, and nearest neighbor interpolation is performed along the intersection of the ray and the surface mesh to map the pixel position onto the three-dimensional point cloud surface. During the matching process, dense sampling is used in the high curvature area of the surface to ensure that the mapping accuracy from pixel to point cloud is within tens of micrometers.
[0102] Perform geometric mapping and distortion correction according to the unfolding parameters to correct feature stretching and dimensional deviations caused by perspective projection;
[0103] The surface unfolding function is applied to each mapping point to convert the three-dimensional point coordinates into two-dimensional unfolding plane coordinates, thereby achieving accurate rearrangement of image content on the unfolding plane. To address edge stretching and local size distortion caused by perspective projection, bilinear interpolation and higher-order interpolation algorithms are used to correct pixel spacing, ensuring that the unfolded image maintains the actual physical proportions in both the horizontal and vertical directions. During the mapping process, the original three-dimensional coordinates, unfolded coordinates, and corresponding grid number of each pixel are recorded to provide spatial correlation information for subsequent feature extraction.
[0104] Generate standardized images, record the acquisition angle, mapping parameters and corresponding surface coordinates of each image, and output the standardized images and corresponding mapping information to the feature fusion module;
[0105] Standardized images are output at a uniform resolution. Each image file name includes the acquisition angle number, camera pose index, and surface unfolding region identifier. At the same time, the mapping parameter table, the surface coordinate data corresponding to the pixels, and error verification information are recorded in the form of structured data. All standardized images and corresponding mapping information are automatically transmitted to the feature fusion module for subsequent processing of texture, edge, and brightness features, ensuring that each pixel can be accurately tracked in space and on the two-dimensional unfolding plane.
[0106] Feature fusion module: Extracts texture, edge and brightness normalized features from the corrected multi-angle image, spatially aligns the features of each angle, uses a fusion algorithm to generate a unified defect feature description, and outputs the fused features to the defect recognition module.
[0107] The feature fusion module performs texture, edge, and brightness normalization feature extraction on the corrected multi-angle image as follows:
[0108] Based on standardized images and corresponding mapping parameters, each image undergoes texture analysis, edge detection, and brightness normalization.
[0109] The standardized multi-angle images and their corresponding surface mapping parameters are imported into the feature extraction and processing system. Based on these parameters, the images are mapped onto a 3D surface mesh of the valve body. The size of each mesh cell is determined according to the image resolution and the scale of the valve body surface features. Within each mesh cell, the system performs texture analysis, including gray-level co-occurrence matrix calculation, local binary mode, and directional gradient filtering, extracting contrast, energy, entropy, and directional gradient texture features. The texture features of each mesh cell are simultaneously labeled with their corresponding surface coordinates and acquisition angle index to ensure consistent spatial positioning of features on the 3D surface. Edge detection processing is performed on the standardized images. Within each mesh cell, multi-scale Gaussian filtering is used to smooth the image grayscale values, and then local gradients are calculated using gradient operators. The system generates a binary edge map by considering the amplitude and direction of the edge points, and maps each edge point to the surface coordinates and acquisition angle. During processing, the system records the filter kernel size, gradient threshold, and non-maximum suppression parameters to ensure consistent edge feature processing across different angles, facilitating subsequent multi-angle fusion. The system normalizes the image brightness by calculating the local brightness mean and standard deviation within each grid cell, mapping grayscale values to a unified range while preserving texture and edge features. The normalized brightness values are combined with texture and edge features to form a multi-dimensional feature vector. Each vector contains acquisition angle, grid cell coordinates, and surface correspondence information. The system records processing parameters and status information for all feature vectors, including processing order, algorithm parameters, and data indexes.
[0110] Extract defect-related feature vectors and label the acquisition angle and corresponding surface area information;
[0111] After completing texture analysis, edge detection, and brightness normalization, the system combines the multi-dimensional features of each grid cell into a defect-related feature vector. During the feature vector generation process, the image pixel coordinates are mapped to the three-dimensional curved surface coordinate system of the valve body through a surface unfolding model, and the surface region number corresponding to each feature vector is determined. The collected angle information is automatically associated with each feature vector through the camera trigger sequence and the angle data recorded by the sensor, so as to achieve a one-to-one correspondence with the image acquisition posture.
[0112] Record the feature extraction parameters and status information, and output the extracted feature vector to the feature fusion module to generate a unified defect feature description;
[0113] The extracted feature vectors are organized and output to the feature fusion module according to the acquisition order and surface position, providing a data foundation for generating a unified defect feature description. The output data format includes the texture, edge and brightness information of each feature vector, acquisition angle identifier and surface coordinate index, while retaining the feature extraction parameters and processing status so that the subsequent fusion algorithm can perform multi-angle feature alignment and multi-scale fusion. The entire process ensures that the feature data remains consistent under spatial, angular and lighting conditions and can be directly used as input to the defect recognition module.
[0114] The process of generating a unified defect feature description using a fusion algorithm in the feature fusion module is as follows:
[0115] Based on multi-angle feature vectors, spatial alignment and multi-scale fusion processing are performed;
[0116] The system inputs feature vectors from different angles into the spatial alignment module. Based on the acquisition angle, surface coordinates, and surface region identifier of each feature vector, it maps the feature points corresponding to the multi-angle images to a unified 3D valve body model coordinate system. For feature vectors within each surface region, a rigid transformation matrix is used for position alignment, ensuring that feature vectors at the same physical location have a consistent spatial reference in the unified coordinate system. During spatial alignment, the original image index and coordinate offset information corresponding to each vector are recorded. The spatially aligned feature vectors are then fused at multiple scales according to local regions and the entire valve body surface. For feature vectors within each local region, a weighted average and variance standardization are performed according to texture, edge, and brightness dimensions to eliminate scale biases introduced by local lighting differences and shooting angles. Global feature integration is performed on the entire valve body surface. The fused features are resampled and merged on the surface coordinates to generate a unified defect feature description vector covering the entire valve body. A neighborhood weighting strategy is used during the fusion process. The neighborhood radius is set according to the valve body curvature and point cloud density, generally one to five percent of the diameter, to maintain the accuracy of local details.
[0117] Eliminate feature differences caused by lighting, shooting angle, and valve body curvature to generate a unified defect feature description vector;
[0118] After multi-scale fusion, the fused feature vectors are normalized, including brightness normalization, texture intensity normalization, and edge gradient normalization, to eliminate feature differences caused by different acquisition angles and lighting conditions. Statistical regularization is used to process each dimension with zero mean and unit variance, and local weighted smoothing is applied to areas with large curvature changes to ensure that the overall feature vectors remain consistent under different surface curvatures. The normalized feature vectors retain surface coordinates, acquisition angles, and corresponding image indices in the data structure, achieving a complete correspondence between the fused features and the original data.
[0119] Record the fusion parameters and corresponding image index information, and output the fused feature vector to the defect recognition module;
[0120] After fusion, the unified defect feature description vector is indexed and stored according to the surface region and surface coordinates. At the same time, the weighting coefficients, neighborhood radius, normalization parameters and image source index used by the fusion algorithm are recorded to form a complete fusion parameter file. This unified feature vector data is output to the defect recognition module and used as input to the deep learning model to ensure that the defect features of each physical surface location can be traced back to the specific acquired image during the model processing.
[0121] Defect identification module: Input the fused features into the deep learning algorithm to complete defect classification and position calibration on the valve body surface.
[0122] The defect identification module completes the defect classification and position calibration process on the valve body surface as follows:
[0123] Based on a unified defect feature vector, the input is processed by a deep learning algorithm;
[0124] The fused unified defect feature vector is organized into a tensor form according to the surface coordinates, acquisition angle, and image index and input into the deep learning algorithm. The input data is standardized, including brightness normalization, texture intensity normalization, and edge gradient normalization, to ensure that the feature vectors under different acquisition conditions can be directly compared numerically. The data structure retains the local surface coordinates corresponding to each feature vector, so that the subsequent position calibration can be directly mapped to the physical surface of the valve body.
[0125] Defect types are classified based on the trained model;
[0126] The deep learning algorithm uses a convolutional neural network structure to perform forward propagation calculation on the input unified feature vector. Each vector is processed through multiple layers of convolution, pooling, and fully connected layers to extract multi-level feature representations. The output defect type probability distribution is then processed by the Softmax function. During the classification process, the trained model uses labeled valve body defect samples as a reference. The network weights are updated by backpropagation based on the cross-entropy loss between the forward propagation output and the training labels. The classification results are saved in the form of defect type number and probability value. Each result retains the corresponding surface area index for easy localization.
[0127] The location of the defect on the valve body surface is determined by combining surface coordinate mapping information;
[0128] The classified defect features are associated with the original surface coordinate mapping information. Each defect marker is mapped to the three-dimensional surface model of the valve body through feature indexing. Nearest neighbor matching and local interpolation methods are used to accurately map the position of the feature on the discrete point cloud to the continuous surface. The three-dimensional spatial coordinates of each defect on the valve body surface are recorded, including X, Y, Z coordinates and local curvature information. The position calibration data is saved synchronously with the classification results to ensure the complete correspondence between defect type and spatial coordinates.
[0129] Generate defect type and spatial coordinate data, and output them to the quality control system;
[0130] The type, probability value, and three-dimensional spatial coordinates of each defect are organized into a structured data table, recording feature indexes, surface coordinates, acquisition angles, and image source information. A standardized data format that can be read by the quality control system is generated. The output data can be directly used for valve body defect tracking, maintenance records, and subsequent analysis, ensuring that the classification results and spatial location of each defect remain complete and traceable in the system.
[0131] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0132] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A quality control system for image recognition of surface defects in a hydrogen gate valve body, characterized in that, include: Light source control module: Places the electronic driver, power supply and controller in the safe zone, controls the segmented static LED array to light up segment by segment, and enters the optical acquisition module; Optical acquisition module: Optical illumination is introduced into the danger zone through a fiber optic array, a transparent window, and an inerting chamber. Images are acquired sequentially from multiple angles, and the acquired data is transmitted to the surface unfolding module. The process of introducing optical illumination into the hazardous area using a fiber optic array, a transparent window, and an inerting chamber is as follows: Based on the output of the light source control module that lights up segment by segment, the light emitted by the light source in the safe area is introduced into the dangerous area through a fiber optic array. A closed optical channel is formed through a transparent viewing window and an inerting chamber; A uniform light distribution is formed on the surface of the valve body, and the light incident angle and light intensity are adjusted according to the light sequence. The optical channel status data is recorded and transmitted to the light source control module. Surface unfolding module: The three-dimensional geometric shape of the valve body is obtained by laser point cloud scanning. A surface unfolding model is established based on the three-dimensional geometric shape and curvature of the valve body. The acquired image is mapped and processed, and a standardized image is output and transmitted to the feature fusion module. The process of obtaining the three-dimensional geometric shape of the valve body using laser point cloud scanning is as follows: In the static state of the valve body after multi-angle image acquisition, the valve body surface is scanned using a structured light or laser scanning device to generate three-dimensional point cloud data. Filtering, registration, and noise removal are performed on point cloud data; By combining the acquired multi-angle image data, the local curvature and overall geometric features of the valve body are extracted to form a high-precision three-dimensional model that can be used for surface unfolding and image mapping. Feature fusion module: Extracts texture, edge and brightness normalized features from the corrected multi-angle image, spatially aligns the features of each angle, generates a unified defect feature description using a fusion algorithm, and outputs the fused features to the defect recognition module; The process of generating a unified defect feature description using a fusion algorithm is as follows: Based on multi-angle feature vectors, spatial alignment and multi-scale fusion processing are performed; Eliminate feature differences caused by lighting, shooting angle, and valve body curvature to generate a unified defect feature description vector; Record the fusion parameters and corresponding image index information, and output the fused feature vector to the defect recognition module; Defect identification module: Input the fused features into the deep learning algorithm to complete defect classification and position calibration on the valve body surface.
2. The hydrogen gate valve body surface defect image recognition quality control system according to claim 1, characterized in that, The process of controlling the segmented static LED array to light up segment by segment is as follows: Connect the safety zone controller to the segmented static LED array and complete the electrical interface configuration; Program the lighting sequence, lighting order, and brightness of each LED segment; The controller activates each LED segment sequentially, while simultaneously collecting light intensity data and correcting it according to the curvature of the valve body; Adjust the lighting duration, light intensity, and incident angle of each LED segment; Record the light source status, brightness curve, and lighting sequence data, and dynamically adjust the lighting sequence according to the valve body size.
3. The hydrogen gate valve body surface defect image recognition quality control system according to claim 1, characterized in that, The process of acquiring images sequentially from multiple angles is as follows: The valve body is placed at the acquisition position where optical illumination is introduced through a fiber optic array, a transparent window, and an inerting chamber; The explosion-proof camera is triggered to acquire images according to a preset angle sequence; The acquired images are labeled with angles and stored, and the image data is transmitted to the surface unfolding module.
4. The quality control system for image recognition of surface defects in a hydrogen gate valve body according to claim 1, characterized in that, The process of establishing a surface development model based on the three-dimensional geometry and curvature of the valve body is as follows: Based on the high-precision 3D model and the extracted local curvature data, the 3D point cloud is registered with the valve body CAD model; The optimal unfolding parameters are calculated based on the local curvature and overall geometric characteristics, and the mapping relationship from the surface to the two-dimensional plane is established. By associating multi-angle image acquisition with the surface model, the accuracy of surface unfolding is verified and corrected. Record the unfolding parameters, model information, and image association data, and pass the surface unfolding model and mapping information to the image mapping process.
5. The hydrogen gate valve body surface defect image recognition quality control system according to claim 4, characterized in that, The process of mapping the acquired images is as follows: Based on the surface unfolding model, multi-angle acquired images are matched with the surface model; Perform geometric mapping and distortion correction according to the unfolding parameters to correct feature stretching and dimensional deviations caused by perspective projection; Standardized images are generated, and the acquisition angle, mapping parameters, and corresponding surface coordinates of each image are recorded. The standardized images and corresponding mapping information are then output to the feature fusion module.
6. The hydrogen gate valve body surface defect image recognition quality control system according to claim 5, characterized in that, The process of extracting texture, edge, and brightness normalized features from the corrected multi-angle images is as follows: Based on standardized images and corresponding mapping parameters, each image undergoes texture analysis, edge detection, and brightness normalization. Extract defect-related feature vectors and label the acquisition angle and corresponding surface area information; Record the feature extraction parameters and status information, and output the extracted feature vectors to the feature fusion module to generate a unified defect feature description.
7. The quality control system for image recognition of surface defects in a hydrogen gate valve body according to claim 1, characterized in that, The process of classifying defects and calibrating their locations on the valve body surface is as follows: Based on a unified defect feature vector, the input is processed by a deep learning algorithm; Defect types are classified based on the trained model; The location of the defect on the valve body surface is determined by combining surface coordinate mapping information; Generate defect type and spatial coordinate data, and output them to the quality control system.