Elevator car weld defect detection method based on image processing

Through image processing-based methods, including color segmentation and convolutional neural network model training, the problem of missing detection of cracks in elevator car welds is solved, the detection accuracy is improved, and the safety of the elevator is ensured.

CN119941732AActive Publication Date: 2025-05-06KYLERYOOENSHANDONGELEVATOR CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510429877.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-08
Publication Date
2025-05-06
Estimated Expiration
2045-04-08

AI Technical Summary

Technical Problem

In the prior art, the detection and missed detection of crack defects in elevator car welds lead to low detection accuracy, affecting the safety of elevators.

Method used

Using an image-based processing method, the images of the weld area of ​​the elevator car are collected and converted to the Lab color space. The color clusters and quantities are determined using K-mean clustering, the color difference is calculated for segmentation, the color area color is marked and replaced, and the color is trained using a convolutional neural network model to detect weld cracks.

Benefits of technology

It improves the accuracy of crack detection in the elevator car weld, reduces the missed inspection problems caused by image resolution and color limitations, and ensures the safety and reliability of the elevator.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119941732A_ABST
    Figure CN119941732A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of defect detection, in particular to an elevator car welding seam defect detection method based on image processing, and the method comprises the steps: collecting an image of a welding seam region of an elevator car, and carrying out the color segmentation of the image through a color difference degree; the elevator car welding seam crack area can be accurately determined through the color of the segmented image, the color of the elevator car welding seam crack area is replaced with the contrast color of the background color, the color of the crack can be accurately highlighted, and the accuracy of elevator car welding seam crack detection is improved. Convolutional neural network model deep training is carried out on the marked image set, so that the accuracy of elevator car weld crack defect detection can be further improved; the crack hidden danger on the surface of the elevator can be found in time by detecting the welding seam defects of the elevator car, accidents can be prevented, and the safety of passengers and maintenance personnel is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of defect detection, and in particular to an elevator car weld defect detection method based on image processing. Background Art

[0002] Weld cracks are an important consideration in the safety evaluation of elevators. The evaluation of elevator cars includes the quality and integrity of welds. If cracks appear in the weld, this may be considered a risk factor, affecting the overall safety evaluation level of the elevator. In addition, elevator users should conduct regular inspections and maintenance of welds to ensure their safety and reliability. If severe corrosion, deformation, cracks and other defects are found in the weld, timely measures should be taken, and if necessary, the parts should be scrapped and replaced with new ones to ensure the safe operation of the elevator. Therefore, the accuracy of weld crack detection is very important, and the missed detection of fine crack defects in welds is an urgent problem to be solved.

[0003] Chinese patent publication number CN 115082444B discloses a copper pipe weld defect detection method and system based on image processing. The prior art realizes the judgment of whether there is a welding defect on the weld surface based on the gray value information corresponding to the surface image of the copper pipe weld to be detected, and further realizes the judgment of the defect position when it is judged that there is a welding defect on the weld surface, that is, the positioning of the welding defect position is realized; the present invention realizes the detection of copper pipe welding defects, solves the problem of difficulty in detecting fine defects on the weld surface in the prior art, but does not involve how to solve the problem of missed detection of fine cracks. Summary of the invention

[0004] To this end, the present invention provides an elevator car weld defect detection method based on image processing to overcome the problems of missed detection of elevator car weld crack defects in the prior art resulting in low detection accuracy and low elevator car safety.

[0005] To achieve the above object, the present invention provides an elevator car weld defect detection method based on image processing, comprising: Collecting a weld area image of an elevator car, and converting the weld area image from an RGB color space to a Lab color space; For the Lab color space, K-means clustering is used to determine the color clusters and the number of color clusters of the weld area image; Calculating the color difference between each color cluster according to the color clusters and the number of color clusters; Determining whether to segment the weld region image to output a plurality of blocks according to the color difference, wherein the number of blocks of the weld region image is determined according to the number of color clusters of the weld region image and the color features of the blocks of the weld region image after segmentation; Marking the cracks in the segmented image of the weld crack region of the elevator car to determine the color of the weld crack region of the elevator car; The color of the elevator car weld crack area image is changed to a contrasting color of the background color of the weld area image; Collect an image set of the color of the weld crack region image after the color is changed, and mark the contour line of the weld crack region in the image set; The convolutional neural network model is used to train the labeled weld area image set to complete crack defect detection in the weld area.

