Edge profile recognition method and system for deburring of aluminum alloy die castings
By acquiring surface images of aluminum alloy die-cast parts under different wind conditions, identifying straight lines at the edges of heat dissipation fins, and analyzing grayscale and gradient features, combined with stability assessment, the accurate identification and removal of burrs on aluminum alloy die-cast parts was achieved, solving the problem of insufficient detection accuracy in traditional methods.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- DONG GUAN ALUMINIUM MASTER DIE-CASTING IND CO LTD
- Filing Date
- 2026-02-02
- Publication Date
- 2026-06-05
AI Technical Summary
Existing technologies struggle to effectively identify and remove burrs on aluminum alloy die-cast parts, especially thin-walled, irregularly shaped burrs with low contrast to the background, resulting in poor detection accuracy and impacting heat dissipation efficiency.
By acquiring multiple surface images under different wind conditions, identifying straight lines at the edges of the heat dissipation fins, analyzing grayscale and gradient distribution characteristics, and combining a stability assessment mechanism, an image segmentation strategy is used to extract the burr edge contours.
It improves the accuracy and reliability of burr detection, overcomes the interference problems of traditional methods, ensures the accurate extraction of burr edge contours, and supports automated deburring operations.
Smart Images

Figure CN122156236A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and specifically to a method and system for edge contour recognition in deburring aluminum alloy die castings. Background Technology
[0002] Aluminum alloy die-cast parts are widely used in heat dissipation due to their excellent thermal conductivity. These parts are typically designed with a large number of regularly arranged heat dissipation fins to increase the heat dissipation area. However, during the die-casting process, factors such as mold wear, mold clearance, or fluctuations in process parameters can easily generate burrs and flash of various shapes on the edges of the thin-walled heat dissipation fins. These burrs not only affect the appearance and assembly of the product but also interfere with the laminar flow of the heat dissipation channel, thus significantly reducing the product's heat dissipation efficiency. Therefore, they must be accurately identified and removed before leaving the factory.
[0003] Currently, the industry mostly uses traditional edge detection methods to identify burrs. These methods are based on the extraction of edge features from a single image. However, in practical applications, due to the characteristics of such burrs, such as thinness, irregular shape, and low contrast with the background, coupled with the fact that environmental interference on the production line, such as dust and oil, is difficult to completely avoid, the recognition effect of burrs in practical applications is not good and it is difficult to meet the requirements of industrial production for detection accuracy. Summary of the Invention
[0004] To address the technical problems of susceptibility to interference and insufficient accuracy in burr detection on aluminum alloy die castings, the present invention aims to provide a method and system for edge contour recognition in deburring aluminum alloy die castings. The specific technical solution adopted is as follows: Firstly, a method for edge contour recognition in deburring aluminum alloy die castings is provided. The method includes: acquiring multiple surface images of the aluminum alloy die casting under different wind conditions; the aluminum alloy die casting includes multiple spaced heat dissipation fins; determining multiple sets of edge lines in each surface image, each set of edge lines corresponding to the two sides of a heat dissipation fin; in any surface image, determining suspected burr areas based on the grayscale distribution features and gradient distribution features of each pixel window on each set of edge lines, wherein the grayscale distribution features characterize the difference between the grayscale value of the pixel window and the grayscale values of all pixel windows on the edge lines, and the gradient distribution features characterize the difference between the grayscale value of the pixel window and the grayscale value of all pixel windows on the edge lines. The stability parameter of each suspected burr region is determined based on the image feature differences between the two surface images within each surface image group. Each surface image group includes two surface images acquired under the condition that the wind direction is symmetrical with respect to the heat sink fins. The image feature differences are used to characterize the differences in gray-level distribution features and gradient distribution features of the suspected burr region in the two surface images within the surface image group. Based on the stability parameter of each suspected burr region, the real burr region is determined, and the real burr region is image segmented to extract the edge contour of the burr.
[0005] In one possible design, suspected glitch regions are determined based on the grayscale distribution characteristics and gradient distribution characteristics of each pixel window on each set of edge lines. This includes: determining the size of the pixel window based on the average pixel length of historical glitch regions; for each pixel window, determining the grayscale distribution characteristics of the pixel window based on the average grayscale value within the pixel window and the average grayscale value of all pixel windows on the corresponding edge line; determining the gradient distribution characteristics of the pixel window based on the number of pixels whose gradient direction is perpendicular to the direction of the heat sink fins within the pixel window; determining the glitch probability of each pixel window region based on the grayscale distribution characteristics and gradient distribution characteristics of multiple pixel windows, where the pixel window region is the region formed by pixel windows at corresponding positions on two edge lines within an edge line group; and identifying pixel window regions with a glitch probability greater than a preset probability threshold as suspected glitch regions.
[0006] In one possible design, determining the surface image group includes: taking the extension direction of the heat sink fins as the axis of symmetry, determining the angle between the wind direction corresponding to each surface image and the axis of symmetry; determining two surface images with the same angle as the initial surface image group; and determining the initial surface image group as a valid surface image group if the difference in the grayscale mean of two surface images in the initial surface image group is less than a preset mean threshold.
[0007] In one possible design, the stability parameter of each suspected burr region is determined based on the difference in image features between two surface images within each surface image group. This includes: for each surface image group, determining the difference in gray-level distribution features and gradient distribution features of the suspected burr region in the two surface images; determining the image difference value corresponding to the surface image group based on the difference in gray-level distribution features and gradient distribution features; and determining the stability parameter of the suspected burr region based on the image difference values of multiple surface image groups.
[0008] In one possible design, the actual burr region is determined based on the stability parameter of each suspected burr region, including: identifying suspected burr regions with stability parameters less than a first stability threshold as large burr regions in the actual burr region; and identifying suspected burr regions with stability parameters greater than or equal to the first stability threshold and less than a second stability threshold as small burr regions in the actual burr region, wherein the first stability threshold is less than the second stability threshold.
[0009] In one possible design, image segmentation is performed on the real burr region to extract the edge contour of the burr, including: for each large burr region, a local image of a predetermined multiple of the large burr region area is cropped with the large burr region as the center; for each small burr region, a local image of the small burr region is cropped; the cropped local images are segmented using a predetermined image segmentation algorithm to obtain a foreground region and a background region; the pixels in the foreground region are identified as burr pixels; and the edges of the burr pixels are extracted to obtain the edge contour of the burr.
[0010] In one possible design, multiple surface images of the aluminum alloy die casting are acquired under different wind directions, including: acquiring a surface image of the aluminum alloy die casting under the initial wind direction; adjusting the wind direction based on a preset step size until the adjusted wind direction is the same as the initial wind direction; and acquiring a surface image of the aluminum alloy die casting after each wind direction adjustment.
[0011] In one possible design, determining multiple sets of edge lines in each surface image includes: for each surface image, preprocessing the surface image, including grayscale processing and histogram equalization processing; extracting edge lines from the preprocessed surface image; and merging adjacent edge lines into a set of edge lines.
[0012] In one possible design, determining multiple pixel windows on each edge line includes: traversing the pixels on the edge line at preset intervals along the extension direction of the edge line from one end of the edge line, determining the pixel window corresponding to the traversed pixel based on the size of the pixel window, wherein the preset interval is half the size of the pixel window.
[0013] Secondly, an edge contour recognition system for deburring aluminum alloy die-cast parts includes: an image acquisition module for acquiring multiple surface images of the aluminum alloy die-cast part under different wind conditions, the aluminum alloy die-cast part including multiple spaced heat dissipation fins; a line recognition module for determining multiple sets of edge lines in each surface image, each set of edge lines corresponding to the two sides of a heat dissipation fin; and a region determination module for determining suspected burr regions in any surface image based on the gray-level distribution features and gradient distribution features of each pixel window on each set of edge lines. The gray-level distribution features characterize the difference between the gray-level value of the pixel window and the gray-level values of all pixel windows on the edge lines, and the gradient distribution features characterize the consistency of the pixel gradient direction distribution within the pixel window, the pixel gradient direction being the direction with the greatest gray-level difference between the pixel and its adjacent pixels. The data processing module determines the stability parameters of each suspected burr region based on the image feature differences between two surface images within each surface image group. Each surface image group includes two surface images acquired under symmetrical wind direction relative to the heat sink fins. The image feature differences characterize the differences in grayscale distribution and gradient distribution features of the suspected burr region between the two surface images within the surface image group. The contour extraction module determines the actual burr region based on the stability parameters of each suspected burr region, performs image segmentation on the actual burr region, and extracts the edge contours of the burrs.
[0014] The present invention has the following beneficial effects: In the edge contour recognition method for deburring aluminum alloy die-casting parts provided in this invention embodiment, multiple surface images are acquired under different wind directions, effectively obtaining the dynamic response characteristics of burrs under different physical stimuli, providing a rich data foundation for distinguishing between genuine and fake burrs. By identifying the straight lines of the heat sink fin edges and analyzing their grayscale and gradient distribution characteristics, the structural regularity of the heat sink fins themselves is fully utilized, achieving sensitive capture of small abnormal areas. In particular, by analyzing the consistency of image features of suspected areas under symmetrical wind directions, a stability evaluation mechanism is innovatively introduced, which can effectively eliminate false detections caused by temporary interference such as dust and debris. Finally, a targeted image segmentation strategy ensures the accurate extraction of burr edge contours. This method overcomes the inherent defects of traditional single-image edge detection methods, such as weak response to thin walls and small burrs and susceptibility to interference, significantly improving the accuracy, reliability, and automation level of burr detection, and providing reliable technical support for subsequent automated deburring operations. Attached Figure Description
[0015] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a schematic diagram of an edge contour recognition system for deburring aluminum alloy die castings according to an embodiment of the present invention. Figure 2 This is a schematic diagram of an aluminum alloy die-casting surface edge straight line detection method provided in one embodiment of the present invention; Figure 3 A symmetrical wind direction diagram provided in one embodiment of the present invention; Figure 4 This is a flowchart illustrating a method for edge contour recognition in deburring aluminum alloy die castings, provided in one embodiment of the present invention. Detailed Implementation
[0017] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a method and system for deburring aluminum alloy die-casting parts according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0018] In embodiments of the present invention, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" or "for example" in embodiments of the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0019] In the description of this invention, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The term "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. Furthermore, "at least one" and "more than one" refer to two or more. The terms "first," "second," etc., do not limit the quantity or order of execution, and "first," "second," etc., do not necessarily imply differences.
[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0021] The following description, in conjunction with the accompanying drawings, details the specific solution of the edge contour recognition method and system for deburring aluminum alloy die castings provided by the present invention.
[0022] Please see Figure 1 This illustrates a schematic diagram of an edge contour recognition system for deburring aluminum alloy die-castings according to an embodiment of the present invention, as shown below. Figure 1 As shown, the edge contour recognition system 10 for deburring aluminum alloy die castings includes an image acquisition module 11, a line recognition module 12, a region determination module 13, a data processing module 14, and a contour extraction module 15.
[0023] The image acquisition module 11 is used to acquire multiple surface images of aluminum alloy die castings under different wind conditions, providing high-quality raw data for subsequent modules.
[0024] The image acquisition module 11 includes a light source device, an image acquisition device, and a wind force application device.
[0025] The light source is positioned above the platform where the aluminum alloy die-casting is located to provide uniform illumination, eliminate shadow interference on the surface of the heat sink fins, amplify the grayscale difference between the heat sink fins and the recessed area, and ensure that image features are clearly distinguishable.
[0026] The image acquisition device is positioned above the platform where the aluminum alloy die-casting part is located. It is used to acquire surface images of the aluminum alloy die-casting part. During the acquisition process, the shooting parameters are kept stable to avoid scale or brightness deviations in images under different wind directions.
[0027] The wind application device is set to the side of the platform where the aluminum alloy die casting is located. It is used to provide wind force with adjustable direction. The wind force is controlled within a preset range of 0.5-2m / s. An empirical value of 1m / s can be fixed. Based on the initial wind direction, the wind direction is gradually adjusted according to the preset step size. After each adjustment, the wind force is stabilized for a preset time. After the burrs or interference objects have fully responded to the wind force, the image acquisition device is triggered to acquire surface images. Finally, multiple frames of surface images of the aluminum alloy die casting under different wind directions are obtained.
[0028] It should be noted that the initial wind direction can be any angle, the preset step size can be 5°, 10°, 15°, etc., and the preset duration can be 5 seconds, 10 seconds, 20 seconds, etc. The embodiments of the present invention do not impose specific limitations on these.
[0029] The line recognition module 12 receives the surface image acquired by the image acquisition module 11 and uses it to determine multiple sets of edge lines in each surface image, wherein each set of edge lines corresponds to the two sides of a heat sink fin.
[0030] The line recognition module 12 includes an image preprocessing unit, an edge line extraction unit, and an edge line grouping unit.
[0031] The image preprocessing unit performs grayscale and histogram equalization on each surface image. Grayscale processing converts the color image into a single-channel grayscale image to simplify the feature extraction process, while histogram equalization improves the image brightness distribution and avoids edge blurring caused by overexposure.
[0032] The edge line extraction unit is used to analyze the preprocessed image using a preset line detection technology. It filters edge lines based on the grayscale continuity and direction consistency of the lines, and accurately identifies the edge lines of the heat sink fins with high brightness characteristics.
[0033] The edge line grouping unit is used to calculate the spacing between edge lines, divide two adjacent edge lines into a group, and each group of edge lines corresponds to the two sides of a heat sink fin. Finally, the edge line grouping result of each surface image is output.
[0034] It should be noted that the preset line detection technology can be Hough transform line detection, line segment detector (LSD), or other line detection algorithms, and the embodiments of the present invention do not specifically limit this.
[0035] For example, the surface image of the aluminum alloy die casting after line detection is as follows: Figure 2 As shown in the figure, a, b, c, and d represent the raised heat dissipation fins, and each raised heat dissipation fin corresponds to a set of two edge straight lines. 1, 2, and 3 are the recessed parts between the heat dissipation fins.
[0036] The region determination module 13 determines the suspected burr region in any surface image based on the edge line grouping results of the line recognition module 12.
[0037] The region determination module 13 includes a pixel window configuration unit, a feature calculation unit, a spur probability calculation unit, and a suspected spur region marking unit.
[0038] The pixel window configuration unit is used to determine the pixel window size based on the average pixel length of historical burrs. Starting from one end of each edge line along the extension direction, the pixels are traversed at a preset interval of half the pixel window size. A corresponding pixel window is constructed for each traversed pixel to ensure that adjacent windows partially overlap to avoid missing small burrs.
[0039] The feature calculation unit is used to calculate the grayscale distribution features and gradient distribution features of each pixel window. The grayscale distribution features are determined by the difference between the average grayscale value within the pixel window and the average grayscale value of all pixel windows on the edge line, and are used to characterize the difference between the grayscale value of the pixel window and the grayscale value of all pixel windows on the edge line. The gradient distribution features are determined by the number of pixels whose gradient direction is perpendicular to the direction of the heat sink fins within the window, and are used to characterize the consistency of the distribution of the gradient direction within the pixel window.
[0040] The spur probability calculation unit is used to determine the spur probability of each pixel window region based on the grayscale distribution characteristics and gradient distribution characteristics of multiple pixel windows. The pixel window region is the area formed by the pixel windows at corresponding positions on two edge lines within an edge line group.
[0041] The suspected spurious region marking unit is used to set a preset probability threshold, mark pixel windows with a spurious probability greater than the preset probability threshold as suspected spurious regions, record their image coordinates and region range and output them to the data processing module 14.
[0042] It should be noted that in order to identify as many suspected burrs as possible, a relatively small preset probability threshold needs to be set. The range of the preset probability threshold is 0.6-0.7, and an empirical value of 0.65 can be taken. This embodiment of the invention does not make a specific limitation on this.
[0043] The data processing module 14 is used to determine the stability parameter of each suspected burr region based on the difference in image features between two surface images in each surface image group.
[0044] The data processing module 14 includes a surface image group division unit, an image feature difference calculation unit, and a stability parameter determination unit.
[0045] The surface image grouping unit is used to determine the angle between the wind direction and the axis of symmetry for each surface image, with the extension direction of the heat sink fins as the axis of symmetry. Two surface images with the same angle are identified as the initial surface image group. If the difference in the mean grayscale value between two surface images in the initial surface image group is less than a preset mean threshold, the initial surface image group is identified as a valid surface image group, ensuring that the images within the group are comparable and providing a reliable data foundation for subsequent image feature difference calculation.
[0046] For example, such as Figure 3 As shown, wind direction 1 and wind direction 2 are symmetrical with respect to the extension direction of the heat sink fins. At this time, the surface image collected under wind direction 1 and the surface image collected under wind direction 2 will be grouped into one surface image group.
[0047] The image feature difference calculation unit is used to locate the corresponding target region based on the image coordinates of the suspected burr region within each surface image group, and calculate the gray-level distribution feature difference and gradient distribution feature difference of the target region in the two surface images respectively. Then, by combining the gray-level distribution feature difference and gradient distribution feature difference, the image feature difference is obtained.
[0048] The stability parameter determination unit is used to integrate the differences in image features of all surface image groups to obtain the stability parameters of suspected burr regions, and finally outputs the stability parameters of all suspected burr regions.
[0049] The contour extraction module 15 is used to determine the real burr region based on the stability parameters of each suspected burr region output by the data processing module 14, and to extract the edge contour of the real burr region.
[0050] The contour extraction module 15 includes a burr region determination unit, a local image cropping unit, an image segmentation unit, and an edge contour extraction unit.
[0051] The burr region determination unit is used to set a first stability threshold and a second stability threshold (the first stability threshold is less than the second stability threshold) based on historical detection data. Suspected burr regions with stability parameters less than the first stability threshold are determined as large burr regions, and suspected burr regions with stability parameters greater than or equal to the first stability threshold and less than the second stability threshold are determined as small burr regions. Together, they constitute the real burr region.
[0052] The local image cropping unit is used to crop a local image of a large burr area, centered on the large burr area, by a preset multiple (such as twice) of the large burr area; and to crop a local image of a small burr area.
[0053] The image segmentation unit is used to process local images using a preset image segmentation algorithm, dividing the local image into a foreground region and a background region, with the pixels in the foreground region being spiky pixels.
[0054] The edge contour extraction unit is used to extract the edges of burr pixels to obtain the edge contour of the burr.
[0055] Please see Figure 4 The diagram illustrates a flowchart of an edge contour recognition method for deburring aluminum alloy die castings according to an embodiment of the present invention, including steps S201-S205.
[0056] S201. Collect multiple surface images of aluminum alloy die castings under different wind directions.
[0057] The aluminum alloy die-cast part includes multiple spaced heat dissipation fins.
[0058] In some embodiments, the aluminum alloy die-cast part to be inspected is first placed on a platform, with the heat dissipation fins of the die-cast part aligned with a reference direction (such as the horizontal direction of the captured surface image). A stable light source is activated to provide uniform illumination for image acquisition. An airflow with an initial wind direction is generated by controlling the wind field, with the wind speed controlled at a fixed speed within the range of 0.5 to 2 m / s, such as 1 m / s. After stabilizing for a preset time, the surface image is acquired by an industrial camera.
[0059] Furthermore, the wind direction is adjusted sequentially (e.g., clockwise or counterclockwise) based on a preset step size until the adjusted wind direction is the same as the initial wind direction, thus traversing a complete cycle. After each wind direction adjustment, after stabilizing for a preset time, the same lighting and camera parameters are maintained, and the surface image of the aluminum alloy casting is captured by an industrial camera.
[0060] S202. Determine multiple sets of edge lines in each surface image.
[0061] Each set of edge lines corresponds to the two sides of a heat dissipation fin.
[0062] As one possible approach, each acquired surface image is first preprocessed to improve image quality, including grayscale conversion of color images to grayscale images and histogram equalization to enhance image contrast, thereby highlighting the boundary between the heat sink fins and the background area.
[0063] Furthermore, a preset line detection algorithm is used to extract edge lines from the preprocessed surface image. For example, the Hough transform line detection algorithm is used to map the pixels in the image space to the parameter space. The edge lines of the heat sink fins in the image are identified by detecting the cumulative peaks in the parameter space. Each detected line is defined by its mathematical equation or the coordinates of its start point and end point.
[0064] After obtaining a series of edge lines, the edge lines are grouped according to the physical structural characteristics of the heat sink fins. Since a heat sink fin appears as two adjacent edge lines in the surface image, the distance between each edge line and its two adjacent edge lines can be determined. The two edge lines with smaller intervals are identified as a group of edge lines, which uniquely correspond to the two sides of a heat sink fin.
[0065] In some embodiments, when grouping edge lines, the method further includes calculating the direction angle of each edge line, which is the acute angle between the edge line and the horizontal line of the image. When the distance between two edge lines is the smallest and their direction angles are similar, the two edge lines are determined as a group of edge lines.
[0066] In some embodiments, an LSD line segment detector or other algorithms capable of extracting line segment features from an image may also be used to extract edge lines from a surface image.
[0067] In some embodiments, for the grouping of edge lines, a cluster analysis-based method can be used to automatically group edge lines with similar spatial positions and directions into a group of edge lines. Alternatively, edge lines can be directly located and grouped by pre-importing the CAD model of the aluminum alloy die casting and using template matching.
[0068] S203. In any surface image, determine the suspected burr region based on the gray-scale distribution characteristics and gradient distribution characteristics of each pixel window on each set of edge lines.
[0069] Among them, the grayscale distribution feature is used to characterize the difference between the grayscale value of the pixel window and the grayscale value of all pixel windows on the edge line, and the gradient distribution feature is used to characterize the consistency of the distribution of pixel gradient directions within the pixel window. The pixel gradient direction is the direction in which the grayscale difference between the pixel and its neighboring pixels is the greatest.
[0070] As one possible implementation, the size of the pixel window is determined based on the average pixel length of historical burrs to ensure complete coverage of typical burr structures. Then, starting from one end of the edge line, pixels along the edge line are traversed at preset intervals of half the size of the pixel window. A corresponding pixel window is constructed for each traversed pixel based on the size of the pixel window. The overlapping design of adjacent pixel windows can avoid missing small burrs. At the same time, the edge line group and pixel position corresponding to each pixel window are recorded to ensure clear data attribution.
[0071] Furthermore, for each pixel window, the grayscale distribution characteristics of the pixel window are determined based on the average grayscale value within the pixel window and the average grayscale value of all pixel windows on the corresponding edge line.
[0072] In some embodiments, the grayscale distribution characteristics of a pixel window can be determined using the following formula: In the formula, For the first The first edge line Gray-level distribution characteristics of a pixel window For the first The first edge line The average gray value of a pixel window For the first The average grayscale value of each pixel window along the edge line.
[0073] Based on the above calculation method, for the same edge line group (such as the first...), On the two edge lines within the edge line group, the first... The grayscale distribution characteristics of a pixel window can be denoted as follows: , .
[0074] It should be noted that, since the grayscale changes are usually relatively continuous on a continuous heat dissipation fin without burrs, the presence of burrs will affect the continuous distribution of grayscale. Therefore, by using the grayscale distribution characteristics of a pixel window, the possibility of the pixel window being a burr region can be assessed based on the difference in the horizontal continuous grayscale distribution of the current pixel window. The greater the difference in grayscale distribution characteristics, the greater the possibility that the pixel window is a burr region.
[0075] Furthermore, the number of pixels whose gradient direction within the pixel window is perpendicular to the direction of the heat sink fins is determined as the gradient distribution feature of the pixel window.
[0076] Among them, for the first Within a set of edge lines, on one of the edge lines, the first... The gradient distribution characteristics of a pixel window can be denoted as: The first On another edge line within the edge line group, the first... The gradient distribution characteristics of a pixel window can be denoted as: and will and The sum of the two is as follows , meaning the first Within the first edge line group Gradient distribution characteristics of a pixel window.
[0077] It should be noted that on a continuous, burr-free heat sink fin, the pixel gradient direction of the pixels is usually perpendicular to the fins and faces the recessed area between them. However, because burrs are random, they disrupt the original distribution of pixel gradient directions, reducing the number of pixels with gradient directions perpendicular to the fins. This number differs significantly from that in normal areas. Therefore, the gradient distribution characteristics of pixel windows can be used to assess the likelihood that a pixel window is a burr region.
[0078] Furthermore, based on the grayscale distribution characteristics and gradient distribution characteristics of multiple pixel windows, the spur probability of each pixel window region is determined.
[0079] Specifically, for each pixel window region, the sum of the gradient distribution features, the sum of the grayscale distribution features, and the difference in grayscale distribution features of the two pixel windows included in the pixel window region are determined.
[0080] In some embodiments, within a set of edge lines, the smaller the difference (difference in grayscale distribution features) between the pixel window regions on the same location (within the pixel window region) of two edge lines, the more similar the image representation at that location. Conversely, in different sets of edge lines, the greater the difference in grayscale distribution features and gradient distribution features between pixel window regions at the same location, the greater the probability that the current pixel window is located in a spurious region. Based on this, the first... In the group of edge lines, the first The probability of a glitch in a pixel window can be expressed by the following formula: In the formula, Indicates the first The first edge line group The probability of glitch in a pixel window region The number of edge line groups. For the first Within the first edge line group The sum of gradient distribution features of a pixel window region For the first Within the first edge line group The sum of gradient distribution features of a pixel window region For the first Within the first edge line group The sum of the gray-level distribution features of a pixel window region For the first Within the first edge line group The sum of the gray-level distribution features of a pixel window region For the first Within the first edge line group The difference in grayscale distribution characteristics of a pixel window region. To obtain the absolute value, For a very small positive number, an empirical value of 0.001 can be taken to avoid the formula becoming meaningless if the denominator is 0. To perform normalization, for example, the maximum-minimum normalization method can be used, with historical maximum and minimum values as references for calculation.
[0081] in, Indicates the first Within the first edge line group The sum of the gradient distribution features of the nth pixel window region, and the nth pixel window region... Within the first edge line group The difference between the sum of gradient distribution features of the n pixel window regions; the larger the difference value, the more significant the difference. Within the first edge line group The greater the difference in gradient distribution between a pixel window region and other edge line groups at the same location, the greater the likelihood of burrs in that region. Indicates the first Within the first edge line group The sum of the gray-level distribution features of the nth pixel window region, and the nth pixel window region... Within the first edge line group The difference between the sum of gray-level distribution features of each pixel window region; the larger the difference value, the more significant the difference. Within the first edge line group The greater the difference in grayscale between a pixel window area and other edge line groups at the same position, the greater the likelihood that there are burrs in that area. For the first Within the first edge line group The difference in grayscale distribution characteristics of a pixel window region. The smaller the value, the more likely that two pixel windows at the same position on the edge line within the pixel window region have similar image performance, that is, there is a grayscale abrupt change caused by the influence of glitch. The smaller the value, the greater the possibility that there is glitch in the region.
[0082] Finally, pixel window regions with a spur probability greater than a preset probability threshold are identified as suspected spur regions. At the same time, the image coordinates and region range of each suspected spur region are recorded to determine the precise location of the suspected spur regions.
[0083] It should be noted that, as described in the above embodiments, in order to identify as many suspected burrs as possible, a relatively small preset probability threshold needs to be set. The range of the preset probability threshold is 0.6-0.7, and an empirical value of 0.65 can be taken. This embodiment of the invention does not make a specific limitation on this.
[0084] In some embodiments, a machine learning-based classification model can be used to output the spur probability of each pixel window region. The classification model uses the gray-level distribution features and gradient distribution features of each pixel window as training samples and the real labels (spurs, non-spurs) corresponding to the samples as supervision signals for training. After training, the gray-level distribution features and gradient distribution features of each pixel window are directly input, and the model outputs the spur probability that the pixel window region corresponding to each pixel window is a spur region.
[0085] Understandably, this invention determines the pixel window size based on historical burr dimensions, ensuring the matching between the detection scale and physical defect characteristics and enhancing detection sensitivity. By quantifying the degree of grayscale anomaly of the pixel window relative to the overall edge, it effectively captures the local brightness abrupt changes caused by burrs. Simultaneously, by statistically analyzing the number of gradient pixels in the vertical direction, it accurately characterizes the destructive characteristics of burrs on regular texture structures. Finally, through probability calculation and threshold determination using multi-feature fusion, it achieves objective and quantitative screening of suspected areas. This overcomes the shortcomings of traditional edge detection, such as weak response to thin-walled burrs and susceptibility to noise interference, laying a high-quality data foundation for subsequent accurate verification.
[0086] S204. Based on the differences in image features between two surface images within each surface image group, determine the stability parameter of each suspected burr region.
[0087] Each surface image group includes two surface images acquired with the wind direction symmetrical to the heat sink fins. The image feature differences are used to characterize the differences in grayscale distribution and gradient distribution features of the suspected burr area in the two surface images within the surface image group.
[0088] As one possible approach, the first step is to determine the surface image set.
[0089] Specifically, the angle between the wind direction and the axis of symmetry corresponding to each surface image is determined with the extension direction of the heat dissipation fins as the axis of symmetry; two surface images with the same angle are determined as the initial surface image group; if the difference in the grayscale mean of two surface images in the initial surface image group is less than a preset mean threshold, the initial surface image group is determined as a valid surface image group.
[0090] It should be noted that, since the parameters other than wind direction (such as illumination parameters and shooting parameters) remain unchanged when the surface image is taken after the wind direction is changed, the pixel grayscale difference between the two surface images in the same group is small. Therefore, the preset mean threshold can be set to a relatively small value to ensure that the two images are meaningful for comparison. For example, an empirical value of 10 can be taken. This embodiment of the invention does not make specific limitations on this.
[0091] Furthermore, for each group of surface images, the differences in grayscale distribution features and gradient distribution features of the suspected burr region in the two surface images are determined, and the image difference value corresponding to the surface image group is determined based on the differences in grayscale distribution features and gradient distribution features.
[0092] In some embodiments, the formula for calculating image difference values is as follows: In the formula, Represented as the first The first group of surface images In the group of edge lines, the first Image difference values for suspected spurious areas. Represented as the first The first surface image in the group of surface images The first edge line in the edge line group The grayscale distribution characteristics of a suspected burr area Represented as the first The second surface image in the group of surface images The first edge line in the edge line group The grayscale distribution characteristics of a suspected burr area Represented as the first The first surface image in the group of surface images The second edge line in the edge line group The grayscale distribution characteristics of a suspected burr area Represented as the first The second surface image in the group of surface images The second edge line in the edge line group The grayscale distribution characteristics of a suspected burr area Represented as the first The first surface image in the group of surface images In the group of edge lines, the first edge line on both sides... The sum of gradient distribution characteristics of each suspected spur region Represented as the first The second surface image in the group of surface images In the group of edge lines, the first edge line on both sides... The sum of gradient distribution characteristics of each suspected spur region To obtain the absolute value.
[0093] in, For the first The difference in grayscale distribution characteristics at the same position on the same side edge line in two surface images in a group of surface images. The smaller the difference value, the less affected the suspected burr area is by symmetrical wind direction, and the more likely it is to be a burr area. For the first The difference in grayscale distribution characteristics at the same location on the opposite edge line in two surface images in a group of surface images. The smaller the difference value, the less affected the suspected burr area is by the symmetrical wind direction, and the more likely it is to be a burr area. For the first The difference between the sum of gradient distribution features of the two edge lines at the same location in two surface images in a group of surface images. The smaller the difference value, the less the suspected burr area is affected by the symmetrical wind direction, and the more likely it is to be a burr area.
[0094] It should be noted that since real burrs will not disappear regardless of changes in wind direction, and larger burrs are less affected by wind force, although relatively small burrs are more susceptible to wind direction, their appearance will be less different under symmetrical wind conditions compared to other attached non-burr edge interference. Therefore, the difference in grayscale distribution and gradient distribution characteristics of real burrs in two images under symmetrical wind conditions is relatively small. Thus, the image difference value calculated by the above formula can be used to characterize the stability of the suspected burr region.
[0095] Furthermore, stability parameters for suspected burr regions are determined based on the image difference values of multiple surface image groups.
[0096] In some embodiments, the formula for calculating the stability parameter of the suspected burr region is as follows: In the formula, For the first In the group of edge lines, the first Stability parameters for a suspected burr region The number of surface image groups, For the first The first group of surface images In the group of edge lines, the first Image difference values for suspected spiky areas.
[0097] Among them, by integrating the first in each group of images The image difference values of each suspected spurious region are used to obtain the stability parameter of the suspected spurious region. The lower the stability parameter, the less the suspected spurious region is affected by the symmetrical wind direction, which means that the probability of the suspected spurious region being a real spurious region is higher.
[0098] In some embodiments, when calculating the image difference value for each group of surface images, a weighted summation method can be used to assign a weight coefficient to each difference value, or a product method can be used to multiply each difference value and determine the image difference value as the product.
[0099] Understandably, the embodiments of the present invention achieve a comprehensive representation of suspected burr regions in a multi-dimensional feature space by calculating the differences in grayscale distribution features and gradient distribution features respectively, thus avoiding the limitations of a single feature criterion. By effectively combining the two types of feature differences, the discriminative information of each feature is preserved, while the complementarity between features is enhanced. Finally, by integrating the difference information of multiple surface image groups, a stability parameter that can comprehensively reflect the consistency of the suspected region under different symmetrical wind directions is constructed. This parameter can effectively distinguish between real burrs and attached interference, thereby significantly reducing the false detection rate and improving the reliability of the entire recognition system.
[0100] S205. Based on the stability parameters of each suspected burr region, determine the real burr region, perform image segmentation on the real burr region, and extract the edge contour of the burr.
[0101] As one possible implementation, based on the distribution characteristics of stability parameters of real burrs and interfering substances in historical burr detection data, a first stability threshold and a second stability threshold are determined, with the first stability threshold being less than the second stability threshold. Further, suspected burr areas with stability parameters less than the first stability threshold are identified as large burr areas within the real burr area (large burrs are tightly connected to the heat dissipation fins and change little with wind direction); suspected burr areas with stability parameters greater than or equal to the first stability threshold and less than the second stability threshold are identified as small burr areas within the real burr area (small burrs are thinner and change slightly with wind direction but do not detach from the fins).
[0102] In some embodiments, determining the first stability threshold and the second stability threshold based on the stability parameter distribution characteristics of real burrs and interfering substances in historical burr detection data may include: acquiring historical data containing a large number of samples of known categories (large burrs, small burrs) and their corresponding stability parameter values; plotting a frequency distribution histogram of the stability parameters to display the parameter distribution characteristics of the two types of samples (large burrs, small burrs); and performing Gaussian fitting on the stability parameter distribution of the large burr samples to obtain their mean. and standard deviation Gaussian fitting was performed on the stability parameter distribution of the small burr samples to obtain their mean. and standard deviation Set the first stability threshold to ,in The empirical coefficient (which can be 1 or 2) ensures that the stability parameter of most large spur samples is less than T1; the second stability threshold is set to... ,in This is an empirical coefficient (which can be 1 or 2), where, , satisfy .
[0103] Furthermore, for each large spur area, a local image of a preset multiple (e.g., twice the size) is cropped centered on the large spur area to ensure complete coverage of the spur and a small amount of surrounding background area, providing sufficient background reference for accurate segmentation; for small spur areas, a local image of the small spur area is directly cropped to avoid excessive background pixels interfering with the segmentation results.
[0104] In the captured local image, a preset image segmentation algorithm is used to segment the image into foreground and background regions, and the pixels within the foreground region are identified as burr pixels. Then, edge extraction is performed on the segmented burr pixels to obtain precise burr edge contours.
[0105] It should be noted that the preset image segmentation algorithm can be an image segmentation algorithm such as Otsu's Thresholding Method (OTSU), region growing algorithm, watershed algorithm, etc., and the embodiments of the present invention do not specifically limit it.
[0106] Understandably, in the edge contour recognition method for deburring aluminum alloy die-casting parts provided in this embodiment of the invention, multiple surface images are acquired under different wind directions, effectively obtaining the dynamic response characteristics of burrs under different physical stimuli, providing a rich data foundation for distinguishing between genuine and fake burrs. By identifying the straight lines of the heat sink fin edges and analyzing their grayscale and gradient distribution characteristics, the structural regularity of the heat sink fins themselves is fully utilized, achieving sensitive capture of small abnormal areas. In particular, by analyzing the consistency of image features of suspected areas under symmetrical wind directions, a stability evaluation mechanism is innovatively introduced, which can effectively eliminate false detections caused by temporary interference such as dust and debris. Finally, a targeted image segmentation strategy ensures the accurate extraction of burr edge contours. This overcomes the inherent defects of traditional single-image edge detection methods, such as weak response to thin walls and small burrs and susceptibility to interference, significantly improving the accuracy, reliability, and automation level of burr detection, providing reliable technical support for subsequent automated deburring operations.
[0107] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0108] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
Claims
1. A method for edge contour recognition in deburring aluminum alloy die-casting parts, characterized in that, The method includes: Multiple surface images of an aluminum alloy die-cast part, which includes multiple spaced heat dissipation fins, were acquired under different wind conditions. Determine multiple sets of edge lines in each surface image, with each set of edge lines corresponding to the two sides of a heat sink fin; In any surface image, suspected spur regions are determined based on the gray-level distribution features and gradient distribution features of each pixel window on each set of edge lines. The gray-level distribution features are used to characterize the difference between the gray-level value of the pixel window and the gray-level value of all pixel windows on the edge lines, and the gradient distribution features are used to characterize the consistency of the distribution of pixel gradient directions within the pixel window. Based on the image feature differences between the suspected burr region and the two surface images in each surface image group, the stability parameter of each suspected burr region is determined. Each surface image group includes two surface images acquired under the condition that the wind direction is symmetrical with respect to the heat sink fins. The image feature differences are used to characterize the gray-level distribution feature differences and gradient distribution feature differences of the suspected burr region in the two surface images in the surface image group. Based on the stability parameters of each suspected burr region, the actual burr region is determined, and image segmentation is performed on the actual burr region to extract the edge contour of the burr.
2. The method for edge contour recognition in deburring aluminum alloy die castings according to claim 1, characterized in that, Based on the grayscale distribution characteristics and gradient distribution characteristics of each pixel window on each set of edge lines, suspected spur regions are identified, including: The size of the pixel window is determined based on the average pixel length of historical glitch data. For each pixel window, the grayscale distribution characteristics of the pixel window are determined based on the average grayscale value within the pixel window and the average grayscale value of all pixel windows on the edge line. The number of pixels whose pixel gradient direction is perpendicular to the direction of the heat sink fins within the pixel window is determined as the gradient distribution feature of the pixel window. Based on the grayscale distribution characteristics and gradient distribution characteristics of multiple pixel windows, the spur probability of each pixel window region is determined. The pixel window region is the region formed by pixel windows at corresponding positions on two edge lines within an edge line group. The pixel window region with a glitch probability greater than a preset probability threshold is identified as the suspected glitch region.
3. The method for edge contour recognition in deburring aluminum alloy die castings according to claim 1, characterized in that, Determine the surface image set, including: Using the extension direction of the heat dissipation fins as the axis of symmetry, determine the angle between the wind direction and the axis of symmetry for each surface image; Two surface images with the same included angle are identified as the initial surface image group; If the difference in the mean grayscale value between two surface images in the initial surface image group is less than a preset mean threshold, the initial surface image group is determined to be a valid surface image group.
4. The method for edge contour recognition in deburring aluminum alloy die castings according to claim 1, characterized in that, Based on the image feature differences between the suspected burr regions in two surface images within each surface image group, a stability parameter for each suspected burr region is determined, including: For each group of surface images, determine the differences in grayscale distribution features and gradient distribution features of the suspected burr region in the two surface images; Based on the differences in grayscale distribution features and the differences in gradient distribution features, the image difference values corresponding to the surface image group are determined; The stability parameters of the suspected burr region are determined based on the image difference values of multiple surface image groups.
5. The method for edge contour recognition in deburring aluminum alloy die castings according to claim 1, characterized in that, Based on the stability parameters of each suspected burr region, the actual burr regions are determined, including: Suspected burr regions with stability parameters less than the first stability threshold are identified as large burr regions in the real burr region. Suspected burr regions with stability parameters greater than or equal to the first stability threshold and less than the second stability threshold are identified as small burr regions within the true burr region, where the first stability threshold is less than the second stability threshold.
6. The method for edge contour recognition in deburring aluminum alloy die castings according to claim 5, characterized in that, Image segmentation is performed on the actual burr region to extract the edge contours of the burrs, including: For each large burr region, a local image of the area of the large burr region, which is a preset multiple, is extracted with the large burr region as the center. For each small burr region, a local image of the small burr region is extracted; The captured local image is segmented using a preset image segmentation algorithm to obtain the foreground and background regions; The pixels within the foreground region are identified as spiky pixels; Edge extraction is performed on the burr pixels to obtain the edge contour of the burr.
7. The method for edge contour recognition in deburring aluminum alloy die castings according to claim 1, characterized in that, Multiple surface images of the aluminum alloy die-cast parts were acquired under different wind conditions, including: Surface images of the aluminum alloy die-casting were acquired under the initial wind direction; Adjust the wind direction based on a preset step size until the adjusted wind direction is the same as the initial wind direction. After each adjustment of the wind direction, a surface image of the aluminum alloy die casting is acquired.
8. The method for edge contour recognition in deburring aluminum alloy die castings according to claim 1, characterized in that, Determine multiple sets of edge lines in each surface image, including: For each surface image, the surface image is preprocessed, including grayscale conversion and histogram equalization. Extracting edge lines from the preprocessed surface image; Combine adjacent edge lines into a set of edge lines.
9. The method for edge contour recognition in deburring aluminum alloy die castings according to claim 2, characterized in that, Determine a multi-pixel window along each edge line, including: Starting from one end of the edge line, the pixels on the edge line are traversed along the extension direction of the edge line at preset intervals. The pixel window corresponding to the traversed pixel is determined according to the size of the pixel window, and the preset interval is half the size of the pixel window.
10. An edge contour recognition system for deburring aluminum alloy die-cast parts, characterized in that, include: An image acquisition module is used to acquire multiple surface images of an aluminum alloy die casting under different wind conditions. The aluminum alloy die casting includes multiple spaced heat dissipation fins. The straight line recognition module is used to identify multiple sets of edge lines in each surface image, with each set of edge lines corresponding to the two sides of a heat sink fin. The region determination module is used to determine suspected spur regions in any surface image based on the gray-level distribution features and gradient distribution features of each pixel window on each set of edge lines. The gray-level distribution features are used to characterize the difference between the gray-level value of the pixel window and the gray-level values of all pixel windows on the edge lines. The gradient distribution features are used to characterize the consistency of the distribution of pixel gradient directions within the pixel window. The pixel gradient direction is the direction in which the gray-level difference between the pixel and its neighboring pixels is the greatest. The data processing module is used to determine the stability parameters of each suspected burr region based on the image feature differences between the two surface images in each surface image group. Each surface image group includes two surface images acquired under the condition that the wind direction is symmetrical with respect to the heat sink fins. The image feature differences are used to characterize the gray-scale distribution feature differences and gradient distribution feature differences of the suspected burr region in the two surface images in the surface image group. The contour extraction module is used to determine the real burr region based on the stability parameters of each suspected burr region, and to perform image segmentation on the real burr region to extract the edge contour of the burr.