A method and system for defect detection of a chainring

By marking semi-macroscopic segregation feature lines in the ray scanning image of the dental disc and constructing a microscopic segregation defect image, the problem of difficult to identify the microscopic segregation defect in the prior art is solved, rapid and non-destructive defect recognition and accurate image coverage are achieved, and the mechanical properties and corrosion resistance of the dental disc are improved.

CN120013947BActive Publication Date: 2025-06-17LANXI WHEEL TOP CYCLE IND
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510496310.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-21
Publication Date
2025-06-17
Estimated Expiration
2045-04-21

AI Technical Summary

Technical Problem

The prior art is difficult to quickly and without loss identify the microscopic segregation defect image in the disc casting, resulting in uneven mechanical properties, which can easily lead to fatigue cracks and reduce corrosion resistance.

Method used

By acquiring the ray scanning image of the dental disc, marking out the semi-macroscopic segregation feature lines, a microscopic segregation defect image is constructed, and a new ray scanning image is formed through image stitching technology to cover the complete area of ​​the microscopic segregation.

Benefits of technology

It realizes lossless and rapid identification of defective images of microsegregation, improves image recognition accuracy, covers the complete area of ​​microsegregation, and enhances the mechanical properties and corrosion resistance of the disc.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120013947B_ABST
    Figure CN120013947B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of casting image processing. The present invention discloses a method and system for defect detection of a chainring, obtaining a ray scan image of the chainring, and marking semi-macroscopic segregation feature lines in the ray scan image; constructing a defect image of microscopic segregation from the diffusion distribution positions of the semi-macroscopic segregation feature lines; forming a new ray scan image on the ray scan image from the defect image of microscopic segregation, capable of nondestructively and quickly identifying the defect image of microscopic segregation through a common ray scan method, and can cover the complete area of microscopic segregation, improving the image recognition accuracy, and can improve the graphic recognition accuracy of the defect image through a precisely trained image recognition model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of cast image processing, and particularly relates to a method and system for detecting defects of a chainring. Background Art

[0002] The chainring plays a key role in the mechanical transmission system. In the casting process of the chainring, the liquid alloy metal melt is poured into the mold for solidification. However, during the solidification process of the chainring melt, due to the differences in various metal components and physical properties in the alloy metal melt, the material flow is uneven. This phenomenon is particularly obvious in common casting processes such as centrifugal casting, continuous casting, and squeeze casting of the chainring. Because during the forming process in the chainring mold under the action of the centrifugal force of high-speed rotation in centrifugal casting, the heavy elements in the material will migrate to the outside, forming regions with higher specific gravity, resulting in uneven distribution of alloy components or specific gravity in different regions of the chainring, that is, the phenomenon of specific gravity segregation. At the same time, due to the strong directional heat dissipation through the mold wall when pouring the casting key, a large temperature difference is formed, resulting in the enrichment of high-melting-point components in the outer region, the enrichment of low-melting-point components, non-metallic impurities and gases in the core, and it is also possible to produce regional segregation (also known as macrosegregation) due to the physical movement of the liquid or solid phase during the solidification process. Specific gravity segregation (i.e., microsegregation, also called microscopic segregation) is the phenomenon that when the density of the precipitated crystal is different from that of the solution, the crystal sinks or floats in the solution to form uneven chemical composition. The slower the cooling and the slower the increase in crystal quantity.

[0003] These two segregation phenomena will lead to non-uniform mechanical properties of the chainring. Especially when subjected to alternating loads (loads whose magnitude and direction change periodically with time during operation), the segregation phenomenon may lead to the formation and expansion of fatigue cracks, reduce the mechanical properties of the casting, easily cause hot cracks and cold cracks, reduce the corrosion resistance of the casting, and seriously lead to the scrapping or failure of the casting due to unqualified performance or fracture. Since macrosegregation is mainly manifested as the non-uniformity of chemical components in different regions inside the chainring casting, it can be observed by the naked eye or a low-power microscope, while microsegregation refers to the non-uniformity of chemical components between grains or near grain boundaries inside the chainring casting, which usually needs to be observed by a high-power microscope or an electron microscope. See reference: Qu Ying. Principles of Steelmaking [M]. Metallurgical Industry Press, 1994. Therefore, in the existing defect detection technologies (carbon and sulfur detection, chemical analysis, direct-reading spectroscopy, metal in-situ analysis methods), many defect images involving microsegregation on the image of the chainring casting cannot be directly detected, and it is even more impossible to quickly and nondestructively identify the defect images of microsegregation through common macro detection technologies such as DR ray scanning and ultrasonic scanning. Summary of the Invention

[0004] The object of the present invention is to provide a method and system for detecting defects of a chainring, so as to solve one or more technical problems existing in the prior art, and at least provide a beneficial alternative or create conditions.

[0005] To achieve the above object, according to one aspect of the present invention, a method for detecting defects of a chainring is provided. The method includes the following steps:

[0006] Obtain a radiographic scan image of the chainring, and mark the semi-macroscopic segregation characteristic lines in the radiographic scan image;

[0007] Construct a defect image of microscopic segregation from the diffusion distribution positions of the semi-macroscopic segregation characteristic lines;

[0008] Form a new radiographic scan image on the radiographic scan image from the defect image of microscopic segregation.

[0009] Further, the method for obtaining the radiographic scan image of the chainring is: scanning the chainring through an XB-18 MaiCiXiongYe real-time digital imaging detection system to obtain the radiographic scan image.

[0010] Further, the method for marking the semi-macroscopic segregation characteristic lines in the radiographic scan image is: mark the boundary lines of the sub-images obtained by segmenting the radiographic scan image through the threshold segmentation method, where the average gray value of all points on the boundary line of the sub-image is less than the average gray value of the radiographic scan image, as the semi-macroscopic segregation characteristic lines.

[0011] Preferably, the threshold segmentation method is the maximum inter-class variance method or the histogram bimodal method.