[0006] Furthermore, for the Lab color space, using K-means clustering to determine the color clusters and the number of color clusters of the weld area image includes: Clustering the colors in the image using K-means clustering in the Lab color space and determining the original cluster centers; Collect the distances from the original single pixel points to the original cluster centers; Update the position of the original cluster center according to the distance of the original cluster center to determine the target cluster center, and perform clustering; The color cluster and the number of color clusters are determined according to the chromaticity of the target cluster center after clustering.

[0007] Further, updating the position of the original cluster center according to the distance of the original cluster center includes: Calculate the distribution density of a plurality of pixel points in the central circle according to the plurality of distances in the central circle of the original cluster center; comparing the distribution density with a preset distribution density; If the distribution density is less than or equal to the preset distribution density, the position of the original cluster center is moved toward the direction of the original cluster center of the core point of the distribution density; The moving distance of the original cluster center is determined based on the distribution density and the initial distance of the original cluster center from the core point of the distribution density.

[0008] Further, calculating the color difference between the color clusters according to the color clusters and the number of color clusters includes: Collect the average chromaticity value of all pixels in a single color cluster; The color difference between color clusters is calculated using the Euclidean distance formula in the color space; Among them, the process of segmenting the image according to the color difference includes: Use gray threshold segmentation method to segment the image; The 10 separate segmented regions are merged into one segmented region based on the color difference.

[0009] Furthermore, the process of determining the elevator car weld crack area according to the number of blocks of the segmented weld area image and the color characteristics of each block includes: Extract the weld area image of a single block and the color features of each block; The color features of each block of the segmented weld area image are compared with the color features of the weld crack area; The color feature area of ​​the weld crack area is marked according to the color feature comparison, and it is determined whether the number of blocks of the weld area image is adjusted.

[0010] Further, the process of determining whether to adjust the number of blocks of the weld area image includes: comparing the number of color clusters in the weld area image with a preset number of color clusters; If the number of color clusters of the weld area image is greater than the preset number of color clusters, it is determined to adjust the number of blocks of the weld area image.

[0011] Furthermore, the adjustment range of the number of blocks of the weld area image is determined by the difference between the number of color clusters and the preset number of color clusters.

[0012] Further, the process of replacing the color of the elevator car weld crack area with a contrasting color of the background color of the weld area image includes: Extracting images of the elevator car weld area and the elevator car weld crack area; The color of the crack area of ​​the elevator car weld and the background color are obtained according to the grayscale threshold of the crack; Replace the color of the elevator car weld crack area with a contrasting color of the background color of the weld area image; In implementation, the contrast color is the inverse of the brightness of the background color to ensure that the replaced color has a clear contrast with the original background.

[0013] Further, the process of marking the contour line of the weld crack area of ​​the image set includes: Collect a set of images containing colors that highlight weld cracks; Use the image marking tool to mark the weld crack area and the contour of the weld crack in the image.

[0014] Furthermore, the process of performing deep training on the labeled image set using a convolutional neural network model includes: Build a set of labeled images; De-noise and grayscale the image set; Build a convolutional neural network model for image segmentation tasks; The labeled image set is trained using a convolutional neural network model to complete crack defect detection in the weld area.

[0015] Compared with the prior art, the beneficial effect of the present invention lies in that the present invention collects images of the weld area of ​​the elevator car, and can perform color segmentation on the image through color difference, and can accurately determine the elevator car weld crack area through the color of the segmented image, and can accurately highlight the color of the crack by replacing the color of the elevator car weld crack area with a contrasting color with the background of the elevator car weld crack area, thereby improving the accuracy of the elevator car weld crack detection, and can further improve the accuracy of the elevator car weld crack defect detection by performing deep training of the convolutional neural network model on the marked image set; through the detection of elevator car weld defects, the hidden dangers of cracks on the elevator surface can be discovered in time, which helps to prevent accidents and ensure the safety of passengers and maintenance personnel.

