Vision-based intelligent detection method and device for punching and cutting defects
Through a vision-based intelligent detection method, the holes of automotive interior decorative fabric pieces are identified and stretched to correct them, solving the problems of low detection accuracy and low efficiency in the existing technology and achieving efficient and accurate hole quality detection.
Patent Information
- Application Number
- CN202510783039.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-12
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-06-12
AI Technical Summary
When inspecting the quality of holes on decorative fabric panels used in automotive interior manufacturing, existing technologies are susceptible to hole position shift or shape deformation due to the softness of the panels, resulting in reduced inspection accuracy. Furthermore, manual and meticulous flattening of the panels is required, impacting inspection efficiency.
Using a vision-based intelligent detection method, the cutting piece is illuminated from the bottom up to obtain a grayscale image of the overhead image, the texture pattern is removed and the image is converted to black and white, the outer contour of the cutting piece is identified, the wrinkle situation is judged by comparing it with the designed outer contour, and stretching correction is performed. The hole area is identified and the roughness and overlap are calculated to determine whether the burrs and size of the holes are qualified.
It achieves precise detection of cut piece holes, eliminates hole deformation and misalignment problems caused by wrinkles, improves detection accuracy, and eliminates the need for manual and precise flattening of cut pieces, thereby improving detection efficiency.
Smart Images