[0012] Preferably, the method for marking the semi-macroscopic segregation characteristic lines in the radiographic scan image is: mark the region of interest of the radiographic scan image, and use the boundary line of the region of interest as the semi-macroscopic segregation characteristic lines.

[0013] Since the defect image of microscopic segregation is difficult to be directly obtained through macroscopic rapid radiographic scanning detection, but there are some small macroscopic V-shaped segregations (semi-macroscopic segregations, V-shaped segregation) that have always been considered not to be a problem and will not affect the quality of the chainring. According to relevant research, see reference: Yang Wen, Gan Ping. Semi-macroscopic segregation of continuous casting billets [J]. Steel Research Intelligence, 1983(03):77-78. DOI: CNKI:SUN:GTYJ.0.1983-03-010. Semi-macroscopic segregation is mainly caused by the flow and accumulation of high-concentration liquid phase accompanied by solidification shrinkage, and its size is between macroscopic segregation and microscopic segregation. And the diffusion of semi-macroscopic segregation in a small area will lead to invisible but serious microscopic segregation. By analyzing the diffusion distribution law of V-shaped segregation (semi-macroscopic segregation), the present application constructs a defect image of microscopic segregation through the following method, specifically:

[0014] Furthermore, the method for constructing the defect image of microsegregation from the diffusion distribution position of the semi-macroscopic segregation characteristic line is as follows:

[0015] Mark the V-shaped pointing points on each semi-macroscopic segregation characteristic line;

[0016] Specifically: Denote the vertex of the acute angle on the semi-macroscopic segregation characteristic line as the V-shaped pointing point, or, denote the corner point that is farthest from the geometric centroid point of the region formed by the semi-macroscopic segregation characteristic line among all the corner points on the semi-macroscopic segregation characteristic line as the V-shaped pointing point;

[0017] Determine the defect positioning range corresponding to each V-shaped pointing point;

[0018] Specifically: Take the corner point with the minimum gray value among the corner points on the semi-macroscopic segregation characteristic line except the V-shaped pointing point B as A, and the corner point with the maximum gray value as C; Connect points A, B, and C to obtain the flow source region △ABC, and rotate △ABC 180° clockwise from vertex B to obtain the flow direction region △DBF; Denote △DBF as the defect positioning range.

[0019] Although the above defect positioning range of the triangle can roughly estimate the approximate range where microsegregation may spread in a small area, and the recognition speed is relatively fast due to the simple algorithm, however, due to solidification shrinkage, gravity-induced convection, and solid movement (such as bulging), the resulting local contraction stress will be greater and smoother than the triangle region, which will lead to insufficient accuracy of the above defect positioning range and difficulty in covering the complete region of microsegregation. To improve the positioning accuracy of the defect range, the present application provides the following preferred method:

[0020] Preferably, take the corner point with the minimum gray value among the corner points on the semi-macroscopic segregation characteristic line except the V-shaped pointing point B as A, and the corner point with the maximum gray value as C; Connect points A, B, and C to obtain the flow source region △ABC, and rotate △ABC 180° clockwise from vertex B to obtain the flow direction region △DBF; Denote the sector formed with ∠B of △DBF as the central angle and side BF as the radius as the extended region, and denote the extended region as the defect positioning range.

[0021] Wherein, the symbol △ represents a triangle, and the symbol ∠ represents the angle symbol for measuring angles.

[0022] Search for paired points in each defect positioning range, and construct the defect image of microsegregation from each paired point;

[0023] Specifically: Take all the V-shaped pointing points within the defect positioning range as paired points; (Note: Each V-shaped pointing point corresponds to a defect positioning range);

[0024] Take the range with the minimum average gray value in the defect localization ranges corresponding to each pair of points as LRage, and the range with the maximum average gray value as HRage; (Since the smaller the gray value after solidification of semi-macroscopic segregation, the deeper the segregation, and vice versa, the defect localization range LRage with the minimum gray value (dark color) is the area with the greatest diffusion flow force starting from the pair of points, while the defect localization range HRage with the maximum gray value (light color) is the area with the smallest diffusion flow force starting from the pair of points. Diffusion flow will cause micro-segregation to occur in the defect localization range);

[0025] Take the intersection area of the defect localization ranges corresponding to each pair of points as the core image block; Take the complements of LRage and the core image block whose average gray value is less than the average gray value of the core image block as the first stitching image; Take the complements of HRage and the core image block whose average gray value is greater than the average gray value of the core image block as the second stitching image;

[0026] Perform image stitching on the first stitching image, the second stitching image, and the core image block to obtain the defect image of micro-segregation.

[0027] The above method identifies each micro-segregation region generated on the diffusion path of semi-macroscopic segregation in a small area range according to the magnitude of the diffusion flow force starting from the pair of points, based on the regions from deep to shallow segregation, and stitches the corresponding defect image of micro-segregation; However, in actual production, sometimes the diffusion path of semi-macroscopic segregation is not linear. Due to the centrifugal force of centrifugal casting or the die-casting tension, the diffusion path of semi-macroscopic segregation spreads open in all directions. Therefore, the present application proposes the following preferred method to identify all images associated with the core image:

[0028] Preferably, take all V-shaped pointing points within the defect localization range as pairs of points;

[0029] Take the range with the minimum average gray value in the defect localization ranges corresponding to each pair of points as LRage, and the range with the maximum average gray value as HRage;

[0030] Denote the pair of points corresponding to LRage as PL, and the pair of points corresponding to HRage as PT. Connect PL to PT to form a straight line denoted as the diffusion streamline. Take the intersection area of the defect localization ranges corresponding to each pair of points as the core image block; Take the complement images of the defect localization ranges corresponding to each pair of points and the core image block; Arrange the complement images in a sequence in ascending order of the distance from the centroid point of each complement image set to the diffusion streamline, denoted as the diffusion image sequence; Denote all complement images that meet the diffusion flow condition as stitching images; Perform image stitching on all stitching images and the core image block to obtain the defect image of micro-segregation.