[0016] Furthermore, the present invention calculates the color difference between color clusters through the color clusters, and segments the image according to the color difference, thereby reducing the problem of missing detection of tiny weld defects due to image resolution limitations, reducing the problem of missing detection of internal cracks due to image acquisition color limitations, and improving the accuracy of elevator car weld crack detection.

[0017] Furthermore, the present invention can accurately highlight the color of the crack by replacing the color of the elevator car weld crack area with a contrasting color with the background image color of the elevator car weld crack area, thereby reducing the occurrence of missed detection of cracks due to background color and improving the accuracy of elevator car weld crack detection.

[0018] Furthermore, the present invention can timely discover hidden dangers of cracks on the elevator surface through the detection of elevator car weld defects, which helps to prevent accidents and ensure the safety of passengers and maintenance personnel; by timely detecting car defects, potential problems can be discovered in time, preventive maintenance measures can be taken, the failure rate of elevator equipment can be reduced, and the reliability and stability of the equipment can be improved.

[0019] Furthermore, the present invention can highlight cracks and improve image quality by contrast enhancement and grayscale processing of the weld crack area of ​​the elevator car, converting color images into grayscale images, simplifying the processing process, and stretching the grayscale level of the image by enhancing the contrast of the image, so that different areas in the image have a wider grayscale range. Eliminating noise interferon can make weld cracks clearer, binarization can highlight the characteristics of weld cracks, and morphological reconstruction can fill the crack area to make the crack clearer.

[0020] Furthermore, the present invention can accurately highlight the color of the crack by replacing the color of the elevator car weld crack area with a background image that matches the elevator car weld crack area. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 This is a flowchart of the steps of elevator car weld defect detection based on image processing according to an embodiment of the present invention; Figure 2 A flowchart of the steps of determining color clusters and the number of color clusters according to an embodiment of the present invention; Figure 3 This is a flow chart of the steps of segmenting an image according to color difference according to an embodiment of the present invention; Figure 4 The present invention is a flowchart of the steps of determining the weld crack area of ​​an elevator car according to the number of blocks of the weld area image after segmentation and the color characteristics of each block. DETAILED DESCRIPTION

[0022] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0023] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.

[0024] It should be noted that, in the description of the present invention, terms such as "up", "down", "left", "right", "inside", "outside" and the like indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings. This is merely for the convenience of description and does not indicate or imply that the device or element must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it should not be understood as a limitation on the present invention.

[0025] In addition, it should be noted that in the description of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0026] See also Figure 1 , which is a flowchart of the steps of elevator car weld defect detection based on image processing according to an embodiment of the present invention; a method for elevator car weld defect detection based on image processing according to the present invention comprises: Step S1, collecting a weld area image of an elevator car, and converting the weld area image from an RGB color space to a Lab color space; Step S2, using K-means clustering to determine the color clusters and the number of color clusters of the weld area image in the Lab color space; Step S3, calculating the color difference between each color cluster according to the color cluster and the number of color clusters; Step S4, determining whether to segment the weld area image according to the color difference, and the number of blocks of the weld area image is determined according to the number of color clusters of the weld area image and the block color characteristics of the weld area image after segmentation; Step S5, marking the cracks in the segmented image of the weld crack region of the elevator car to determine the color of the weld crack region of the elevator car; Step S6, changing the color of the elevator car weld crack area image to a contrasting color of the background color of the weld area image; Step S7, collecting an image set of the color of the elevator car weld crack after the color is changed, and marking the contour line of the weld crack area in the image set; Step S8, using a convolutional neural network model to train the marked weld area image set to complete crack defect detection in the weld area.

[0027] Among them, K-means clustering is the clustering algorithm in this implementation.

[0028] Specifically, whether to segment the weld area image into equal-area segmentation is determined according to the color difference, the weld area image is segmented into a single area after equal-area segmentation, and the block color feature is one of brightness and saturation.

[0029] Specifically, the weld crack region image is an image of the weld crack region obtained by segmenting the weld region image.

