Crack detection system and method
By using convolution processing technology in the crack size measurement system to identify and measure the crack characteristics on the surface of the object, the problem of difficulty in detecting fine cracks in the existing technology is solved, and accurate measurement and quality control of cracks during object processing are achieved, improving improve production efficiency and product quality.
Patent Information
- Application Number
- CN202410242757.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-04
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-03-04
AI Technical Summary
Existing crack measurement methods can only detect obvious cracks and are difficult to identify fine cracks. They also require light intensity conditions and cannot accurately measure whether the cracks of an object comply with specifications under all circumstances, affecting production efficiency and product quality.
A crack size measurement system and method is used to transport the measured object to the target position through a transport device, use the first light source to illuminate the surface of the object, the image acquisition device collects the surface image, and obtains the features of cracks and non-cracks through convolution processing Feature image of the feature, calculate the geometric parameters of the crack based on pixel values and coordinate data, and measure the size of the crack.
It achieves precise measurement of fine cracks on the surface of objects, improves production efficiency, reduces the possibility of non-compliant objects entering the market, and enhances product quality control.
Smart Images

Figure CN118225781B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of metrology, and in particular to a crack size measurement system and method. Background Art
[0002] In many industrial production fields, it is usually necessary to measure cracks in the processing of objects (or products) to ensure that the processed objects meet production standards. For example, in the welding, stamping, injection molding and other processing links of automobile metal parts, crack measurement is usually involved, and its specific purpose is to measure whether the cracks of the object meet the specifications.
[0003] In the related art, an image of the surface of the object to be measured is first collected, and then whether there is a crack on the surface of the object to be measured is identified based on whether there is a color difference in the collected image, and the length and width of the crack are measured multiple times using a crack measurement system, and then the length and width of the crack measured multiple times are averaged to obtain the final length and final width of the crack. However, this crack measurement method can only detect obvious cracks on the surface of the object to be measured, and crack detection can only be performed when the light intensity on the surface of the object to be measured is sufficient. Therefore, it is urgent to propose an efficient and accurate crack measurement system to measure whether the fine cracks of the object meet the specifications during the processing of the object, thereby improving the production efficiency of the object and avoiding objects with cracks that do not meet the specifications from entering the market for use. Summary of the invention
[0004] In order to solve the above technical problems, the present disclosure provides a crack size measurement system and method.
[0005] In a first aspect, the present disclosure provides a crack size measurement system, the system comprising:
[0006] A conveying device, used for conveying the object to be measured from an initial position to a target position under the control of the control device;
[0007] A first light source, used to illuminate one side of the object under the control of the control device, wherein the first light source is located at a first position of the image acquisition device;
[0008] The image acquisition device is used to acquire a first surface image of the measured object at the target position under the control of the control device;
[0009] The measuring device includes: a first acquisition module, used to acquire a first surface image of the measured object; a second acquisition module, used to perform convolution processing on pixel points in the first surface image based on a first direction corresponding to the first orientation and a direction opposite to the first direction, to acquire a first feature image including crack features and non-crack features, wherein a feature difference between crack features and non-crack features in the first feature image is greater than a feature difference between crack features and non-crack features in the first surface image; a third acquisition module, used to acquire cracks from the first feature image according to pixel values and coordinate data of pixel points in the first feature image; and a measuring module, used to calculate geometric parameters of the crack based on the coordinate data of the pixel points on the crack, and measure the size of the crack.
[0010] In a second aspect, the present disclosure provides a method for measuring crack size, the method comprising:
[0011] Acquire a first surface image of the object to be measured, wherein the first surface image is a surface image acquired when a first light source in a first orientation illuminates one side of the object to be measured;
[0012] Based on a first direction corresponding to the first orientation and a direction opposite to the first direction, performing convolution processing on pixel points in the first surface image to obtain a first feature image including crack features and non-crack features, wherein a feature difference between the crack features and the non-crack features in the first feature image is greater than a feature difference between the crack features and the non-crack features in the first surface image;
[0013] Acquire cracks from the first feature image according to pixel values and coordinate data of pixel points in the first feature image;
[0014] Based on the coordinate data of the pixel points on the crack, the geometric parameters of the crack are calculated to measure the size of the crack.
[0015] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the device comprising:
[0016] one or more processors;
[0017] a storage device for storing one or more programs,
[0018] When one or more programs are executed by one or more processors, the one or more processors implement the method provided in the second aspect.
[0019] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method provided in the second aspect is implemented.
[0020] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:
[0021] A crack size measurement system and method according to an embodiment of the present disclosure include: a conveying device, used to convey the measured object from an initial position to a target position under the control of a control device; a first light source, used to illuminate one side of the measured object under the control of the control device, wherein the first light source is located at a first position of an image acquisition device; an image acquisition device, used to acquire a first surface image of the measured object at the target position under the control of the control device; a measuring device, including: a first acquisition module, used to acquire a first surface image of the measured object; a second acquisition module, used to perform convolution processing on pixel points in the first surface image based on a first direction corresponding to the first position and a reverse direction of the first direction, to acquire a first feature image including crack features and non-crack features, wherein the feature difference between the crack features and the non-crack features in the first feature image is greater than the feature difference between the crack features and the non-crack features in the first surface image; a third acquisition module, used to acquire cracks from the first feature image according to pixel values and coordinate data of pixel points in the first feature image; and a measuring module, used to calculate geometric parameters of the crack based on the coordinate data of the pixel points on the crack, to measure the size of the crack. Through the above method, for the object to be measured conveyed during the processing, the surface image of the object to be measured is collected when it is irradiated by light sources in different directions, and the distinction between crack features and non-crack features is improved through convolution processing, and then the crack is accurately identified from the first feature image with obvious crack features and non-crack features, and the size of the crack is metered or measured based on the coordinate data of the pixel points on the crack, to help the user understand whether the cracks of the object to be measured during the processing meet the specifications, and further assist the user to optimize the processing procedures based on the crack defects and detailed information of the crack defects, thereby reducing the possibility of objects that do not meet the specifications entering the market for use, and at the same time, improving the production efficiency of the objects. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0024] Figure 1 A structural schematic diagram of a crack size measurement system provided by an embodiment of the present disclosure;
[0025] Figure 2A specific morphology of cracks in a crack region provided in an embodiment of the present disclosure;
[0026] Figure 3 A schematic diagram of the principle of crack imaging on the surface of a measured object provided by an embodiment of the present disclosure;
[0027] Figure 4 A schematic diagram of a crack imaging effect on the surface of a measured object provided by an embodiment of the present disclosure;
[0028] Figure 5 A convolution processing schematic diagram provided for an embodiment of the present disclosure;
[0029] Figure 6 Another convolution processing schematic diagram provided for an embodiment of the present disclosure;
[0030] Figure 7 A schematic diagram of a process flow of a crack size measurement method provided by an embodiment of the present disclosure;
[0031] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure.
[0032] Description of reference numerals: conveying device 110 ; control device 120 ; first light source 130 ; image acquisition device 140 ; measuring device 150 ; processor 801 ; memory 802 ; transceiver 803 ; bus 804 . DETAILED DESCRIPTION
[0033] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0034] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0035] In order to measure whether the cracks of an object during processing meet the specifications, the embodiment of the present disclosure provides a crack size measurement system for implementing the crack size measurement method. Figure 1 Provide explanation.
[0036] Figure 1 A structural schematic diagram of a crack size measurement system provided by an embodiment of the present disclosure is shown.
[0037] like Figure 1As shown, the crack size measurement system may include: a conveying device 110 , a control device 120 , a first light source 130 , an image acquisition device 140 and a measuring device 150 .
[0038] The conveying device 110 is used to convey the object to be measured from the initial position to the target position under the control of the control device 120;
[0039] A first light source 130, used to illuminate one side of the object under the control of the control device 120, wherein the first light source is located at a first position of the image acquisition device;
[0040] The image acquisition device 140 is used to acquire a first surface image of the measured object at a target position under the control of the control device 120;
[0041] The measuring device 150 includes: a first acquisition module, used to acquire a first surface image of the object to be measured; a second acquisition module, used to perform convolution processing on pixel points in the first surface image based on a first direction corresponding to a first orientation and a reverse direction of the first direction, to acquire a first feature image including crack features and non-crack features, wherein the feature difference between the crack features and the non-crack features in the first feature image is greater than the feature difference between the crack features and the non-crack features in the first surface image; a third acquisition module, used to acquire cracks from the first feature image according to pixel values and coordinate data of pixel points in the first feature image; and a measuring module, used to calculate geometric parameters of the crack based on the coordinate data of the pixel points on the crack, and measure the size of the crack.
[0042] In this embodiment, during the object processing, in order to prevent non-compliant and cracked objects from entering the market for use, and at the same time, to improve the production efficiency of the objects, a crack size measurement system is used to measure whether there are cracks on the surface of the object and to measure the size of the cracks, thereby helping users to determine whether the processed object meets the specifications based on the size of the cracks.
[0043] Specifically, under the control of the control device, the conveying device is used to convey the object from the initial position to the target position for crack size measurement, and the first light source in the first orientation is controlled to illuminate one side of the object to be measured. At this time, the control device continues to control the image acquisition device to acquire the surface image of the object to be measured at the target position, and uses the surface image as the first surface image. Next, the control device obtains the first surface image acquired by the image acquisition device, and transmits the first surface image to the measuring device. The measuring device then identifies the crack from the image by feature extraction, and measures or quantifies the size of the crack based on the coordinate data of the pixel points on the crack, thereby helping the user to understand whether the crack of the object to be measured during the processing meets the specifications.
[0044] The conveying device 110 refers to a device having an object conveying function. Optionally, the conveying device 110 includes but is not limited to a conveyor belt, a conveying robot and other devices.
[0045] The control device 120 may be understood as a device for controlling the crack size measurement process, and the control device 120 communicates with the conveying device 110 , the first light source 130 , the image acquisition device 140 , and the measuring device 150 .
[0046] The object to be measured can be understood as a product that needs to be crack measured. Optionally, the object to be measured includes but is not limited to metal parts, glass parts and other products.
[0047] The initial position can be understood as the position of the processing equipment of the object to be measured. The target position can be understood as the position of the crack measurement. Specifically, the target position can be located directly below the optical center of the image acquisition device 140.
[0048] The first light source 130 is a light source that is in a first position and illuminates the object to be measured. The first position can be understood as the position of the first light source 130 relative to the image acquisition device 140.
[0049] The image acquisition device 140 includes but is not limited to cameras, webcams and other devices with image acquisition functions.
[0050] The first surface image is an image of the surface of the object captured by the image acquisition device 140. If the surface of the object to be measured contains cracks, the first surface image contains crack regions and non-crack regions, wherein the specific morphology of the cracks in the crack region is as follows: Figure 2 shown.
[0051] To facilitate understanding of the image acquisition process, Figure 3 The schematic diagram of the crack imaging principle of the measured object surface is shown. Before collecting the first surface image of the measured object, a camera C is vertically set near the crack on the surface of the measured object as an image acquisition device, and two groups of light sources are vertically set at a distance from the optical center L on a plane passing through the optical center of the camera and parallel to the optical axis of the camera. The first group of light sources includes S l and S r The second light source group includes S u and S d ( Figure 3 (not shown), the light beam of each light source is a cone with the optical axis as the central axis, the cone angles of the light beams of each light source are equal, and the angle between the optical axis of each light source and the optical axis of the camera is 60°.
[0052] Before collecting images, the camera is adjusted so that the optical axis of the camera is consistent with the normal direction of the surface of the object being measured. Since the angle between the optical axis of each light source and the optical axis of the camera is 60°, the distance between the optical center of the camera and the surface of the object being measured is L / 2. Figure 3 When performing image acquisition according to the principle shown in the figure, the control device controls the light source S l , light source S r , light source S u and light source S d The light sources S1 and S2 are lit one by one, and the surface image collected when the light source S1 is lit is recorded as I1. l The surface image collected when lit is recorded as I l , the light source S r The surface image collected when lit is recorded as I r , the light source S u The surface image collected when lit is recorded as I u , the light source S d The surface image collected when lit is recorded as I d .
[0053] It should be noted that the first light source 130 in this embodiment can be a light source S l , light source S r , light source S u and light source S d Any one of, accordingly, the first surface image is surface image I l ,I r ,I u ,I d The first position can be the light source S l , light source S r , light source S u and light source S d The direction corresponding to any light source in .
[0054] It should be noted that the image acquisition device used in this embodiment can be a high-resolution industrial camera. The pixel equivalent of the camera when it is clearly imaging is generally fixed. Therefore, the pixel equivalent of the high-resolution industrial camera is calibrated in advance according to the image acquisition requirements. When acquiring surface images under different light source viewing angles, the pixel equivalent is multiplied by the number of pixels of the surface image to obtain the size of the surface image.
[0055] Further, after acquiring the first surface image, the measuring device 150 identifies cracks from the image by means of convolution processing. Since the feature difference between the crack feature and the non-crack feature in the first feature image is greater than the feature difference between the crack feature and the non-crack feature in the first surface image, a first feature image in which the crack feature and the non-crack feature are clearly distinguished can be obtained, and then the crack is accurately identified from the first feature image in which the crack feature and the non-crack feature are obvious, and the size of the crack is metered or measured according to the coordinate data of the pixel points on the crack. Specifically, different surface images of the measured object each have a corresponding orientation, and different orientations each correspond to the direction of feature processing of the surface image. Therefore, by performing convolution processing on the first surface image based on the first direction corresponding to the first orientation and the opposite direction of the first direction, the crack feature and the non-crack feature in the image can be highlighted, and the image containing the crack feature and the non-crack feature with obvious feature difference is used as the first feature image.
[0056] The first direction corresponding to the first orientation is specifically the direction of performing feature processing on the first surface image. Optionally, the first direction can be any one of from top to bottom, from bottom to top, from left to right, and from right to left, which is specifically determined by the first light source viewing angle.
[0057] In the second acquisition module, the pixel points in the first surface image are subjected to feature processing in a manner including but not limited to convolution processing, filtering analysis, etc., so as to obtain a first feature image including crack features and non-crack features. Optionally, the crack features include but are not limited to color features, texture features, shape features, and spatial relationship features of the crack region, and correspondingly, the non-crack features include but are not limited to color features, texture features, shape features, and spatial relationship features of the non-crack region.
[0058] In the third acquisition module, since the first feature image contains crack features and non-crack features, the first feature image is morphologically processed based on the pixel values of the pixels in the first feature image to locate the crack area from the first feature image, and then a curve or a straight line is simulated based on the coordinate data of the pixel points in the crack area, and the simulated curve or straight line is used as the crack in the first feature image.
[0059] Optionally, the morphological processing methods in this embodiment include but are not limited to expansion processing, corrosion processing, skeletonization processing, opening operation processing, closing operation processing, etc.
[0060] In the measurement module, first, based on the coordinate data of all pixels or part of the pixels on the crack, the geometric parameters of the crack are calculated, and the geometric parameters include but are not limited to the length, width, curvature and other data of the crack, and the length, width, curvature and other data of the crack are used as the size of the crack.
[0061] A crack size measurement system according to an embodiment of the present disclosure includes: a conveying device, which is used to convey the object to be measured from an initial position to a target position under the control of a control device; a first light source, which is used to illuminate one side of the object to be measured under the control of the control device, wherein the first light source is located at a first position of the image acquisition device; the image acquisition device, which is used to acquire a first surface image of the object to be measured at the target position under the control of the control device; a measuring device, which includes: a first acquisition module, which is used to acquire the first surface image of the object to be measured; a second acquisition module, which is used to perform convolution processing on pixel points in the first surface image based on a first direction corresponding to the first position and a reverse direction of the first direction, to acquire a first feature image including crack features and non-crack features, wherein the feature difference between the crack features and the non-crack features in the first feature image is greater than the feature difference between the crack features and the non-crack features in the first surface image; a third acquisition module, which is used to acquire cracks from the first feature image according to pixel values and coordinate data of pixel points in the first feature image; and a measuring module, which is used to calculate geometric parameters of the crack based on the coordinate data of the pixel points on the crack, and measure the size of the crack. Through the above method, for the object to be measured conveyed during the processing, the surface image of the object to be measured is collected when it is irradiated by light sources in different directions, and the distinction between crack features and non-crack features is improved through convolution processing, and then the crack is accurately identified from the first feature image with obvious crack features and non-crack features, and the size of the crack is metered or measured based on the coordinate data of the pixel points on the crack, to help the user understand whether the cracks of the object to be measured during the processing meet the specifications, and further assist the user to optimize the processing procedures based on the crack defects and detailed information of the crack defects, thereby reducing the possibility of objects that do not meet the specifications entering the market for use, and at the same time, improving the production efficiency of the objects.
[0062] Furthermore, after determining the size of the crack, the measuring device 150 can also remove fine cracks based on the size of the crack and retain obvious cracks. Accordingly, the measuring device 150 can also be used to determine whether the size of the crack meets the preset screening conditions; remove cracks that do not meet the preset screening conditions, and retain cracks that meet the preset screening conditions.
[0063] The preset selection condition is a screening bar for determining whether the crack is a fine crack or a clear crack. For example, if the geometric parameter is length, when the length of the crack is greater than the preset length, the crack is retained; if the geometric parameter is width, when the width of the crack is greater than the preset width, the crack is removed; if the geometric parameter is curvature, when the curvature of the crack is less than the preset curvature, the crack is removed.
[0064] Therefore, based on the preset screening conditions, fine cracks are eliminated and obvious cracks are retained, thereby improving the accuracy of crack identification.
[0065] It should be noted that Figure 1The measuring device 150 in the crack size measurement system shown can implement various steps in the crack size measurement method embodiment, and realize various processes and effects in the crack size measurement method embodiment.
[0066] In another embodiment of the present disclosure, the convolution processing process of the second acquisition module in the measuring device is explained in detail.
[0067] In the embodiment of the present disclosure, optionally, the second acquisition module includes:
[0068] A first acquisition unit, configured to perform a first convolution process on pixel points in the first surface image along a first direction to acquire first convolution features of the pixel points in the first surface image;
[0069] A second acquisition unit, configured to perform a second convolution process on the pixel points in the first surface image along a direction opposite to the first direction, to acquire a second convolution feature of the pixel points in the first surface image;
[0070] A third acquisition unit is used to perform weighted summation on the first convolution feature and the second convolution feature of the same pixel point in the first surface image to obtain a target feature of the pixel point in the first surface image;
[0071] The target features include crack features and non-crack features, and the image including the crack features and non-crack features is the first feature image.
[0072] Understandably, continue to see Figure 3 , light source S r When lit, the left side of the crack is illuminated by the light source S r Illuminate (e.g. Figure 4 The left line in the figure), the right side of the crack is not illuminated by the light source S r Illuminated and darker (e.g. Figure 4 ), the pixel points in the first surface image are convolved by convolution processing, which will make the characteristic value of the convolution feature of the non-crack area with uniform pixel values smaller, and the characteristic value of the convolution feature of the crack area with uneven pixel values larger.
[0073] The first direction may be a positive direction of a convolution operator used in the convolution processing process, and the opposite direction of the first direction may be a negative direction of the convolution operator.
[0074] For details, see Figure 3 , and see Figure 5 and Figure 6 The convolution processing diagram shown in the figure shows that the light source S rWhen lit, the positive direction of the convolution operator can be from left to right, and the negative direction of the convolution operator can be from right to left. The positive convolution operator is used to convolve the pixels in the first surface image. If the crack area with higher pixel values in the first surface image corresponds to the positive area of the convolution operator, and the non-crack area with lower pixel values corresponds to the negative area of the convolution operator, then the overall convolution value is larger; the negative convolution operator is used to convolve the pixels in the first surface image. If the crack area with higher pixel values in the first surface image corresponds to the negative area of the convolution operator, and the non-crack area with lower pixel values corresponds to the positive area of the convolution operator, then the overall convolution value is smaller. At this time, under the convolution processing of the positive and negative groups of convolution operators, the surface of the object under test will form an obvious convolution value jump phenomenon, which is convenient for crack identification. That is, by convolving the first surface image, the difference between crack features and non-crack features is improved, which facilitates accurate identification of cracks from the first feature image with obvious crack features and non-crack features.
[0075] Optionally, the convolution operator used in this embodiment includes but is not limited to the Gabor operator, and may also be other types of convolution operators. The expression of the Gabor operator can be expressed as follows:
[0076]
[0077] Among them, k is the output parameter of the Gabor operator, σ is the variance value of the Gaussian distribution, x is the input parameter of the Gabor operator, and f is the frequency.
[0078] In other cases, the light source S l When the light source S is on, the positive direction of the convolution operator can be from right to left, and the negative direction of the convolution operator can be from left to right. u When the light source S is on, the positive direction of the convolution operator can be from top to bottom, and the negative direction of the convolution operator can be from bottom to top. d When lit, the positive direction of the convolution operator can be the direction from bottom to top, and the negative direction of the convolution operator can be the direction from top to bottom.
[0079] It should be noted that when the light sources in other directions are turned on, the method for determining the target features of the pixel points in the first surface image can be referred to the above description and will not be repeated here.
[0080] In this way, when one side of the crack on the surface of the object to be measured is illuminated by the light source, the pixel points in the first surface image are convolved along the positive and negative directions of the first direction respectively, so that an obvious jump phenomenon of the convolution feature is formed on the surface of the object to be measured, thereby improving the distinction between crack features and non-crack features, and facilitating the accurate identification of cracks from the first feature image with obvious crack features and non-crack features.
[0081] In another embodiment of the present disclosure, the third acquisition module in the measuring device can use morphological processing methods such as expansion processing, corrosion processing, and connected domain extraction processing to acquire cracks from the first feature image.
[0082] In the embodiment of the present disclosure, optionally, the third acquisition module includes:
[0083] A first determining unit, configured to perform binarization processing on the first feature image according to pixel values of pixels in the first feature image to obtain a binarized image;
[0084] A second determining unit is used to perform dilation processing and erosion processing on the binary image based on the grayscale values of the pixels in the binary image to obtain a skeleton image of the binary image;
[0085] A third determining unit is used to perform a connected domain extraction process on the skeleton image according to the grayscale values of the pixels in the skeleton image to obtain an area of interest containing cracks;
[0086] The fourth determining unit is used to perform fitting processing on the pixel points according to the coordinate data of the pixel points in the region of interest containing the crack to obtain the crack.
[0087] The binary image refers to the grayscale image corresponding to the first feature image.
[0088] The skeleton image can be understood as an image region including crack pixels and a small number of non-crack pixels.
[0089] Specifically, first, a threshold is set in advance, and the first feature image is binarized according to the pixel values of the pixels in the first feature image, the binarization values of the pixels whose pixel values are greater than the threshold are set to 1, and the binarization values of the pixels whose pixel values are less than or equal to the threshold are set to 0, thereby obtaining a binary image; then, according to the grayscale values of the pixels in the binary image, the binary image is morphologically expanded so that each pixel is expanded by 4 pixels to obtain a dilated image; then, the dilated image is morphologically eroded so that a skeleton image is obtained from the dilated image; further, based on the grayscale values of the pixels in the skeleton image, a connected domain extraction process is performed on the skeleton image using but not limited to a region growing method to obtain a region of interest containing cracks.
[0090] The crack region of interest refers to the image region containing crack pixels.
[0091] Optionally, the size of the region of interest containing the crack may be determined by multiplying a pixel equivalent pre-calibrated for the camera by the number of pixels of interest.
[0092] The second determination unit is specifically used to: perform fitting processing on the pixel points according to the coordinate data of the pixel points in the region of interest containing the crack, using the least squares method or other curve fitting methods or straight line fitting methods to obtain the cracks.
[0093] In this way, for the first feature image with the jump phenomenon of convolution features, the expansion processing, corrosion processing, connected domain extraction processing and other morphological processing methods are used to accurately and quickly obtain cracks from the first feature image, thereby improving the efficiency and accuracy of crack recognition.
[0094] In another embodiment of the present disclosure, a measuring module in a measuring device can calculate geometric parameters of the crack based on coordinate data of the head and tail end points of the crack to obtain the size of the crack.
[0095] In the embodiment of the present disclosure, optionally, the measurement module includes:
[0096] A first identification unit, used for identifying a first endpoint and a second endpoint from the crack based on coordinate data of a pixel point on the crack;
[0097] The calculation unit is used to calculate the geometric parameters of the crack according to the coordinate data of the first endpoint and the coordinate data of the second endpoint to obtain the size of the crack.
[0098] The first endpoint and the second endpoint may be the first and last pixels of the crack, or the first and last projection points on the crack.
[0099] Specifically, first, based on the coordinate data of the pixel points on the crack, the first and last pixel points are selected from the crack as the first endpoint and the second endpoint, or the first and last projection points are selected from the projection points on the crack as the first endpoint and the second endpoint, and then, according to the coordinate data of the first endpoint and the coordinate data of the second endpoint, the length or width of the crack is calculated as the size of the crack.
[0100] In this way, after the crack is identified from the first characteristic image, the first endpoint and the second endpoint are identified according to the coordinate data of the crack, and the geometric parameters of the crack are calculated based on the coordinate data of the two endpoints, thereby measuring the size of the crack on the surface of the object being measured.
[0101] In another embodiment of the present disclosure, in order to improve the accuracy of crack size measurement, at least one surface image of the object under test under other light source viewing angles may be obtained, and the crack size may be measured by combining multiple surface images with small light source viewing angles.
[0102] In the embodiment of the present disclosure, optionally, the measuring device may further include:
[0103] A fourth acquisition module, used to acquire at least one surface image of the object under test when illuminated by light sources in other orientations;
[0104] a fifth acquisition module, configured to perform convolution processing on pixel points in at least one surface image based on directions corresponding to other orientations, to acquire a feature image of at least one surface image including crack features and non-crack features;
[0105] A fusion module, used for adding feature values of the same pixel point in the first feature image and the feature image of at least one surface image to obtain a feature fusion image;
[0106] Accordingly, the third acquisition module is specifically used for:
[0107] According to the pixel values and coordinate data of the pixel points in the feature fusion image, the cracks are obtained from the feature fusion image.
[0108] The light source in other directions may be understood as any light source different from the first light source in the first direction.
[0109] For example, see Figure 3 , if the first light source is light source S l , other light sources include light source S r , light source S u and light source S d , then the characteristic image of at least one surface image includes the light source S r The surface image collected when illuminated, under the light source S u The surface images collected when illuminated and the d The surface image is collected when the light source S l The first surface image collected when illuminated is denoted as f l , the light source S r The surface image collected when illuminated is denoted as f r , the light source S u The surface image collected when illuminated is denoted as f u , the light source S d The surface image collected when illuminated is denoted as f d , further, f l 、f r 、f u 、f d The feature values of the same pixel in are added to obtain the feature fusion map.
[0110] Furthermore, according to the pixel values and coordinate data of the pixel points in the feature fusion image, the crack is obtained from the feature fusion image, and then based on the coordinate data of the pixel points on the crack, the geometric parameters of the crack are calculated to measure the size of the crack.
[0111] It should be noted that the specific method of obtaining the crack according to the feature fusion image and measuring the size of the crack based on the coordinate data of the pixel points on the crack can be found in the above embodiment and will not be described in detail here.
[0112] In order to improve the efficiency and accuracy of crack size measurement, the following Figure 6 The crack size measurement method provided in the embodiment of the present disclosure is described. In the embodiment of the present disclosure, the crack size measurement method can be performed by an electronic device or a server. The electronic device may include a tablet computer, a desktop computer, a laptop computer, and other devices with communication functions, and may also include a virtual machine or a device simulated by a simulator. The server may be a cloud server or a server cluster and other devices with storage and computing functions. The electronic device or server may specifically be a controller of the robot where the end tool is located.
[0113] Figure 7 A schematic flow chart of a crack size measurement method provided in an embodiment of the present disclosure is shown.
[0114] like Figure 7 As shown, the crack size measurement method may include the following steps.
[0115] S710: Acquire a first surface image of the object to be measured, wherein the first surface image is a surface image collected when a first light source in a first orientation illuminates one side of the object to be measured.
[0116] S720. Based on the first direction corresponding to the first orientation and the opposite direction of the first direction, perform convolution processing on the pixel points in the first surface image to obtain a first feature image including crack features and non-crack features, wherein the feature difference between the crack features and the non-crack features in the first feature image is greater than the feature difference between the crack features and the non-crack features in the first surface image.
[0117] S730: Acquire cracks from the first feature image according to pixel values and coordinate data of pixel points in the first feature image.
[0118] S740: Calculate geometric parameters of the crack based on the coordinate data of the pixel points on the crack, and measure the size of the crack.
[0119] A crack size measurement method according to an embodiment of the present disclosure obtains a first surface image of a measured object, wherein the first surface image is a surface image collected when a first light source in a first orientation illuminates one side of the measured object; based on a first direction corresponding to the first orientation and a direction opposite to the first direction, convolution processing is performed on pixel points in the first surface image to obtain a first feature image including crack features and non-crack features, wherein a feature difference between the crack features and the non-crack features in the first feature image is greater than a feature difference between the crack features and the non-crack features in the first surface image; cracks are obtained from the first feature image according to pixel values and coordinate data of pixel points in the first feature image; geometric parameters of the crack are calculated based on the coordinate data of the pixel points on the crack to measure the size of the crack. Through the above method, for the object to be measured conveyed during the processing, the surface image of the object to be measured is collected when it is irradiated by light sources in different directions, and the distinction between crack features and non-crack features is improved through convolution processing, and then the crack is accurately identified from the first feature image with obvious crack features and non-crack features, and the size of the crack is metered or measured based on the coordinate data of the pixel points on the crack, to help the user understand whether the cracks of the object to be measured during the processing meet the specifications, and further assist the user to optimize the processing procedures based on the crack defects and detailed information of the crack defects, thereby reducing the possibility of objects that do not meet the specifications entering the market for use, and at the same time, improving the production efficiency of the objects.
[0120] In some embodiments of the present disclosure, specific implementations of S720 include but are not limited to the following:
[0121] S7201, performing a first convolution process on pixel points in the first surface image along a first direction to obtain first convolution features of the pixel points in the first surface image;
[0122] S7202, performing a second convolution process on the pixel points in the first surface image along a direction opposite to the first direction to obtain a second convolution feature of the pixel points in the first surface image;
[0123] S7203, performing weighted summation on the first convolution feature and the second convolution feature of the same pixel in the first surface image to obtain a target feature of the pixel in the first surface image;
[0124] The target features include crack features and non-crack features, and the image including the crack features and non-crack features is the first feature image.
[0125] In some embodiments of the present disclosure, specific implementations of S730 include but are not limited to the following:
[0126] S7301, binarizing the first feature image according to the pixel values of the pixels in the first feature image to obtain a binary image;
[0127] S7302, based on the grayscale values of the pixels in the binary image, dilate and erode the binary image to obtain a skeleton image of the binary image;
[0128] S7303, performing connected domain extraction processing on the skeleton image according to the grayscale values of the pixels in the skeleton image, and obtaining an area of interest containing cracks;
[0129] S7304. Perform fitting processing on the pixel points according to the coordinate data of the pixel points in the region of interest containing the crack to obtain the crack.
[0130] In some embodiments of the present disclosure, specific implementations of S740 include but are not limited to the following:
[0131] Based on the coordinate data of the pixel points on the crack, identifying a first endpoint and a second endpoint from the crack;
[0132] According to the coordinate data of the first endpoint and the coordinate data of the second endpoint, the geometric parameters of the crack are calculated to obtain the size of the crack.
[0133] In some embodiments of the present disclosure, the method further includes:
[0134] Acquire at least one surface image of the object under test when illuminated by light sources in other orientations;
[0135] Based on directions corresponding to other orientations, convolution processing is performed on pixel points in at least one surface image to obtain a feature image of at least one surface image including crack features and non-crack features;
[0136] Adding feature values of the same pixel in the first feature image and the feature image of at least one surface image to obtain a feature fusion image;
[0137] Correspondingly, the step of acquiring cracks from the first feature image according to the pixel values and coordinate data of the pixel points in the first feature image includes:
[0138] The crack is obtained from the feature fusion image according to the pixel value and coordinate data of the pixel point in the feature fusion image.
[0139] Figure 8 A schematic structural diagram of an electronic device provided by an embodiment of the present disclosure is shown.
[0140] like Figure 8 As shown, the electronic device may include a processor 801 and a memory 802 storing computer program instructions.
[0141] Specifically, the processor 801 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0142] The memory 802 may include a large capacity memory for information or instructions. By way of example and not limitation, the memory 802 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 802 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 802 may be inside or outside the integrated gateway device. In a particular embodiment, the memory 802 is a non-volatile solid-state memory. In a particular embodiment, the memory 802 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (Electrically Erasable Programmable ROM, EEPROM), an electrically rewritable ROM (EAROM) or a flash memory, or a combination of two or more of these.
[0143] The processor 801 reads and executes the computer program instructions stored in the memory 802 to perform the steps of the crack size measurement method provided in the embodiment of the present disclosure.
[0144] In one example, the electronic device may further include a transceiver 803 and a bus 804. Figure 8 As shown, the processor 801, the memory 802 and the transceiver 803 are connected via a bus 804 and communicate with each other.
[0145] The bus 804 includes hardware, software, or both. For example, but not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a Memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, the bus 804 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.
[0146] The following is an embodiment of a computer-readable storage medium provided in an embodiment of the present disclosure. The computer-readable storage medium and the crack size measurement method of the above-mentioned embodiments belong to the same inventive concept. For details not described in detail in the embodiment of the computer-readable storage medium, reference can be made to the embodiment of the above-mentioned crack size measurement method.
[0147] This embodiment provides a storage medium containing computer executable instructions. When the computer executable instructions are executed by a computer processor, they are used to perform a crack size measurement method. The method includes:
[0148] Acquire a first surface image of the object to be measured, wherein the first surface image is a surface image acquired when a first light source in a first orientation illuminates one side of the object to be measured;
[0149] Based on a first direction corresponding to the first orientation and a direction opposite to the first direction, performing convolution processing on pixel points in the first surface image to obtain a first feature image including crack features and non-crack features, wherein a feature difference between the crack features and the non-crack features in the first feature image is greater than a feature difference between the crack features and the non-crack features in the first surface image;
[0150] Acquire cracks from the first feature image according to pixel values and coordinate data of pixel points in the first feature image;
[0151] Based on the coordinate data of the pixel points on the crack, the geometric parameters of the crack are calculated to measure the size of the crack.
[0152] Of course, the computer executable instructions of a storage medium containing computer executable instructions provided in an embodiment of the present disclosure are not limited to the above method operations, and can also execute related operations in the crack size measurement method provided in any embodiment of the present disclosure.
[0153] Through the above description of the implementation methods, the technical personnel in the relevant field can clearly understand that the present disclosure can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present disclosure can be essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer cloud platform (which can be a personal computer, a server, or a network cloud platform, etc.) to perform the crack size measurement method provided by each embodiment of the present disclosure.
[0154] Note that the above are only preferred embodiments of the present disclosure and the technical principles used. Those skilled in the art will understand that the present disclosure is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present disclosure. Therefore, although the present disclosure is described in more detail through the above embodiments, the present disclosure is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present disclosure, and the scope of the present disclosure is determined by the scope of the appended claims.
Claims
1. A crack size measurement system, characterized in that: include: A conveying device, used for conveying the object to be measured from an initial position to a target position under the control of the control device; A first light source, used to illuminate one side of the object under the control of the control device, wherein the first light source is located at a first position of the image acquisition device; The image acquisition device is used to acquire a first surface image of the measured object at the target position under the control of the control device; The measuring device includes: a first acquisition module, which is used to acquire a first surface image of the measured object; a second acquisition module, which is used to perform a first convolution process on pixel points in the first surface image along a first direction to acquire a first convolution feature of the pixel points in the first surface image, perform a second convolution process on the pixel points in the first surface image in a direction opposite to the first direction to acquire a second convolution feature of the pixel points in the first surface image, perform weighted summation on the first convolution feature and the second convolution feature of the same pixel point in the first surface image, and obtain a target feature of the pixel point in the first surface image, wherein the feature difference between a crack feature and a non-crack feature in the first feature image is greater than the feature difference between the crack feature and the non-crack feature in the first surface image, the target feature includes the crack feature and the non-crack feature, and the image including the crack feature and the non-crack feature with obvious feature difference is the first feature image; a third acquisition module, which is used to acquire a crack from the first feature image according to the pixel value and coordinate data of the pixel points in the first feature image; and a measuring module, which is used to calculate geometric parameters of the crack based on the coordinate data of the pixel points on the crack, and measure the size of the crack.
2. The system according to claim 1, characterized in that The third acquisition module includes: A first determining unit, configured to perform binarization processing on the first feature image according to pixel values of pixels in the first feature image to obtain a binarized image; A second determining unit is used to perform dilation processing and erosion processing on the binary image based on the grayscale values of the pixels in the binary image to obtain a skeleton image of the binary image; A third determining unit is used to perform a connected domain extraction process on the skeleton image according to the grayscale values of the pixels in the skeleton image to obtain the region of interest containing the crack; The fourth determining unit is used to perform fitting processing on the pixel points according to the coordinate data of the pixel points in the region of interest containing the crack to obtain the crack.
3. The system according to claim 1, characterized in that The measuring module comprises: A first identification unit, configured to identify a first endpoint and a second endpoint from the crack based on coordinate data of a pixel point on the crack; A calculation unit is used to calculate the geometric parameters of the crack according to the coordinate data of the first endpoint and the coordinate data of the second endpoint to obtain the size of the crack.
4. The system according to claim 1, characterized in that The measuring device also includes: A fourth acquisition module, used to acquire at least one surface image of the object under test when illuminated by light sources in other orientations; a fifth acquisition module, configured to perform convolution processing on the pixel points in the at least one surface image based on directions corresponding to other orientations, to acquire a feature image of the at least one surface image including crack features and non-crack features; A fusion module, used for adding feature values of the same pixel point in the first feature image and the feature image of the at least one surface image to obtain a feature fusion image; Accordingly, the third acquisition module is specifically used for: The crack is obtained from the feature fusion image according to the pixel values and coordinate data of the pixel points in the feature fusion image.
5. A method for measuring crack size, characterized in that: A measuring system applied to the crack size measuring system according to any one of claims 1 to 4, the method comprising: Acquire a first surface image of the object to be measured, wherein the first surface image is a surface image acquired when a first light source in a first orientation illuminates one side of the object to be measured; Performing a first convolution process on the pixel points in the first surface image along a first direction to obtain first convolution features of the pixel points in the first surface image; Performing a second convolution process on the pixel points in the first surface image along a direction opposite to the first direction to obtain second convolution features of the pixel points in the first surface image; Performing weighted summation on the first convolution feature and the second convolution feature of the same pixel point in the first surface image to obtain a target feature of the pixel point in the first surface image, wherein a feature difference between a crack feature and a non-crack feature in the first feature image is greater than a feature difference between the crack feature and the non-crack feature in the first surface image, the target feature includes the crack feature and the non-crack feature, and an image including the crack feature and the non-crack feature with obvious feature difference is the first feature image; Acquire cracks from the first feature image according to pixel values and coordinate data of pixel points in the first feature image; Based on the coordinate data of the pixel points on the crack, the geometric parameters of the crack are calculated to measure the size of the crack.
6. The method according to claim 5, characterized in that The step of acquiring cracks from the first feature image according to pixel values and coordinate data of pixel points in the first feature image comprises: Binarizing the first feature image according to the pixel values of the pixels in the first feature image to obtain a binary image; Based on the grayscale values of the pixels in the binary image, the binary image is expanded and eroded to obtain a skeleton image of the binary image; According to the grayscale values of the pixels in the skeleton image, the skeleton image is subjected to a connected domain extraction process to obtain the region of interest containing the crack; According to the coordinate data of the pixel points in the region of interest containing the crack, the pixel points are fitted to obtain the crack.
7. The method according to claim 5, characterized in that The step of calculating geometric parameters of the crack based on the coordinate data of the pixel points on the crack and measuring the size of the crack comprises: Based on the coordinate data of the pixel points on the crack, identifying a first endpoint and a second endpoint from the crack; According to the coordinate data of the first endpoint and the coordinate data of the second endpoint, geometric parameters of the crack are calculated to obtain the size of the crack.
8. The method according to claim 5, characterized in that Also includes: Acquire at least one surface image of the object under test when illuminated by light sources in other orientations; Based on directions corresponding to other orientations, convolution processing is performed on pixel points in the at least one surface image to obtain a feature image of the at least one surface image including crack features and non-crack features; Adding feature values of the same pixel in the first feature image and the feature image of the at least one surface image to obtain a feature fusion image; Correspondingly, acquiring cracks from the first feature image according to pixel values and coordinate data of pixel points in the first feature image includes: The crack is obtained from the feature fusion image according to the pixel values and coordinate data of the pixel points in the feature fusion image.