[0031] Among them, the diffusion flow condition is: HG(i - 1) > HG(i) and HG(i) < HG(i + 1);

[0032] HG(i) is the average gray value of all images from the 1st to the ith image in the diffusion image sequence, and i is the serial number.

[0033] Furthermore, the method for forming a new ray scan image from the defect image of microsegregation on the ray scan image includes:

[0034] Cover the defect image of microsegregation at the corresponding position on the ray scan image to obtain a covered ray scan image;

[0035] Perform image denoising on the covered ray scan image through a median filtering algorithm to obtain a denoised scan image;

[0036] Adjust the contrast of the scan image through a histogram equalization algorithm to obtain an adjusted scan image;

[0037] Perform color correction processing on the adjusted scan image through a white balance algorithm to obtain a corrected scan image;

[0038] Input the corrected scan image into the generator of a pre - set generative adversarial network for image generation to obtain a labeled scan image;

[0039] Input the labeled scan image into the discriminator of the generative adversarial network for image optimization to obtain a new ray scan image.

[0040] Preferably, the method for forming a new ray scan image from the defect image of microsegregation on the ray scan image is replaced by:

[0041] Train a convolutional neural network with the defect image of microsegregation to obtain a trained convolutional neural network;

[0042] Identify the ray scan image through the trained convolutional neural network to obtain a newly labeled ray scan image.

[0043] Preferably, the method for forming a new ray scan image from the defect image of microsegregation on the ray scan image is replaced by:

[0044] Mark the corresponding position of the defect image of microsegregation on the ray scan image to obtain a new ray scan image.

[0045] The present invention also provides a defect detection system for a chainring. The defect detection system for a chainring includes: a processor, a memory, and a computer script program stored in the memory and executable on the processor. When the processor executes the computer script program, the steps in the defect detection method for a chainring are implemented. The defect detection system for a chainring can run on computing devices such as a desktop computer, a laptop computer, a handheld computer, and a cloud data center. The operable system may include, but is not limited to, a processor, a memory, and a server cluster. The processor executes the computer program and runs in the following units of the system:

[0046] A segregation feature marking unit, configured to obtain a ray scan image of the chainring and mark semi-macroscopic segregation feature lines in the ray scan image;

[0047] A defect image construction unit, configured to construct a defect image of microscopic segregation from the diffusion distribution positions of the semi-macroscopic segregation feature lines;

[0048] A microscopic image display unit, configured to form a new ray scan image on the ray scan image from the defect image of microscopic segregation.

[0049] The beneficial effects of the present invention are as follows: The present invention provides a defect detection method and system for a chainring, which can quickly and nondestructively identify a defect image of microscopic segregation through a common ray scan method, and can cover the entire area of microscopic segregation, improving the image recognition accuracy. Moreover, the graphic recognition accuracy of the defect image can be improved through a precisely trained image recognition model. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] By describing the embodiments shown in the accompanying drawings in detail, the above and other features of the present invention will become more obvious. The same reference numerals in the drawings of the present invention denote the same or similar elements. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts. In the drawings:

[0051] Figure 1 Shown is a flowchart of a defect detection method for a chainring;

[0052] Figure 2 Shown is a new ray scan image formed by adding a defect image of microscopic segregation in Embodiment 1;

[0053] Figure 3 Shown is a new ray scan image formed by adding a defect image of microscopic segregation in Embodiment 2;

[0054] Figure 4Shown is a new ray scan image for forming a defect image with increased microsegregation in Example 3;

[0055] Figure 5 Shown is a defect detection system diagram based on a chainring. Detailed implementation manners

[0056] The following will clearly and completely describe the concept, specific structure and technical effects generated by the present invention in combination with the embodiments and the drawings, so as to fully understand the purpose, solution and effects of the present invention. It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.

[0057] Example 1

[0058] As Figure 1 Shown is a flowchart of a defect detection method for a chainring according to the present invention. The following will describe a defect detection method for a chainring according to the implementation manner of the present invention in combination with Figure 1 to elaborate on a defect detection method for a chainring according to the implementation manner of the present invention.

[0059] A defect detection method for a chainring specifically includes the following steps:

[0060] Obtain a ray scan image of the chainring, and mark the semi-macroscopic segregation characteristic line in the ray scan image;

[0061] Construct a defect image of microsegregation from the diffusion distribution positions of the semi-macroscopic segregation characteristic lines;

[0062] Form a new ray scan image on the ray scan image from the defect image of microsegregation.

[0063] Further, the method for obtaining the ray scan image of the chainring is: scanning the chainring through an XB-18 Maicixiongye real-time digital imaging detection system to obtain a ray scan image.

[0064] Among them, the ray scan image is corrected for scattered rays.

[0065] Further, the method for marking the semi-macroscopic segregation characteristic line in the ray scan image is: marking the boundary line of the sub-image whose average gray value of all points on the boundary line in the sub-image obtained by segmenting the ray scan image through the threshold segmentation method is less than the average gray value of the ray scan image as the semi-macroscopic segregation characteristic line.

[0066] Among them, the threshold segmentation method is the maximum between-class variance method.

[0067] Since it is difficult to directly obtain the defect image of microsegregation through macroscopic rapid ray scanning detection, but there are some small macroscopic V-shaped segregations (semi-macroscopic segregations) that have always been considered not a problem and will not affect the quality of the chainring. According to relevant research, see reference: Yang Wen, Gan Ping. Semi-macroscopic Segregation of Continuous Casting Billets [J]. Steel Research Intelligence, 1983(03):77-78.DOI:CNKI:SUN:GTYJ.0.1983-03-010, semi-macroscopic segregation is mainly formed by the flow and accumulation of high-concentration liquid phase accompanying solidification shrinkage, and its size is between macroscopic segregation and microsegregation. The diffusion of semi-macroscopic segregation in a small area will lead to invisible and serious microsegregation. By analyzing the diffusion distribution law of V-shaped segregation (semi-macroscopic segregation), the present application constructs the defect image of microsegregation through the following methods, specifically:

[0068] Furthermore, the method for constructing the defect image of microsegregation from the diffusion distribution position of the semi-macroscopic segregation characteristic line is as follows:

[0069] Mark the V-shaped pointing points on each semi-macroscopic segregation characteristic line;

[0070] Specifically: Denote the vertex of the acute angle on the semi-macroscopic segregation characteristic line as the V-shaped pointing point;

[0071] Determine the defect positioning range corresponding to each V-shaped pointing point;

[0072] Specifically: Take the corner point with the smallest gray value among the corner points on the semi-macroscopic segregation characteristic line except the V-shaped pointing point B as A, and the corner point with the largest gray value as C; Connect points A, B, and C to obtain the flow source area △ABC, and rotate △ABC 180° clockwise from vertex B to obtain the flow direction area △DBF; Denote △DBF as the defect positioning range.

[0073] Among them, the key source code described in C# language for the specific implementation of the method for determining the defect positioning range corresponding to each V-shaped pointing point is:

[0074] class Program

[0075] { / / The corner point list is pointList, and each point contains a gray value

[0076] List <pointwithgrayvalue>pointList = GetCornerPoints();

[0077] / / Find the corner point A with the smallest gray value and the corner point C with the largest gray value, excluding the point B pointed by the V shape

[0078] PointWithGrayValue A = FindMinGrayValuePoint(pointList, outPointWithGrayValue B);

[0079] PointWithGrayValue C = FindMaxGrayValuePoint(pointList, B);

[0080] / / Calculate the mobile source area △ABC

[0081] Triangle ABC = new Triangle(A.Point, B.Point, C.Point);

[0082] / / Rotate △ABC to obtain the mobile direction area △DBF

[0083] Triangle DBF = RotateTriangle(ABC, B.Point, 180);

[0084] static List <pointwithgrayvalue>GetCornerPoints()

[0085] {static PointWithGrayValue FindMinGrayValuePoint(List <pointwithgrayvalue>points, out PointWithGrayValue excludedPoint)

[0086] {excludedPoint = points.Find(p => p.Point == new Point(125, 225)); / / Assume this is point B

[0087] PointWithGrayValue minPoint = null;

[0088] foreach (var point in points)

[0089] {if (!point.Equals(excludedPoint) && (minPoint == null || point.GrayValue < minPoint.GrayValue))

[0090] {minPoint = point;}}

[0091] return minPoint;}

[0092] static PointWithGrayValue FindMaxGrayValuePoint(List <pointwithgrayvalue>points, PointWithGrayValue excludedPoint)

[0093] {PointWithGrayValue maxPoint = null;

[0094] foreach (var point in points)

[0095] {if (!point.Equals(excludedPoint)&&(maxPoint == null ||point.GrayValue>maxPoint.GrayValue))

[0096] {maxPoint = point;}}

[0097] return maxPoint;}

[0098] static Triangle RotateTriangle(Triangle triangle, Point rotationCenter, float angle)

[0099] {Point vertex1 = RotatePoint(triangle.Vertex1, rotationCenter, angle);

[0100] Point vertex2 = RotatePoint(triangle.Vertex2, rotationCenter, angle);

[0101] Point vertex3 = RotatePoint(triangle.Vertex3, rotationCenter, angle);

[0102] return new Triangle(vertex1, vertex2, vertex3);}

[0103] static Point RotatePoint(Point point, Point center, float angle)

[0104] {double radians = angle * Math.PI / 180;

[0105] int x = (int)(Math.Cos(radians) * (point.X - center.X) - Math.Sin(radians) * (point.Y - center.Y) + center.X);

[0106] int y = (int)(Math.Sin(radians) * (point.X - center.X) + Math.Cos(radians) * (point.Y - center.Y) + center.Y);

[0107] return new Point(x, y);}}

[0108] class PointWithGrayValue

[0109] {public Point Point { get;}

[0110] public int GrayValue { get;}

[0111] public PointWithGrayValue(Point point, int grayValue)

[0112] {Point = point;

[0113] GrayValue = grayValue;}}。

[0114] Search for paired points within each defect location range, and construct a defect image of microsegregation from each paired point;

[0115] Specifically: Use all V-shaped pointing points within the defect location range as paired points; (Note: Each V-shaped pointing point corresponds to a defect location range);

[0116] Take the range with the minimum average gray value in the defect location range corresponding to each paired point as LRage, and the range with the maximum average gray value as HRage; (Since for semi-macrosegregation, the smaller the gray value after solidification, the deeper the segregation, and vice versa, the range LRage with the minimum gray value (dark color) is the area with the greatest diffusion flow force starting from the paired point, and the range HRage with the maximum gray value (light color) is the area with the smallest diffusion flow force starting from the paired point. Diffusion flow will cause microsegregation to occur in the defect location range);

[0117] Take the intersection area of the defect location ranges corresponding to each pair of points as the core image block; take the complement of the LRage and the core image block in which the average gray value in each complement is less than the average gray value of the core image block as the first stitched image; take the complement of the HRage and the core image block in which the average gray value in each complement is greater than the average gray value of the core image block as the second stitched image;

[0118] Stitch the first stitched image, the second stitched image and the core image block to obtain the defect image of microsegregation.

[0119] Among them, the key source code described in C# language for the specific implementation of the method of searching for paired points in each defect location range and constructing the defect image of microsegregation from each paired point is as follows:

[0120] public class DefectImageMerger

[0121] {public List <defectregion>DefectRegions { get; set;} / / Defect location range

[0122] public List <pointf>VPoints { get; set;} / / V-shaped pointing points

[0123] public DefectImageMerger(List <defectregion>defectRegions, List <pointf>vPoints)

[0124] {DefectRegions = defectRegions;

[0125] VPoints = vPoints;}

[0126] public Image MergeDefectImages()

[0127] {var pairingPoints = VPoints;

[0128] var LRange = GetLRage(pairingPoints);

[0129] var HRange = GetHRage(pairingPoints);

[0130] var coreImageBlock = CalculateCoreImageBlock(pairingPoints);

[0131] var firstStitchImage = GetFirstStitchImage(LRange, coreImageBlock);

[0132] var secondStitchImage = GetSecondStitchImage(HRange, coreImageBlock);

[0133] return StitchImages(firstStitchImage, secondStitchImage,coreImageBlock);

[0134] }

[0135] private DefectRegion GetLRage(IEnumerable <pointf>pairingPoints)

[0136] { / / Obtain the region with the minimum average gray value in the defect localization range corresponding to each pairing point

[0137] return pairingPoints.Select(p => GetDefectRegionAtPoint(p))

[0138] OrderBy(region => region.AverageGrayValue)

[0139] FirstOrDefault();}

[0140] private DefectRegion GetHRage(IEnumerable <pointf>pairingPoints)

[0141] { / / Obtain the region with the largest average gray value in the defect location range corresponding to each pairing point

[0142] return pairingPoints.Select(p => GetDefectRegionAtPoint(p))

[0143] OrderByDescending(region => region.AverageGrayValue)

[0144] FirstOrDefault();}

[0145] private DefectRegion CalculateCoreImageBlock(IEnumerable <pointf>pairingPoints)

[0146] { / / Calculate the intersection of the defective regions corresponding to all pairing points

[0147] return new DefectRegion(); / / Return the core image block}

[0148] private Image GetFirstStitchImage(DefectRegion LRange, DefectRegion coreImageBlock)

[0149] {var complementImages = GetComplementImages(LRange);

[0150] var validComplements = complementImages.Where(img => img.AverageGrayValue < coreImageBlock.AverageGrayValue).ToList();

[0151] / / Stitch the valid complement images

[0152] return CombineImages(validComplements);}

[0153] private Image GetSecondStitchImage(DefectRegion HRange, DefectRegion coreImageBlock)

[0154] {var complementImages = GetComplementImages(HRange);

[0155] var validComplements = complementImages.Where(img => img.AverageGrayValue > coreImageBlock.AverageGrayValue).ToList();

[0156] / / Stitch the valid complement images

[0157] return CombineImages(validComplements);}

[0158] private List GetComplementImages(DefectRegion region)

[0159] { / / Get the complementary images according to the defect region

[0160] return new List (); / / Return the list of complementary images}

[0161] private Image StitchImages(Image firstStitch, Image secondStitch,DefectRegion coreImageBlock)

[0162] { return new Bitmap(1, 1); / / Return the final stitched image}

[0163] private Image CombineImages(List images)

[0164] {return new Bitmap(1, 1); / / Return the image of the combined result}

[0165] private DefectRegion GetDefectRegionAtPoint(PointF point)

[0166] { / / Get the defect location range (DefectRegion) according to the point

[0167] / / Get the area data corresponding to this point here

[0168] return new DefectRegion(); / / Return the defect region}}.

[0169] Among them, according to the formation mechanism of the V-shaped pointing point of macrosegregation, it can be known that the diffusion within the small area formed by the flow channels formed by the sliding of the second-phase region in the equiaxed crystal at the corresponding position of the V-shaped pointing point will form a defect image of microsegregation nearby; each pair of points can accurately locate the position of the defect image of microsegregation in the ray-scanned image.

[0170] Among them, the formation mechanism of the V-shaped pointing point of semi-macroscopic segregation is as follows: In the initial stage of solidification, columnar crystals grow. As the temperature decreases, equiaxed crystals begin to grow and replace the columnar crystals; when there is still liquid in the center of the slab, there is still a small amount of solid phase in the liquid phase, forming a two-phase region with fluid properties; due to the action of gravity and solidification shrinkage, equiaxed crystals slide in the two-phase region, forming flow channels; these flow channels are located in the V-shaped cone region along the pouring direction, and V-shaped segregation is formed during the final solidification, and its V-shaped vertex is the V-shaped pointing point. See the reference: Zhang Weiping, Shen Houfa. Several factors affecting A and V-shaped segregation in ingots [J]. Angang Technology, 1995(6):6.

[0171] Furthermore, the method for forming a new ray scan image from the defect image of microscopic segregation on the ray scan image includes:

[0172] Cover the defect image of microscopic segregation at the corresponding position on the ray scan image to obtain a covered ray scan image;

[0173] Perform image denoising on the covered ray scan image through a median filtering algorithm to obtain a denoised scan image;

[0174] Adjust the contrast of the scan image through a histogram equalization algorithm to obtain an adjusted scan image;

[0175] Perform color correction processing on the adjusted scan image through a white balance algorithm to obtain a corrected scan image;

[0176] Input the corrected scan image into the generator of a pre-set generative adversarial network for image generation to obtain a labeled scan image;

[0177] Input the labeled scan image into the discriminator of the generative adversarial network for image optimization to obtain a new ray scan image as Figure 2 shown.

[0178] Embodiment 2

[0179] This Embodiment 2 replaces the method of marking all the same boundary points corresponding to the current crack boundary points on the basis of Embodiment 1. Specifically:

[0180] On the basis of Embodiment 1, replace the method of marking the semi-macroscopic segregation feature lines in the ray scan image with: Mark the region of interest in the ray scan image, and use the boundary line of the region of interest as the semi-macroscopic segregation feature line.

[0181] On the basis of Embodiment 1, replace the method of marking the V-shaped pointing points on each semi-macroscopic segregation feature line with: Denote the corner point farthest from the geometric centroid point of the region formed by the semi-macroscopic segregation feature line among each corner point on the semi-macroscopic segregation feature line as the V-shaped pointing point.

[0182] Although the defect location range of the above triangle can roughly estimate the approximate range where microsegregation may spread in a small area, and the recognition speed is relatively fast due to the simple algorithm, however, due to solidification shrinkage, gravity-induced convection, and solid movement (such as bulging), the local contraction stress generated will be greater and smoother than that in the triangular area, resulting in insufficient accuracy of the above defect location range and difficulty in covering the entire area of microsegregation. To improve the accuracy of defect range location, the present application provides the following preferred methods:

[0183] On the basis of Embodiment 1, the method for determining the defect location range corresponding to each V-shaped pointing point is replaced as follows: The corner point with the smallest gray value among the corner points on the semi-macrosegregation characteristic line except the V-shaped pointing point B is designated as A, and the corner point with the largest gray value is designated as C; Connect points A, B, and C to obtain the flow source region △ABC, and rotate △ABC 180° clockwise from vertex B to obtain the flow direction region △DBF; The sector formed with ∠B of △DBF as the central angle and side BF as the radius is denoted as the extended region, and the extended region is denoted as the defect location range.

[0184] Among them, the symbol △ represents a triangle, and the symbol ∠ represents the angle symbol for measuring angles.

[0185] Among them, the key source code described in C# language for the specific implementation of the method for determining the defect location range corresponding to each V-shaped pointing point in this Embodiment 2 is as follows:

[0186] using System.Drawing; / / Use the System.Drawing.Common NuGet package

[0187] public class DefectLocationProcessor

[0188] {public List <pointgray>CornerPoints { get; set;} / / Set of corner points, including points and corresponding gray values

[0189] public DefectLocationProcessor(List <pointgray>cornerPoints)

[0190] {CornerPoints = cornerPoints;}

[0191] public (PointF A, PointF B, PointF C, PointF D, PointF F) CalculateRegions()

[0192] {if (CornerPoints == null || CornerPoints.Count < 3)

[0193] throw new InvalidOperationException("At least three corner points are required");

[0194] / / Determine points A, B, and C

[0195] var pointB = GetPointB(); / / Point to point B

[0196] var pointA = GetPointWithMinGrayValue(pointB); / / Corner point with the minimum gray value

[0197] var pointC = GetPointWithMaxGrayValue(); / / Corner point with the maximum gray value

[0198] / / Calculate points D and F to form the extended region

[0199] var pointD = RotatePoint(pointB, pointA, 180);

[0200] var pointF = RotatePoint(pointB, pointC, 180);

[0201] return (pointA, pointB, pointC, pointD, pointF);}

[0202] private PointF GetPointB()

[0203] { / / V-shaped pointing point

[0204] return new PointF(CornerPoints[0].X, CornerPoints[0].Y);}

[0205] private PointF GetPointWithMinGrayValue(PointF excludePoint)

[0206] {float minGray = float.MaxValue;

[0207] PointF minPoint = PointF.Empty;

[0208] foreach (var point in CornerPoints)

[0209] {if (point.ToPointF() != excludePoint&&point.GrayValue<minGray){

[0210] minGray = point.GrayValue;

[0211] minPoint = point.ToPointF();}}

[0212] return minPoint;}

[0213] private PointF GetPointWithMaxGrayValue()

[0214] {float maxGray = float.MinValue;

[0215] PointF maxPoint = PointF.Empty;

[0216] foreach (var point in CornerPoints)

[0217] {if (point.GrayValue>maxGray){

[0218] maxGray = point.GrayValue;maxPoint = point.ToPointF();

[0219] }}

[0220] return maxPoint;}

[0221] / / Rotate △ABC 180° clockwise around vertex B to obtain the flow direction area △DBF

[0222] private PointF RotatePoint(PointF center, PointF point, float angle)

[0223] {double radians = angle * Math.PI / 180.0;

[0224] float cosTheta = (float)Math.Cos(radians);

[0225] float sinTheta = (float)Math.Sin(radians);

[0226] float rotatedX = center.X + (point.X - center.X) * cosTheta -(point.Y - center.Y) * sinTheta;

[0227] float rotatedY = center.Y + (point.X - center.X) * sinTheta +(point.Y - center.Y) * cosTheta;

[0228] return new PointF(rotatedX, rotatedY);}}

[0229] public class PointGray

[0230] {public int X { get; set;}

[0231] public int Y { get; set;}

[0232] public float GrayValue { get; set;}

[0233] public PointF ToPointF() =>new PointF(X, Y);}。

[0234] The method of replacing the ray-scanned image with a new ray-scanned image formed by the defect image of microscopic segregation is as follows: Mark the corresponding positions of the defect images of microscopic segregation on the ray-scanned image to obtain a new ray-scanned image as shown in Figure 3 shown below.

[0235] Example 3

[0236] The above method identifies each microscopic segregation region generated on the diffusion path of semi-macroscopic segregation within a small area range according to the magnitude of the diffusion flow force starting from the paired points, and identifies the regions from deep to shallow segregation, and stitches together the corresponding defect images of microscopic segregation; however, in actual production, sometimes the diffusion path of semi-macroscopic segregation is not linear. Due to the centrifugal force of centrifugal casting or the die-casting tension, the diffusion path of semi-macroscopic segregation diffuses open-ended in all directions. Therefore, the present application proposes the following preferred method to identify all images associated with the core image:

[0237] In this Example 3, on the basis of Example 1, the method of searching for paired points in each defect positioning range and constructing the defect image of microscopic segregation from each paired point is replaced with:

[0238] Preferably, all V-shaped pointing points within the defect positioning range are used as paired points;

[0239] The range with the minimum average gray value in the defect positioning range corresponding to each paired point is denoted as LRage, and the range with the maximum average gray value is denoted as HRage;

[0240] Denote the paired point corresponding to LRage as PL, and the paired point corresponding to HRage as PT. Connect PL to PT to form a straight line denoted as the diffusion streamline. Take the intersection region of the defect positioning ranges corresponding to each paired point as the core image block; take the complementary images of the defect positioning ranges corresponding to each paired point and the core image block; arrange the complementary images in a sequence in ascending order of the distance from the centroid point of each complementary image set to the diffusion streamline, denoted as the diffusion image sequence; denote all complementary images that meet the diffusion flow condition as the stitching images; stitch all the stitching images with the core image block to obtain the defect image of microscopic segregation.

[0241] Among them, the diffusion flow condition is: HG(i - 1) > HG(i) and HG(i) < HG(i + 1);

[0242] HG(i) is the average gray value of all images from the 1st to the ith image in the diffusion image sequence, and i is the serial number.

[0243] Among them, the key source code described in C# language for the specific implementation of the method of searching for paired points in each defect positioning range and constructing the defect image of microscopic segregation in this Example 3 is as follows:

[0244] using System.Drawing; / / To use the System.Drawing.Common NuGet package

[0245] class DefectImageProcessor

[0246] {public DefectImageProcessor(List coreImageBlock, List <point>pl, List <point>pt)

[0247] {CoreImageBlock = coreImageBlock;

[0248] LRage PL = pl; HRage PT = pt;}

[0249] public List ProcessImages()

[0250] {var diffuseImages = new List ();

[0251] / / Calculate the complementary image of the core image block

[0252] foreach (var image in CoreImageBlock)

[0253] {var complementImage = CalculateComplement(image);

[0254] diffuseImages.Add(complementImage);}

[0255] / / Calculate the distance from the centroid point to the diffusion streamline between PL and PT

[0256] var sortedDiffuseImages = diffuseImages.OrderBy(img =>CalculateDistanceToLine(PL, PT, img)).ToList();

[0257] / / Calculate HG(i)

[0258] var hgValues = new List <double>();

[0259] for (int i = 0; i < sortedDiffuseImages.Count; i++)

[0260] { hgValues.Add(CalculateAverageGrayValue(sortedDiffuseImages.Take(i + 1)));}

[0261] / / Determine the stitched images

[0262] var stitchedImages = new List ();

[0263] for (int i = 1; i < hgValues.Count - 1; i++)

[0264] { if (hgValues[i - 1] > hgValues[i] && hgValues[i] < hgValues[i + 1])

[0265] { stitchedImages.Add(sortedDiffuseImages[i]);

[0266] }} / / Stitch all stitched images with the core image block

[0267] return StitchImages(stitchedImages, CoreImageBlock);}

[0268] private double CalculateAverageGrayValue(IEnumerable images)

[0269] { / / Calculate the average gray value

[0270] double totalGrayValue = 0;

[0271] int count = 0;

[0272] foreach (var img in images)

[0273] { totalGrayValue += GetImageGrayValue(img); / / The function returns the average gray value of a single image

[0274] count++;}

[0275] return count == 0? 0 : totalGrayValue / count;

[0276] }private double GetImageGrayValue(Image img)

[0277] { / / Get the average gray value of the image

[0278] Bitmap bitmap = new Bitmap(img);

[0279] double totalBrightness = 0;

[0280] for (int y = 0; y < bitmap.Height; y++)

[0281] {for (int x = 0; x < bitmap.Width; x++)

[0282] {totalBrightness += bitmap.GetPixel(x, y).GetBrightness();}}

[0283] return totalBrightness / (bitmap.Width * bitmap.Height);}}。

[0284] In this Example 3, the method of forming a new ray-scanned image from the defect image of microsegregation on the ray-scanned image in Example 1 is replaced by: training a convolutional neural network with the defect image of microsegregation to obtain a trained convolutional neural network; and identifying the ray-scanned image through the trained convolutional neural network to obtain a new ray-scanned image marked as shown Figure 4 as shown.

[0285] Among them, the diffusion flow condition is to sequentially determine all the regions affected by the tension or centrifugal force of semi-macrosegregation according to the color depth change of all microsegregations irradiated by the core image block, so as to accurately identify the defect image of microsegregation.

[0286] Preferably, it is determined whether there is a defect of microsegregation on the tooth disc according to the position of the defect image of microsegregation marked on the new ray-scanned image.

[0287] An embodiment of the present invention provides a defect detection system based on a chainring, as follows Figure 5 As shown in the figure of the defect detection system based on a chainring of the present invention, the defect detection system based on a chainring in this embodiment includes: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps in the embodiment of the above-mentioned defect detection system based on a chainring are implemented.

[0288] The system includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it runs in the following units of the system:

[0289] A segregation feature marking unit, configured to obtain a ray scan image of the chainring and mark semi-macroscopic segregation feature lines in the ray scan image;

[0290] A defect image construction unit, configured to construct a defect image of microscopic segregation from the diffusion distribution positions of the semi-macroscopic segregation feature lines;

[0291] A microscopic image display unit, configured to form a new ray scan image on the ray scan image from the defect image of microscopic segregation.

[0292] The defect detection system based on a chainring can run on computing devices such as desktop computers, laptop computers, palmtop computers, and cloud servers. The defect detection system that can run may include, but is not limited to, a processor and a memory. Those skilled in the art can understand that the above examples are merely examples of the defect detection system based on a chainring, and do not constitute a limitation on the defect detection system based on a chainring. It may include more or fewer components than the examples, or combine certain components, or different components. For example, the defect detection system based on a chainring may further include input / output devices, network access devices, buses, etc.

[0293] The so-called processor may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The processor is the control center of the operating system of the tooth disc-based defect detection system, and connects various parts of the operable system of the tooth disc-based defect detection system through various interfaces and lines.

[0294] The memory can be used to store the computer programs and / or modules. By running or executing the computer programs and / or modules stored in the memory, and by calling the data stored in the memory, the processor realizes various functions of the tooth disc-based defect detection system. The memory mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the mobile phone (such as audio data, phone book, etc.). In addition, the memory can include high-speed random access memory, and can also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0295] Although the description of the present invention has been quite detailed and several embodiments have been particularly described, it is not intended to be limited to any of these details or embodiments or any particular embodiment, so as to effectively cover the intended scope of the present invention. In addition, the present invention is described above with embodiments foreseeable by the inventor for the purpose of providing a useful description, and non-substantive modifications to the present invention that are not currently foreseeable may still represent equivalent modifications of the present invention.< / double> < / point> < / point> < / pointgray> < / pointgray> < / pointf> < / pointf> < / pointf> < / pointf> < / defectregion> < / pointf> < / defectregion> < / pointwithgrayvalue> < / pointwithgrayvalue> < / pointwithgrayvalue> < / pointwithgrayvalue>