[0030] Specifically, the background color of the weld area image is all other colors in the weld area image after removing the color of the crack area; the contrasting color is one of yellow and blue, purple and green, and red and cyan.

[0031] In practice, the process of converting the weld area image from RGB color space to Lab color space includes: Convert RGB color values ​​to linear RGB values; Use the conversion matrix to multiply the linear RGB value to convert the linear RGB value to XYZ value; Converting the XYZ color space to the Lab color space includes using a conversion matrix to convert the XYZ value of each pixel into the corresponding L, a, and b components in the Lab color space, where L represents brightness, and a and b represent two axes of color information, representing the range from red to green and from yellow to blue, respectively.

[0032] Specifically, the conversion matrix is ​​calculated based on the chromaticity coordinates of the three primary colors (red, green, blue) in the RGB color space and the chromaticity coordinates of the white point. The calculation process includes: Determine the chromaticity coordinates of the RGB primary colors: This is done by measuring the coordinates of the primary colors of the RGB display device in the XYZ color space; Determine the chromaticity coordinates of the white point: based on the coordinates of white (including D65) in the XYZ color space.

[0033] Construct a conversion matrix: Using the chromaticity coordinates of the RGB primary colors and the chromaticity coordinates of the white point, construct a 3x3 conversion matrix that can be used to convert linear RGB values ​​to XYZ values.

[0034] The present invention collects images of the weld area of ​​the elevator car, and can perform color segmentation on the image through color difference. The elevator car weld crack area can be accurately determined through the color of the segmented image, and the color of the crack can be accurately highlighted by replacing the color of the elevator car weld crack area with a contrasting color with the background color of the elevator car weld crack area, thereby improving the accuracy of the elevator car weld crack detection, and the accuracy of the elevator car weld crack defect detection can be further improved by performing deep training of the convolutional neural network model on the marked image set; the detection of elevator car weld defects can timely discover the hidden dangers of cracks on the elevator surface, which helps to prevent accidents and ensure the safety of passengers and maintenance personnel.

[0035] The present invention can timely discover hidden dangers of cracks on the elevator surface by detecting defects in the elevator car welds, which helps to prevent accidents and ensure the safety of passengers and maintenance personnel; by timely detecting car defects, potential problems can be discovered in time, preventive maintenance measures can be taken, the failure rate of elevator equipment can be reduced, and the reliability and stability of the equipment can be improved.

[0036] In the implementation, the image of the weld crack area of ​​the elevator car is collected and measured, and the image is converted from the RGB color space to the Lab color space, wherein the RGB color space is based on red, green, and blue as the basic elements to construct a three-dimensional space, wherein each color is divided into 256 levels according to brightness, and the Lab color space is based on the color space perceived by the human visual system, L represents brightness, and a and b represent the two dimensions of green and red and blue and yellow respectively. Then, the colors in the image are clustered using K-means clustering on the Lab color space to determine the color clusters and the number of color clusters. Afterwards, the color difference between the color clusters is calculated based on the color clusters; the image is color segmented based on the color difference; the problem of missing the detection of small-sized weld defects due to image resolution limitations is reduced, and the problem of missing the detection of internal cracks due to image acquisition color limitations is reduced, thereby improving the accuracy of the detection of weld cracks in the elevator car.

[0037] See also Figure 2 As shown, it is a flowchart of the steps of determining color clusters and the number of color clusters in an embodiment of the present invention; for the Lab color space, using K-means clustering to determine the color clusters and the number of color clusters of the weld area image includes: Step S21, clustering the colors in the image using K-means clustering in the Lab color space and determining the original cluster center; Step S22, collecting the distances from the original single pixel points to the original cluster centers; Step S23, updating the position of the original cluster center according to the distance of the original cluster center to determine the target cluster center, and performing clustering; Step S24: determining the color cluster and the number of color clusters according to the chromaticity of the target cluster center after clustering.

[0038] Specifically, calculating the color difference between the color clusters according to the color clusters and the number of color clusters includes: Collect the average chromaticity value of all pixels in a single color cluster; The color difference between any two color clusters is calculated according to the Euclidean distance formula in the color space.

