A method for detecting and identifying surface defects of an inner container of an electric water heater
By synchronously raising and lowering a camera and a controllable light source in a shaded environment, dynamically adjusting the light source parameters and conducting cyclic heating and cooling tests, the problems of light interference and insufficient detection of the outer surface in the detection of defects on the inner tank surface of electric water heaters are solved, achieving highly accurate and reliable defect identification and ensuring product safety.
Patent Information
- Application Number
- CN202510930460.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-07
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2045-07-07
AI Technical Summary
Existing technologies for detecting defects on the inner tank surface of electric water heaters are easily affected by lighting conditions, resulting in inconsistent image quality, making it difficult to adapt to different environments. Furthermore, they neglect the detection of defects on the outer surface, failing to fully identify potential defects caused by thermal stress, thus posing safety hazards.
In a shaded environment, a camera and a controllable light source are raised and lowered synchronously. By dynamically adjusting the light source parameters, the image quality of the inner and outer surfaces is ensured to be consistent. Combined with a cyclic heating and cooling test to simulate actual usage conditions, a re-inspection is conducted to identify potential defects.
It improves the accuracy and reliability of defect identification, reduces the probability of false positives and false negatives, ensures product safety, eliminates potential hazards such as water leakage and electrical leakage caused by material stress failure, and enhances product reliability and user safety.
Smart Images