Claims

1. A method for detecting defects in a toothed disc, characterized in that: The method comprises the following steps: Obtaining a radiographic scanning image of the toothed disc, and marking a semi-macro segregation characteristic line in the radiographic scanning image; The defect image of microsegregation is constructed from the diffuse distribution position of the semi-macro segregation characteristic line; forming a new radiographic scanning image from a microscopically segregated defect image on the radiographic scanning image; Among them, the method of constructing the defect image of micro segregation from the diffusion distribution position of the semi-macro segregation characteristic line is: Mark the V-shaped pointing points on each semi-macro-segregation characteristic line, specifically: the vertex of the acute angle on the semi-macro-segregation characteristic line is marked as the V-shaped pointing point; Determine the defect location range corresponding to each V-shaped pointing point, specifically: the corner point with the smallest gray value among the corner points on the semi-macro segregation characteristic line except the V-shaped pointing point B is A, and the corner point with the largest gray value is C; connect the three points A, B, and C to obtain the flow source area △ABC, rotate △ABC 180° clockwise from the vertex B to obtain the flow direction area △DBF; record △DBF as the defect location range; Search for pairing points in each defect positioning range, and construct a defect image of micro-segregation from each pairing point, specifically: take all V-shaped pointing points in the defect positioning range as pairing points; take the range with the smallest average grayscale value in the defect positioning range corresponding to each pairing point as LRage, and the range with the largest average grayscale value as HRage; take the intersection area of ​​the defect positioning range corresponding to each pairing point as the core image block, take the complement of LRage and each complement of the core image block whose average grayscale value is less than the average grayscale value of the core image block as the first stitched image, take HRage and each complement of the core image block whose average grayscale value is greater than the average grayscale value of the core image block as the second stitched image, and stitch the first stitched image, the second stitched image and the core image block to obtain a defect image of micro-segregation.