[0039] In practice, the Euclidean distance is calculated as: , Where S is the color difference between any two color clusters. For any two color points A and B in the Lab color space, the coordinates of point A in the embodiment (A L , A a , A b ), the coordinates of point B (B L , B a , B b ), the Euclidean distance measures the overall difference between any two colors. This embodiment measures the color difference between any two pixels based on the Euclidean distance. Therefore, the greater the distance between the Lab color points represented by any two pixels, the greater the color difference between any two pixels.

[0040] Specifically, updating the position of the original cluster center according to the distance of the original cluster center includes: Calculate the distribution density of a plurality of pixel points in the central circle according to the plurality of distances in the central circle of the original cluster center; comparing the distribution density with a preset distribution density; If the distribution density is less than or equal to the preset distribution density, the position of the original cluster center is moved toward the direction of the original cluster center of the core point of the distribution density; The moving distance of the original cluster center is determined based on the distribution density and the initial distance of the original cluster center from the core point of the distribution density.

[0041] In implementation, the central circle of the original cluster center is a central circle centered on a single cluster that can be simulated as a point, the distribution density core point is the point with the maximum distribution density, and the preset distribution density is 163 ppi.

[0042] See also Figure 3 As shown, it is a flow chart of the steps of segmenting an image according to color difference according to an embodiment of the present invention; segmenting an image according to color difference includes: Step S31, using gray threshold segmentation method to segment the image into equal areas; Step S32: merging the 10 separate segmented areas into one segmented area according to the color difference.

[0043] In implementation, the color difference uses the Euclidean distance in the Lab color space to measure the color similarity. The preset number of segments is 10. It is understandable that the preset number of segments can be adjusted according to actual conditions, and the threshold range is [5,20].

[0044] See also Figure 4 As shown, it is a flowchart of the steps of determining the elevator car weld crack area according to the number of blocks of the weld area image after segmentation and the color characteristics of each block in an embodiment of the present invention; determining the elevator car weld crack area according to the number of blocks of the weld area image after segmentation and the color characteristics of each block includes: Step S41, extracting the weld area image of a single block and the color features of each block; Step S42, comparing the color features of each block of the segmented weld area image with the color features of the weld crack area; Step S43: Mark the color feature area of ​​the weld crack area according to the color feature comparison, and determine whether to adjust the number of blocks of the weld area image.

[0045] In the implementation, the color feature of the weld crack area of ​​the elevator car is first determined. This color feature includes the range of the color of the crack area, which is one of brightness and saturation in this implementation. Then, for the segmented image, color feature matching is performed on each segmented area to determine the area that matches the color feature of the weld crack area. Finally, based on the color feature matching results, the areas that match the color features of the weld crack area are marked. These areas include potential weld cracks.

[0046] Specifically, the process of determining whether to adjust the number of blocks of the weld area image includes: comparing the number of color clusters in the weld area image with a preset number of color clusters; If the number of color clusters of the weld area image is less than or equal to the preset number of color clusters, determining to maintain the existing number of blocks for the weld area image; If the number of color clusters of the weld area image is greater than the preset number of color clusters, it is determined to adjust the number of blocks of the weld area image.

[0047] In the implementation, the preset number of color clusters is 30. Because in visual design, the number and distribution of colors will directly affect the visual effect. 30 color clusters is a practical and efficient choice, which can quickly find the required colors and reduce the time spent on color selection. In this implementation, 30 color clusters are enough to cover most design requirements, while maintaining visual balance and harmony and avoiding too chaotic colors.