Figure CN120629198B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of liner surface defect detection, and relates to a liner surface defect detection and identification method for an electric water heater. BACKGROUND
[0002] The liner of an electric water heater is a core component for storing hot water, and is usually made of stainless steel or enamel steel plate by roll welding. Surface defects of the liner may cause safety hazards such as water leakage and electric leakage during the production process. In addition, new surface defects may be caused on the surface of the liner during the heating process of the electric water heater, and even accelerate the corrosion of the liner. Therefore, accurate detection and identification of the surface defects of the liner of the electric water heater are necessary links to ensure product safety and improve market competitiveness.
[0003] Currently, there are technologies for detecting and identifying the surface defects of the liner of a water heater. For example, the patent with publication number CN119006415A proposes a liner inner surface defect detection method for a water heater. The improved YOLOv8 model is used to detect the inner surface defects of the liner. The inner surface video images of the liner are obtained by an image acquisition device, and are split into image frames and subjected to data enhancement and training. The automatic identification and detection of the internal defects of the liner of the water heater are realized, and the detection accuracy and efficiency are improved.
[0004] Another example is the patent with publication number CN205003093U, which proposes an online automatic detection system for the inner cavity surface defects of the liner of a water heater. The liner is fixed by a positioning mechanism, and a tracking mechanism operates synchronously with a conveying line. The detection mechanism drives the detection rod to move up and down and rotate by a lifting device to scan the inner surface of the liner. The imaging device and the light source are combined to collect images, which are compared with a standard template to determine whether there are defects. After the detection is completed, the tracking mechanism is reset for the next detection, which improves the production efficiency and product quality, and reduces manual intervention and the rate of missed detection.
[0005] Although the above two existing technologies have achieved certain results in the detection and identification of the surface defects of the liner of a water heater, there are still the following deficiencies. First, since the liner of an electric water heater is usually made of stainless steel material with strong reflectivity, the image acquisition process is easily affected by lighting conditions, resulting in uneven quality of the acquired images. The existing technology lacks an effective dynamic adjustment mechanism for the light source according to the actual environment, and it is difficult to adapt to changes in different liner materials and production environments. The acquired images may be blurred and have many shadows due to poor lighting, making the defect features not obvious, reducing the accuracy of defect identification, and increasing the probability of misjudgment and missed judgment.
[0006] Secondly, due to the possibility of defects caused by thermal stress in the inner container during use, the existing technology mainly focuses on surface defect detection under normal temperature conditions, and cannot comprehensively identify the risk of surface defects caused by heating before the product is shipped, so that the products with hidden dangers flow into the market, which may cause failure in subsequent use, affecting the safety and performance of the product.
[0007] In addition, the existing technology only detects defects on the inner surface of the inner container, ignoring the detection needs of the outer surface defects. The gradual expansion of the outer surface defects affects the sealing and corrosion resistance of the inner container, and may even cause safety hazards such as electric leakage and water leakage, shorten the service life, and increase the after-sales maintenance cost and brand risk. SUMMARY
[0008] In view of this, in order to solve the problems raised in the background art, the present application provides a method for detecting and identifying surface defects of an inner container of an electric water heater.
[0009] The purpose of the present application can be achieved by the following technical solutions: a method for detecting and identifying surface defects of an inner container of an electric water heater, comprising: arranging a camera and a controllable light source in a light-shielded environment on the inner container inside and outside the center axis and the same height coaxially.
[0010] The controllable light source is set to a preset initial light source parameter, and the inner and outer cameras are controlled to move down synchronously to collect real-time images of the inner and outer surfaces of the inner container.
[0011] Based on the priority of the outer surface image quality, the outer initial light source parameter is adjusted, and then the internal initial light source parameter is slightly compensated according to the adjusted outer initial light source parameter and the inner surface image quality, and the dynamic balance is maintained cyclically.
[0012] Under the condition of maintaining the dynamic balance of the inner and outer light sources, the inner and outer cameras are controlled to move up synchronously to collect real-time images of the inner and outer surfaces of the inner container.
[0013] Comparing the quality of two groups of inner and outer surface images collected at the same position during the up and down movement, the group of inner and outer surface images with higher quality score is selected.
[0014] The group of inner and outer surface images with higher quality score is detected for defects, and if there is no defect, it is determined that the preliminary inspection is qualified.
[0015] The inner container that passes the preliminary inspection is subjected to a cyclic heating and cooling test and then placed in a light-shielded environment again, and the inner and outer surface images are collected again and subjected to defect re-inspection.
[0016] If no defects are found in the re-inspection, the inner container is determined to be a qualified product, and if defects are detected in any stage of the preliminary inspection or re-inspection, the inner container is determined to be an unqualified product.
[0017] Compared with the prior art, the present application has the following advantages: (1) The present application co-arranges the camera and the controllable light source in a light-shielded environment, presets the initial light source parameters of the controllable light source, and adjusts the external light source according to the image quality of the outer surface first, and then makes a micro-compensation to the internal light source, forming a cyclic dynamic balance mechanism, so that the image quality can be automatically adjusted to remain consistent under different environmental light conditions, ensuring the standard and clarity of the collected image quality, preliminarily improving the accuracy of defect identification, and reducing the probability of misjudgment and omission.
[0018] (2) The present application simulates the temperature change that may be encountered in actual use process through cyclic heating and cooling test, and re-detects the surface defects by comparing the initial inspection and re-inspection images in the re-inspection link, to ensure that the inner container can still pass the defect screening after simulating the actual heating scene, to eliminate the safety hazards such as water leakage and electric leakage caused by material stress failure from the source, and to improve the product reliability and user safety.
[0019] (3) The present application synchronously lifts and collects the inner and outer surface images by symmetrically arranging the inner and outer cameras and controllable light sources, compares the image quality of the same position in the up and down movement process, selects high-quality image pairs, and provides more reliable basis for the subsequent detection and identification of surface defects. BRIEF DESCRIPTION OF DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.
[0021] Figure 1 The method embodiment of the present application is a method embodiment of the present application.
[0022] Figure 2 The device structure diagram of the synchronous lifting camera and controllable light source of the present application.
[0023] Figure 3 The dynamic adjustment flowchart of the external light source parameters of the present application.
[0024] The drawings are as follows: 1-detection space, 2-liftable vertical rigid support frame, 3-horizontal rigid support structure, 4-camera, 5-controllable light source, 6-electric water heater inner container. DETAILED DESCRIPTION
[0025] With reference to the drawings of the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described, obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0026] Please refer to Figure 1 As shown in the drawings, the present application provides a method for detecting and identifying surface defects of an inner container of an electric water heater, comprising: S1. arranging a camera and a controllable light source in a light-shielded environment on the inside central axis and the outside contour of the inner container in a synchronous lifting manner.
[0027] The light-shielded environment first builds a closed detection space, the inner wall of which is covered with light-absorbing material and is provided with an openable and closable entrance and exit.
[0028] Then, a light-shielded structure capable of automatic opening and closing is installed at the entrance and exit of the detection space.
[0029] Finally, after the inner container to be detected is moved into the detection space, the light-shielded structure is closed, the ambient background light source condition of the detection space is tested by triggering the ambient light sensor, and it is confirmed that it is lower than the interference threshold.
[0030] The ambient background light source condition of the detection space refers to the light condition naturally existing inside the detection space when all artificial light sources are turned off in the light-shielded environment. Such light may affect the final image quality even if it is weak and uncontrolled, thereby affecting the results of defect detection.
[0031] Generally, the influence of different ambient light conditions on image acquisition quality is tested through a series of experiments, so as to determine a maximum allowable ambient light intensity or brightness level that does not affect the final detection results as the interference threshold.
[0032] External light sources or ambient light may interfere with the inner and outer surface images of the inner container collected by the camera, affecting the quality of the images, such as the key indicators of clarity and brightness uniformity. In order to ensure the quality of the images and reduce the possibility of false positives and missed detection, image acquisition needs to be carried out in a light-shielded environment.
[0033] Please refer to Figure 2 As shown in the drawings, the structure realization steps of the synchronous lifting camera and controllable light source are as follows: a horizontal rigid support structure is fixedly installed on the inner wall of the detection space, and the horizontal span is greater than the diameter of the inner container.
[0034] The horizontal span greater than the diameter of the inner container can ensure that the camera and the light source can form an effective working layout inside and outside the inner container.
[0035] Place the inner container in the detection space, ensuring that its internal center axis is vertically aligned with the center position of the transverse rigid support structure.
[0036] Vertically fix and install three liftable longitudinal rigid support frames parallel to and equal in length at the two ends and the center position of the transverse rigid support structure, respectively, and fix and install a camera and a controllable light source at the end of each longitudinal rigid support frame, respectively.
[0037] Since the inner container of the water heater is mostly made of stainless steel, its strong mirror reflection characteristics can affect the detection effect, so the camera can be selected but not limited to an industrial camera with a polarizer, thereby effectively suppressing light interference and significantly improving the imaging contrast of surface texture and defects.
[0038] The controllable light source can minimize external light interference during image acquisition, and different detection objects or different parts of the same object may require different lighting conditions to obtain the best image effect, which helps to improve the accuracy of defect detection.
[0039] The central longitudinal rigid support frame extends to the internal center axis of the inner container, and the two end longitudinal rigid support frames are symmetrically distributed outside the inner container.
[0040] Synchronize the driving of the three longitudinal rigid support frames by the lifting driving mechanism on the transverse support structure, and drive all cameras and controllable light sources to move vertically in absolute height.
[0041] Specifically, the absolute height movement of all cameras and controllable light sources in the vertical direction ensures the consistency of the images collected in height, making it easier to compare and pair two sets of inner and outer surface images at the same position during the up and down movement, which is conducive to quickly screening high-quality images for further defect identification.
[0042] S2. Set the controllable light source to the preset initial light source parameters, and control the inner and outer cameras to move down synchronously to collect the inner and outer surface images of the inner container in real time.
[0043] Specifically, according to the optical properties and curved structure characteristics of the inner container material, the color temperature range of the external controllable light source is set to the middle-high section of white light, and the illumination range is set to a relatively high brightness level that covers the basic light reflection requirements of the metal surface.
[0044] Metal surfaces have high reflectivity, and require high-brightness lighting to overcome the impact of surface reflection and ensure image clarity and brightness uniformity.
[0045] Synchronously set the color temperature range of the internal controllable light source to the middle-low section of white light, and the illumination range to a relatively low brightness level lower than the external illumination level.
[0046] The lower color temperature can reduce excessive reflection and glare phenomenon caused by internal structure or complex shape, thereby avoiding overexposure or spot problem when the camera captures images, and since the inner container has small internal space and relatively closed structure, it does not need as high illumination as the outside to meet the basic lighting needs.
[0047] S3. Adjust the external initial light source parameters based on the outer surface image quality, and then make a micro-compensation on the internal initial light source parameters according to the adjusted external initial light source parameters and the inner surface image quality, and maintain dynamic balance in a cycle.
[0048] The image quality evaluation is mainly embodied by the definition score and the brightness uniformity score.
[0049] Specifically, the linear feature of the inner container surface material texture in the image is extracted, and the gray value change rate is calculated pixel by pixel along the extension direction thereof.
[0050] The linear feature of the inner container surface material texture first pre-processes the collected image, including denoising to reduce noise interference and improve the accuracy of subsequent processing.
[0051] Then, an edge detection operator such as Sobel operator is used to identify the linear structure in the image.
[0052] The gradient in the horizontal direction The formula is calculated as follows: The gradient in the vertical direction The formula is calculated as follows: wherein, is the original gray image, and * is the convolution operation.
[0053] According to the horizontal and vertical gradients obtained, the gradient amplitude and direction of each pixel point are calculated, and the gradient amplitude is represented as: The gradient direction is represented as: By setting the threshold range of the gradient direction to screen the linear features in a specific direction.
[0054] The gray value change rate refers to calculating the gradient along the linear feature direction of the material texture, and for the gradient direction that has been determined, a first-order difference is used based on the original gray value: wherein, represents the gray value at the position , and is a small displacement along the texture direction. In order to calculate more accurately along the gradient direction , the small displacement is converted to: , wherein, This represents a small distance increment.
[0055] When the grayscale value change rate exceeds the preset sharpness threshold, it is determined to be a valid edge pixel, and the proportion of valid edge pixels in the total pixels is recorded as the sharpness score.
[0056] It's important to note that sharpness essentially refers to the clarity and discernibility of details in an image. These details are primarily found in edge areas, specifically where the grayscale values of adjacent pixels differ significantly. A sharp image contains more distinguishable details, meaning it has more edges. In a blurry image, due to factors such as inaccurate focus or motion blur, the edges become unclear or even disappear. Therefore, the more effective edges an image has, the sharper it is.
[0057] The preset sharpness threshold is determined by selecting a group of representative inner liner samples, acquiring images of each sample, calculating the grayscale value change rate of all pixels in each image, plotting the distribution of grayscale value change rates based on the acquired data, and selecting a threshold that can distinguish between valid edge pixels and invalid pixels by observing the distribution characteristics. For example, a certain percentile in the change rate distribution can be selected as the threshold, such as 90%, which means that only the top 10% of pixels with the highest change rate are considered valid edge pixels.
[0058] The image is divided into several rectangular grid regions, and the average gray value of each rectangular grid region is calculated.
[0059] The formula for the average grayscale value of each rectangular grid region is as follows: ,in, This indicates the number of pixels in the rectangular grid area. This represents the grayscale value of each pixel. This indicates the pixel number of each rectangular grid region. .
[0060] The degree of dispersion of the average gray value of all grid areas is recorded as the brightness uniformity score.
[0061] Specifically, calculate the global average gray value: ,in, This represents the average gray value of each rectangular grid. Indicates the rectangular grid number, , Indicates the number of rectangular grids.
[0062] Calculate the standard deviation of the average gray value: .
[0063] Convert the standard deviation into a brightness uniformity score: .
[0064] It should be noted that the gray value is the most basic pixel information in the image, which represents the brightness of the point. The higher the gray value, the brighter the area. The lower the gray value, the darker the area. The brightness of the image can be understood as the average gray value of the whole or local area. The high local area gray value indicates that the area is bright. The low local area gray value indicates that the area is dark.
[0065] Low dispersion degree indicates that the average gray value of each grid area is close, which means that the image has good brightness uniformity. High dispersion degree indicates that the average gray value between grid areas is large, which may indicate uneven lighting conditions or the presence of surface defects.
[0066] Referring to Figure 3 It is shown that the quality of the outer surface image is evaluated in real time. If the sharpness score is lower than the sharpness threshold, the color temperature of the external light source is increased. If the sharpness score is higher than the sharpness threshold and the brightness uniformity score is lower than the uniformity threshold, the color temperature of the external light source is decreased.
[0067] It should be noted that when the sharpness score is low, it means that the edge information in the image is not clear or obvious, which may be due to insufficient contrast or unsuitable light conditions for the current material surface. Increasing the color temperature can increase the proportion of blue light, making the image look colder, which helps to enhance the details and contrast of metal surfaces, thereby improving the sharpness.
[0068] If the sharpness is already high enough but the brightness uniformity is poor, i.e. there are obvious light and dark unevenness in the image, the color temperature needs to be reduced to increase the proportion of red light to make the light more soft, reduce the problem of local overexposure or shadow caused by too strong high color temperature light, and thus improve the brightness uniformity.
[0069] The sharpness threshold and the uniformity threshold are usually determined based on a large amount of experimental data and statistical analysis. However, in actual operation, these thresholds are not fixed and can be dynamically adjusted according to actual conditions.
[0070] If the brightness uniformity score is lower than the uniformity threshold and the sharpness score is lower than the sharpness threshold, the brightness of the external light source is increased. If the brightness uniformity score is lower than the uniformity threshold and the sharpness score is higher than the sharpness threshold, the brightness of the external light source is decreased.
[0071] It should be noted that when the image has both brightness unevenness, i.e. low uniformity score, and lack of sufficient sharpness, i.e. low sharpness score, it means that the current lighting conditions are not sufficient to provide sufficient illumination intensity to clearly display all the details of the inner liner surface. Increasing the brightness of the light source can improve the brightness level of the overall image, so that more details can be displayed, and it also helps to reduce shadows and dark areas, improving brightness uniformity.
[0072] If the sharpness of the image is already high enough, i.e. the sharpness score meets the threshold, but the brightness uniformity is poor, i.e. the uniformity score is low, it can mean that the current light source is too strong, causing local overexposure or strong reflection, which in turn affects the uniform distribution of brightness. Reducing the brightness of the light source can reduce the reflection of the light, avoid the local area being too bright, and help to improve the brightness uniformity of the image without significantly affecting the sharpness.
[0073] Lock the current external light source parameters when the external surface image quality meets the threshold.
[0074] Keep the locked external light source parameters, and if the internal surface sharpness score is lower than the sharpness threshold, increase the internal light source color temperature within the preset small color temperature floating interval corresponding to the locked external light source color temperature.
[0075] It should be noted that keeping the external light source parameters stable can avoid the uncertainty or interference caused by frequent adjustments.
[0076] If the internal surface sharpness score is lower than the sharpness threshold, it means that the current internal light source setting is not sufficient to clearly display all the details of the internal surface. Increasing the internal light source color temperature can increase the blue light component without changing the external light source, making the texture of the internal surface material more obvious, which helps to improve the contrast and sharpness of the image.
[0077] Adjusting the internal light source color temperature within the preset small color temperature floating interval corresponding to the locked external light source color temperature minimizes the interference with the overall lighting balance, as the inner container is an open structure, and the external controllable light source will refract into the interior through the open structure. For example, the small adjustment is within 10% of the locked external light source color temperature.
[0078] If the internal surface sharpness score is higher than the sharpness threshold and the internal surface brightness uniformity score is lower than the uniformity threshold, decrease the internal light source color temperature within the preset small color temperature floating interval corresponding to the locked external light source color temperature.
[0079] It should be noted that when the surface sharpness score is higher than the sharpness threshold, it means that the current light source setting can already provide sufficient contrast and edge details, but the brightness uniformity score is lower than the uniformity threshold, which means that there is a significant brightness unevenness in the image. Therefore, decreasing the color temperature of the internal light source, i.e. increasing the red light component and reducing the blue light component, can make the light more soft and reduce the strong reflection and shadow effect caused by high color temperature light sources.
[0080] If the internal surface brightness uniformity score is lower than the uniformity threshold and the internal surface sharpness score is lower than the sharpness threshold, increase the internal light source brightness within the preset small brightness floating interval corresponding to the locked external light source brightness.
[0081] It should be noted that if the inner surface definition score is lower than the definition threshold, it means that the current lighting conditions are insufficient to provide sufficient contrast or brightness to clearly display the details of the inner surface, and at the same time, the brightness uniformity score is also lower than the uniformity threshold, indicating that there are obvious brightness unevenness phenomena in the image, such as local dark or shadow problems. Increasing the overall brightness can enhance the contrast of the image, so that more details can be revealed, thereby improving the definition.
[0082] The preset micro-brightness floating interval corresponding to the locked external light source brightness can be set to within 5% of the external light source brightness for micro-adjustment.
[0083] If the inner surface brightness uniformity score is lower than the uniformity threshold and the inner surface definition score is higher than the definition threshold, the internal light source brightness is reduced within the preset micro-brightness floating interval corresponding to the locked external light source brightness.
[0084] It should be noted that the inner surface definition score is already higher than the definition threshold, indicating that the current lighting conditions can already provide sufficient contrast and edge information, but the brightness uniformity score is lower than the uniformity threshold, which may be due to some areas being too bright, causing local light reflection or overexposure, affecting the consistency of brightness. Reducing the brightness can reduce the reflection of strong light and avoid visual interference caused by the over-brightness of local areas.
[0085] When the inner and outer surface images meet the requirements at the same time, the current light source parameters are maintained for subsequent image acquisition.
[0086] If any surface image quality deviates from the preset requirements during the acquisition process, the external light source parameters are preferentially maintained stable and the internal light source parameters are fine-tuned for compensation, and if the compensation is invalid, the external light source preferential adjustment is re-executed.
[0087] It should be noted that under the premise of keeping the external light source unchanged, the internal light source parameters are fine-tuned to optimize the inner surface image quality, which can quickly respond to and solve the problems in the inner surface image without damaging the existing outer surface image quality, and in addition, since the inner container is a semi-closed cavity with an opening structure, when the external light source shines on the opening area, part of the light will enter the inner container, so the internal light source is fine-tuned.
[0088] S4. Control the inner and outer cameras to move up synchronously under the condition of maintaining the dynamic balance of the inner and outer light sources to acquire the inner and outer surface images of the inner container in real time.
[0089] It should be noted that maintaining the dynamic balance of the inner and outer light sources can ensure that the inner and outer surfaces of the inner container can obtain uniform and consistent lighting conditions at different height positions, thereby improving the accuracy and reliability of surface defect detection.
[0090] S5. Compare the quality of the two groups of inner and outer surface images of the same position collected in real time during the up and down movement, and select the group of inner and outer surface images with higher quality score.
[0091] Specifically, the height coordinates of each frame of image recorded in real time during the synchronous lifting are established to unify the position coordinates of the down movement and the up movement.
[0092] According to the height coordinates, the inner and outer surface images collected during the down movement are matched with the inner and outer surface images collected at the same position coordinates during the up movement, forming two groups of inner and outer image pairs of the same position.
[0093] Verify whether the surface area quality of each group of inner and outer image pairs meets the preset image quality condition.
[0094] It should be noted that if the clarity score is higher than the clarity threshold, it is considered that the image meets the clarity requirement, and if the brightness uniformity score is lower than the uniformity threshold, it is considered that the image meets the brightness uniformity requirement.
[0095] Count the total number of basic parameters of each group of inner and outer images that pass the verification.
[0096] More specifically, if the total number of basic parameters of the up movement group that pass the verification is greater than the total number of basic parameters of the down movement group that pass the verification, the up movement group image is selected;
[0097] If the total number of basic parameters of the up movement group that pass the verification is less than the total number of basic parameters of the down movement group that pass the verification, the down movement group image is selected;
[0098] If the total number of basic parameters of the two groups that pass the verification is the same, the up movement group image is selected by default.
[0099] In this way, the highest quality image data is ensured to be obtained, thereby improving the accuracy and reliability of surface defect detection.
[0100] S6. Perform defect recognition detection on the group of inner and outer surface images with higher quality score, and determine that the preliminary inspection is qualified if there is no defect.
[0101] Specifically, the selected group of images with higher quality score is separated into independent outer surface image sequence and inner surface image sequence.
[0102] Each frame of image in the outer surface image sequence and the inner surface image sequence is regionally divided according to the preset fixed size grid, forming a standardized detection unit covering the complete surface.
[0103] The preset fixed-size grid is determined according to the minimum size of the defect to be detected and the actual image quality, and realizes efficient and standardized image analysis under the premise of ensuring defect recognition capability. For example, the minimum defect size to be detected is 5 mm x 5 mm, the image resolution is 100 pixels per millimeter, that is, the defect occupies about 500 x 500 pixels in the image, the overall image size is 4096 x 4096 pixels, the image quality is good, the edge is clear, and the noise is low, and the grid size is reasonably selected as 256 x 256 pixels, about 2.5 mm x 2.5 mm in physical size.
[0104] For each standardized detection unit, calculate the light-dark transition feature difference value with the adjacent image.
[0105] Specifically, the image in the standardized detection unit is converted into a gray-scale image, highlighting the light-dark information.
[0106] By an edge detection algorithm such as Sobel operator, the edge pixels in the detection unit are identified to determine the boundary of the light-dark transition.
[0107] For each standardized detection unit in each frame of gray-scale image, find the corresponding unit at the same position coordinates in the previous and subsequent frames, and calculate the average gray-scale value in each standardized detection unit.
[0108] For a certain standardized detection unit of the current frame, calculate the difference between the average gray-scale values of the corresponding units of the previous frame and the subsequent frame, respectively, and the difference value is represented as the absolute difference.
[0109] Based on the same position coordinates, the reference transition feature range of the corresponding standardized detection unit is retrieved from the historical qualified product image library.
[0110] It should be noted that different batches of products may have slight differences, and by comparing the current image with the standard of the historical qualified product, the abnormal area can be more accurately identified, ensuring the consistency and reliability of the detection result. The historical qualified product image library provides a reference for normal data, making it easier to find any deviation from the normal range.
[0111] When the light-dark transition feature difference value exceeds the reference transition feature range in three consecutive images, the unit is marked as a suspicious area.
[0112] In the adjacent three consecutive height images of the marked suspicious area, the morphological consistency of the abnormal features is checked.
[0113] Specifically, the suspicious area is binarized to extract its contour features such as shape, area, and perimeter, and the abnormal contour of the current frame is matched with the contours of the same position area of the previous frame and the subsequent frame, and the contour similarity is calculated, such as based on Hu moment and contour key point matching.
[0114] For the binarized contour, the number of pixels within the contour or the area of the contour is calculated using the area calculation formula, such as the polygon area calculation based on Green's formula, to obtain the area of a single frame. The absolute value of the area of the next frame and the percentage of the area ratio of the current frame are recorded as the adjacent frame change rate. If the adjacent frame change rate of three consecutive frames exceeds the preset threshold, it is determined that the area change is abnormal and the morphology is inconsistent.
[0115] If the shape parameter presents irregular fluctuations in three consecutive frames, it is determined that the morphology is inconsistent.
[0116] If the displacement direction and distance of key points, such as contour vertices and inflection points, are discontinuous in adjacent frames, it is considered that the morphology is abnormal.
[0117] When the similarity of the abnormal region contour of three consecutive frames is greater than or equal to a preset similarity threshold, such as 80%, and the morphology feature parameter change is within a reasonable range, it is determined that the morphology is consistent.
[0118] Check whether there are similar optical abnormal features in other surface orientation images of the same height coordinate.
[0119] The similar optical abnormal features refer to the same or similar light and dark distribution patterns, edge distortion morphology, or texture damage features in different surface orientation images of the same height coordinate.
[0120] Specifically, the same feature extraction algorithm, such as gradient feature extraction optical feature, is used for the same position standardized detection unit, and the feature vectors are standardized, such as normalization, dimensionality reduction, to eliminate the influence of light and angle differences.
[0121] Cosine similarity, Euclidean distance, and other methods are used to calculate the similarity of the current suspicious region features and the features of other orientation images of the same height.
[0122] For edge features, template matching or Hough transform is used to detect whether there are the same geometric shapes, such as the same radian bright edge.
[0123] When the similarity is greater than or equal to a preset similarity threshold, such as 70%, and the same type of features appear in multiple orientation images, it is determined that there are similar optical abnormal features, indicating that there may be defects that penetrate or distribute circumferentially.
[0124] When the morphology consistency and correlation conditions are met at the same time, it is determined that there is an effective defect.
[0125] Comparing and screening high-quality images collected at the same position is to obtain the most reliable image data in complex imaging environments, providing a solid foundation for subsequent defect recognition, light source adjustment, and standardized analysis, and comprehensively improving the accuracy, stability, and automation level of detection.
[0126] S7. After the qualified inner container is subjected to the cyclic heating and cooling test, it is placed in a light-shielded environment again, and the images of the inner and outer surfaces are collected again for re-inspection of defects.
[0127] The specific content of the cyclic heating and cooling test is as follows: the qualified inner container is moved into an independent temperature-controlled test cabin, the inner wall of which is coated with heat-reflecting material and the bottom is provided with a rotating bracket.
[0128] The temperature of the test cabin is raised to a first temperature level at a preset basic heating rate, and maintained for a first holding time.
[0129] The preset basic heating rate is determined according to the material properties and experimental requirements, and generally needs to avoid too fast heating to cause internal stress concentration or material damage.
[0130] The first temperature level is the first stable temperature point of the experiment, and the selection criteria include but are not limited to material properties, expected application environment temperature range, etc.
[0131] The first holding time depends on the time required for the material to reach thermal equilibrium. It can be estimated by heat conduction analysis or experiment.
[0132] The temperature is raised to a peak temperature below the critical temperature of the heat-reflecting material in stages at a decreasing heating rate.
[0133] In order to prevent the material from being damaged due to too fast heating as the temperature rises, the heating rate should be gradually reduced, and the decreasing heating rate needs to be adjusted according to the thermal sensitivity of the material and previous experience data.
[0134] The rotating bracket is started at the peak temperature to rotate the inner container at a constant speed, while maintaining the temperature for a preset stress triggering time.
[0135] The heating system is turned off and the temperature is lowered to a second temperature level at a preset basic cooling rate.
[0136] The preset basic cooling rate is determined by reference to factors such as the thermal expansion coefficient of the material.
[0137] The second temperature level is an intermediate stop point in the cooling process, which can be used to evaluate the performance of the material under different temperature conditions.
[0138] The forced air cooling is turned on to accelerate the cooling to the ambient temperature.
[0139] The cycle is repeated until the preset number of cycles is completed.
[0140] The preset number of cycles depends on the fatigue life test requirements of the inner container or in order to simulate the temperature fluctuations in actual use, setting multiple cycles can help understand the performance of the material exposed to temperature changes for a long time.
[0141] Specifically, the defect re-inspection specific steps are as follows: comparing the inner and outer surface images of the same position coordinates in the re-inspection and the initial inspection, identifying the newly added light and dark transition abnormal area or the abnormal area of the morphological expansion characteristics of the original area.
[0142] For the identified abnormal area, check its continuity along the direction of the liner curved surface in the adjacent height image, and verify its optical response correlation in the inner and outer surface images.
[0143] If there is an abnormal feature that meets the continuity and correlation conditions, it is determined to be a valid defect induced by thermal stress, otherwise it is marked as an environmental interference artifact.
[0144] S8. If the liner is not found to have defects in the re-inspection, it is determined to be a qualified product, and if defects are detected in any stage of the initial inspection or re-inspection, it is determined to be an unqualified product.
[0145] The parameters involved in the above formula are de-dimensioned to calculate their numerical values, the formula is obtained by software simulation of a large amount of data to obtain the most recent real situation, and the preset parameters in the formula are set by a person skilled in the art according to the actual situation.
[0146] The above embodiments can be realized wholly or partially by software, hardware, firmware or any other combination. When realized by software, the above embodiments can be realized wholly or partially in the form of a computer program product.
[0147] Those skilled in the art can realize that the modules and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized by hardware or software depends on the specific application and design constraints of the technical solutions. A person skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0148] In addition, the functional modules in each embodiment of the present application can be integrated in one processing module, or each module can exist physically alone, or two or more modules can be integrated in one module.
[0149] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
[0150] Finally, the above only is the preferred embodiment of the present application, and is not used to limit the present application, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.
Claims
1. A method for detecting and identifying surface defects in the inner tank of an electric water heater, characterized in that: include: In a light-proof environment, a camera and a controllable light source are arranged at the same height and coaxially on the inner central axis and the outer side, and are raised and lowered synchronously. Set the controllable light source to the preset initial light source parameters, and control the inner and outer cameras to move down synchronously to collect images of the inner and outer surfaces of the inner liner; The external initial light source parameters are adjusted based on the quality of the external surface image, and the internal initial light source parameters are then micro-compensated based on the adjusted external initial light source parameters and the quality of the internal surface image, and the dynamic balance is maintained in a loop. Under the condition of maintaining dynamic balance between internal and external light sources, control the internal and external cameras to move upward synchronously to collect images of the inner and outer surfaces of the inner liner; Compare the quality of two sets of inner and outer surface images acquired in real time at the same location during the up-and-down movement, and select the set of inner and outer surface images with the higher quality score; For the set of inner and outer surface images with higher quality scores, defect identification and detection are performed. If no defects are found, the initial inspection is deemed qualified. After the inner liner that passed the initial inspection was subjected to a cyclic heating and cooling test, it was placed back in a light-proof environment, and images of the inner and outer surfaces were repeatedly collected and defects were re-inspected. If no defects are found in the inner liner during the re-inspection, it is judged as a qualified product; if defects are found at either the initial inspection or the re-inspection stage, it is judged as a non-qualified product. The specific image quality evaluation steps are as follows: extract the linear features of the texture of the inner liner surface material in the image, and calculate the gray value change rate pixel by pixel along its extension direction; when the gray value change rate exceeds the preset sharpness threshold, it is determined to be a valid edge pixel, and the proportion of valid edge pixels in the total pixels is recorded as the sharpness score. The image is divided into several rectangular grid regions, and the average gray value of each rectangular grid region is calculated. The dispersion of the average gray value of all grid regions is recorded as the brightness uniformity score. The specific steps of prioritizing the adjustment of external initial light source parameters based on external surface image quality, followed by micro-compensation of internal initial light source parameters based on the adjusted external initial light source parameters and internal surface image quality, to maintain dynamic balance in a cyclical manner are as follows: Real-time evaluation of external surface image quality; if the sharpness score is below the sharpness threshold, increase the external light source color temperature; if the sharpness score is above the sharpness threshold but the brightness uniformity score is below the uniformity threshold, decrease the external light source color temperature; if the brightness uniformity score is below the uniformity threshold and the sharpness score is below the sharpness threshold, increase the external light source brightness. If the brightness uniformity score is below the uniformity threshold and the sharpness score is above the sharpness threshold, the brightness of the external light source is reduced. Once the image quality of the outer surface meets the standard, the current external light source parameters are locked. While maintaining the locked external light source parameters, if the inner surface sharpness score is below the sharpness threshold, the color temperature of the internal light source is increased within the preset micro-color temperature fluctuation range corresponding to the locked external light source color temperature. If the inner surface sharpness score is above the sharpness threshold and the inner surface brightness uniformity score is below the uniformity threshold, the color temperature of the internal light source is decreased within the preset micro-color temperature fluctuation range corresponding to the locked external light source color temperature. If the uniformity score of the inner surface brightness is lower than the uniformity threshold and the sharpness score of the inner surface is lower than the sharpness threshold, then the brightness of the inner light source is increased within the preset micro-brightness fluctuation range corresponding to the locked external light source brightness; if the uniformity score of the inner surface brightness is lower than the uniformity threshold and the sharpness score of the inner surface is higher than the sharpness threshold, then the brightness of the inner light source is decreased within the preset micro-brightness fluctuation range corresponding to the locked external light source brightness; when both the inner and outer surface images meet the standards, the current light source parameters are maintained for subsequent image acquisition. If the image quality of any surface deviates from the preset requirements during the acquisition process, the external light source parameters will be kept stable first, and the internal light source parameters will be finely adjusted for compensation. If the compensation is ineffective, the external light source adjustment will be re-executed.
2. The method for detecting and identifying surface defects in the inner tank of an electric water heater according to claim 1, characterized in that: The specific steps for setting up the shaded environment are as follows: A closed testing space was constructed, with its inner walls covered with light-absorbing material and equipped with an openable and closable entrance and exit. Install an automatically opening and closing light-shielding structure at the entrance and exit of the detection space; After the inner liner to be inspected is moved into the inspection space, the light-shielding structure is closed, triggering the ambient light sensor to check the background light conditions of the inspection space and confirm that they are below the interference threshold.
3. The method for detecting and identifying surface defects in the inner tank of an electric water heater according to claim 2, characterized in that: The specific implementation steps for the synchronously rising and falling camera and controllable light source are as follows: A horizontal rigid support structure is fixedly installed on the inner wall of the testing space, and its horizontal span is greater than the diameter of the inner liner. Place the inner liner in the testing space, ensuring that its internal central axis is perpendicularly aligned with the center of the transverse rigid support structure; Three parallel and equal-length vertical rigid support frames are vertically fixed at both ends and the center of the transverse rigid support structure. A camera and a controllable light source are fixedly installed at the end of each vertical rigid support frame. The central longitudinal rigid support frame extends to the central axis inside the inner liner, and the two longitudinal rigid support frames at both ends are symmetrically distributed outside the inner liner. The lifting drive mechanism on the horizontal support structure synchronously drives the three vertical rigid support frames, causing all cameras and controllable light sources to move up and down at absolutely equal heights in the vertical direction.
4. The method for detecting and identifying surface defects in the inner tank of an electric water heater according to claim 1, characterized in that: The specific steps for comparing the quality of two sets of inner and outer surface images acquired in real time at the same location during the up-and-down movement are as follows: During the synchronous lifting and lowering process, the acquisition height coordinates of each frame of image are recorded in real time to establish a unified position coordinate system for the lowering and uppering processes; Based on the height coordinates, the inner and outer surface images acquired during the downward movement are paired with the inner and outer surface images acquired at the same coordinates during the upward movement to form two pairs of inner and outer images at the same location; For each pair of internal and external images, verify whether the surface region quality meets the preset image quality conditions. Count the total number of basic parameters that passed the verification in each group of internal and external images.
5. The method for detecting and identifying surface defects in the inner tank of an electric water heater according to claim 4, characterized in that: The specific steps for selecting a set of inner and outer surface images with higher quality scores are as follows: If the total number of basic parameters that pass verification in the upward group is greater than the total number of basic parameters that pass verification in the downward group, then the image from the upward group is selected. If the total number of basic parameters that pass verification in the upward group is less than the total number of basic parameters that pass verification in the downward group, then the image from the downward group is selected. If the total number of basic parameters passed by the two groups is the same, the image of the group to be moved up will be selected by default.
6. The method for detecting and identifying surface defects in the inner tank of an electric water heater according to claim 1, characterized in that: The specific steps for defect identification and detection of the set of inner and outer surface images with higher quality scores are as follows: The set of images with higher quality scores was separated into independent sequences of outer surface images and inner surface images. Each frame of the outer surface image sequence and the inner surface image sequence is divided into regions according to a preset fixed-size grid to form a standardized detection unit covering the entire surface; For each standardized detection unit, calculate the difference value of its light and dark transition features with neighboring images; Based on the same location coordinates, the reference transition feature range of the corresponding standardized detection unit is retrieved from the historical qualified product image library; When the difference value of the light-dark transition feature exceeds the range of the baseline transition feature in three consecutive frames, the unit is marked as a suspicious region. Examine the morphological consistency of anomalous features in three consecutive adjacent height images of the marked suspicious region; Examine other surface orientation images at the same height coordinates for the presence of similar optical anomalies. When both the morphological consistency and correlation conditions are met, it is determined to be a valid defect.
7. The method for detecting and identifying surface defects in the inner tank of an electric water heater according to claim 1, characterized in that: The specific details of the cyclic heating and cooling test are as follows: The inner liner that passed the initial inspection was moved into an independent temperature-controlled test chamber, whose inner wall was covered with heat-reflective material and whose bottom was installed with a rotating bracket. The temperature of the test chamber is raised to the first temperature level at a preset basic heating rate and maintained for the first holding time. The temperature is gradually increased to the peak temperature below the critical temperature that the heat-reflective material can withstand, at a decreasing rate of increase. At the peak temperature, the rotating bracket is activated to make the inner liner rotate at a constant speed, while maintaining the temperature to the preset stress triggering time. The heating system is turned off and the temperature is reduced to the second temperature level at a preset basic cooling rate. Forced air cooling is activated to accelerate the temperature drop to ambient temperature. Repeat the cycle until the preset number of cycles is completed.
8. The method for detecting and identifying surface defects in the inner tank of an electric water heater according to claim 1, characterized in that: The specific steps for defect re-inspection are as follows: By comparing the inner and outer surface images at the same coordinates in the re-inspection and the initial inspection, new abnormal areas of light and dark transition or abnormal areas of morphological expansion features of the original area can be identified. For the identified abnormal regions, examine their continuity along the inner lining surface in adjacent height images and verify the correlation of their optical response in the inner and outer surface images. If there are abnormal features that meet the conditions of continuity and correlation, they are determined to be valid defects induced by thermal stress; otherwise, they are marked as environmental interference artifacts.
Citation Information
Patent Citations
Water heater inner container inner surface defect detection method
CN119006415A
Water heater inner bag inner chamber surface defect on -line automatic detection system
CN205003093U
Comprehensive detection system for defects of enamel inner container
CN107677689A
Comprehensive detection system for inner surface defects of enamel liner
CN107941817A