Figure CN120672716A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of visual inspection technology, and in particular to a vision-based intelligent detection method and device for punching sheet defects. Background Art
[0002] In the automotive interior manufacturing industry, decorative fabric panels require punching holes for mounting. The quality of these holes directly impacts the aesthetics and durability of the product. Existing inspection methods primarily rely on manual measurement or simple visual inspection methods using threshold segmentation. However, these methods have significant shortcomings in practice: Due to the inherent softness of the panels, wrinkles inevitably form during movement. These wrinkles can cause the holes on the panels to shift position or deform in shape, affecting the accuracy of traditional inspection methods. This necessitates meticulously leveling each section of the panel during inspection, severely impacting inspection efficiency. Summary of the Invention
[0003] The present invention provides a vision-based intelligent detection method and device for punching sheet defects, which can effectively solve the problems in the background technology.
[0004] The present invention provides a vision-based intelligent detection method for punching sheet defects, comprising the following steps: Light the cut piece from bottom to top, obtain a grayscale image of the top view of the cut piece, remove the texture pattern in the top view image, and then convert it to black and white to obtain the image to be tested; Identify the inflection points of the outer contour of the piece in the image to be tested and obtain the detected outer contour of the piece; The detected outer contour is compared with the designed outer contour of the cut piece, and the wrinkle situation is judged. If it exceeds the allowable range, an alarm is issued; if it is within the allowable range, the stretching area and stretching parameters of the detected outer contour are obtained according to the wrinkle situation, and then the detected outer contour and its inner area are stretched to obtain a stretched image so that the detected outer contour and the designed outer contour range coincide; Identify the area of each hole in the stretched image as a detection hole area, calculate the roughness of the edge of each detection hole area, and determine the hole with a roughness exceeding a set range as a burr; The design hole area of each hole is determined according to the design outer contour, and the overlap between the corresponding design hole area and the detection hole area is calculated. Holes with overlap exceeding the set range are judged as unqualified in size.
[0005] Furthermore, the specific steps of removing the texture pattern in the overhead image are as follows: Performing Fourier transform on the overhead image to convert the overhead image from the spatial domain to the frequency domain; Eliminate noise in the frequency domain of overhead images; Perform inverse Fourier transform on the overhead image in the frequency domain to convert the overhead image from the frequency domain back to the spatial domain; Eliminate the noise of the overhead image in the spatial domain to obtain the final image.
[0006] Furthermore, the specific steps of converting the overhead image into black and white to obtain the image to be measured are: Divide the image to be tested into N regions of equal size and calculate the segmentation value Tn=μn-1.5σn of the nth region; Wherein, μn is the average grayscale value of all pixels in the nth region; σn is the standard deviation of the grayscale value of all pixels in the nth region; The colors of the pixels in the nth region whose grayscale values are greater than or equal to Tn are all set to black, and the colors of the pixels in the nth region whose grayscale values are less than Tn are all set to white.
[0007] Furthermore, the specific steps of identifying the inflection point of the outer contour of the cutting piece in the image to be tested and obtaining the detected outer contour of the cutting piece are as follows: Calculate the distance between each inflection point and other inflection points on the design contour to form multiple comparison groups; Start from the leftmost column of the image to be tested and search column by column until the first black pixel is found and recorded as the origin O; Traverse all black pixels in the remaining test images and count the colors of the eight pixels around each pixel. If the number of white pixels is greater than the number of black pixels, then record the pixel as a pending point. Calculate the distance between each undetermined point and the origin, compare it with multiple comparison groups, and find the closest comparison group to determine the correspondence between the origin and the undetermined point and each inflection point of the design outer contour; The origin and the to-be-determined point in the image to be tested are connected in the order of connecting the inflection points in the designed outer contour, thereby obtaining the detected outer contour of the piece.
[0008] Furthermore, the specific steps for obtaining the wrinkle status of the cut pieces are as follows: Calculate the center point of the minimum bounding box of the detection outer contour and the design outer contour, and make the centers of the two coincide by translation, and make them have the same orientation by rotation; Calculate the degree of overlap between the detected outer contour and the designed outer contour.
[0009] Furthermore, the stretching area and stretching parameters of the image to be tested are obtained according to the wrinkle condition, and then the image to be tested is stretched to obtain a stretched image. The specific steps are as follows: Identify and detect non-straight line segments on the outer contour and fit the arc segments of each non-straight line segment; For each arc segment, the straight line passing through the center and center point of the arc segment is used as the center line, and the angle between the center line and the design outer contour segment corresponding to the arc segment is recorded as the offset angle. The fold length is calculated based on the offset angle and the chord height of the arc segment. The point obtained by moving the fold length inward from the center point of the arc segment along the center line is recorded as the fold vertex. The fold vertex and the two end points of the arc segment are connected to form a triangular area. The part of the outer contour within the triangular area is a stretching area. All pixels in the stretching area are moved according to their distance from the corresponding center line and arc segment to achieve the stretching effect of the stretching area, and the interpolation method is used to fill the vacant pixels in the stretching area.
[0010] Furthermore, the steps for determining whether a hole has burrs are as follows: For each detection hole area, the minimum bounding box center point of the detection hole area is calculated, and the distance between all edge points and the center point of the hole area is calculated. The standard deviation of all distance values is calculated and recorded as roughness.
[0011] Furthermore, the step of determining whether the hole has burrs or not further includes: The edge point sequence is converted into a polar coordinate system, the center point of the minimum bounding box is located at the origin of the polar coordinate system, and a radius-angle curve is generated; Detect the number of local extreme points of the curve and record the angles of the local extreme points; The number of local extreme points and their corresponding angles recorded in multiple tests are compared to determine the burr inheritance status.
[0012] Furthermore, before the detection, a brightness calibration step is also included, which includes: Take a blank background image without cutting pieces to check the uniformity of light distribution; If the difference between the brightness of the center area and the edge exceeds the set threshold, the light source angle is adjusted or the brightness is compensated until the difference returns to the set threshold; After calibration, the light source parameters are locked to ensure consistency in subsequent image acquisition.
[0013] The present invention also provides a vision-based intelligent detection device for punching sheet defects, comprising: The workbench is made of transparent material and is used to place the cut pieces; A light source is provided below the workbench; A camera, set above the workbench; A processor is used to implement the above-mentioned vision-based intelligent detection method for punching and cutting defects.
[0014] The technical solution of the present invention can achieve the following technical effects: This method accurately divides the image of the cut piece by setting stretching areas, and then stretches and corrects the captured cut piece image, thereby eliminating the hole deformation and misalignment problems in the image caused by the wrinkles of the cut piece, thereby making the detection of holes more accurate; and there is no need for personnel to finely flatten the cut piece during detection, which can effectively improve the detection efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0016] Figure 1 Flowchart of the vision-based intelligent detection method for punching sheet defects in the present invention; Figure 2 is a schematic diagram of the design outer contour of the cutting piece in the present invention; Figure 3 Schematic diagram of the detected outer contour of the cut piece in the present invention; Figure 4 It is an enlarged view of various possibilities of the inflection point on the graph in the present invention; Figure 5 This is an enlarged view of various possibilities of edge points on the graph in the present invention. DETAILED DESCRIPTION
[0017] The basic principles and main features of the technical solution of the present invention will be described below in conjunction with the accompanying drawings in the embodiments of the present invention. The following will be described more intuitively through one or more embodiments, and the described embodiments are only part of the embodiments of the present invention, not all embodiments.
[0018] In the description of the present invention, words indicating directions or positional relationships (such as up, down, left, right, etc.) are based on the directions shown in the drawings or some conventional positional relationships. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the features referred to must have a specific direction, be constructed and operated in a specific direction. Therefore, they should not be understood as limiting the present invention.
[0019] The present invention relates to a vision-based intelligent detection method for punching sheet defects. The steps mainly include image acquisition, image processing, and calculation. The specific process of each step is as follows: Image acquisition steps: illuminate the piece from bottom to top. From a bird's-eye view, part of the piece will become darker, while the hole and the part outside the piece will become brighter. This way, a sensitive and contrasting bird's-eye view image can be obtained. The bird's-eye view image of the piece is then converted into a grayscale image. Due to the common woven texture on the surface of decorative fabric materials, these textures will form regularly distributed texture patterns in the image, such as equally spaced white spots and stripes. These texture patterns will affect subsequent calculations, so it is necessary to remove the texture patterns in the bird's-eye view image. The grayscale image is then black-and-white processed to convert the image into an image with only black and white colors to further highlight the piece part in the image. This black-and-white image is used as the final image to be tested.
[0020] Image processing step: This step is mainly used to identify the cut piece part in the image to be tested and eliminate the wrinkles in the image by local stretching. Specifically: Identify the inflection points of the outer contour of the piece in the image to be tested, and then connect the inflection points in sequence to obtain the detected outer contour of the piece; Compare the detected outer contour with the designed outer contour of the piece. The designed outer contour is the size of the piece when it is designed. When wrinkles appear on the piece, the area of the piece will be smaller than the designed size when viewed from above. Therefore, this comparison can reflect the wrinkle condition of the piece. After that, an allowable range can be set and the wrinkle situation can be judged. If it exceeds the allowable range, it means that the wrinkles of the piece are too large, which will cause serious deformation of the hole pattern from the top view. The hole pattern cannot be restored by stretching the image alone, so an alarm is issued and the cloth needs to be manually repositioned. If it is within the allowable range, it means that the wrinkles of the piece are not large at this time and the hole pattern can be restored by stretching the image. The stretching area and stretching parameters of the detected outer contour are obtained according to the wrinkle situation. The detected outer contour and its inner area are then stretched to obtain a stretched image. The stretching area is the area that will deform when stretched. The remaining area will be moved by translation and rotation to ensure that it moves without deformation. The stretching parameters are the data required for stretching, such as the direction and distance of each pixel in the stretching area. After stretching, the range of the detected outer contour and the designed outer contour will overlap with each other. At this time, the holes in the wrinkled area (i.e., the stretching area) will also be restored to a hole pattern closer to the actual shape as they are stretched, and their positions on the image are also corrected. At this time, the detected outer contour and the designed outer contour are comparable.
[0021] The final step is the calculation step, which is to determine whether the punched hole on the piece is defective by calculating the stretched image after stretch correction, as follows: The first step is to determine whether there are burrs on the edge of the hole. In the stretched image, white represents the part that can transmit light, that is, the hole. We only need to find the area composed of adjacent white pixels, which is the area of a hole. In this way, we can identify the area of each hole in the stretched image as the detection hole area. After the hole area is identified, the roughness of each detection hole area is calculated. The roughness mainly indicates whether the detection hole area is smooth. The smoother the hole edge, the lower the roughness. Holes with roughness exceeding the set range are judged as burrs. After that, we determine whether the size and position of the hole meet the design requirements, and determine the design hole area of each hole according to the design outer contour. The design hole area is a virtual area. When the size and position of the hole are closer to the design size and design position, the detection hole area should overlap with the design hole area more, that is, the number of white pixels representing the holes in the design hole area should be more, and the number of white pixels around the outside of the design hole area should be less. Based on this idea, the overlap between the corresponding design hole area and the detection hole area can be calculated, and the holes whose overlap exceeds the set range will be judged as unqualified in size.
[0022] It can be seen that this method accurately divides the image of the cut piece by setting the stretching area, and then stretches and corrects the captured cut piece image, thereby eliminating the hole deformation and misalignment problems caused by the wrinkles of the cut piece in the image, thereby making the detection of holes more accurate; and there is no need for personnel to finely flatten the cut piece during detection, which can effectively improve the detection efficiency.
[0023] Preferably, the specific steps of removing the texture pattern in the overhead image are: Perform a Fourier transform on the overhead image to convert it from the spatial domain to the frequency domain. In the frequency domain, image information can be processed from a frequency perspective. In the frequency domain, features with obvious periodicity, such as woven texture patterns, will be converted into noise points far away from the edges. In this case, it is only necessary to use filtering algorithms and other methods to eliminate the noise points in the frequency domain of the overhead image to remove the texture pattern in the frequency domain. Then, the overhead image in the frequency domain is inverse Fourier transformed to convert the overhead image from the frequency domain back to the spatial domain. In this way, the image in the spatial domain will no longer show texture patterns, but some additional noise will be generated at this time, and the original image may also have certain noise due to impurities and other things. Therefore, a filtering algorithm is needed to eliminate the noise in the spatial domain to obtain the final image. The final image will not have noise that interferes with subsequent calculations.
[0024] Preferably, the specific steps of converting the top view image into black and white to obtain the image to be measured are: Divide the image to be tested into N regions of equal size and calculate the segmentation value Tn=μn-1.5σn of the nth region; Among them, μn is the average grayscale value of all pixels in the nth region, which is used to reflect the local brightness; σn is the standard deviation of the grayscale value of all pixels in the nth region, which is used to measure the contrast; 1.5 is the adjustment coefficient, which can be a fixed value or adjusted according to the specific detection scene requirements; The colors of the pixels in the nth region whose grayscale values are greater than or equal to Tn are all set to black, and the colors of the pixels in the nth region whose grayscale values are less than Tn are all set to white.
[0025] Preferably, the specific steps of identifying the inflection point of the outer contour of the cutting piece in the image to be tested and obtaining the detected outer contour of the cutting piece are: Calculate the distance between each inflection point and other inflection points on the design outer contour to form multiple comparison groups, such as Figure 2 As shown, assuming that the designed outer contour of the cutting piece is a quadrilateral ABCD, then the four points A, B, C, and D should be used as the basis, and the distance between the point and other points should be calculated, eventually forming four comparison groups, namely [AB, AC, AD], [BA, BC, BD], [CA, CB, CD], and [DA, DB, DC]; these values are calculated based on the designed dimensions of the cutting piece, so these values are fixed in the detection of the same cutting piece.
[0026] The next step is to process the captured image of the piece to be tested, i.e. the image to be tested, to identify the position of the piece in the image to be tested and form the detection outer contour: First, start from the leftmost column of the image to be tested and search column by column. Since the noise in the image has been removed in the previous step, the first black pixel found will be a corner point on the cut piece, such as Figure 3 As shown, this point is recorded as the origin O; Traverse all the black pixels in the rest of the image to be tested, and count the colors of the 8 pixels around each black pixel. For the middle point, inflection point and edge point, there will be obvious differences in the proportion of black and white pixels. The 8 pixels around the middle point will be all black; the situation of the inflection point will be as follows Figure 4 As shown, the number of white pixels is greater than the number of black pixels; the edge points will be as follows Figure 5 As shown in the figure, the number of white pixels is less than or equal to the number of black pixels; therefore, if the number of white pixels is greater than the number of black pixels among the 8 pixels around a black pixel, then this pixel may be an inflection point. Of course, when the burr wind field is prominent, it may cause misjudgment, such as Figure 3 Point H is shown, so these pixels can only be recorded as pending points and wait for further judgment.
[0027] Then calculate the distance between each pending point and the origin, for example Figures 2 and 3For example, now we have found the pending points E, F, G, H, calculate OE, OF, OH, OG, and compare them with multiple comparison groups ([AB, AC, AD], [BA, BC, BD], [CA, CB, CD] and [DA, DB, DC]), find the closest comparison group, and thus determine the correspondence between the origin and the pending points and the inflection points of the design outer contour. For example, we can now find that the combination [OE, OF, OG] can correspond to [AB, AC, AD], which means that the correspondence between the design outer contour and the detected outer contour is A corresponds to O, B corresponds to E, C corresponds to F, and D corresponds to G. The pending points E, F, and G are inflection points, and point H is a misjudged point. Then, the origin O in the image to be tested and the undetermined points E, F, and G can be connected in the order ABCD of the inflection points in the design contour, resulting in the detected contour OEFG of the piece. This not only quickly distinguishes true inflection points from misidentified points in the image to be tested, but also accurately determines the correspondence between the designed and detected contours. In addition to shape and size, even position can be quickly determined, facilitating subsequent comparison between the two.
[0028] Preferably, the specific steps of obtaining the wrinkle status of the cut piece are: Calculate the minimum bounding box center point of the detection outer contour and the design outer contour, and make the centers of the two coincide by translation, and make them have the same placement direction by rotation, for example Figures 2 and 3 The angles of pieces ABCD and OEFG in the figure are different, so we need to calculate the angle difference and then rotate one of them so that they are placed in the same direction on the figure. The degree of overlap between the detected outer contour and the designed outer contour is calculated. If there are fewer white pixels located inside the edge of the designed outer contour and fewer black pixels located outside the edge, then the degree of overlap between the detected outer contour and the designed outer contour is higher, that is, the number of wrinkles in the tested piece is less.
[0029] Preferably, the stretching area and stretching parameters of the image to be tested are obtained according to the wrinkle condition, and then the image to be tested is stretched to obtain a stretched image. The specific steps are: Identify and detect non-straight line segments on the outer contour, and use the least squares circle fitting method to fit the arc segment of each non-straight line segment; For each arc segment, the straight line passing through the center of the circle and the center point of the arc segment is taken as the center line. The center line can be regarded as the central symmetry line of the fold, and the angle between the center line and the design outer contour segment corresponding to the arc segment is recorded as the offset angle; the fold length is calculated according to the offset angle and the chord height of the arc segment, and then the point obtained by moving the fold length inward from the center point of the arc segment along the center line is recorded as the fold vertex, and the fold vertex and the two end points of the arc segment are connected to form a triangular area. The part of the outer contour detected within the triangular area is a stretching area; correspondingly, stretching parameters such as offset angle and chord height are also obtained to calculate the displacement of each pixel point.
[0030] For each pixel point in the stretching area, the specific calculation formula for its displacement is: ; Where △(x,y) represents the displacement of the pixel at the xth row and yth column; h is the chord height of the arc segment; θ is the offset angle; Dcen is the distance between the pixel and the central symmetry line; Dedg is the distance between the pixel and the corresponding edge of the detected outer contour; α is the adjustment coefficient, which is usually 0.1.
[0031] All pixels in the stretching area are moved according to the distance from the corresponding center line and arc segment to achieve the stretching effect of the stretching area. Since the stretching area becomes larger after stretching, the number of original pixels is not enough to fill the entire stretched area, so it is necessary to use interpolation to fill the missing pixels in the stretching area.
[0032] The specific steps to determine whether a hole has burrs are as follows: For each detection hole area, calculate the minimum bounding box center point of the detection hole area, calculate the distance between all edge points of the hole area and the center point, and calculate the standard deviation of all distance values. The smaller the standard deviation, the more consistent the distance between the edge point and the center point of the detection hole area, and the closer the edge of the detection hole area is to a circle; conversely, the larger the standard deviation, the less the edge of the detection hole area is like a circle; in this way, the standard deviation can be used to reflect the situation of the edge of the detection hole area, and the standard deviation can be recorded as roughness. Of course, if necessary, other influencing parameters can be added and then calculated together with the standard deviation to form the final roughness.
[0033] Preferably, the step of determining whether the hole has burrs further includes: The edge point sequence is converted into a polar coordinate system, the center point of the minimum bounding box is located at the origin of the polar coordinate system, and a radius-angle curve is generated; Detect the number of local extreme points of the curve and record the angle of the local extreme points, which means recording the number and position of the edge burrs in the detection hole area; The number of local extreme points and their corresponding angles recorded in multiple tests are compared to determine the burr inheritance status. For example, if the number and position of burrs on the holes of multiple pieces do not change, it may indicate that the punching tool is worn. If the number of burrs on the holes of multiple pieces does not change, but the position is changing, it may indicate that the punching tool is loose. In this way, the burr inheritance status can be used to determine whether there is a problem in the processing equipment, so that personnel can make quick adjustments.
[0034] Preferably, before the detection, a brightness calibration step is also included, the steps including: Take a blank background image without cutting pieces to check the uniformity of light distribution and prevent some areas from being too dark; If the difference between the brightness of the center area and the edge exceeds the set threshold, the light source angle is adjusted or the brightness is compensated until the difference returns to the set threshold; After calibration, the light source parameters are locked to ensure consistency in subsequent image acquisition.
[0035] The present invention also relates to a vision-based intelligent detection device for punching sheet defects, comprising: The workbench is made of transparent material and is used to place the cut pieces; A light source is provided below the workbench; preferably, an LED lamp is used as the light source, which emits more uniform light; a camera, arranged above the workbench; A processor is used to implement the above-mentioned vision-based intelligent detection method for punching and cutting defects.
[0036] The basic principles, main features, and advantages of the present invention are shown and described above. Those skilled in the art should understand that the present invention is not limited to the foregoing embodiments. The foregoing embodiments and descriptions are merely illustrative of the principles of the present invention. Various changes and modifications may be made to the present invention without departing from the spirit and scope of the present invention. Such changes and modifications are intended to fall within the scope of the present invention. The scope of protection claimed in the present invention is defined by the appended claims and their equivalents.
Claims
1. A vision-based intelligent detection method for punching defects, characterized in that the steps include: Light the cut piece from bottom to top, obtain a grayscale image of the top view of the cut piece, remove the texture pattern in the top view image, and then convert it to black and white to obtain the image to be tested; Identify the inflection points of the outer contour of the piece in the image to be tested and obtain the detected outer contour of the piece; The detected outer contour is compared with the designed outer contour of the cut piece, and the wrinkle situation is judged. If it exceeds the allowable range, an alarm is issued; if it is within the allowable range, the stretching area and stretching parameters of the detected outer contour are obtained according to the wrinkle situation, and then the detected outer contour and its inner area are stretched to obtain a stretched image so that the detected outer contour and the designed outer contour range coincide; Identify the area of each hole in the stretched image as a detection hole area, calculate the roughness of the edge of each detection hole area, and determine the hole with a roughness exceeding a set range as a burr; The design hole area of each hole is determined according to the design outer contour, and the overlap between the corresponding design hole area and the detection hole area is calculated. Holes with overlap exceeding the set range are judged as unqualified in size.
2. The vision-based intelligent detection method for punching defects according to claim 1, characterized in that: The specific steps to remove texture patterns in overhead images are: Performing Fourier transform on the overhead image to convert the overhead image from the spatial domain to the frequency domain; Eliminate noise in the frequency domain of overhead images; Perform inverse Fourier transform on the overhead image in the frequency domain to convert the overhead image from the frequency domain back to the spatial domain; Eliminate the noise of the overhead image in the spatial domain to obtain the final image.
3. The vision-based intelligent detection method for punching defects according to claim 1, characterized in that: The specific steps for black-and-white processing of the overhead image to obtain the image to be measured are: Divide the image to be tested into N regions of equal size and calculate the segmentation value Tn=μn-1.5σn of the nth region; Wherein, μn is the average grayscale value of all pixels in the nth region; σn is the standard deviation of the grayscale value of all pixels in the nth region; The colors of the pixels in the nth region whose grayscale values are greater than or equal to Tn are all set to black, and the colors of the pixels in the nth region whose grayscale values are less than Tn are all set to white.
4. The vision-based intelligent detection method for punching defects according to claim 1, characterized in that: The specific steps for identifying the inflection points of the outer contour of the cutting piece in the image to be tested and obtaining the detected outer contour of the cutting piece are as follows: Calculate the distance between each inflection point and other inflection points on the design contour to form multiple comparison groups; Start from the leftmost column of the image to be tested and search column by column until the first black pixel is found and recorded as the origin O; Traverse all black pixels in the remaining test images and count the colors of the eight pixels around each pixel. If the number of white pixels is greater than the number of black pixels, then record the pixel as a pending point. Calculate the distance between each undetermined point and the origin, compare it with multiple comparison groups, and find the closest comparison group to determine the correspondence between the origin and the undetermined point and each inflection point of the design outer contour; The origin and the to-be-determined point in the image to be tested are connected in the order of connecting the inflection points in the designed outer contour, thereby obtaining the detected outer contour of the piece.
5. The vision-based intelligent detection method for punching defects according to claim 4, characterized in that: The specific steps to obtain the wrinkle status of the cutting piece are as follows: Calculate the center point of the minimum bounding box of the detection outer contour and the design outer contour, and make the centers of the two coincide by translation, and make them have the same orientation by rotation; Calculate the degree of overlap between the detected outer contour and the designed outer contour.
6. The vision-based intelligent detection method for punching defects according to claim 5, characterized in that: The stretching area and stretching parameters of the image to be tested are obtained according to the wrinkle condition, and then the image to be tested is stretched to obtain a stretched image. The specific steps are as follows: Identify and detect non-straight line segments on the outer contour and fit the arc segments of each non-straight line segment; For each arc segment, the straight line passing through the center and center point of the arc segment is used as the center line, and the angle between the center line and the design outer contour segment corresponding to the arc segment is recorded as the offset angle. The fold length is calculated based on the offset angle and the chord height of the arc segment. The point obtained by moving the fold length inward from the center point of the arc segment along the center line is recorded as the fold vertex. The fold vertex and the two end points of the arc segment are connected to form a triangular area. The part of the outer contour within the triangular area is a stretching area. All pixels in the stretching area are moved according to their distance from the corresponding center line and arc segment to achieve the stretching effect of the stretching area, and the interpolation method is used to fill the vacant pixels in the stretching area.
7. The vision-based intelligent detection method for punching defects according to claim 1, characterized in that: The specific steps to determine whether a hole has burrs are as follows: For each detection hole area, the minimum bounding box center point of the detection hole area is calculated, and the distance between all edge points and the center point of the hole area is calculated. The standard deviation of all distance values is calculated and recorded as roughness.
8. The vision-based intelligent detection method for punching defects according to claim 7, characterized in that: The steps of determining whether the hole has burrs or not also include: The edge point sequence is converted into a polar coordinate system, the center point of the minimum bounding box is located at the origin of the polar coordinate system, and a radius-angle curve is generated; Detect the number of local extreme points of the curve and record the angles of the local extreme points; The number of local extreme points and their corresponding angles recorded in multiple tests are compared to determine the burr inheritance status.
9. The vision-based intelligent detection method for punching defects according to claim 1, characterized in that: Before the test, a brightness calibration step is also included, which includes: Take a blank background image without cutting pieces to check the uniformity of light distribution; If the difference between the brightness of the center area and the edge exceeds the set threshold, the light source angle is adjusted or the brightness is compensated until the difference returns to the set threshold; After calibration, the light source parameters are locked to ensure consistency in subsequent image acquisition.
10. A vision-based intelligent detection device for punching sheet defects, characterized in that: include: The workbench is made of transparent material and is used to place the cut pieces; a light source, arranged below the workbench; a camera, arranged above the workbench; A processor for implementing the vision-based intelligent detection method for punched sheet defects according to any one of claims 1 to 9.
Citation Information
Patent Citations
Defect detection method and device, electronic equipment and storage medium
CN117808751A
Clothing cutting piece quality detection system and method thereof
CN118096715A
System and method for sewing and dewrinkling fabric
CN119836496A
Unwrinkling systems and methods
US10745839B1
Cited By
Diesel generator set base laser cutting defect detection method based on machine vision
CN122505926A