A vision-based multi-hole burr detection method, system and storage medium
Through the vision-based porous burr detection method, the burrs of mechanical parts are automatically detected, which solves the problems of low manual detection efficiency and high equipment cost, achieves efficient and accurate burr screening and re-inspection, and improves production efficiency and product quality.
Patent Information
- Application Number
- CN202411096092.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-08-12
AI Technical Summary
In the existing technology, burr detection during the processing of mechanical parts relies on manual judgment, which is inefficient, easy to miss detection errors, and the equipment is complex and expensive, resulting in high costs and low production efficiency.
Using a vision-based multi-hole burr detection method, by obtaining the hole surface view, the round hole area with burrs on the inner edge is screened out, the burr status is judged based on the characteristics of the pixel block and rectangle, a pass or fail signal is output, and when it fails, Enter re-inspection mode to reduce manual re-inspection.
It realizes automated detection of burrs on mechanical parts, improves detection efficiency and accuracy, reduces labor costs and time consumption, reduces the rate of defective products, and improves the operating efficiency and product quality of the production line.
Smart Images

Figure CN118624641B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of automatic detection of porous burrs, and in particular, relates to a method, system and storage medium for detecting porous burrs based on vision. Background Art
[0002] At present, burrs often appear on the edge of mechanical parts during machining, that is, uneven flash on the edge of cold-cut, hot-sawed or flame-cut steel. Generally, parts are allowed to have burrs of a certain height, but some mechanical parts such as welded pipes must be smoothed and deburred for internal and external burrs. In order to ensure the machining and production quality of mechanical parts, burr detection is required for mechanical parts.
[0003] At present, the detection methods of burrs on the surface of steel shells are mainly divided into two types: manual detection and equipment detection. In the existing technology, most of them adopt manual detection methods such as hanging wire method, magnification method, hand touch and naked eye identification based on manual judgment. This method mainly relies on the experience of the detection personnel, with a large workload and easy to produce fatigue in long-term detection. Moreover, the more through holes in the steel shell, the longer the detection time, and it is easy to make mistakes, which will affect the defective rate of the product; and the efficiency of detection is greatly affected by the proficiency of the staff and the fatigue of the work. It is very easy to miss the burrs that are very small or in hidden positions. The speed of manual detection is far less than that of machine detection, and the detection efficiency is low. There are also problems of frequent missed detection and wrong detection; a few are special equipment based on sensors and optical microscopes for detection. For example, infrared rays are used to detect burrs on parts, but the equipment used in the infrared detection method of burrs on parts is relatively complex and the cost of the equipment is expensive. The infrared detection of burrs on parts also has high requirements for environmental conditions, which makes the cost of the burr detection process of parts too high. Summary of the invention
[0004] In response to the defects of the above-mentioned prior art, the present application provides a vision-based porous burr detection method, system and storage medium. Through automatic detection of porous burrs on steel shell products, the pores that meet the standards in the target test products are accurately and efficiently filtered out, reducing the number and time of subsequent manual re-inspections, thereby greatly improving production efficiency.
[0005] To achieve the above objectives, the present application provides a visual-based porous burr detection method, the method comprising:
[0006] S100: Acquire a perforated surface view of a target test product, wherein the perforated surface view includes a plurality of circular holes of preset specifications.
[0007] S200: Filtering out a circular hole detection area with burrs on the inner edge according to a preset condition, wherein in the circular hole detection area, any burr spot area is displayed as a first pixel block, and a non-burr area is displayed as a second pixel block.
[0008] S300: A target circumscribed rectangle is made according to the first pixel block, a target connecting line is obtained by connecting the first center of the circular hole detection area with the center point of the target circumscribed rectangle, and a burr is determined to be in a flat state or an erect state according to the target connecting line.
[0009] S400: making a target circumscribed circle according to the first pixel block, and when the burr is currently in a flat state, determining whether the target circumscribed circle satisfies a preset first condition, and if so, outputting a detection pass signal; otherwise, outputting a detection fail signal.
[0010] S500: When the burr is currently in an erect state, determine whether the target circumscribed circle meets the preset second condition. If so, output the detection pass signal; otherwise, determine whether the side length of the target circumscribed rectangle meets the preset third condition. If so, output the detection pass signal; otherwise, output the detection fail signal.
[0011] S600: In response to the detection failure signal, entering a re-inspection mode, and outputting the position of the circular hole with burrs on the inner edge in the hole surface view and burr information according to the re-inspection result.
[0012] The preset conditions are specifically:
[0013] The holed surface view is converted into a grayscale image. In the grayscale image, if the inner edge detection area of any circular hole only includes the second pixel block, it is determined that the inner edge detection area of the circular hole is free of burrs; if the inner edge detection area of any circular hole includes the first pixel block and the second pixel block, it is determined that the inner edge detection area of the circular hole has burrs; wherein the first pixel block includes a black pixel block and a gray pixel block, and the second pixel block includes a white pixel block.
[0014] In the present application, making a target bounding rectangle according to the first pixel block is specifically:
[0015] The length of the straight line projected on the plane by the first and second ends of the first pixel block is used as the length of the target circumscribed rectangle, and the width of the straight line projected on the plane by the first and second ends of the first pixel block is used as the width of the target circumscribed rectangle. The target circumscribed rectangle is obtained according to the length and width of the target circumscribed rectangle.
[0016] In the present application, the determination of whether the burr is currently in a flat state or an erected state according to the target connecting line is specifically:
[0017] A first diameter in the horizontal direction is made through the first center of the circular hole detection area, and a target triangle is formed according to the first diameter, the target connecting line, and a line segment where the extended line of the length of the target circumscribed rectangle intersects with the first diameter; in the target triangle, whether the burr is in a flat state or an erect state is judged according to the angle value of the intersection of the target connecting line and the length of the target circumscribed rectangle; when the angle value meets the preset threshold range, the burr is judged to be in a flat state; otherwise, the burr is judged to be in an erect state.
[0018] In the present application, making a target circumscribed circle according to the first pixel block is specifically:
[0019] The length of the target circumscribed rectangle is used as the second diameter, the center of the first pixel block is used as the second circle center, and the target circumscribed circle is obtained according to the second circle center and the second diameter.
[0020] Furthermore, the preset first condition is specifically:
[0021] The number of white pixel blocks of the second pixel block in the target circumscribed circle is obtained, recorded as the first number of white pixel blocks, and the first number of white pixel blocks must meet a preset first number range; and the width of the target circumscribed rectangle must meet a preset first side length range.
[0022] In this application, the preset second condition is specifically:
[0023] The number of white pixel blocks of the second pixel block in the target circumscribed circle is obtained, recorded as the second white pixel block number, and the second white pixel block number must meet the preset second number range; and the length of the target circumscribed rectangle must meet the preset second side length range.
[0024] In this application, the preset third condition is specifically:
[0025] The ratio of the length to the width of the target circumscribed rectangle must satisfy a preset ratio range; and the length of the target circumscribed rectangle must satisfy a preset third side length range.
[0026] In the present application, the re-examination mode at least includes a manual re-examination function; the manual re-examination function is specifically:
[0027] The circular hole detection area with burrs on the inner edge with a failed detection result is displayed in the interface window; an outsider re-inspects the circular hole detection area displayed in the interface window to determine whether the foreign matter on the inner edge is a burr or a non-burr object; when the re-inspection result shows that the foreign matter on the inner edge is a burr, the position of the circular hole with burrs on the inner edge and the burr information in the hole surface view are output; otherwise, the detection pass signal is output to complete the re-inspection.
[0028] To achieve the above objectives, the present application also provides a vision-based porous burr detection system, the system comprising:
[0029] An acquisition module is used to obtain a perforated surface view of a target test product, wherein the perforated surface view includes a plurality of circular holes of preset specifications; a circular hole detection area with burrs on the inner edge is screened out according to preset conditions, and in the circular hole detection area, any burr spot area is displayed as a first pixel block, and a non-burr area is displayed as a second pixel block.
[0030] A view processing module is used to make a target circumscribed rectangle based on the first pixel block, connect the first center of the circular hole detection area with the center point of the target circumscribed rectangle to obtain a target connecting line, and determine whether the burr is currently in a flat state or an upright state based on the target connecting line.
[0031] The first judgment module is used to make a target circumscribed circle according to the first pixel block, and when the burr is currently in a flat state, judge whether the target circumscribed circle meets a preset first condition, and if so, output a detection pass signal; otherwise, output a detection fail signal.
[0032] The second judgment module, the first judgment module is used to judge whether the target circumscribed circle meets the preset second condition when the burr is currently in an upright state, and if so, output the detection pass signal; otherwise, judge whether the side length of the target circumscribed rectangle meets the preset third condition, and if so, output the detection pass signal; otherwise, output the detection fail signal.
[0033] And, a re-inspection module, the re-inspection module is used to respond to the detection failure signal, enter a re-inspection mode, and output the position of the circular hole with burrs on the inner edge in the hole surface view and the burr information according to the re-inspection result.
[0034] To achieve the above objectives, the present application also provides a storage medium, which is a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements any of the vision-based porous burr detection methods described above.
[0035] Compared with the prior art, the present invention has the following beneficial effects:
[0036] The present application proposes a vision-based porous burr detection method, system and storage medium. Through the vision-based porous burr detection method, the automatic acquisition and detection of the hole surface view in the target test product is realized, which largely avoids relying solely on visual inspection or remote observation by staff, thereby reducing labor costs and time consumption. The present application can accurately screen out the circular hole detection area with burrs on the inner edge, and determine the state of the burrs according to preset conditions, so as to efficiently filter out the qualified pores in the target test product, reducing the number and time of subsequent manual re-inspections. By reducing the need for manual re-inspections, the solution can greatly improve production efficiency, reduce production delays caused by burr problems, thereby improving the operating efficiency and capacity utilization of the overall production line; and, by automatically detecting and promptly discovering burr problems, the processing and production quality of mechanical parts can be effectively guaranteed, the defective rate caused by burrs can be reduced, and the quality and reliability of products can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 This is a flow chart of a vision-based porous burr detection method in one embodiment of the present application.
[0038] Figure 2 This is a schematic diagram of a steel shell product with a hole surface in one embodiment of the present application.
[0039] Figure 3 It is a grayscale image of the steel shell after the view is converted in one embodiment of the present application.
[0040] Figure 4 A schematic diagram of constructing a target circumscribed rectangle and a target triangle for any circular hole detection area with burrs on the inner edge in an embodiment of the present application.
[0041] Figure 5 A schematic diagram of constructing a target circumscribed circle in which the burrs in a circular hole detection area are in a flat state is preferably provided in an embodiment of the present application.
[0042] Figure 6 A schematic diagram showing a burr in an upright state in a circular hole detection area is preferably provided for an embodiment of the present application.
[0043] Figure 7 Schematic diagram of the framework of a vision-based porous burr detection system in one embodiment of the present application. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme will be clearly and completely described below in conjunction with the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application. Example
[0045] As attached Figure 1 As shown, in order to solve the above technical problems, the present application provides a visual-based porous burr detection method, the method comprising:
[0046] S100: Acquire a perforated surface view of a target test product, wherein the perforated surface view includes a plurality of circular holes of preset specifications.
[0047] It should be noted that the target test product can be a steel shell product, such as the attached Figure 2 The figure shows a perforated surface view of a steel shell. Preferably, this embodiment can adopt computer vision technology combined with an image processing algorithm, that is, an industrial camera or other image acquisition device is used to shoot or scan the steel shell product, and then image processing is performed, and then the circular hole information in the perforated surface view is further extracted, including the number and sequence of circular holes. In addition, the preset specifications of the circular holes can be 5 mm or 10 mm, the distance between the circular holes can be 2 mm, etc., and steel shells of different materials and thicknesses may require circular holes of different sizes and shapes, which are not limited thereto.
[0048] In other embodiments, the shape of the circular hole may be a standard circle, or other shapes, such as an ellipse, a hexagon, etc., which may be preset according to specific requirements.
[0049] S200: Filtering out a circular hole detection area with burrs on the inner edge according to a preset condition, wherein in the circular hole detection area, any burr spot area is displayed as a first pixel block, and a non-burr area is displayed as a second pixel block.
[0050] It should be noted that the preset conditions are specifically:
[0051] The holed surface view is converted into a grayscale image. In the grayscale image, if the inner edge detection area of any circular hole only includes the second pixel block, it is determined that the inner edge detection area of the circular hole is free of burrs; if the inner edge detection area of any circular hole includes the first pixel block and the second pixel block, it is determined that the inner edge detection area of the circular hole has burrs; wherein the first pixel block includes a black pixel block and a gray pixel block, and the second pixel block includes a white pixel block.
[0052] As attached Figure 3The grayscale image of the steel shell after the view conversion is shown. In this embodiment, step S200 can accurately and preliminarily screen out the circular holes with burrs by judging whether the inner edge detection area of the circular hole in the grayscale image contains burr spots, that is, the first pixel block, so as to carry out subsequent processing and detection in a targeted manner. The use of grayscale images for burr detection can effectively distinguish burr spots from non-burr areas, reduce the possibility of misjudgment, and improve the accuracy and reliability of detection. Through the automated burr detection process, the dependence on staff is reduced, the labor cost and time consumption are reduced, and the production efficiency and stability of the production line are improved.
[0053] Preferably, assuming that there is a grayscale image of a surface view with holes, which contains 72 circular holes, wherein the inner edge detection area of the circular hole in the 2nd column and the 4th row contains black pixel blocks and gray pixel blocks, then it is preliminarily determined that the circular hole in the 2nd column and the 4th row has burrs in the inner edge detection area.
[0054] S300: A target circumscribed rectangle is made according to the first pixel block, a target connecting line is obtained by connecting the first center of the circular hole detection area with the center point of the target circumscribed rectangle, and a burr is determined to be in a flat state or an erect state according to the target connecting line.
[0055] It should be noted that the target bounding rectangle is equivalent to the minimum bounding rectangle of the burr spot, as shown in the attached figure. Figure 4 The figure is a schematic diagram of the detection area of any circular hole with burrs on the inner edge in this embodiment. The burr spot is located at the lower left position of the circular hole and is surrounded by a red rectangular frame.
[0056] The red rectangle is the minimum circumscribed rectangle of the burr spot, where A refers to the length of the minimum circumscribed rectangle, B refers to the width of the minimum circumscribed rectangle, O refers to the first center of the circle, C refers to the parallel line of the long side of the circumscribed rectangle, and D refers to the line connecting the center of the circumscribed rectangle to the center of the circle; the length of the straight line projected on the plane by the first and last ends of the first pixel block is used as the length of the target circumscribed rectangle, and the width of the straight line projected on the plane by the first and last ends of the first pixel block is used as the width of the target circumscribed rectangle, and the target circumscribed rectangle is obtained according to the length and width of the target circumscribed rectangle.
[0057] The burr spot may be a flat shape with both the head and tail points connected to the inner edge of the circular hole, or one end of the head or tail may be connected to the inner edge of the circular hole, and the other end is suspended in the circular hole, that is, the burr part is facing the center of the circle and presents a vertical shape. In this embodiment, it can be determined according to the target connection line whether the burr is currently in a flat state or a vertical state, specifically:
[0058] A first diameter in the horizontal direction is made through the first center of the circular hole detection area, and a target triangle is formed according to the first diameter, the target connecting line, and a line segment where the extended line of the length of the target circumscribed rectangle intersects with the first diameter; in the target triangle, whether the burr is in a flat state or an erect state is judged according to the angle value of the intersection of the target connecting line and the length of the target circumscribed rectangle; when the angle value meets the preset threshold range, the burr is judged to be in a flat state; otherwise, the burr is judged to be in an erect state.
[0059] Preferably, in this embodiment, the position and inner edge information of the circular hole can be detected and extracted by using image processing technology, for example, by edge detection algorithms (such as Canny edge detection) and circle detection algorithms (such as Hough transform).
[0060] For the inner edge area of each circular hole, pixel-level analysis is performed to identify the burr spot area, which can be achieved through pixel value thresholding and connected region analysis, and the area containing the first pixel block is marked as the burr spot area. For each burr spot area, its minimum enclosing rectangle is calculated. This can be achieved through the functions provided by the image processing library (such as the boundingRect function in OpenCV).
[0061] The target connection line is obtained according to the center point of the burr spot area, which can be achieved through feature point extraction and straight line fitting algorithms (such as the least squares method). According to the relationship between the target connection line and the target circumscribed rectangle, it is determined whether the burr is currently in a flat state or an erected state. This can be achieved by calculating the angle between the target connection line and the long side of the target circumscribed rectangle, and then judging according to the preset threshold range. Finally, according to the judgment result of the burr state, a detection pass signal or a detection fail signal is output for subsequent processing and feedback.
[0062] Furthermore, the target triangle is used to facilitate observation of the angle relationship between the three sides, as shown in the attached figure. Figure 4 As shown, the angle value Angle 3 of the intersection of the target connection line and the long side of the target circumscribed rectangle can be obtained by the absolute value of the difference between Angle 1 and Angle 2. When Angle 3 meets the preset threshold range, such as within the range of 90°±20°, that is, the target connection line is equivalent to the tangent of the long side of the target circumscribed rectangle, it is determined that the burr is in a flat state; otherwise, the target connection line is not tangent to the long side of the target circumscribed rectangle, and the burr is determined to be in an erected state, which is not limited to this.
[0063] S400: making a target circumscribed circle according to the first pixel block, and when the burr is currently in a flat state, determining whether the target circumscribed circle satisfies a preset first condition, and if so, outputting a detection pass signal; otherwise, outputting a detection fail signal.
[0064] As attached Figure 5 As shown in FIG. 1 , it is a circular hole detection area diagram where the burr is currently in a flat state according to the above embodiment, and a target circumscribed circle is further constructed on this basis. It should be noted that the attached Figure 5 The target circumscribed circle is only an example for clearly demonstrating the implementation process of this embodiment. In actual situations, the burr portion accounts for a very small portion of the circular hole detection area, so each target circumscribed circle automatically constructed during the detection process also accounts for a relatively small portion. By further detecting the proportion of the burr portion within the target circumscribed circle, it can be determined whether the passing condition is met.
[0065] Further, making a target circumscribed circle according to the first pixel block is specifically:
[0066] The length of the target circumscribed rectangle is used as the second diameter, the center of the first pixel block is used as the second circle center, and the target circumscribed circle is obtained according to the second circle center and the second diameter.
[0067] It should be noted that making a target circumscribed circle means finding a minimum circular boundary that can contain the burr spot area. In this embodiment, other methods can also be used to make the target circumscribed circle, for example:
[0068] Use the convex hull algorithm to find the smallest convex polygon of the point set, and then find the largest inscribed circle that can contain this convex polygon. This inscribed circle is the smallest circumscribed circle. Apply the least squares method to the point set in the burr spot area to fit a best matching circular boundary. In addition, for an irregular shape, the center of the circle can be determined by calculating the geometric center of all edge points, and then the radius of the circle can be determined based on the average distance from the point to the center. This is not limited to this.
[0069] Preferably, the center of the first pixel block can be equivalent to the center of the target circumscribed rectangle, which can be quickly obtained through image processing recognition, and the target circumscribed circle can be equivalent to the minimum circumscribed circle of the burr spot, which includes all the burr spots. It should be noted that if there are more than one burr area on the inner edge of the same circular hole, they can be processed according to the same principle.
[0070] Furthermore, the preset first condition is specifically:
[0071] The number of white pixel blocks of the second pixel block in the target circumscribed circle is obtained, recorded as the first number of white pixel blocks, and the first number of white pixel blocks must meet a preset first number range; and the width of the target circumscribed rectangle must meet a preset first side length range.
[0072] It should be noted that the number of the first white pixel blocks in the target circumscribed circle refers to the number of pixel blocks in the non-burr part. The number of pixel blocks in the non-burr part needs to reach a certain number, and the width of the burr part needs to be greater than a preset value, so that the circular hole detection area is judged to be qualified.
[0073] Preferably, in this embodiment, the preset first quantity range may be that the number of first white pixels is greater than 5, or the number of regions of first white pixels is greater than 2, and the preset first side length range may be that the width side length of the target circumscribed rectangle is greater than 0.18 mm. The specific preset threshold value may be modified with corresponding parameters according to actual conditions, and is not limited thereto. Only when both the preset first quantity range and the preset first side length range are met, a detection pass signal will be output; otherwise, a detection fail signal will be output.
[0074] In summary, this embodiment realizes rapid and automated detection of burrs in porous structures, thereby improving detection efficiency and accuracy; by setting specific quantitative standards, this embodiment can ensure that only round holes that meet quality requirements can pass the detection, thereby ensuring product quality consistency, reducing manual intervention, and improving production efficiency.
[0075] S500: When the burr is currently in an erect state, determine whether the target circumscribed circle meets the preset second condition. If so, output the detection pass signal; otherwise, determine whether the side length of the target circumscribed rectangle meets the preset third condition. If so, output the detection pass signal; otherwise, output the detection fail signal.
[0076] As attached Figure 6 As shown, the detection of the attached Figure 6 ∠3 in the figure is greater than 120°, which is not within the range of 90°±20°. Therefore, according to this determination result, a schematic diagram of the circular hole detection area where the burr is currently in an upright state can be output.
[0077] Furthermore, the preset second condition is specifically:
[0078] The number of white pixel blocks of the second pixel block in the target circumscribed circle is obtained, recorded as the second white pixel block number, and the second white pixel block number must meet the preset second number range; and the length of the target circumscribed rectangle must meet the preset second side length range.
[0079] Preferably, in this embodiment, the preset second quantity range may be that the number of second white pixels is greater than 5, or the number of regions of second white pixels is greater than 2, and the preset second side length range may be that the length of the side of the target circumscribed rectangle is greater than 0.18 mm. The specific preset threshold value may be modified with corresponding parameters according to actual conditions, and is not limited thereto. Only when both the preset second quantity range and the preset second side length range are satisfied, will the detection pass signal be output; otherwise, the process will enter the link of determining whether the side length of the target circumscribed rectangle meets the preset third condition.
[0080] In this embodiment, the preset third condition is specifically:
[0081] The ratio of the length to the width of the target circumscribed rectangle must satisfy a preset ratio range; and the length of the target circumscribed rectangle must satisfy a preset third side length range.
[0082] Preferably, in this embodiment, the preset ratio range can be set as the ratio of the length to the width of the target circumscribed rectangle is less than 3, and the third side length range can be set as the length of the target circumscribed rectangle is less than 0.1. The specific preset threshold can be modified according to the actual situation. The detection pass signal will be output only when both the preset ratio range and the third side length range are met; otherwise, the detection fail signal will be output.
[0083] In summary, this embodiment achieves accurate detection and evaluation of the burr state through quantitative indicators in multiple dimensions. Multiple preset conditions can be adjusted according to different products and quality requirements to adapt to different production environments; through automated detection processes, the consistency of product quality is ensured and human errors are reduced. This embodiment realizes automatic and rapid determination of the burr state through a method program, improves the detection efficiency of the production line, and reduces production costs. These preset conditions together constitute a multi-level detection mechanism, which aims to ensure that only round holes that meet strict quality standards can pass the inspection, thereby improving the overall quality of the product.
[0084] S600: In response to the detection failure signal, entering a re-inspection mode, and outputting the position of the circular hole with burrs on the inner edge in the hole surface view and burr information according to the re-inspection result.
[0085] In the present application, the re-examination mode at least includes a manual re-examination function; the manual re-examination function is specifically:
[0086] The circular hole detection area with burrs on the inner edge with a failed detection result is displayed in the interface window; an outsider re-inspects the circular hole detection area displayed in the interface window to determine whether the foreign matter on the inner edge is a burr or a non-burr object; when the re-inspection result shows that the foreign matter on the inner edge is a burr, the position of the circular hole with burrs on the inner edge and the burr information in the hole surface view are output; otherwise, the detection pass signal is output to complete the re-inspection.
[0087] It should be noted that when the system detects that some circular holes have burrs on the inner edge and outputs a failed signal, the system will trigger the re-inspection mode. The circular hole detection area with burrs on the inner edge with unqualified detection results will be displayed in the interface window for external personnel to re-inspect. External personnel will re-inspect the circular hole detection area displayed in the interface window to determine whether the foreign matter is a burr. If it is confirmed to be a burr, the next step will be carried out; otherwise, the detection pass signal will be output and the re-inspection will end.
[0088] If the re-inspection results confirm that a circular hole has a burr on its inner edge, the system will output the location information of the circular hole and the specific information of the burr, such as the shape, size, and location of the burr.
[0089] Preferably, it is assumed that among the round holes to be re-inspected, round hole 1 is located at coordinates (100, 200), the burr length is 2 mm, and the shape is a thin strip; round hole 2 is located at coordinates (150, 300), the burr length is 3 mm, and the shape is a small ball. This information can help production personnel accurately locate and process round holes with burrs to improve product quality, and is not limited to this.
[0090] In this embodiment, the re-inspection mode can ensure the accuracy of the test results through re-confirmation by outsiders. Outsiders can carefully review the unqualified test results to ensure that only the cases where burrs actually exist are marked as unqualified, thereby reducing the possibility of misjudgment. Through the re-inspection mode, the round holes with burrs can be discovered and confirmed in time, and then necessary measures can be taken to deal with them. This helps to improve the quality and reliability of products, prevent defective products from entering the market, and protect user interests and brand reputation.
[0091] In addition, the re-inspection mode provides a feedback channel for problems found during the production process. By recording and analyzing the problems found during the re-inspection process, the detection algorithm and process can be adjusted and improved in a timely manner, further improving the stability of the production line and product quality.
[0092] In summary, this embodiment can quickly and accurately detect circular holes with burrs on the inner edges in the hole surface view through automated image processing technology, thereby improving detection efficiency and reducing labor costs. By performing burr detection on products with holes, circular holes with burrs can be discovered and processed in a timely manner, thereby ensuring product quality, reducing defective product rates, and improving user satisfaction. Example
[0093] As attached Figure 7 As shown, in order to solve the above technical problems, the present application also proposes a vision-based porous burr detection system, the system comprising:
[0094] An acquisition module is used to obtain a perforated surface view of a target test product, wherein the perforated surface view includes a plurality of circular holes of preset specifications; a circular hole detection area with burrs on the inner edge is screened out according to preset conditions, and in the circular hole detection area, any burr spot area is displayed as a first pixel block, and a non-burr area is displayed as a second pixel block.
[0095] It should be noted that the acquisition module is responsible for obtaining the perforated surface view of the target test product. This can be achieved by a visual sensor or camera, which converts the image of the product surface into black and white image data.
[0096] According to the preset conditions, the acquisition module screens the circular hole detection area with burrs on the inner edge. This involves image processing algorithms, such as edge detection, pixel block analysis, etc., to determine which circular holes need further burr detection. In the screened circular hole detection area, the acquisition module displays any burr spot area as the first pixel block, and the non-burr area as the second pixel block. This can be achieved by image marking or setting specific pixel values.
[0097] According to the preset conditions, the acquisition module can accurately screen out the circular hole detection area with inner edge burrs. This helps the subsequent burr detection and processing, and improves the accuracy and efficiency of the detection. Through the preprocessing and screening of the acquisition module, the process of the entire burr detection system can be optimized. Only circular holes that meet the conditions will enter the subsequent processing flow, reducing unnecessary calculations and resource consumption. The acquisition module represents the burr spot area and the non-burr area with different pixel blocks, making the detection results more intuitive and easy to understand. This helps the operator or algorithm to perform further analysis and processing.
[0098] Through the implementation of the acquisition module, the image acquisition and preprocessing problems in the porous burr detection system can be effectively solved, and the reliability and efficiency of the system can be improved.
[0099] A view processing module is used to make a target circumscribed rectangle based on the first pixel block, connect the first center of the circular hole detection area with the center point of the target circumscribed rectangle to obtain a target connecting line, and determine whether the burr is currently in a flat state or an upright state based on the target connecting line.
[0100] It should be noted that the view processing module first calculates the target bounding rectangle according to the first pixel block. This can be achieved by using a function provided by an image processing library, such as the boundingRect function in OpenCV.
[0101] Further, the view processing module calculates the target connection line based on the first center of the circular hole detection area and the center point of the target circumscribed rectangle. This may involve geometric analysis algorithms, such as straight line equation fitting or straight line calculation between two points. According to the direction and position of the target connection line, the view processing module determines whether the burr is currently in a flat state or an erected state. This can be achieved by calculating the angle between the target connection line and the long side of the target circumscribed rectangle, and then making a determination based on a preset threshold range.
[0102] The view processing module can accurately determine whether the burr is currently in a flat state or an erected state based on the calculation results of the target connection line. This helps with subsequent burr processing and classification. Through the implementation of the view processing module, the burr state can be automatically detected and determined, reducing the need for manual intervention and improving processing efficiency. The view processing module can output the determination results of the burr state for subsequent processing and recording. This helps production managers understand the situation on the production site and adjust production parameters and processes in a timely manner.
[0103] The first judgment module is used to make a target circumscribed circle according to the first pixel block, and when the burr is currently in a flat state, judge whether the target circumscribed circle meets a preset first condition, and if so, output a detection pass signal; otherwise, output a detection fail signal.
[0104] It should be noted that the first judgment module calculates the target circumscribed circle according to the first pixel block. Specifically, it uses the length of the target circumscribed rectangle as the second diameter and the center of the first pixel block as the second circle center, thereby obtaining the position and size of the target circumscribed circle.
[0105] When the burr is currently in a flat state, the first judgment module checks whether the target circumscribed circle meets the preset first condition. This may involve condition setting and comparison, such as comparison of the diameter of the circle with the preset condition. According to the detection result of the preset condition, the first judgment module outputs a corresponding detection pass signal or a detection fail signal to notify the subsequent processing link.
[0106] The first judgment module realizes the automatic calculation and conditional judgment of the target circumscribed circle, and provides timely feedback information for subsequent processing by outputting the test results, thereby realizing the automated burr detection process. Through the preset conditions and judgment logic, the first judgment module can accurately judge whether the target circumscribed circle meets the requirements, thereby accurately determining the eligibility of the burr detection results. The automated processing of the first judgment module can quickly and accurately complete the judgment of the test results, reduce the need for manual intervention, and improve production efficiency and product quality.
[0107] Through the implementation of the first judgment module, the judgment and feedback of the burr detection results can be effectively completed, providing important support for the automation and optimization of the production process.
[0108] The second judgment module, the first judgment module is used to judge whether the target circumscribed circle meets the preset second condition when the burr is currently in an upright state, and if so, output the detection pass signal; otherwise, judge whether the side length of the target circumscribed rectangle meets the preset third condition, and if so, output the detection pass signal; otherwise, output the detection fail signal.
[0109] It should be noted that the second judgment module first checks whether the burr is in an erected state. If so, the next judgment is performed; if not, the target circumscribed circle is directly judged whether it meets the preset second condition.
[0110] If the burr is in an erected state, the second judgment module checks whether the target circumscribed circle meets the preset second condition. This may involve comparing the radius or diameter of the circle with the preset condition. If the target circumscribed circle does not meet the preset second condition, the second judgment module will further determine whether the side length of the target circumscribed rectangle meets the preset third condition. This may involve comparing the side length of the rectangle with the preset condition. Based on the judgment result, the second judgment module outputs a corresponding detection pass signal or a detection fail signal to notify the subsequent processing link.
[0111] The second judgment module performs multi-condition judgment according to different situations, ensuring the comprehensiveness and accuracy of the detection results. Through multiple preset conditions, the second judgment module can carefully judge whether the target circumscribed circle and circumscribed rectangle meet the requirements, thereby improving the accuracy of the detection. When the target circumscribed circle or circumscribed rectangle meets the preset conditions, the second judgment module outputs a detection pass signal, indicating that the circular hole burr detection is qualified and can continue with subsequent processing.
[0112] The automated processing of the second judgment module can quickly and accurately complete the judgment of the test results, reduce the need for manual intervention, and improve production efficiency and product quality. Through the implementation of the second judgment module, multi-condition judgment and feedback of burr detection results can be effectively completed, providing important support for the automation and optimization of production processes.
[0113] And, a re-inspection module, the re-inspection module is used to respond to the detection failure signal, enter a re-inspection mode, and output the position of the circular hole with burrs on the inner edge in the hole surface view and the burr information according to the re-inspection result.
[0114] It should be noted that when the system receives a detection failure signal, the re-inspection module is triggered and enters the re-inspection mode.
[0115] The re-inspection module displays the position of the circular hole with burrs on the inner edge in the hole surface view, so that the operator can re-inspect. The outside personnel re-inspect the circular hole detection area displayed in the interface window to determine whether the foreign matter is a burr. If it is confirmed to be a burr, the next step is processed; otherwise, the detection pass signal is output and the re-inspection ends. If the re-inspection result confirms that the inner edge of a circular hole has burrs, the re-inspection module will output the position information of the circular hole and the specific information of the burr, such as the shape, size, and position of the burr.
[0116] The re-inspection mode ensures the accuracy of the test results and avoids misjudgment through reconfirmation by outside personnel. Timely discovery and confirmation of round holes with burrs helps to improve product quality and reliability, prevent defective products from entering the market, and protect user interests and brand reputation. In addition, the re-inspection module also provides a feedback channel for problems found during the production process. By recording and analyzing the problems found during the re-inspection process, the detection algorithm and process can be adjusted and improved in a timely manner, further improving the stability of the production line and product quality.
[0117] In summary, Example 2 makes a detailed analysis and examples of a visual-based porous burr detection system proposed in this application. This application realizes the automatic detection and processing of porous burrs through the combination of the acquisition module, the view processing module, the first judgment module and the second judgment module. The system can automatically acquire images of target products, perform burr detection, and judge and classify according to preset conditions, thereby realizing an automated production process. The system can promptly detect and process round holes with burrs, ensuring the quality and reliability of the products. Through precise detection and judgment, the number of defective products is reduced, the qualified rate of products is improved, and user satisfaction is enhanced. Automated detection and processing reduces manual intervention and improves production efficiency. Through the timely output of qualified signals and the processing of defective products, duplication and waste in production are avoided, and the operating efficiency of the production line is improved. The specific implementation process and principle have been introduced in detail in Example 1, and will not be repeated in this embodiment. Example
[0118] The present application also provides a storage medium, which is a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements any of the vision-based porous burr detection methods described above.
[0119] Preferably, the storage medium in this embodiment can be an optical disk, a hard disk, a flash drive, etc. Assuming that this is a flash drive, the developer writes and stores the computer program of the visual-based porous burr detection system in the flash drive. This computer program includes the code implementation of each module such as the acquisition module, the view processing module, the first judgment module, the second judgment module and the re-inspection module.
[0120] The storage medium can be used as a backup of the computer program to ensure the safety and reliability of the program. At the same time, the storage medium can be transferred to other computers, so that the visual-based multi-hole burr detection method can be executed on different devices.
[0121] This embodiment stores the computer program in a storage medium so that the user can use the program anytime and anywhere without being restricted by a specific computer.
[0122] As a form of program, the storage medium can be executed on different computers, while avoiding the risk of illegal copying or tampering of the program, protecting the security and integrity of the program. If the visual-based porous burr detection method is updated or improved, the developer can store the new version of the program in the medium, transfer and update it, and ensure that users always use the latest version of the detection method.
[0123] In summary, the storage medium, as a carrier of a computer program, provides convenience, security and continuous updating guarantee for the implementation of the vision-based porous burr detection method.
[0124] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. The memory is used to store an operating system, an application program, a boot loader, data, and other programs, such as the program code of the computer program, etc. The memory may also be used to temporarily store data that has been output or is to be output.
[0125] In several embodiments provided in the present application, it is understood that each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved.
[0126] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.
[0127] The specific embodiments described above further describe the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only a specific embodiment of the present application and is not intended to limit the scope of protection of the present application. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of protection of the present application.
Claims
1. A visual-based porous burr detection method, characterized in that: include: S100: Acquire a perforated surface view of a target test product, wherein the perforated surface view includes a plurality of circular holes of preset specifications; S200: Filtering out a circular hole detection area with burrs on the inner edge according to a preset condition, wherein in the circular hole detection area, any burr spot area is displayed as a first pixel block, and a non-burr area is displayed as a second pixel block; S300: A target circumscribed rectangle is made according to the first pixel block, a target connecting line is obtained by connecting the first center of the circular hole detection area with the center point of the target circumscribed rectangle, and a burr is determined to be in a flat state or an erect state according to the target connecting line; S400: making a target circumscribed circle according to the first pixel block, and when the burr is currently in a flat state, determining whether the target circumscribed circle satisfies a preset first condition, and if so, outputting a detection pass signal; otherwise, outputting a detection fail signal; S500: when the burr is currently in an erected state, determining whether the target circumscribed circle satisfies a preset second condition, and if so, outputting the detection pass signal; otherwise, determining whether the side length of the target circumscribed rectangle satisfies a preset third condition, and if so, outputting the detection pass signal; otherwise, outputting the detection fail signal; S600: In response to the detection failure signal, entering a re-inspection mode, and outputting the position of the circular hole with burrs on the inner edge and burr information in the hole surface view according to the re-inspection result; The preset conditions are specifically: Converting the hole surface view into a grayscale image, wherein in the grayscale image, if the inner edge detection area of any circular hole only includes the second pixel block, it is determined that the inner edge detection area of the circular hole has no burrs; if the inner edge detection area of any circular hole includes the first pixel block and the second pixel block, it is determined that the inner edge detection area of the circular hole has burrs; Wherein, the first pixel block includes a black pixel block and a gray pixel block, and the second pixel block includes a white pixel block; The step of making a target bounding rectangle according to the first pixel block is specifically: The target circumscribed rectangle is obtained by taking the length of the straight line projected on the plane by the first and last ends of the first pixel block as the length of the target circumscribed rectangle, and taking the width of the straight line projected on the plane by the first and last ends of the first pixel block as the width of the target circumscribed rectangle. The step of determining whether the burr is currently in a flat state or an erect state according to the target connecting line is specifically as follows: A first diameter in the horizontal direction is made through the first center of the circular hole detection area, and a target triangle is formed according to the first diameter, the target connecting line, and a line segment where the extended line of the target circumscribed rectangle intersects with the first diameter; in the target triangle, whether the burr is in a flat state or an erect state is judged according to the angle value of the intersection of the target connecting line and the length of the target circumscribed rectangle; When the angle value is within the range of 90°±20°, the burr is determined to be in a flat state; otherwise, the burr is determined to be in an erect state; The step of making a target circumscribed circle according to the first pixel block is specifically as follows: Taking the length of the target circumscribed rectangle as the second diameter and the center of the first pixel block as the second circle center, obtaining the target circumscribed circle according to the second circle center and the second diameter; The preset first condition is specifically: The number of white pixel blocks of the second pixel block in the target circumscribed circle is obtained, recorded as the first number of white pixel blocks, and the first number of white pixel blocks needs to meet a preset first number range; and the width of the target circumscribed rectangle needs to meet a preset first side length range; The preset second condition is specifically: Obtaining the number of white pixel blocks of the second pixel block in the target circumscribed circle, recorded as the second number of white pixel blocks, the second number of white pixel blocks needs to meet a preset second number range; and the length of the target circumscribed rectangle needs to meet a preset second side length range; The preset third condition is specifically: The ratio of the length to the width of the target circumscribed rectangle must satisfy a preset ratio range; and the length of the target circumscribed rectangle must satisfy a preset third side length range.
2. A visual-based porous burr detection method according to claim 1, characterized in that: The re-inspection mode at least includes a manual re-inspection function; The manual re-examination function is specifically as follows: The round hole detection area with burrs on the inner edge with unqualified detection results is displayed in the interface window; The outside personnel re-inspect the circular hole detection area displayed in the interface window to determine whether the foreign matter on the inner edge is a burr or a non-burr object; When the re-inspection result shows that the foreign matter on the inner edge is a burr, the position of the circular hole with burrs on the inner edge in the hole surface view and the burr information are output; otherwise, the detection pass signal is output to complete the re-inspection.
3. A vision-based porous burr detection system, characterized in that: include: An acquisition module, the acquisition module is used to obtain a perforated surface view of a target test product, wherein the perforated surface view includes a plurality of circular holes of preset specifications; a circular hole detection area with burrs on the inner edge is screened out according to preset conditions, wherein in the circular hole detection area, any burr spot area is displayed as a first pixel block, and a non-burr area is displayed as a second pixel block; A view processing module, the view processing module is used to make a target circumscribed rectangle according to the first pixel block, connect the first center of the circular hole detection area with the center point of the target circumscribed rectangle to obtain a target connection line, and determine whether the burr is currently in a flat state or an erect state according to the target connection line; a first judgment module, the first judgment module being used to make a target circumscribed circle according to the first pixel block, and when the burr is currently in a flat state, judging whether the target circumscribed circle satisfies a preset first condition, and if so, outputting a detection pass signal; otherwise, outputting a detection fail signal; A second judgment module, wherein the first judgment module is used to judge whether the target circumscribed circle satisfies a preset second condition when the burr is currently in an erected state, and if so, output the detection pass signal; otherwise, judge whether the side length of the target circumscribed rectangle satisfies a preset third condition, and if so, output the detection pass signal; otherwise, output the detection fail signal; and a re-inspection module, the re-inspection module being used to respond to the detection failure signal, enter a re-inspection mode, and output the position of the circular hole with burrs on the inner edge and the burr information in the hole surface view according to the re-inspection result; The preset conditions are specifically: Converting the hole surface view into a grayscale image, wherein in the grayscale image, if the inner edge detection area of any circular hole only includes the second pixel block, it is determined that the inner edge detection area of the circular hole has no burrs; if the inner edge detection area of any circular hole includes the first pixel block and the second pixel block, it is determined that the inner edge detection area of the circular hole has burrs; Wherein, the first pixel block includes a black pixel block and a gray pixel block, and the second pixel block includes a white pixel block; The step of making a target bounding rectangle according to the first pixel block is specifically: The target circumscribed rectangle is obtained by taking the length of the straight line projected on the plane by the first and last ends of the first pixel block as the length of the target circumscribed rectangle, and taking the width of the straight line projected on the plane by the first and last ends of the first pixel block as the width of the target circumscribed rectangle. The step of determining whether the burr is currently in a flat state or an erect state according to the target connecting line is specifically as follows: A first diameter in the horizontal direction is made through the first center of the circular hole detection area, and a target triangle is formed according to the first diameter, the target connecting line, and a line segment where the extended line of the target circumscribed rectangle intersects with the first diameter; in the target triangle, whether the burr is in a flat state or an erect state is judged according to the angle value of the intersection of the target connecting line and the length of the target circumscribed rectangle; When the angle value is within the range of 90°±20°, the burr is determined to be in a flat state; otherwise, the burr is determined to be in an erect state; The step of making a target circumscribed circle according to the first pixel block is specifically as follows: Taking the length of the target circumscribed rectangle as the second diameter and the center of the first pixel block as the second circle center, obtaining the target circumscribed circle according to the second circle center and the second diameter; The preset first condition is specifically: The number of white pixel blocks of the second pixel block in the target circumscribed circle is obtained, recorded as the first number of white pixel blocks, and the first number of white pixel blocks needs to meet a preset first number range; and the width of the target circumscribed rectangle needs to meet a preset first side length range; The preset second condition is specifically: Obtaining the number of white pixel blocks of the second pixel block in the target circumscribed circle, recorded as the second number of white pixel blocks, the second number of white pixel blocks needs to meet a preset second number range; and the length of the target circumscribed rectangle needs to meet a preset second side length range; The preset third condition is specifically: The ratio of the length to the width of the target circumscribed rectangle must satisfy a preset ratio range; and the length of the target circumscribed rectangle must satisfy a preset third side length range.
4. A storage medium, which is a computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the visual-based porous burr detection method as described in any one of claims 1-2 is implemented.
Citation Information
Patent Citations
Visual inspection device for burr quality of copper bar holes
CN108844964A
Rapid detection and length accurate measurement method for product burrs
CN109115800A