2. A method for detecting defects in a crankset according to claim 1, characterized in that: The method for marking the semi-macro segregation feature line in the ray scanning image is as follows: marking the boundary line of the sub-image obtained by segmenting the ray scanning image by the threshold segmentation method, in which the average gray value of all points on the boundary line is less than the average gray value of the ray scanning image, as the semi-macro segregation feature line.

3. A method for detecting defects in a crankset according to claim 1, characterized in that: The method of marking the V-shaped pointing points on each semi-macro-segregation characteristic line is replaced by: the corner point farthest from the geometric center of gravity of the area formed by the semi-macro-segregation characteristic line among each corner point on the semi-macro-segregation characteristic line is recorded as the V-shaped pointing point.

4. A method for detecting defects in a crankset according to claim 1, characterized in that: The method for determining the defect location range corresponding to each V-shaped pointing point is replaced by: the corner point with the smallest grayscale value among the corner points on the semi-macro segregation characteristic line except the V-shaped pointing point B is taken as A, and the corner point with the largest grayscale value is taken as C; the flow source area △ABC is obtained by connecting the three points A, B, and C, and the flow direction area △DBF is obtained by rotating △ABC 180° clockwise from the vertex B; the sector formed by taking ∠B of △DBF as the central angle and the side BF as the radius is recorded as the extended area, and the extended area is recorded as the defect location range.

