Explosion-proof valve detection method and system, computer equipment, medium and program product
By using four bar light sources with adjustable brightness and image detection equipment for the acquisition and analysis of explosion-proof valve surface pictures, the problem that manual detection in the prior art is difficult to complete accurately, and efficient and accurate explosion-proof valve detection results are achieved.
Patent Information
- Application Number
- CN202411040922.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-11-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, explosion-proof valve detection relies on manual judgment, making it difficult to ensure accuracy and low efficiency.
Four bar light sources with adjustable brightness are used to collect the surface pictures of the explosion-proof valve, and image segmentation, feature extraction and defect detection are performed through image detection equipment, defect detection algorithm is used to determine and classify defects, and detection results are generated.
It improves the accuracy and efficiency of explosion-proof valve detection, reduces the dependence on manual judgment, and obtains more accurate detection results.
Smart Images

Figure CN118883567A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of defect detection technology, and in particular to an explosion-proof valve detection method, system, computer equipment, medium and program product. Background Art
[0002] An explosion-proof valve is a safety device that automatically releases pressure when the pressure exceeds the rated value to prevent the container or pipeline from exploding or being damaged due to excessive pressure. If there are surface defects on the explosion-proof valve, such as cracks, pits, bubbles, etc., it will lead to incomplete valve sealing or local structural weakening, damage the surface coating or protective layer of the explosion-proof valve, and cause damage to the local mechanical properties of the explosion-proof valve, which will damage the material strength and durability of the valve, reduce the compressive strength, increase the risk of leakage during operation, and reduce the service life. Therefore, it is necessary to perform surface defect detection on the explosion-proof valve.
[0003] In the related art, the explosion-proof valve is manually inspected by visual inspection, touch inspection, paint or dye inspection, etc., by observing whether the surface of the explosion-proof valve has obvious flaws, bumps, scratches or color abnormalities, touching whether the surface of the explosion-proof valve is flat, and applying paint or dye to the surface of the explosion-proof valve to check whether there is penetration or discoloration, so as to detect tiny surface cracks or holes.
[0004] However, the above method relies on manual judgment, which is difficult to guarantee accuracy and has low efficiency. Summary of the invention
[0005] In view of this, an object of the present invention is to provide an explosion-proof valve detection method, system, computer equipment, medium and program product to solve the problem of difficulty in ensuring accuracy and low efficiency when performing explosion-proof valve detection in related technologies.
[0006] In a first aspect, the present invention provides an explosion-proof valve detection method, which is performed by an image detection device in an explosion-proof valve detection system; the explosion-proof valve detection system also includes a bracket, a camera, a lens and four bar light sources with adjustable brightness; the camera, the lens and the explosion-proof valve to be tested are arranged in sequence on a target straight line; the bar light sources are distributed in the area between the lens and the explosion-proof valve to be tested, and the light-emitting side of the bar light source is close to the explosion-proof valve to be tested; the four bar light sources with adjustable brightness are divided into two groups, each group includes two bar light sources; the two bar light sources in each group are arranged in parallel and are respectively located on both sides of the explosion-proof valve to be tested; the bar light sources between the two groups are distributed at 90 degrees on the vertical plane projection of the target straight line; the method includes:
[0007] Acquire a surface image of the explosion-proof valve; the surface image of the explosion-proof valve is acquired by the camera when the four bar-shaped light sources with adjustable brightness illuminate the surface of the explosion-proof valve to be tested separately in sequence;
[0008] Performing image segmentation on the explosion-proof valve surface image to obtain individual explosion-proof valve surface segment images;
[0009] Perform feature extraction on each explosion-proof valve surface sub-image respectively to obtain a feature extraction image of each explosion-proof valve surface sub-image;
[0010] Defect detection is performed on the feature extraction image of each explosion-proof valve surface sub-image by using a defect detection algorithm to obtain a defect detection result of each explosion-proof valve surface sub-image;
[0011] Defect analysis is performed based on the defect detection results of each explosion-proof valve surface sub-image to obtain the detection results of the explosion-proof valve.
[0012] In an optional implementation, the extracting features of each explosion-proof valve surface sub-image to obtain a feature extraction image of each explosion-proof valve surface sub-image includes:
[0013] Brightness extraction, texture extraction and edge feature extraction are performed on each explosion-proof valve surface sub-image respectively to obtain a feature extraction image of each explosion-proof valve surface sub-image.
[0014] In an optional implementation, the defect detection is performed on the feature extraction image of each explosion-proof valve surface sub-image by a defect detection algorithm to obtain the defect detection result of each explosion-proof valve surface sub-image, including:
[0015] The feature extraction image of each explosion-proof valve surface sub-image is processed separately by the defect detection model, and defect judgment and defect classification are performed on the feature extraction image of each explosion-proof valve surface sub-image to obtain the defect detection result of each explosion-proof valve surface sub-image.
[0016] In an optional implementation, the defect analysis is performed based on the defect detection result of each explosion-proof valve surface sub-image to obtain the detection result of the explosion-proof valve, including:
[0017] The defect detection results of each explosion-proof valve surface sub-image are scored based on the preset scoring criteria to obtain the detection results of the explosion-proof valve.
[0018] In an optional implementation, before performing image segmentation on the explosion-proof valve surface image, the method further includes:
[0019] The explosion-proof valve surface image is subjected to denoising and image enhancement processing.
[0020] In a second aspect, the present invention provides an explosion-proof valve detection system, the system comprising:
[0021] A bracket for fixing the camera and four bar lights with adjustable brightness;
[0022] The camera, the lens, and the explosion-proof valve to be tested are sequentially arranged on a target straight line to collect images of the surface of the explosion-proof valve;
[0023] Four bar-shaped light sources with adjustable brightness are distributed in the area between the lens and the explosion-proof valve to be tested, and the light-emitting side of the bar-shaped light sources is close to the explosion-proof valve to be tested; the four bar-shaped light sources with adjustable brightness are divided into two groups, each group includes two bar-shaped light sources; the two bar-shaped light sources in each group are arranged in parallel and are respectively located on both sides of the explosion-proof valve to be tested; the projection of the bar-shaped light sources between the two groups on the vertical plane of the target straight line is distributed at 90 degrees; the four bar-shaped light sources with adjustable brightness are used to illuminate the surface of the explosion-proof valve to be tested, so that the camera can collect the surface picture of the explosion-proof valve;
[0024] Image detection equipment, including:
[0025] A data acquisition module, used to acquire a surface image of the explosion-proof valve; the surface image of the explosion-proof valve is acquired by the camera when the four bar-shaped light sources with adjustable brightness illuminate the surface of the explosion-proof valve to be tested separately and in turn;
[0026] An image segmentation module is used to segment the explosion-proof valve surface image to obtain each explosion-proof valve surface segment image;
[0027] A feature extraction module is used to extract features from each explosion-proof valve surface sub-image respectively to obtain a feature extraction image of each explosion-proof valve surface sub-image;
[0028] A defect detection module is used to perform defect detection on the feature extraction image of each explosion-proof valve surface sub-image through a defect detection algorithm to obtain a defect detection result of each explosion-proof valve surface sub-image;
[0029] The defect analysis module is used to perform defect analysis based on the defect detection results of each explosion-proof valve surface sub-image to obtain the detection results of the explosion-proof valve.
[0030] In an optional embodiment, the bracket further includes a moving module for adjusting the heights of the camera and the bar light source respectively.
[0031] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the explosion-proof valve detection method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0032] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the explosion-proof valve detection method of the first aspect or any corresponding embodiment thereof.
[0033] In a fifth aspect, the present invention provides a computer program product, including computer instructions, and the computer instructions are used to enable a computer to execute the explosion-proof valve detection method of the first aspect or any corresponding embodiment thereof.
[0034] The technical solution provided by the present invention may include the following beneficial effects:
[0035] The explosion-proof valve detection method provided by the present invention sequentially illuminates the surface of the explosion-proof valve to be tested by four bar-shaped light sources with adjustable brightness to collect the explosion-proof valve surface image. The four bar-shaped light sources with adjustable brightness can respectively form four bright and dark fields and are evenly distributed on the surface of the explosion-proof valve to be tested, avoiding the blind spots of the light source and ensuring the accuracy of the explosion-proof valve surface image. Next, the explosion-proof valve surface image is segmented to obtain each explosion-proof valve surface segment image, and feature extraction is performed on each explosion-proof valve surface segment image to obtain the feature extraction image of each explosion-proof valve surface segment image. The feature extraction image of each explosion-proof valve surface segment image is subjected to defect detection by a defect detection algorithm to obtain the defect detection result of each explosion-proof valve surface segment image. By segmenting the explosion-proof valve surface image, defect detection can be carried out on each segmented explosion-proof valve surface segment image in a targeted manner, thereby improving the accuracy of defect determination and defect classification, and thereby obtaining a more accurate explosion-proof valve detection result without the need for manual judgment, with high accuracy and efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0037] Figure 1 is a schematic flow chart of an explosion-proof valve detection method according to an embodiment of the present invention;
[0038] Figure 2 is a flow chart of another explosion-proof valve detection method according to an embodiment of the present invention;
[0039] Figure 3 is a structural diagram of an explosion-proof valve detection system according to an embodiment of the present invention;
[0040] Figure 4 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0042] An explosion-proof valve is a safety device that automatically releases pressure when the pressure exceeds the rated value to prevent the container or pipeline from exploding or being damaged due to excessive pressure. If there are surface defects on the explosion-proof valve, such as cracks, pits, bubbles, etc., it will lead to incomplete valve sealing or local structural weakening, damage the surface coating or protective layer of the explosion-proof valve, and cause damage to the local mechanical properties of the explosion-proof valve, which will damage the material strength and durability of the valve, reduce the compressive strength, increase the risk of leakage during operation, and reduce the service life. Therefore, it is necessary to perform surface defect detection on the explosion-proof valve.
[0043] In the related art, the explosion-proof valve is manually inspected visually, touched, or coated with paint or dyes, etc., by observing whether the surface of the explosion-proof valve has obvious flaws, bumps, scratches, or abnormal colors, touching whether the surface of the explosion-proof valve is uneven, and applying paint or dyes to the surface of the explosion-proof valve to check whether there is penetration or discoloration, so as to detect tiny surface cracks or holes. However, the above methods rely on manual judgment, which is difficult to guarantee accuracy and has low efficiency.
[0044] Therefore, an embodiment of the present invention provides an explosion-proof valve detection method, which collects explosion-proof valve surface images by setting four strip light sources with adjustable brightness, and performs image detection on the explosion-proof valve surface images, so as to improve the accuracy and efficiency of explosion-proof valve detection.
[0045] According to an embodiment of the present invention, an explosion-proof valve detection method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0046] In the present embodiment, a method for detecting explosion-proof valves is provided, which is performed by an image detection device in an explosion-proof valve detection system. The explosion-proof valve detection system also includes a bracket, a camera, a lens, and four bar light sources with adjustable brightness. The camera, the lens, and the explosion-proof valve to be tested are arranged on the target straight line in sequence. The bar light sources are distributed in the area between the lens and the explosion-proof valve to be tested, and the light-emitting side of the bar light sources is close to the explosion-proof valve to be tested. The four bar light sources with adjustable brightness are divided into two groups, each group containing two bar light sources, and the two bar light sources in each group are arranged in parallel and are respectively located on both sides of the explosion-proof valve to be tested, and the bar light sources between the two groups are distributed at 90 degrees in the vertical plane projection of the target straight line. The image detection device can be a laptop computer, a desktop computer, etc. Figure 1 FIG. 1 is a flow chart of a method for detecting an explosion-proof valve according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0047] Step S101, obtaining a surface image of the explosion-proof valve.
[0048] The explosion-proof valve surface image is collected by the camera when the four bar-shaped light sources with adjustable brightness illuminate the surface of the explosion-proof valve to be tested in turn. In other words, for each explosion-proof valve, four explosion-proof valve surface images need to be collected, and each explosion-proof valve surface image contains a bright and dark light field formed when a bar-shaped light source is turned on. The bright and dark light fields in four directions avoid blind spots of the light source.
[0049] Specifically, when the strip light source is irradiated forward, a bright spot will be formed in the center. As the light diffuses from the center to both sides, the light intensity gradually weakens, so it gradually darkens to both sides to form a bright and dark field. On a smooth surface, due to the characteristics of the light spot and the scattering of light, a uniformly distributed bright and dark light field can be formed. The change of the light spot can reflect the different characteristics of the plane. When the surface of the explosion-proof valve to be tested is illuminated by a strip light source, the light spot falls on the side of the explosion-proof valve to be tested, and the bright and dark fields formed by the light source are evenly distributed on the surface of the explosion-proof valve to be tested, forming a uniformly changing bright and dark light field, thereby obtaining stable optical imaging. Since slight deformation has slight differences in different directions, four strip light sources are set, divided into two groups, each group contains two strip light sources, and the two strip light sources in each group are set in parallel and are located on both sides of the explosion-proof valve to be tested. The strip light sources between the two groups are distributed at 90 degrees in the vertical plane projection of the target straight line, avoiding the blind spot of the light source, so as to find defects at all angles. If there is a slight bulge or depression on the surface of the explosion-proof valve to be tested, it can cause the light field to change, resulting in abnormal bright and dark areas, or the formation of abnormal bright or dark spots.
[0050] It should be noted that the two strip light sources in each group are arranged in parallel, and the strip light sources between the two groups are distributed at 90 degrees in the vertical plane projection of the target straight line, that is to say, the distribution of the four strip light sources corresponds to the four sides of the square in general, and they are divided into two groups because the bracket in the explosion-proof valve detection system can only install two parallel strip light sources at a time. Optionally, first install a group of two strip light sources to collect surface images of the explosion-proof valve in two directions, and then install another group of two strip light sources to collect surface images of the explosion-proof valve in the other two directions; or, set up two workstations, each of which includes a bracket, a camera, a lens and a group of strip light sources, first place the explosion-proof valve to be tested in the corresponding position of one workstation, collect two explosion-proof valve surface images under one group of strip light sources, and then place the explosion-proof valve to be tested in the corresponding position of another workstation, and collect two explosion-proof valve surface images under another group of strip light sources.
[0051] Furthermore, the four bar-shaped light sources are all bar-shaped light sources with adjustable brightness. By adjusting the brightness of the four bar-shaped light sources, four different bright and dark light fields can be formed, thereby obtaining different imaging effects, so as to facilitate explosion-proof valve detection.
[0052] Optionally, the brightness of the four bar light sources is adjusted to high brightness to enhance the brightness and contrast of the imaging, improve the signal-to-noise ratio of the camera imaging, reduce the impact of noise, and increase the brightness range captured by the camera, thereby improving the imaging effect of the explosion-proof valve surface image, making the adverse effect characteristics obvious, effectively reducing the misjudgment rate, and improving the recognition accuracy. Exemplarily, the light source controller of the bar light source can adjust the brightness range to 0-255, and the brightness of the four bar light sources is adjusted to 150 by the light source controller.
[0053] Step S102, performing image segmentation on the explosion-proof valve surface image to obtain individual explosion-proof valve surface segment images.
[0054] Since there may be multiple defects on the surface of the explosion-proof valve, the explosion-proof valve surface image is segmented into different regions to obtain each explosion-proof valve surface sub-image to detect defects separately. Optionally, a suitable segmentation method is selected based on the geometric shape and light field of the explosion-proof valve, such as segmentation based on brightness threshold or segmentation after edge detection.
[0055] Step S103 , performing feature extraction on each explosion-proof valve surface sub-image respectively to obtain a feature extraction image of each explosion-proof valve surface sub-image.
[0056] The features of each explosion-proof valve surface sub-image are extracted separately, such as brightness, texture, edge features, etc. The purpose of feature extraction is to quantify specific properties of the explosion-proof valve surface, which may be associated with product defects or product failures.
[0057] Step S104, performing defect detection on the feature extraction image of each explosion-proof valve surface sub-image by using a defect detection algorithm to obtain a defect detection result of each explosion-proof valve surface sub-image.
[0058] Exemplarily, the defect detection algorithm can adopt threshold-based defect detection, machine learning models (such as support vector machines, neural networks, etc.) or shape matching-based methods, etc., to perform defect detection on the feature extraction image of each explosion-proof valve surface sub-image obtained by feature extraction in step S103, and obtain the defect detection result of each explosion-proof valve surface sub-image. The defect detection result can be a scoring result or classification result for various defects.
[0059] Step S105, performing defect analysis based on the defect detection result of each explosion-proof valve surface sub-image to obtain the detection result of the explosion-proof valve.
[0060] According to the defect detection results of each explosion-proof valve surface image, the defect category of the explosion-proof valve surface defects and the score of each defect category can be determined, and the score of the target defect category is compared with the preset threshold. If it exceeds the preset threshold, it is determined that there are defects of the target defect category on the surface of the explosion-proof valve.
[0061] The explosion-proof valve detection method provided in this embodiment uses four bar-shaped light sources with adjustable brightness to illuminate the surface of the explosion-proof valve to be tested in turn to collect the explosion-proof valve surface image. The four bar-shaped light sources with adjustable brightness can form four bright and dark fields respectively and evenly distribute them on the surface of the explosion-proof valve to be tested, avoiding the blind spots of the light source and ensuring the accuracy of the explosion-proof valve surface image. Next, the explosion-proof valve surface image is segmented to obtain each explosion-proof valve surface segment image, and feature extraction is performed on each explosion-proof valve surface segment image to obtain the feature extraction image of each explosion-proof valve surface segment image. The feature extraction image of each explosion-proof valve surface segment image is subjected to defect detection by a defect detection algorithm to obtain the defect detection result of each explosion-proof valve surface segment image. By segmenting the explosion-proof valve surface image, defect detection can be carried out on each segmented explosion-proof valve surface segment image in a targeted manner, thereby improving the accuracy of defect determination and defect classification, and thereby obtaining a more accurate explosion-proof valve detection result without the need for manual judgment, with high accuracy and efficiency.
[0062] In the present embodiment, a method for detecting explosion-proof valves is provided, which is performed by an image detection device in an explosion-proof valve detection system. The explosion-proof valve detection system also includes a bracket, a camera, a lens, and four bar light sources with adjustable brightness. The camera, the lens, and the explosion-proof valve to be tested are arranged on the target straight line in sequence. The bar light sources are distributed in the area between the lens and the explosion-proof valve to be tested, and the light-emitting side of the bar light sources is close to the explosion-proof valve to be tested. The four bar light sources with adjustable brightness are divided into two groups, each group containing two bar light sources, and the two bar light sources in each group are arranged in parallel and are respectively located on both sides of the explosion-proof valve to be tested, and the bar light sources between the two groups are distributed at 90 degrees in the vertical plane projection of the target straight line. The image detection device can be a laptop computer, a desktop computer, etc. Figure 2 FIG. 1 is a flow chart of a method for detecting an explosion-proof valve according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0063] Step S201, obtaining a surface image of the explosion-proof valve.
[0064] The explosion-proof valve surface image is collected by the camera when the four bar-shaped light sources with adjustable brightness illuminate the surface of the explosion-proof valve to be tested separately and in turn.
[0065] For details, please see Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0066] Step S202, performing image segmentation on the explosion-proof valve surface image to obtain individual explosion-proof valve surface segment images.
[0067] For details, please see Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.
[0068] Step S203 , performing feature extraction on each explosion-proof valve surface sub-image respectively to obtain a feature extraction image of each explosion-proof valve surface sub-image.
[0069] Optionally, brightness extraction, texture extraction, and edge feature extraction are performed on each explosion-proof valve surface sub-image to obtain a feature extraction image of each explosion-proof valve surface sub-image.
[0070] Optionally, before feature extraction, the explosion-proof valve surface image is preprocessed, including denoising and image enhancement. The denoising can remove noise interference in the explosion-proof valve surface image, and the image enhancement can improve the contrast and clarity of the explosion-proof valve surface image to ensure that subsequent analysis can be performed based on high-quality explosion-proof valve surface images, thereby improving the accuracy of explosion-proof valve detection.
[0071] Step S204, performing defect detection on the feature extraction image of each explosion-proof valve surface sub-image by using a defect detection algorithm to obtain a defect detection result of each explosion-proof valve surface sub-image.
[0072] Specifically, the above step S204 includes:
[0073] Step S2041, obtaining a defect detection model.
[0074] First, sample images of explosion-proof valve surface defects are obtained to form a training set and a validation set. Sample images of explosion-proof valve surface defects are collected for each defect category, and the defect categories include convexity, concaveness, crack, stain, unevenness, etc. For example, sample images of explosion-proof valve surface defects are obtained by downloading pictures from the Internet or taking pictures by yourself.
[0075] Next, obtain the defect detection model to be trained. A neural network model with image detection function can be selected as the defect detection model to be trained. Then, the defect detection model to be trained is trained by a training set composed of sample images of surface defects of explosion-proof valves. The defect detection model to be trained is verified by a verification set composed of sample images of surface defects of explosion-proof valves. The training and verification process is repeated until the performance of the defect detection model to be trained meets the requirements. The final defect detection model to be trained is used as the defect detection model, which can detect various defects on the surface of explosion-proof valves.
[0076] Step S2042, respectively process the feature extraction image of each explosion-proof valve surface sub-image through the defect detection model, perform defect determination and defect classification on the feature extraction image of each explosion-proof valve surface sub-image, and obtain the defect detection result of each explosion-proof valve surface sub-image.
[0077] Defect judgment is to judge whether there are defects in the explosion-proof valve surface segmentation picture. Defect classification is to classify the determined defects to obtain defect categories. The defect detection results include the defect categories and the probability of existence of each type of defects.
[0078] Optionally, defect determination and defect classification of various types of defects are performed for each explosion-proof valve surface sub-image, so that each explosion-proof valve surface sub-image corresponds to the probability of the existence of various types of defects.
[0079] Step S205 , performing defect analysis based on the defect detection result of each explosion-proof valve surface sub-image to obtain the detection result of the explosion-proof valve.
[0080] The defect detection results of each explosion-proof valve surface sub-image are scored based on the preset scoring standard to obtain the detection results of the explosion-proof valve. The preset scoring standard can be set according to actual needs. For example, if the probability of the target category of defects existing in any explosion-proof valve surface sub-image exceeds the preset threshold, it is determined that the target category of defects exists. It is also possible to compare the mean of each type of defect of all explosion-proof valve surface sub-images with the preset threshold, for example, calculate the average probability of bulges, depressions, cracks, stains, and unevenness in all explosion-proof valve surface sub-images to determine whether there are various types of defects on the surface of the explosion-proof valve. Alternatively, the probability of each type of defect in each explosion-proof valve surface sub-image is sorted from large to small, and the probability mean of the explosion-proof valve surface sub-image with the largest probability is compared with the preset threshold. For example, the mean of the probability of bulges of the three explosion-proof valve surface sub-images with the largest probability of bulges is taken. If it exceeds 60%, it is determined that there is a bulge on the surface of the explosion-proof valve. Further, the judgment result is output for each type of defect for user reference, and the explosion-proof valve surface sub-images can also be numbered to facilitate the location of defects.
[0081] The explosion-proof valve detection method provided in this embodiment uses four bar-shaped light sources with adjustable brightness to illuminate the surface of the explosion-proof valve to be tested in turn to collect the explosion-proof valve surface image. The four bar-shaped light sources with adjustable brightness can form four bright and dark fields respectively and evenly distribute them on the surface of the explosion-proof valve to be tested, avoiding the blind spots of the light source and ensuring the accuracy of the explosion-proof valve surface image. Next, the explosion-proof valve surface image is segmented to obtain each explosion-proof valve surface segment image, and feature extraction is performed on each explosion-proof valve surface segment image to obtain the feature extraction image of each explosion-proof valve surface segment image. The feature extraction image of each explosion-proof valve surface segment image is subjected to defect detection by a defect detection algorithm to obtain the defect detection result of each explosion-proof valve surface segment image. By segmenting the explosion-proof valve surface image, defect detection can be carried out on each segmented explosion-proof valve surface segment image in a targeted manner, thereby improving the accuracy of defect determination and defect classification, and thereby obtaining a more accurate explosion-proof valve detection result without the need for manual judgment, with high accuracy and efficiency.
[0082] In this embodiment, an explosion-proof valve detection system is also provided, which is used to implement the above embodiments and preferred implementations, and will not be repeated for what has been described. As used below, the term "module" may be a combination of software and / or hardware that implements a predetermined function.
[0083] This embodiment provides an explosion-proof valve detection system, such as Figure 3 As shown, the system includes a bracket 1, a camera 2, four bar-shaped light sources 4 with adjustable brightness, and an image detection device ( Figure 3 The bracket 1 is used to fix the camera 2 and four strip light sources 4 with adjustable brightness ( Figure 3A group of two strip light sources 4 is shown in FIG. 2 ). The camera 2, the lens 3, and the explosion-proof valve 5 to be tested are sequentially arranged on the target straight line, and the lens 3 is mounted on the camera 2. The camera 2 is used to collect the surface image of the explosion-proof valve. Four strip light sources 4 with adjustable brightness are distributed in the area between the lens 3 and the explosion-proof valve 5 to be tested, and the light-emitting side of the strip light source 4 is close to the explosion-proof valve 5 to be tested. The four strip light sources with adjustable brightness are divided into two groups, each group includes two strip light sources, and the two strip light sources in each group are arranged in parallel and are respectively located on both sides of the explosion-proof valve to be tested. The projection of the strip light sources between the two groups on the vertical plane of the target straight line is 90 degrees. The four strip light sources with adjustable brightness are used to illuminate the surface of the explosion-proof valve to be tested, so that the camera can collect the surface image of the explosion-proof valve. The image detection device includes a data acquisition module, an image segmentation module, a feature extraction module, a defect detection module, and a defect analysis module. The data acquisition module is used to obtain the surface image of the explosion-proof valve, and the surface image of the explosion-proof valve is collected by the camera when the four strip light sources 4 with adjustable brightness illuminate the surface of the explosion-proof valve to be tested. The image segmentation module is used to perform image segmentation on the explosion-proof valve surface image to obtain each explosion-proof valve surface segment image. The feature extraction module is used to perform feature extraction on each explosion-proof valve surface segment image to obtain a feature extraction image of each explosion-proof valve surface segment image. The defect detection module is used to perform defect detection on the feature extraction image of each explosion-proof valve surface segment image through a defect detection algorithm to obtain a defect detection result of each explosion-proof valve surface segment image. The defect analysis module is used to perform defect analysis based on the defect detection result of each explosion-proof valve surface segment image to obtain a detection result of the explosion-proof valve.
[0084] In an optional implementation, the feature extraction module is also used to perform brightness extraction, texture extraction, and edge feature extraction on each explosion-proof valve surface sub-image, to obtain a feature extraction image of each explosion-proof valve surface sub-image. Figure 2 The embodiments are not described in detail here.
[0085] In an optional implementation, the defect detection module is also used to process the feature extraction image of each explosion-proof valve surface sub-image respectively through the defect detection model, perform defect determination and defect classification on the feature extraction image of each explosion-proof valve surface sub-image, and obtain the defect detection result of each explosion-proof valve surface sub-image. Figure 2 The embodiments are not described in detail here.
[0086] In an optional implementation, the defect analysis module is further used to score the defect detection result of each explosion-proof valve surface sub-image based on a preset scoring standard to obtain the detection result of the explosion-proof valve. Figure 2 The embodiments are not described in detail here.
[0087] In an optional implementation, the image detection device further includes a preprocessing module for performing denoising and image enhancement processing on the explosion-proof valve surface image. Figure 2 The embodiments are not described in detail here.
[0088] In an optional embodiment, the bracket 1 further includes a moving module 6 for respectively adjusting the height of the camera 2 and the bar light source 4. The moving modules are respectively provided for the camera 2 and the bar light source 4 to respectively adjust the height of the camera 2 and the bar light source 4.
[0089] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0090] The image detection device in the explosion-proof valve detection system in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0091] An embodiment of the present invention further provides a computer device having the image detection device in the explosion-proof valve detection system.
[0092] See also Figure 4 , Figure 4 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 4 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 4 A processor 10 is taken as an example.
[0093] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0094] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0095] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0096] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0097] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 4 The example of connecting through bus is taken in the following.
[0098] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.
[0099] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0100] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0101] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for detecting an explosion-proof valve, characterized in that: The method is performed by an image detection device in an explosion-proof valve detection system; the explosion-proof valve detection system also includes a bracket, a camera, a lens and four bar light sources with adjustable brightness; the camera, the lens and the explosion-proof valve to be tested are arranged in sequence on a target straight line; the bar light sources are distributed in the area between the lens and the explosion-proof valve to be tested, and the light-emitting side of the bar light sources is close to the explosion-proof valve to be tested; the four bar light sources with adjustable brightness are divided into two groups, each group includes two bar light sources; the two bar light sources in each group are arranged in parallel and are respectively located on both sides of the explosion-proof valve to be tested; the bar light sources between the two groups are distributed at 90 degrees in the vertical plane projection of the target straight line; the method includes: Acquire a surface image of the explosion-proof valve; the surface image of the explosion-proof valve is acquired by the camera when the four bar-shaped light sources with adjustable brightness illuminate the surface of the explosion-proof valve to be tested separately in sequence; Performing image segmentation on the explosion-proof valve surface image to obtain individual explosion-proof valve surface segment images; Perform feature extraction on each explosion-proof valve surface sub-image respectively to obtain a feature extraction image of each explosion-proof valve surface sub-image; Defect detection is performed on the feature extraction image of each explosion-proof valve surface sub-image by using a defect detection algorithm to obtain a defect detection result of each explosion-proof valve surface sub-image; Defect analysis is performed based on the defect detection results of each explosion-proof valve surface sub-image to obtain the detection results of the explosion-proof valve.
2. The method according to claim 1, characterized in that The feature extraction is performed on each explosion-proof valve surface sub-image respectively to obtain a feature extraction image of each explosion-proof valve surface sub-image, including: Brightness extraction, texture extraction and edge feature extraction are performed on each explosion-proof valve surface sub-image respectively to obtain a feature extraction image of each explosion-proof valve surface sub-image.
3. The method according to claim 2, characterized in that The defect detection is performed on the feature extraction image of each explosion-proof valve surface sub-image by using a defect detection algorithm to obtain a defect detection result of each explosion-proof valve surface sub-image, including: The feature extraction image of each explosion-proof valve surface sub-image is processed separately by the defect detection model, and defect judgment and defect classification are performed on the feature extraction image of each explosion-proof valve surface sub-image to obtain the defect detection result of each explosion-proof valve surface sub-image.
4. The method according to claim 3, characterized in that The defect analysis is performed based on the defect detection results of each explosion-proof valve surface sub-image to obtain the detection results of the explosion-proof valve, including: The defect detection results of each explosion-proof valve surface sub-image are scored based on the preset scoring criteria to obtain the detection results of the explosion-proof valve.
5. The method according to any one of claims 1 to 4, characterized in that: Before performing image segmentation on the explosion-proof valve surface image, the method further includes: The explosion-proof valve surface image is subjected to denoising and image enhancement processing.
6. An explosion-proof valve detection system, characterized in that: The system comprises: A bracket for fixing the camera and four bar lights with adjustable brightness; The camera, the lens, and the explosion-proof valve to be tested are sequentially arranged on a target straight line to collect images of the surface of the explosion-proof valve; Four bar-shaped light sources with adjustable brightness are distributed in the area between the lens and the explosion-proof valve to be tested, and the light-emitting side of the bar-shaped light sources is close to the explosion-proof valve to be tested; the four bar-shaped light sources with adjustable brightness are divided into two groups, each group includes two bar-shaped light sources; the two bar-shaped light sources in each group are arranged in parallel and are respectively located on both sides of the explosion-proof valve to be tested; the projection of the bar-shaped light sources between the two groups on the vertical plane of the target straight line is distributed at 90 degrees; the four bar-shaped light sources with adjustable brightness are used to illuminate the surface of the explosion-proof valve to be tested, so that the camera can collect the surface picture of the explosion-proof valve Image detection equipment, including: A data acquisition module, used to acquire a surface image of the explosion-proof valve; the surface image of the explosion-proof valve is acquired by the camera when the four bar-shaped light sources with adjustable brightness illuminate the surface of the explosion-proof valve to be tested separately and in turn; An image segmentation module is used to segment the explosion-proof valve surface image to obtain each explosion-proof valve surface segment image; A feature extraction module is used to extract features from each explosion-proof valve surface sub-image respectively to obtain a feature extraction image of each explosion-proof valve surface sub-image; A defect detection module is used to perform defect detection on the feature extraction image of each explosion-proof valve surface sub-image through a defect detection algorithm to obtain a defect detection result of each explosion-proof valve surface sub-image; The defect analysis module is used to perform defect analysis based on the defect detection results of each explosion-proof valve surface sub-image to obtain the detection results of the explosion-proof valve.
7. The system according to claim 6, characterized in that The bracket also includes a moving module for adjusting the height of the camera and the strip light source respectively.
8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the explosion-proof valve detection method according to any one of claims 1 to 5 by executing the computer instructions.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the explosion-proof valve detection method according to any one of claims 1 to 5.
10. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to enable a computer to execute the explosion-proof valve detection method according to any one of claims 1 to 5.
Citation Information
Cited By
Intelligent welding defect detection method and device for explosion-proof valve of battery cover plate
CN120765570A
Detection system for explosion-proof valve assembly
WO2026157303A1