[0048] Specifically, the adjustment range of the number of blocks of the weld area image is determined by the difference between the number of color clusters and the preset number of color clusters, wherein: If the difference between the number of color clusters and the preset number of color clusters is less than or equal to the preset first color cluster number difference, the number of blocks of the weld area image is adjusted using the first number adjustment coefficient; If the difference between the number of color clusters and the preset number of color clusters is greater than the preset first color cluster number difference and less than or equal to the preset second color cluster number difference, the number of blocks of the weld area image is adjusted using the second number adjustment coefficient; If the difference between the number of color clusters and the preset number of color clusters is greater than the preset second color cluster number difference, the number of blocks of the weld area image is adjusted using a third number adjustment coefficient; In implementation, the preset difference in the number of first color clusters is 5; the preset difference in the number of second color clusters is 8; the formula for adjusting the number of blocks of the weld area image is T=t×αn, wherein T is the number of blocks of the weld area image after adjustment, t is the number of blocks of the weld area image before adjustment, αn is the nth adjustment coefficient, the number of blocks of the weld area image before adjustment is 60, α1=1.1; α2=1.2; α3=1.3; when the number of color clusters is 36, the difference between the number of color clusters and the preset number of color clusters is 6, and the number of blocks of the weld area image after adjustment is T=t×αn=60×α2=60×1.2=72, that is, the number of blocks of the weld area image after adjustment is 72.

[0049] In the implementation, contrast enhancement and grayscale processing of the weld crack area of ​​the elevator car can highlight the crack and improve the image quality. Converting the color image to a grayscale image can simplify the processing process. By enhancing the contrast of the image and stretching the grayscale level of the image, different areas in the image have a wider grayscale range. Eliminating noise interferon can make the weld crack clearer, binarization can highlight the characteristics of the weld crack, and morphological reconstruction can fill the crack area to make the crack clearer.

[0050] Specifically, the process of replacing the color of the elevator car weld crack area with a contrasting color of the background color of the weld area image to highlight the color of the crack includes: Extract the color of the weld area image and the image of the weld crack area; The color and background color of the weld crack area image are obtained respectively according to the gray threshold of the crack; Extract the color of cracks in the weld of an elevator car; Replace the color of the weld crack region image with a contrasting color of the background color of the weld region image; The contrast color is the inverse of the brightness of the background color to ensure that the replaced color forms a clear contrast with the original background.

[0051] In the implementation, it can be implemented not only by using OpenCV but also by using Python, and both can accurately highlight the color of the crack by replacing the color of the elevator car weld crack area with a background image that matches the elevator car weld crack area.

[0052] Specifically, the process of marking the contour lines of the weld crack area in the image set includes: Collect a set of images containing colors that highlight weld cracks; Use the image marking tool to mark the weld crack area and the contour of the weld crack in the image.

[0053] In the implementation, first, a set of images containing prominent crack colors is collected, and the image set has 1,000 data, ensuring that there are obvious weld cracks in each image; then, the image is marked using an image marking tool to mark the weld crack area, and the number of marked crack areas in each area is not less than 5. The image marking tools include one or both of Labelmg and VGG ImageAnnotator; finally, a total of not less than 5,000 marked information is saved in XML format for subsequent model training.

[0054] Specifically, the process of training the labeled image set using a convolutional neural network model includes: Build a set of labeled images; Preprocess the image set; Build a convolutional neural network model for image segmentation tasks; The labeled image set is trained using a convolutional neural network model to complete crack defect detection in the weld area.

[0055] In the implementation, first, a set of images containing marked contours is constructed to ensure that each image and crack area and contour can be used for model training. Then, the image data is preprocessed, including one or more of scaling, normalization, and data enhancement to facilitate model training. Then, a convolutional neural network model suitable for image segmentation tasks is constructed, and an existing architecture can be selected, including one or two of U-Net and DeepLab. Then, the convolutional neural network model is trained using the image set, and the hyperparameters of the model are adjusted according to the performance of the validation set. Then, the performance of the model is evaluated using the test set, including one or more of accuracy, recall, and F1 score.

[0056] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.

Claims

1. A method for detecting weld defects in an elevator car based on image processing, characterized in that: include: Collecting a weld area image of an elevator car, and converting the weld area image from an RGB color space to a Lab color space; For the Lab color space, K-means clustering is used to determine the color clusters and the number of color clusters of the weld area image; Calculating the color difference between each color cluster according to the color clusters and the number of color clusters; Determining whether to segment the weld region image to output a plurality of blocks according to the color difference, wherein the number of blocks of the weld region image is determined according to the number of color clusters of the weld region image and the color features of the blocks of the weld region image after segmentation; Marking the cracks in the segmented image of the weld crack region of the elevator car to determine the color of the weld crack region of the elevator car; The color of the elevator car weld crack area image is changed to a contrasting color of the background color of the weld area image; An image set of the color of the weld crack region image after the color is changed is collected, and the contour line of the weld crack region in the image set is marked; The convolutional neural network model is used to train the labeled weld area image set to complete crack defect detection in the weld area.