5. A method for detecting defects in a crankset according to claim 1, characterized in that: The method of searching for paired points in each defect location range and constructing a defect image of microsegregation from each paired point is replaced by: All V-shaped pointing points within the defect positioning range are taken as pairing points; the range with the smallest average grayscale value in the defect positioning range corresponding to each pairing point is LRage, and the range with the largest average grayscale value is HRage; the pairing point corresponding to LRage is PL, the pairing point corresponding to HRage is PT, the straight line connecting PL to PT is recorded as the diffusion streamline, and the intersection area of ​​the defect positioning range corresponding to each pairing point is taken as the core image block; the complementary image of the defect positioning range corresponding to each pairing point and the core image block is taken; the sequence of complementary images is recorded as the diffusion image sequence in order from the distance from the set centroid point of each complementary image to the diffusion streamline from small to large; all complementary images that meet the diffusion flow condition are recorded as spliced ​​images; all spliced ​​images are spliced ​​with the core image block to obtain a defect image of micro segregation; wherein, the diffusion flow condition is: HG(i-1)>HG(i) and HG(i)<HG(i+1); HG(i) is the average grayscale value of all images from the 1st to the i-th image in the diffusion image sequence, and i is the sequence number.

6. A defect detection system for a toothed disc, characterized in that: The defect detection system for a crankset comprises: a processor, a memory, and a computer script program stored in the memory and running on the processor. When the processor executes the computer script program, the steps in any one of the defect detection methods for a crankset in claims 1-5 are implemented.

Citation Information

Patent Citations

  • Corroding agent for displaying continuously cast bloom semimacrosegregation and use method thereof

    CN101995350A

  • Unmanned aerial vehicle spraying defect image detection method

    CN117670834A