Defect detection method and device
By using machine vision image segmentation and neural network recognition methods, the problems of low efficiency and insufficient accuracy in detecting surface defects of rotating parts have been solved, achieving efficient and accurate automated detection.
Patent Information
- Application Number
- CN202410883078.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-03
- Publication Date
- 2024-11-22
AI Technical Summary
In the current technology, the detection of surface defects in rotating parts relies on manual inspection, which is inefficient, highly subjective, lacks clear standards, and is prone to false detections and missed detections, making it difficult to meet the needs of quality management.
A machine vision-based defect detection method is adopted, including image segmentation, digital morphology optimization, and neural network recognition. By acquiring the target image, segmenting and optimizing the binarized image, extracting defect features, and using a neural network to determine the defect category.
It improves the accuracy and efficiency of surface defect detection for rotating parts, eliminates the uncertainty of manual inspection, meets the detection needs of different types of defects, and realizes automated quality management.
Smart Images

Figure CN119006361A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of part surface defect detection, and in particular to a defect detection method and device. Background Art
[0002] Rotating parts, such as the piston shaft, piston and sealing ring in the hydraulic actuator, will have cracks, scratches, pits, corrosion and other damage on their contact surfaces after a period of use. In severe cases, it may cause the device to malfunction. Therefore, it is necessary to detect the damage on the surface of these rotating parts.
[0003] At present, the surface defect detection of rotating parts mostly adopts the manual visual method. This method has low detection efficiency, and the detection effect is determined by the workers' experience, which is subjective. There is no clear detection standard, which is not convenient for quality management of parts. At the same time, workers will become tired after working for a long time, which is prone to false detection and missed detection, and the detection effect is not ideal. In addition, due to the variety of rotating parts, their length, diameter and other parameters are different, which will also bring additional workload to the detection process and reduce the detection efficiency.
[0004] Therefore, how to improve the detection quality and efficiency of surface defects of rotating parts is an urgent problem to be solved. Summary of the invention
[0005] In view of this, the present application discloses a defect detection method and device to improve the detection quality and efficiency of surface defects of rotating parts.
[0006] In the first aspect, the present application discloses a defect detection method for detecting surface defects of rotating parts, comprising: acquiring a target image, which is an image of a rotating part; segmenting the target image to obtain a binary image of the target image; optimizing the binary image based on a digital morphology method to highlight defect areas in the binary image, or to complete each defect target area in the binary image; extracting defect features based on the optimized binary image, and inputting several defect features into a neural network to determine the category of the surface defect.
[0007] Optionally, obtaining the target image includes: using a camera to photograph the surface of a rotating part to obtain a surface image; and synthesizing a plurality of surface images to obtain a target image.
[0008] Optionally, after acquiring the target image, the method further includes: using a partial differential equation to denoise the target image, and determining a divergence of the target image based on a gradient of the target image to remove equal illumination lines in the target image.
[0009] Optionally, segmenting the target image to obtain a binary image of the target image includes: binarizing the target image using a maximum inter-class variance method; recording an optimal threshold when the inter-class variance reaches a maximum; and obtaining a binary image of the target image based on the optimal threshold.
[0010] Optionally, a digital morphology-based method is used to optimize the binary image to highlight defect areas in the binary image, or to complete each defect target area in the binary image, including: fusing defect target areas with foggy distribution into one defect target area; when there are holes inside the defect target area or the defect target area is not fully connected, filling the defect target area completely.
[0011] Optionally, defect features are extracted based on the optimized binary image, and several defect features are input into a neural network to determine the category of surface defects, including: determining the geometric features of each defect in the optimized binary image in units of pixels, the geometric features include defect area, defect perimeter, defect rectangularity and area duty cycle; converting the geometric features into corresponding feature vectors, inputting the feature vectors into a back propagation neural network to determine the category of surface defects, the categories of surface defects include cracks, scratches, pits and corrosion.
[0012] In the second aspect, the present application discloses a defect detection device for executing any defect detection method in the first aspect above to determine the category of surface defects of rotating parts to be detected, the defect detection device comprising a rotating platform, a fixing device, a camera and a processor; the fixing device is installed on the top of the rotating platform, for fixing the rotating parts to be detected so that the axis of the rotating parts to be detected coincides with the rotation axis of the rotating platform; the camera is used to capture the surface image of the rotating parts to be detected when the rotating platform drives the rotating parts to be detected to rotate; the processor is connected to the camera, for receiving the surface image, and determining the category of surface defects of the rotating parts to be detected based on the surface image.
[0013] Optionally, the defect detection device further includes: a displacement platform, which is connected to the camera device and is used to control the camera device to translate forward and backward and / or left and right.
[0014] Optionally, the defect detection device further includes: a line light source, which is used to provide lighting to highlight the defect area in the surface image.
[0015] Optionally, the rotating platform rotates uniformly at a preset speed, and the camera device continuously exposes according to a fixed frame number to obtain surface images of a number of rotating parts to be inspected.
[0016] In summary, the defect detection method and device disclosed in this application have the following beneficial effects: by using image segmentation, the defect area and intact area of the part can be accurately distinguished, thereby improving the accuracy of detection; by using geometric features, the defects can be quantitatively and qualitatively analyzed to meet the detection requirements of different types of defects, thereby improving the detection efficiency. In addition, through the automated defect detection method, various uncertainties of manual detection are eliminated, thereby improving the detection quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The following is a brief introduction to the drawings used in describing the embodiments of the present application:
[0018] Figure 1 is a schematic diagram of a defect detection method provided in an embodiment of the present application;
[0019] Figure 2 is a structural schematic diagram of a defect detection device provided in an embodiment of the present application;
[0020] Figure 3 It is a rotating part to be detected provided in an embodiment of the present application;
[0021] Figure 4 It is another rotating part to be detected provided in the embodiment of the present application.
[0022] In the figure: 1-rotating parts to be inspected, 2-fixing device, 3-rotating platform, 4-line light source, 5-camera equipment, 6-displacement platform, 7-processor. DETAILED DESCRIPTION
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the specific implementation methods of the present application will be described below with reference to the accompanying drawings. The accompanying drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other accompanying drawings and other implementation methods can be obtained based on these drawings without creative work. Adjustments and improvements made without departing from the concept of the present application are all within the scope of protection of the present application.
[0024] In order to simplify the drawings, only the parts related to the corresponding embodiments are schematically shown in each figure, and they do not represent the actual structure of the product. In addition, in order to simplify the drawings and facilitate understanding, only part of the components with the same structure or function in some figures are schematically drawn, and there may be more or fewer components with the same structure or function in reality.
[0025] In this application, unless otherwise clearly specified and limited, ordinal numbers, such as "first", "second", etc., are only used to distinguish and describe associated objects, and cannot be understood as indicating or implying the relative importance or order between associated objects; in addition, they do not represent the number of associated objects. "Multiple" includes two or more, and other quantifiers are similar. " / " is used to describe the relationship between associated objects, which indicates the "or" relationship between associated objects. "And / or" is used to describe the relationship between associated objects, which includes any combination relationship between associated objects, such as "a and / or b" includes: "alone a", "alone b", or "a and b". "One or more" or "at least one" in multiple objects refers to any object or any combination of multiple objects, such as "one or more of a1, a2, a3" or "at least one of a1, a2, a3" includes: "alone a1", "alone a2", "alone a3", "a1 and a2", "a1 and a3", "a2 and a3", or "a1, a2 and a3".
[0026] Rotating parts are widely used in daily life. For example, in the automotive industry, crankshafts and camshafts can be used to transmit engine power and control the opening and closing of valves, hubs and axles can be used to support wheels and transmit power, and drive shafts and universal joints can be used to transmit engine power to drive wheels; in the field of mechanical manufacturing, gears and gear shafts can be used to transmit power inside mechanical equipment, and ball screws can be used for precise position control in CNC machine tools and industrial robots; in the field of medical equipment, centrifuge rotors can be used for separation and analysis of laboratory samples, and the rotating shafts of surgical instruments can be used for precise operation of various surgical tools; in the field of aerospace, hydraulic actuators composed of rotating parts such as pistons, piston shafts and closing rings can be used in various control systems and mechanical operations to improve the safety and performance of aircraft.
[0027] Take the hydraulic actuator as an example. It can be used in the aircraft landing gear system to control the retraction and extension of the aircraft landing gear. After the aircraft takes off, the hydraulic actuator retracts the landing gear into the fuselage to reduce air resistance; before the aircraft lands, the hydraulic actuator extends the landing gear to ensure a safe landing. The hydraulic actuator can also act as a shock absorbing system for the landing gear, absorbing and alleviating the impact force when the aircraft lands, and improving the comfort and safety of the personnel in the aircraft. The hydraulic actuator can achieve wing surface adjustment and is used to control the trailing edge flaps and leading edge slats of the aircraft to change the shape and aerodynamic characteristics of the wing and optimize the performance of the aircraft in different flight stages, especially during takeoff and landing. The hydraulic actuator can be used for engine control. For example, it can be applied to the operation of the thrust reverser to help the aircraft decelerate quickly when landing. The thrust reverser achieves a braking effect by changing the thrust direction of the engine. In addition, hydraulic actuators are widely used in many aspects of aircraft such as brake systems, door controls, and emergency systems. Therefore, hydraulic actuators are widely used and powerful in the aerospace field, providing a certain force and precise control to improve the safety of aircraft and spacecraft and enable efficient operation of aircraft. Due to the high requirements for safety and reliability in the aerospace field, hydraulic actuators need to be tested to ensure that they can work properly.
[0028] The inspection of the hydraulic actuator includes defect detection on the surface of each rotating part. The piston shaft, piston and sealing ring in the hydraulic actuator will have cracks, scratches, pits, corrosion and other damage on their contact surfaces after a period of use, which may cause the hydraulic actuator to malfunction in severe cases. In the prior art, experienced operators can visually inspect the surface of the parts and find surface defects with the help of a magnifying glass or microscope. This method relies on manual experience, has low efficiency, and is affected by personnel fatigue and subjective factors. It is prone to false detection and missed detection, and the detection effect is not ideal. Alternatively, the propagation characteristics of ultrasonic waves in materials can be used to detect defects inside or on the surface of parts. However, this ultrasonic detection requires coupling agent, is complicated to operate and has high technical requirements for operators. Alternatively, laser interference, laser speckle or laser profile scanning and other technologies can be used to detect changes in the morphology of the surface of parts to find defects. However, the equipment cost of this laser detection method is high and the operation is complicated. In other words, the existing technologies for defect detection on the surface of rotating parts are mostly highly dependent on manual participation. This method has low detection efficiency, and the detection effect is determined by the workers' experience, which is highly subjective. There is no clear detection standard, which makes it inconvenient to manage the quality of parts.
[0029] Based on the above, the idea of this application is to design a method and device for detecting surface defects of rotating parts based on machine vision, and use image processing methods to improve the detection quality and efficiency of surface defects.
[0030] In some embodiments, please refer to Figure 1 , which shows a schematic diagram of a defect detection method provided by an embodiment of the present application. Figure 1 As shown, a defect detection method is used to detect surface defects of rotating parts, comprising:
[0031] S100, acquiring a target image, where the target image is an image of a rotating part;
[0032] S200, segmenting the target image to obtain a binary image of the target image;
[0033] S300, optimizing the binary image based on a digital morphology method to highlight defect areas in the binary image, or to complete each defect target area in the binary image;
[0034] S400, extracting defect features based on the optimized binary image, and inputting a number of defect features into a neural network to determine the category of the surface defect.
[0035] First, obtain an image of a rotating part. Exemplarily, the rotating part may be derived from an aircraft leading edge flap actuator. Use a camera to photograph the surface of the rotating part, and use its surface image as the target image for subsequent defect detection. Exemplarily, the camera may be a line scan camera. Unlike a traditional surface scan camera, a line scan camera is characterized by single-line imaging, and then a complete image is obtained by continuously moving the photographed object or the camera itself. Using a line scan camera as a camera can better match the structural characteristics of the rotating part itself, so as to facilitate subsequent defect detection. Furthermore, for rotating parts with a large surface area, multiple surface images can be taken from different angles, and these surface images can be synthesized into a whole target image. For example, when the rotating part to be detected is a cylinder, taking an image with a line scan camera and synthesizing it is equivalent to unfolding the surface of the cylinder, so that the side information of the cylinder is fully reflected in a two-dimensional image. In this way, a panoramic view of the surface of the part can be obtained, ensuring the continuity and integrity of the image, which is conducive to subsequent defect detection. In some embodiments, the rotating part can be controlled to rotate around the central axis, and a camera device can be used to photograph the surface of the rotating part during the rotation of the part.
[0036] Segment the target image to obtain a binary image of the target image. Since the grayscale value of the defective part of rotating parts is quite different from that of the intact part, the present application achieves image binarization by segmenting the target image. Image segmentation divides the target image into different areas (defective parts and intact parts) for further analysis. Through precise image segmentation, the target image is divided into foreground and background, and the defective area is separated from the background, which can make subsequent defect detection and feature extraction more accurate and improve the accuracy and reliability of the entire detection system. At the same time, this method can adapt to defects of different types and degrees, and effective segmentation can be performed as long as there is a significant grayscale difference between the defective area and the background area.
[0037] The binary image is optimized based on the digital morphology method to highlight the defect area in the binary image or to complete each defect target area in the binary image. In addition to the defect information on the surface of the rotating parts, the binary image obtained by image segmentation also has the following problems: the single defect target area is not completely connected; the defects are distributed in the binary image in a foggy manner, and the foggy defects need to be combined into a single defect; there are some holes inside the area of the single defect, and the holes of the defect need to be filled. Defect detection using mathematical morphology methods includes a series of image processing operations, such as expansion, corrosion, opening and closing operations. These operations are used to process the binary image to improve the connectivity of the defect area, eliminate noise and fill holes. For example, the white area in the binary image can be expanded by expansion operation to connect adjacent defect areas; the white area in the image can be reduced by corrosion operation to remove noise; small noise points can be removed by corrosion first and then expansion through opening operation; or the holes inside the defect area can be filled by expansion first and then corrosion through closing operation. Through the above digital morphology method, the defect information in the binary image is processed and the defect area is highlighted to facilitate the subsequent extraction of defect features; the problems of incomplete connectivity, foggy distribution and internal voids in the defect area are solved, so as to achieve the purpose of optimizing the binary image.
[0038] Based on the optimized binary image, defect features are extracted, and several defect features are input into the neural network to determine the category of surface defects. Feature extraction can perform qualitative and quantitative analysis on defects. There are many characteristics of defects, such as geometric features, grayscale features, texture features, etc. For example, geometric features can be selected for subsequent analysis. The feature vector of the extracted defect is used as the input layer neuron and input into the neural network; the neural network identifies the category of defects based on the trained samples. For example, the corresponding sample data can be trained according to the characteristics of various defects. Cracks are defects caused on the surface of parts due to alternating loads, stress concentration or material fatigue. The accumulation of cracks may eventually lead to part failure; scratches are caused by relative movement between contact surfaces or the presence of external foreign matter. Scratches increase the friction coefficient and reduce the wear resistance of parts, and may become the starting point of cracks; pits are caused by impact loads or excessive contact stress. Pits are usually accompanied by plastic deformation of materials and may cause stress concentration, making parts more likely to fail under fatigue loads; corrosion is caused by the contact surface under the action of humidity, chemicals or electrochemical reactions. Corrosion will cause local peeling of materials and increase surface roughness, thereby reducing the performance and service life of parts. Based on the characteristics of the above defect types, corresponding samples can be designed for defect classification and recognition by neural networks. In this way, the accuracy of defect recognition can be improved by utilizing the powerful classification ability of neural networks.
[0039] The defect detection method disclosed in this embodiment can accurately distinguish the defective area and intact area of the part through image segmentation, thereby improving the accuracy of detection; it can quantitatively and qualitatively analyze the defects through geometric features, meet the detection requirements of different types of defects, and improve the detection efficiency. In addition, through the automated defect detection method, various uncertainties of manual detection are eliminated, and the detection quality is improved.
[0040] In some embodiments, obtaining a target image includes: using a camera to photograph the surface of a rotating part to obtain a surface image; and synthesizing a plurality of surface images to obtain a target image.
[0041] As mentioned above, for rotating parts with a large surface area, its surface images can be captured from multiple angles, and then the surface images can be stitched together to form the desired target image. For example, the target part can be fixed, and then a camera can be used to shoot from different directions at the same height to obtain several surface images. The acquired surface images are processed, and their image properties, such as size, resolution and other data, are adjusted, and then stitched in sequence to obtain a whole target image. Alternatively, the camera device is fixed, the target part is rotated, and the camera device shoots at a preset frequency to obtain several surface images, and then these images are processed and stitched into a whole target image. By synthesizing the captured surface images into a complete expanded image, further defect detection and analysis are facilitated.
[0042] In some embodiments, after acquiring the target image, the method further includes: denoising the target image using a partial differential equation, and determining the divergence of the target image based on the gradient of the target image to remove iso-illuminance lines in the target image.
[0043] Since most images captured by camera equipment contain noise, denoising can be used to improve image quality before defect detection, making subsequent defect detection results more accurate. Due to the characteristics of the defects of rotating parts, if mean filtering or Gaussian filtering is used during denoising, the image will be blurred, and if median filtering is used, the image grayscale distribution will be discontinuous, which is not conducive to subsequent defect detection. Therefore, partial differential equations are used to denoise the target image. In this way, the iso-illuminance lines inside the image can be diffused according to certain rules to achieve the denoising effect, and the corresponding diffusion speed and direction can also be controlled.
[0044] For example, partial differential equations are used to denoise the image, remove the isoluminance lines in the image, achieve brightness balance, and also eliminate the influence of other unstable factors on the image quality. The calculation formula is as follows: u(x,y,0)=u0(x,y). Where u(x,y,t) is the output image and u0 is the input image. is the gradient of the image, and div is the divergence. According to the formula, the divergence of the target image is determined based on the gradient of the target image, and the iso-illuminance lines in the target image are removed to achieve the purpose of image denoising; in this way, the image quality is improved, the interference of noise is reduced, and it is helpful for subsequent image segmentation and defect detection.
[0045] In some embodiments, segmenting a target image to obtain a binary image of the target image includes: binarizing the target image using a maximum inter-class variance method; recording an optimal threshold when the inter-class variance reaches a maximum; and obtaining a binary image of the target image based on the optimal threshold.
[0046] Since the grayscale value of the defective part of the actuator parts is quite different from that of the intact part, the maximum inter-class variance method can be used to binarize the pre-processed image to complete the image segmentation. First, the maximum inter-class variance method is used to binarize the target image to distinguish the foreground and background of the image. The calculation formula is as follows: 2 =P A (m A -m G ) 2 +P B (m B -m G ) 2 , where P A is the probability of the pixel with gray value less than t appearing; P B is the probability of the pixel whose gray value is not less than t appearing; m A is the mean gray value of all pixels whose gray value is less than t; m B is the mean gray value of all pixels whose gray value is not less than t; m G is the mean gray value of all pixels. 2 The maximum gray value is the optimal threshold t. During segmentation, the gray value of the pixel whose gray value is not less than the optimal threshold t is recorded as 1, and the gray value of the pixel whose gray value is less than the optimal threshold t is recorded as 0. The binary image after segmentation according to the optimal threshold is: Among them, D(x,y) represents the gray value of the binarized image, that is, the binarized image of the target image; f(x,y) is the gray value of the original image. Using the maximum inter-class variance method, only the gray histogram in the image needs to be calculated. The mathematical operation is relatively simple and the calculation efficiency is high. In this way, areas with large gray value differences can be effectively distinguished, which is conducive to defect detection.
[0047] In some embodiments, a digital morphology-based method is used to optimize a binary image so as to complete each defect target area in the binary image, including: fusing defect target areas with foggy distribution into one defect target area; and filling the defect target area completely when there are holes or incomplete connectivity inside the defect target area.
[0048] Exemplarily, the following method can be used to optimize the binarized image obtained in the above embodiment to complete each defect target area in the binarized image. By setting a structural element to help extract a specific shape or feature. By adjusting the size and shape of the structural element, features of different sizes and shapes can be detected and extracted. For example, when detecting defects on the surface of a target part, a structural element can be used to connect a broken defect area or separate an adhesion area. The use of structural elements can improve the analysis of connected areas. Through the expansion operation, adjacent defect points can be connected so that the originally scattered defect points become a whole, which is convenient for subsequent defect analysis and feature extraction. By selecting one or more operations of the expansion operation, the corrosion operation, the opening operation and the closing operation, the image quality and feature extraction effect are improved, and the defect area in the binarized image is filled completely. In this way, noise can be effectively removed, broken areas can be connected, and small holes can be filled, thereby improving the accuracy and reliability of defect detection and analysis, and solving problems such as incomplete connectivity, foggy distribution, and internal holes in defect areas.
[0049] In some embodiments, defect features are extracted based on the optimized binary image, and several defect features are input into a neural network to determine the category of surface defects, including: determining the geometric features of each defect in the optimized binary image in units of pixels, the geometric features including defect area, defect perimeter, defect rectangularity, and area duty cycle; converting the geometric features into corresponding feature vectors, inputting the feature vectors into a back propagation neural network to determine the category of surface defects, the categories of surface defects including cracks, scratches, pits, and corrosion.
[0050] The extraction of defect features can be used to perform qualitative and quantitative analysis of defects. There are many types of defect features, such as geometric features, grayscale features, texture features, etc. The geometric features are selected as an example for explanation. Geometric features include defect area, defect perimeter, defect rectangularity, and area duty cycle. By operating in pixels, the size of the defect can be accurately quantified, including area, perimeter, etc. Defects can be analyzed more accurately by taking pixels as units rather than pixel blocks composed of several pixels. Among them, qualitative analysis focuses on the nature or type of defects rather than their specific number or size, which can help identify the types of defects, such as cracks, scratches, pits, and corrosion. In contrast, quantitative analysis focuses on the specific numerical characteristics of defects, including size, number, and location, which can provide accurate measurements of defects and help assess the severity and possible impact of defects. For example, the defect area represents the number of pixels in the defect in the image, which can reflect the size of the defect; the defect perimeter represents the length of the defect contour, which is helpful for evaluating the shape complexity of the defect; the rectangularity represents the area ratio of the defect area to its minimum circumscribed rectangle, reflecting the shape regularity of the defect; the aspect ratio represents the ratio of the longest and shortest dimensions of the defect, which helps describe the shape of the defect. The following calculation formula can further visualize the properties of these geometric features: Among them, the defect area S is the total number of pixels in the defect target area, R d is the set of pixels in the defect area of the image; Among them, the boundary perimeter P is the total number of pixels occupied by the outer contour of the defect, R b is the set of boundary points of defects in the image; Among them, the defect rectangularity R t L is the ratio of the short side length to the long side length of the minimum circumscribed rectangle of the defect area. s L is the short side length of the minimum circumscribed rectangle of the defect area. l is the long side length of the minimum circumscribed rectangle of the defect area; Among them, the area duty cycle R q is the ratio of the defect area S to the minimum circumscribed rectangle area of the defect area, S is the defect area, L s L is the short side length of the minimum circumscribed rectangle of the defect area. l is the long side length of the minimum circumscribed rectangle of the defect area. In this way, the geometric features of each defect in the optimized binary image are determined by the above formula.
[0051] Subsequently, the geometric features are converted into corresponding feature vectors, and the feature vectors are input into the back propagation (BP) neural network to determine the category of surface defects. The category of surface defects can be one or more of the above-mentioned cracks, scratches, pits and corrosion. The feature vector of the defect is used as the input layer neuron, and the category of the defect is identified based on the trained samples. The internal working logic of the neural network can be set according to the actual situation, and there is no restriction here. In this way, the powerful classification ability of the neural network can be used to improve the accuracy of defect identification, and improve the detection quality and efficiency of surface defects of rotating parts.
[0052] Based on similar technical concepts, the present application discloses a defect detection device for executing any defect detection method in the above embodiments to determine the type of surface defects of rotating parts to be detected. Figure 2 , which shows a schematic diagram of the structure of a defect detection device provided in an embodiment of the present application. Figure 2 As shown, the defect detection device includes a rotating platform 3, a fixing device 2, a camera 5 and a processor 7; the fixing device 2 is installed on the top of the rotating platform 3, and is used to fix the rotating part 1 to be detected so that the axis of the rotating part 1 to be detected coincides with the rotation axis of the rotating platform 3; the camera 5 is used to capture the surface image of the rotating part 1 to be detected when the rotating platform 3 drives the rotating part 1 to be detected to rotate; the processor 7 is connected to the camera 5, and is used to receive the surface image and determine the category of the surface defect of the rotating part 1 to be detected according to the surface image.
[0053] Figure 2 The rotating part 1 to be detected shown in the figure is a piston shaft part. In some other embodiments, please refer to Figure 3 and Figure 4 The rotating parts to be inspected can also be Figure 3 Piston parts shown or Figure 4The closed loop part shown. Exemplarily, the fixing device 2 can be a three-jaw micro servo clamp. When working, the three clamps extend into the interior of the target part to clamp the part, automatically realize the centering of the part, ensure that the axis of the part is consistent with the center of rotation, and ensure the photo effect. Exemplarily, the camera device 5 can be a line scan camera. After the position adjustment of the camera device 5 is completed, the rotating platform 3 drives the rotating part 1 to be detected to rotate at a uniform speed for one circle, and at the same time the camera device 5 starts to expose continuously according to a fixed number of frames. After the rotating part 1 to be detected rotates one circle, the camera device 5 stops exposing. The surface image acquired by the camera device 5 is sent to the processor 7 via a wired (such as USB connection, Ethernet connection) or wireless (such as WIFI connection, Bluetooth connection) connection method, and the processor 7 determines the category of the surface defect of the rotating part to be detected. In this way, through the automated defect detection method, various uncertainties of manual detection are eliminated and the detection quality is improved.
[0054] Please continue to refer to Figure 2 In some embodiments, the defect detection device further includes: a displacement platform 6, which is connected to the camera device 5 and is used to control the camera device 5 to translate forward and backward and / or left and right.
[0055] In this way, by installing the camera device 5 on the displacement platform 6, the camera device 5 can move up and down, left and right, and automatically adjust the shooting position for parts of different lengths and diameters to ensure that the captured picture is in focus and the part is located in the center of the picture. In this way, the defect detection device of the present application can adapt to rotary parts of different size parameters, thereby improving versatility.
[0056] Please continue to refer to Figure 2 In some embodiments, the defect detection device further includes: a line light source 4, which is used to provide lighting to highlight the defect area in the surface image.
[0057] In this way, a stable light source can be provided to make the contrast between the foreground and the background of the captured image obvious. The specific placement position of the line light source 4 can be adjusted according to actual needs to make the defect area in the surface image prominent.
[0058] In some embodiments, the rotating platform rotates at a constant speed at a preset speed, and the camera device continuously exposes according to a fixed frame number to obtain surface images of several rotating parts to be inspected. The exposure frequency of the camera device can be set according to actual needs and is not limited here. Exemplarily, the rotating platform can be driven to rotate by a stepper motor, and the frequency of the stepper motor can be consistent with the exposure frequency of the camera device. When the camera device is a line scan camera, the above settings can make it possible to record the images of the surfaces of the rotating parts to be inspected, which is convenient for subsequent image synthesis processing.
[0059] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments. In addition, the above embodiments can be freely combined as needed.
Claims
1. A defect detection method, characterized in that: Used to detect surface defects of rotating parts, including: Acquire a target image, wherein the target image is an image of the rotating part; Segmenting the target image to obtain a binary image of the target image; Optimizing the binary image based on a digital morphology method to highlight defect areas in the binary image or to complete each defect target area in the binary image; Defect features are extracted based on the optimized binary image, and a number of the defect features are input into a neural network to determine the category of the surface defect.
2. The defect detection method according to claim 1, characterized in that: The acquiring of the target image comprises: Using a camera to photograph the surface of the rotating part to obtain a surface image; A plurality of the surface images are synthesized to obtain the target image.
3. The defect detection method according to claim 1, characterized in that: After acquiring the target image, the method further includes: The target image is denoised using a partial differential equation, and a divergence of the target image is determined based on a gradient of the target image to remove iso-illuminance lines in the target image.
4. The defect detection method according to claim 1, characterized in that: The step of segmenting the target image to obtain a binary image of the target image includes: Binarization of the target image is performed using a maximum inter-class variance method; The optimal threshold is recorded when the between-class variance reaches the maximum; A binary image of the target image is obtained based on the optimal threshold.
5. The defect detection method according to claim 1, characterized in that: The digital morphology-based method optimizes the binary image to highlight the defective area in the binary image or complete each defective target area in the binary image, including: Merging the defect target areas distributed in a mist form into one defect target area; When there is a hole inside the defect target area or it is not completely connected, the defect target area is filled completely.
6. The defect detection method according to claim 1, characterized in that: The method of extracting defect features based on the optimized binary image and inputting a number of the defect features into a neural network to determine the category of the surface defect includes: Determine the geometric features of each defect in the optimized binary image in units of pixels, wherein the geometric features include defect area, defect perimeter, defect rectangularity and area duty cycle; The geometric features are converted into corresponding feature vectors, and the feature vectors are input into a back propagation neural network to determine the categories of the surface defects, which include cracks, scratches, pits and corrosion.
7. A defect detection device, characterized in that: Used to execute the defect detection method according to any one of claims 1 to 6 to determine the type of surface defects of rotating parts to be detected, the defect detection device comprising a rotating platform, a fixing device, a camera device and a processor; The fixing device is installed on the top of the rotating platform and is used to fix the rotating part to be detected so that the axis of the rotating part to be detected coincides with the rotation axis of the rotating platform; The camera device is used to capture the surface image of the rotating part to be inspected when the rotating platform drives the rotating part to be inspected to rotate; The processor is connected to the camera device and is used to receive the surface image and determine the category of the surface defect of the rotating part to be detected according to the surface image.
8. The defect detection device according to claim 7, characterized in that: Also includes: A displacement platform is connected to the camera device and is used to control the camera device to move forward and backward and / or left and right.
9. The defect detection device according to claim 7, characterized in that: Also includes: A line light source is used to provide illumination to highlight defect areas in the surface image.
10. The defect detection device according to any one of claims 7 to 9, characterized in that: The rotating platform rotates uniformly at a preset speed, and the camera device continuously exposes according to a fixed number of frames to obtain surface images of a plurality of rotating parts to be inspected.
Citation Information
Patent Citations
Outer surface defect detection method and device for cylindrical workpiece
CN107238605A
A foamed nickel surface defect extraction and classification method
CN109472783A
Cited By
Crack defect image recognition method for flaw detection of ring forgings
CN119941711A