2. The elevator car weld defect detection method based on image processing according to claim 1 is characterized in that: For the Lab color space, using K-means clustering to determine the color clusters and the number of color clusters of the weld area image includes: Clustering the colors in the image using K-means clustering in the Lab color space and determining the original cluster centers; Collect the distances from the original single pixel points to the original cluster centers; Update the position of the original cluster center according to the distance of the original cluster center to determine the target cluster center, and perform clustering; The color cluster and the number of color clusters are determined according to the chromaticity of the target cluster center after clustering.

3. The elevator car weld defect detection method based on image processing according to claim 2 is characterized in that: Updating the position of the original cluster center according to the distance of the original cluster center includes: Calculate the distribution density of a plurality of pixel points in the central circle according to the plurality of distances in the central circle of the original cluster center; comparing the distribution density with a preset distribution density; If the distribution density is less than or equal to the preset distribution density, the position of the original cluster center is moved toward the direction of the original cluster center of the core point of the distribution density; The moving distance of the original cluster center is determined based on the distribution density and the initial distance of the original cluster center from the core point of the distribution density.

4. The elevator car weld defect detection method based on image processing according to claim 3 is characterized in that: Calculating the color difference between the color clusters according to the color clusters and the number of color clusters includes: Collect the average chromaticity value of all pixels in a single color cluster; Calculates the color difference between color clusters.

5. The elevator car weld defect detection method based on image processing according to claim 4 is characterized in that: According to the number of blocks of the weld area image after segmentation and the color characteristics of each block, the weld crack area of ​​the elevator car is determined to include: Extract the weld area image of a single block and the color features of each block; The color features of each block of the segmented weld area image are compared with the color features of the weld crack area; The color feature area of ​​the weld crack area is marked according to the color brightness feature comparison, and it is determined whether the number of blocks of the weld area image is adjusted.

6. The elevator car weld defect detection method based on image processing according to claim 5 is characterized in that: Determine whether to adjust the number of blocks of the weld area image, including: If the number of color clusters of the weld area image is greater than the preset number of color clusters, the number of blocks of the weld area image is adjusted.

7. The elevator car weld defect detection method based on image processing according to claim 6 is characterized in that: The adjustment range of the number of blocks of the weld area image is determined by the difference between the number of color clusters and the preset number of color clusters.

8. The elevator car weld defect detection method based on image processing according to claim 7 is characterized in that: Replace the color of the elevator car weld crack area with a contrasting color of the background color of the weld area image including, Extracting images of the weld area and images of the weld crack area; The color and background color of the weld crack area image are obtained respectively according to the gray threshold of the crack; Replace the color of the elevator car weld crack area image with a contrasting color of the weld area image's background color.

9. The elevator car weld defect detection method based on image processing according to claim 8, characterized in that: The process of marking the contours of the weld crack area in the image set includes: Collect a set of images containing the colors of weld cracks; The contour line of the weld crack in the weld crack area of ​​the image is marked.

10. The elevator car weld defect detection method based on image processing according to claim 9, characterized in that: The process of training the labeled image set using a convolutional neural network model includes: Build a set of labeled images; De-noise and grayscale the image set; Build a convolutional neural network model for image segmentation tasks; The labeled image set is trained using a convolutional neural network model to complete crack defect detection in the weld area.

Citation Information

Patent Citations

  • A method and system for detecting defects in copper pipe welds based on image processing

    CN115082444B

  • Easy-to-distinguish detection process used for electronic tube

    CN105372019A

  • Steel structure welding crack defect detection method based on image processing technology

    CN113989280A

  • Visual inspection method and system for welding robot

    CN117689663A

  • Steel structure welding seam quality detection method

    CN119338750A