A Side Detection Device and Method for Hole Position Deformation of a Motorcycle Cylinder Head
By collecting the side image of the cylinder head hole position of the motorcycle, using the shape characteristics of the edge profile and the Hough circle matching degree, the hole position deformation discrimination value is constructed, which solves the problem that traditional methods are difficult to accurately detect the deformation of the cylinder head hole position, and achieves a higher detection accuracy.
Patent Information
- Application Number
- CN202411587736.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2044-11-08
AI Technical Summary
When traditional image recognition methods detect the deformation of the motorcycle cylinder head hole position, it is difficult to accurately distinguish the deformation hole position and the undeformed hole position, resulting in identification errors.
By collecting the side image of the hole position of the motorcycle cylinder head, the edge contour is constructed using the shape characteristics of the edge contour to construct the edge contour circle value, the hole edge contour is selected, and based on the difference in the center distance and radius between the hole edge contour and the Hough circle, the edge contour Hough match and hole deformation discrimination value are constructed to identify whether the hole edge contour has deformation.
It improves the accuracy of deformation detection of motorcycle cylinder head hole position, can accurately distinguish between deformation hole position and undeformed hole position, and reduces identification errors.
Smart Images

Figure CN119090891B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of image recognition, and particularly to a device and method for detecting the deformation side of the hole positions on a motorcycle cylinder head. Background Art
[0002] The function of a motorcycle cylinder head is to seal the cylinder and jointly form a closed combustion space with the piston. There are many hole positions on the cylinder head, such as intake holes, exhaust holes, spark plug mounting holes, etc., and these hole positions each undertake important functions.
[0003] During the production process of a motorcycle cylinder head, the hole positions of the cylinder head may be deformed due to factors such as extrusion and collision. When the hole positions of the cylinder head are deformed, problems such as cylinder air leakage, oil leakage, or engine performance degradation may occur. In order to prevent the deformation of the hole positions on the cylinder head from having an adverse impact on the performance of the motorcycle, it is necessary to identify the deformed hole positions during the production process. When traditional image recognition methods are used to detect the deformation of the hole positions on the cylinder head, due to the very small deformation of the hole positions, it is often impossible to accurately distinguish between the deformed hole positions and the non-deformed hole positions, resulting in misidentification. Summary of the Invention
[0004] In order to solve the above technical problems, this application provides a device and method for detecting the deformation side of the hole positions on a motorcycle cylinder head, and the specific technical solutions adopted are as follows:
[0005] In a first aspect, an embodiment of this application provides a method for detecting the deformation side of the hole positions on a motorcycle cylinder head, and this method includes the following steps:
[0006] Collect the side images of the hole positions on the motorcycle cylinder head;
[0007] Utilize the edge contour features in the side images of the hole positions on the motorcycle cylinder head to identify whether the edge contour of the hole position is deformed. Specifically:
[0008] A1. Based on the shape features of the edge contours detected in the side images of the hole positions on the motorcycle cylinder head, construct the edge contour circularity value of the edge contour, and use the edge contour circularity value to screen out the edge contours of the hole positions;
[0009] A2. Based on the center distance and radius difference between the edge contour of the hole position and the Hough circle, construct the edge contour Hough matching degree, and use the edge contour Hough matching degree to screen out the matching Hough circles of each edge contour of the hole position;
[0010] A3. Based on the edge between the edge contour of the hole position and its matching Hough circle, and the overlap difference between the edge contour of the hole position and the surrounded area of its matching Hough circle, construct the hole position deformation discrimination value of the edge contour of the hole position, and identify whether the edge contour of the hole position is deformed.
[0011] Preferably, the shape features include the curvature of the edge points on the edge contour and the overall distribution of the gradient direction.
[0012] Preferably, the method for screening the edge contour of the hole position is as follows:
[0013] Obtain the segmentation threshold among the circularity values of all edge contours;
[0014] Take the edge contour corresponding to the circularity value of the edge contour greater than the segmentation threshold as the edge contour of the hole position.
[0015] Preferably, the central coordinates of the edge contour of the hole position used in calculating the center distance are determined by the center of the minimum circumscribed rectangle of the edge contour of the hole position.
[0016] Preferably, the radius of the edge contour of the hole position used in calculating the radius difference is determined by half of the average value of the distances between the two farthest edge points longitudinally and the two farthest edge points transversely on the edge contour of the hole position it passes through.
[0017] Preferably, the Hough circle is obtained by using the Hough circle detection algorithm on the binary image of the side image of the motorcycle cylinder head holes.
[0018] Preferably, the matching Hough circle for each edge contour of the hole position is the Hough circle corresponding to the maximum value of the Hough matching degree calculated with its edge contour of the hole position.
[0019] Preferably, the construction expression of the hole position deformation discrimination value is: ; where represents the hole position deformation discrimination value of the j-th edge contour of the hole position; represents the ratio of the number of non-coincident pixels to the number of coincident pixels among all the edge pixels of the j-th edge contour of the hole position and its matching Hough circle; represents the area of the region enclosed by the matching Hough circle of the j-th edge contour of the hole position, represents the area of the region enclosed by the j-th edge contour of the hole position; exp is the exponential function with the natural constant as the base; iou is the intersection over union function.
[0020] Preferably, identifying whether the edge contour of the hole position is deformed includes: when the hole position deformation discrimination value of the edge contour of the hole position is greater than the preset threshold, identifying the edge contour of the hole position as a deformed hole position; otherwise, the edge contour of the hole position is an undeformed hole position.
[0021] In a second aspect, another embodiment of the present application provides a detection device for the deformation side of the hole positions on a motorcycle cylinder head, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above-mentioned method for detecting the deformation side of the hole positions on a motorcycle cylinder head are implemented.
[0022] The embodiments of the present application at least have the following beneficial effects:
[0023] The present application constructs a circularity value of the edge contour based on the shape characteristics of the edge contour, and screens out the edge contours of the hole positions for accurately distinguishing the edge contours of the hole positions from those of non-hole positions; based on the central distance and radius difference between the edge contour of the hole position and the Hough circle, constructs a Hough matching degree of the edge contour for characterizing the matching degree between an edge contour of a hole position and a Hough circle, so that the matching result of the Hough circle is more accurate; based on the overlap difference between the edge between the edge contour of the hole position and its matching Hough circle and the surrounding area of the edge contour of the hole position and its matching Hough circle, constructs a deformation discrimination value of the hole position for analyzing the shape difference before and after the deformation of the hole position and judging whether a hole position has deformed, greatly improving the accuracy of detecting the deformation of the hole positions on a motorcycle cylinder head. Description of the Drawings
[0024] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0025] Figure 1 It is a flowchart of the steps of a method for detecting the deformation side of the hole positions on a motorcycle cylinder head provided by an embodiment of the present application;
[0026] Figure 2 It is a flowchart of the judgment process for whether the edge contour of the hole position is deformed provided by an embodiment of the present application;
[0027] Figure 3 It is a schematic diagram of the grayscale image of the hole position side image of the motorcycle cylinder head from the first angle provided by an embodiment of the present application;
[0028] Figure 4 It is a schematic diagram of the grayscale image of the hole position side image of the motorcycle cylinder head from the second angle provided by an embodiment of the present application;
[0029] Figure 5 It is a schematic diagram of the grayscale image of the hole position side image of the motorcycle cylinder head from the third angle provided by an embodiment of the present application;
[0030] Figure 6 Schematic diagram of the grayscale image of the side image of the motorcycle cylinder head hole positions from the fourth perspective provided by an embodiment of the present application. Detailed implementation manners
[0031] In order to further elaborate on the technical means and effects adopted by the present application to achieve the predetermined invention purpose, the following specifically describes in detail, with reference to the accompanying drawings and preferred embodiments, a motorcycle cylinder head hole position deformation side detection device and method proposed according to the present application, including its specific implementation manners, structures, features, and effects. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0032] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present application belongs.
[0033] The following specifically describes, with reference to the accompanying drawings, the specific solutions of a motorcycle cylinder head hole position deformation side detection device and method provided by the present application.
[0034] Please refer to Figure 1 , which shows a flowchart of the steps of a motorcycle cylinder head hole position deformation side detection method provided by an embodiment of the present application. The method includes the following steps:
[0035] The first step is to collect the side image of the motorcycle cylinder head hole positions.
[0036] First, place the motorcycle cylinder head to be detected on the conveyor belt in sequence, and use a high-resolution camera fixed above the conveyor belt to collect the side image of the motorcycle cylinder head hole positions. During the collection process, ensure sufficient surrounding light and align the camera lens with the side of the cylinder head with hole positions. The collected image is an RGB image.
[0037] Since the camera may cause image distortion during shooting, such as barrel distortion and pincushion distortion, a distortion correction algorithm is used to correct the image to eliminate image distortion. The distortion correction algorithm is a well-known technology, and the specific process will not be elaborated here.
[0038] Thus, the side image of the motorcycle cylinder head hole positions can be collected.
[0039] The second step is to use the edge contour features in the side image of the motorcycle cylinder head hole positions to identify whether the edge contour of the hole positions has deformed.
[0040] During the production process of motorcycle cylinder heads, the reasons for hole position deformation include excessive extrusion during the die pressing process and non-standard operation processes. The edge contour of a normal hole position is the edge contour of a standard circle. If the hole position is deformed, the edge contour of the deformed hole position is similar to the edge contour of an ellipse or an irregular circle. In order to detect the deformed hole positions, in this embodiment, by comparing the differences between the edge contour of the hole position in the side image of the motorcycle cylinder head hole position and the Hough circle, a hole position deformation discrimination value is constructed to detect the deformed hole positions. The flowchart of the judgment process for whether the edge contour of the hole position is deformed is as shown in the appendix Figure 2 as follows:
[0041] A1. Based on the shape characteristics of the edge contour detected in the side image of the motorcycle cylinder head hole position, construct the edge contour similarity circle value of the edge contour, and use the edge contour similarity circle value to screen out the edge contour of the hole position.
[0042] Convert the collected side image of the motorcycle cylinder head hole position into a grayscale image, and use the grayscale image as the input of the edge detection algorithm to obtain the binary image of the grayscale image. The edge points of the binary image are marked as white, and at the same time, the gradient direction and gradient amplitude of each edge point can be obtained. Round each gradient direction to an integer, then the gradient direction of the edge point is 360 directions within [1°, 360°].
[0043] In the embodiment of the present application, the grayscale images of the side images of the motorcycle cylinder head hole positions at four different angles are respectively as shown in the appendix Figure 3 , appendix Figure 4 , appendix Figure 5 and appendix Figure 6 as shown.
[0044] This embodiment adopts the Canny edge detection algorithm. The Canny edge detection algorithm is a well-known technology, and the specific process will not be elaborated here. In other embodiments of the present application, the Sobel operator and Prewitt operator can also be used to obtain the edge points and their gradients in the grayscale image.
[0045] For the edge points obtained by the edge detection algorithm, use these edge points as the input of the edge tracking algorithm to obtain continuous edge contours. The edge tracking algorithm is a well-known technology, and the specific process will not be elaborated here. Among these edge contours, there are both the edge contours of the hole positions and the edge contours of non-hole positions. Next, it is necessary to distinguish between the edge contours of the hole positions and the edge contours of non-hole positions.
[0046] In the cylinder head, each hole position is circular and independently distributed, and the edge contour of the hole position should be closed. The curvature of each edge point in the edge contour is relatively close, and the gradient directions of each edge point in the edge contour of the hole position are different. Most of the non-hole position edge contours are not closed. These edge contours are linear or curved, and the average curvature of the edge points on the edge contour is small. On the same non-hole position edge contour, the difference in the gradient directions of each edge point is small.
[0047] In the embodiment of the present application, for any edge point of any edge contour in the side image of the motorcycle cylinder head hole position, M edge points on the left and right sides of the any edge point are respectively obtained; the any edge point and a total of 2M edge points on its two sides are subjected to curve fitting to obtain the curvature of the any edge point on the curve where it is located. Among them, the calculation process of the curvature on the curve is a well-known technology and will not be elaborated here.
[0048] Particularly, when the number of edge points on the left or right side of edge point C is less than M, the curvature of edge point C is taken to be equal to the curvature of the edge point on its left and right sides that is closest and has a number of edge points greater than or equal to M. Thus, the curvature of each edge point in each edge contour can be obtained. In this embodiment, M is taken as 5, and it can be set by the implementer according to the actual situation.
[0049] (1) Further, based on the shape characteristics of the edge contours detected in the side image of the motorcycle cylinder head hole position, an edge contour circle-likeness value of the edge contour is constructed, specifically:
[0050] Preferably, in the embodiment of the present application, the shape characteristics include the overall distribution of the curvature and gradient direction of the edge points on the edge contour.
[0051] In other embodiments of the present application, on the basis of the overall distribution of the curvature and gradient direction of the edge points on the edge contour as the shape characteristics, the shape characteristics further include the overall distribution of the tangent slope and gradient amplitude of the edge points on the edge contour.
[0052] Specifically, in an implementation manner of the embodiment of the present application, taking the i-th edge contour as an example, the edge contour circle-likeness value of the i-th edge contour is calculated, specifically:
[0053] The sequence formed by the gradient directions of all edge points in the i-th edge contour is denoted as . When the i-th edge contour is the edge contour of the hole position, the data in it is diverse, and the information entropy of has a smaller information entropy and a smaller variance; if the edge contour is curvilinear, compared with the circular edge contour, the has a smaller information entropy and a smaller range.
[0054] Based on the above features, an edge contour circularity value is constructed to characterize the possibility that an edge contour belongs to the edge contour of a hole position. The edge contour circularity value of the i-th edge contour is expressed as: ; in the formula, represents the edge contour circularity value of the i-th edge contour; represents the sequence composed of the curvatures of all edge points in the i-th edge contour; represents the average value of all data in ; D represents the variance function, which is used to calculate the variance of the input sequence; represents the sequence composed of the gradient directions of all edge points in the i-th edge contour; S represents the information entropy function, which is used to calculate the information entropy of the input sequence. The calculation of the information entropy is a well-known technology, and the specific process will not be elaborated here; B represents the range function, which is used to calculate the range of the input sequence.
[0055] It should be understood that when has a large value, it indicates that the average curvature of the i-th edge contour is large, which further indicates that the edge contour is more curved, and further indicates that the edge contour is more likely to be the edge contour of a hole position; has a smaller value, indicating that the curvature values of each point on the i-th edge contour are closer, which further indicates that the edge contour is more likely to be a circular hole position edge contour; has a large value, indicating that the gradient directions of the edge points on the i-th edge contour are more diverse, which further indicates that the edge contour is more likely to be the edge contour of a hole position; has a large value, indicating that the gradient direction differences of each edge point on the i-th edge contour are large, which further indicates that the edge contour is more likely to be the edge contour of a hole position; has a large value, indicating that the span of the gradient directions of the edge points on the i-th edge contour is large, which further indicates that the edge contour is more likely to be the edge contour of a hole position.
[0056] That is, the larger the edge contour circularity value of the edge contour, the more likely the edge contour is to be the edge contour of a hole position. Accordingly, the edge contours of the hole positions are screened out according to the size of the edge contour circularity value.
[0057] (2) Further, the edge contours of the hole positions are screened out by using the edge contour circularity value, specifically:
[0058] Preferably, in the embodiments of the present application, a segmentation threshold is obtained from the edge contour circularity values of all edge contours; the edge contours corresponding to the edge contour circularity values greater than the segmentation threshold are used as the hole position edge contours.
[0059] In other embodiments of the present application, all edge contour circularity values can also be sorted from largest to smallest, and the edge contours corresponding to the top preset number of values in the sorting result are used as the hole position edge contours.
[0060] In an implementation manner of the embodiments of the present application, the edge contour circularity values of all edge contours are calculated, and all edge contour circularity values are used as the input of the Otsu threshold segmentation algorithm to obtain a segmentation threshold z. According to the size of z, the edge contours are divided into hole position edge contours and non-hole position edge contours.
[0061] When the i-th edge contour is denoted as the hole position edge contour; when the i-th edge contour is denoted as the non-hole position edge contour. Among them, the Otsu threshold segmentation algorithm is a well-known technology, and the specific process will not be elaborated here.
[0062] In other implementation manners of the embodiments of the present application, a clustering algorithm can also be used to segment the edge contour circularity values of all edge contours according to the numerical size, which is specifically set by the implementer himself.
[0063] Thus, several hole position edge contours in the hole position side image of the motorcycle cylinder head are obtained.
[0064] A2. Based on the center distance and radius difference between the hole position edge contour and the Hough circle, an edge contour Hough matching degree is constructed, and the matching Hough circle of each hole position edge contour is screened out by using the edge contour Hough matching degree.
[0065] The binary image obtained in step A1 is used as the input of the Hough circle detection algorithm to obtain the center coordinates and radius of each Hough circle in the binary image. These Hough circles may contain both normal hole positions and deformed hole positions. Among them, the Hough circle detection algorithm is a well-known technology, and the specific process will not be elaborated here.
[0066] In the hole position side image of the motorcycle cylinder head, due to the different thicknesses and sizes of the hole positions, one hole position may contain multiple edge contours of different sizes, and these edge contours share a common center. In order to judge whether the hole position contour is deformed, it is necessary to compare whether there is a shape difference between the hole position contour and the Hough circle matched with the hole position contour. Therefore, it is necessary to find the Hough circle matched with the hole position contour. Therefore, it is necessary to specifically analyze the center distance and radius difference between the hole position edge contour and the Hough circle, and match a suitable Hough circle for each hole position edge contour, so that a hole position contour and a Hough circle represent the same contour of the same hole position.
[0067] (1) Further, the method for obtaining the central coordinates and radius of the hole edge contour used in calculating the center distance and radius difference is as follows:
[0068] Preferably, in the embodiment of the present application, the central coordinates of the hole edge contour are determined by the center of the minimum circumscribed rectangle of the hole edge contour. The approximate radius of the hole edge contour is determined by half of the average value of the distance between the two farthest edge points longitudinally on the hole edge contour and the distance between the two farthest edge points transversely on the hole edge contour.
[0069] In other embodiments of the present application, the coordinates of the geometric center of the hole edge contour can also be used as its central coordinates, and the radius after the hole edge contour is fitted by the Hough circle can be used as its approximate radius.
[0070] In an implementation manner of the embodiment of the present application, taking the j-th hole edge contour as an example for analysis, specifically:
[0071] For the j-th hole edge contour, calculate the distance between the two farthest edge points transversely on the edge contour, denoted as ; calculate the distance between the two farthest pixel points longitudinally on the edge contour, denoted as ; denote the radius of the j-th hole edge contour as the approximate radius r of the j-th hole edge contour. Obtain the minimum circumscribed rectangle of the j-th hole edge contour, and use the center of the minimum circumscribed rectangle as the central coordinates of the j-th hole edge contour.
[0072] (2) Further, construct the edge contour Hough matching degree, and the screening method for screening out the matching Hough circle of each hole edge contour by using the edge contour Hough matching degree is specifically as follows:
[0073] If the j-th hole edge contour and the m-th Hough circle are the same edge contour of the same hole, then the distance between the center point of the j-th hole edge contour and the center of the m-th Hough circle is relatively short, and the approximate radius of the j-th edge contour and the radius of the m-th Hough circle differ relatively little.
[0074] Based on the above characteristics, construct the edge contour Hough matching degree to represent the matching degree between the j-th hole edge contour and the m-th Hough circle.
[0075] Preferably, in the embodiment of the present application, the construction method of the edge contour Hough matching degree is: obtain the center distance and radius difference between the hole edge contour and the Hough circle; the edge contour Hough matching degree is negatively correlated with the center distance and radius difference respectively.
[0076] It can be understood that a negative correlation means that the dependent variable decreases as the independent variable increases, and the dependent variable increases as the independent variable decreases. This is determined by actual applications, and no special restrictions are imposed in this application.
[0077] In an implementation manner of an embodiment of this application, taking the Hough matching degree between the edge contour of the j-th hole position and the edge contour of the m-th Hough circle as an example, its expression is: ; in the formula, is the Hough matching degree between the edge contour of the j-th hole position and the edge contour of the m-th Hough circle; represents the center coordinates of the edge contour of the j-th hole position; represents the center coordinates of the center of the m-th Hough circle; is the Euclidean distance function, which is used to calculate the Euclidean distance between two input coordinate points. The calculation of the Euclidean distance is a well-known technology, and the specific process will not be elaborated here; represents the approximate radius of the edge contour of the j-th hole position; is the radius of the m-th Hough circle; is a constant to prevent the denominator from being 0, and its value is 0.01.
[0078] It should be understood that when the value is small, it means that the distance between the center coordinates of the edge contour of the j-th hole position and the center of the m-th Hough circle is very close, indicating that the edge contour of the j-th hole position and the m-th Hough circle are very likely to be the same hole position; when the value is small, it means that the difference between the approximate radius of the edge contour of the j-th hole position and the radius of the m-th Hough circle is very small, indicating that the edge contour of the j-th hole position and the m-th Hough circle are very likely to be the same edge contour of the same hole position. The larger the value of
[0079] is, the more likely it is that the edge contour of the j-th hole position and the m-th Hough circle are the same edge contour of the same hole position.
[0080] Preferably, in an embodiment of this application, the Hough circle matched with each hole position edge contour is: the Hough circle corresponding to the maximum value of the edge contour Hough matching degree calculated with its hole position edge contour.
[0081] Taking the Hough circle matched with the edge contour of the j-th hole position as an example: calculate the edge contour Hough matching degree between the edge contour of the j-th hole position and each Hough circle, and use the Hough circle corresponding to the maximum value of the edge contour Hough matching degree as the Hough circle matched with the edge contour of the j-th hole position.
[0082] A3. Based on the edge and overlap difference between the edge of the hole position contour and its matched Hough circle, and the overlapping difference between the enclosed area of the hole position contour and its matched Hough circle, construct the hole position deformation discrimination value of the hole position contour to identify whether the hole position contour has deformed.
[0083] Furthermore, by analyzing the overlap difference between the matched hole position contour and the Hough circle, determine whether the hole position has deformed.
[0084] If a hole position deforms due to extrusion, then among the edge points of the hole position contour of the hole position and the edge points of the Hough circle, the ratio of the number of non - overlapping edge points to the number of overlapping pixel points is relatively large; when a normal circular hole position deforms, the perimeter of the deformed edge contour is equal to the perimeter before deformation, but the shape becomes non - circular, then the area of the deformed hole position will be smaller than the area before deformation, and the intersection - over - union ratio of the area enclosed by the hole position contour of the hole position and the area enclosed by the Hough circle will be smaller.
[0085] Based on the above characteristics, construct the hole position deformation discrimination value to represent whether a hole position has deformed. The specific expression is: ; where represents the hole position deformation discrimination value of the j - th hole position contour; represents the ratio of the number of non - overlapping to the number of overlapping among all the edge pixels of the j - th hole position contour pixel points and its matched Hough circle; represents the area of the region enclosed by the matched Hough circle of the j - th hole position contour pixel points, represents the area of the region enclosed by the j - th hole position contour; exp is the exponential function with the natural constant as the base; iou is the intersection - over - union function, which is used to calculate the intersection - over - union ratio of the areas of two input regions. The calculation of the intersection - over - union ratio is a well - known technology, and the specific process will not be elaborated here. Among them, the area is the number of pixel points within the enclosed region.
[0086] It should be understood that when has a large value, it indicates that many of the pixel points of the j - th hole position contour do not overlap with the edge points of its matched Hough circle, which further indicates that the hole position represented by the hole position contour may have deformed; when has a large value, it indicates that the area of its matched Hough circle is larger than the area of the j - th hole position contour, which further indicates that the j - th hole position contour may have deformed; when has a small value, it indicates that the ratio of the intersection region to the union region of the j - th hole position contour and its matched Hough circle is small, which further indicates that the hole position represented by the j - th hole position contour may have deformed.
[0087] When the edge contour of the j-th hole position matches its corresponding Hough circle, calculate the hole deformation discrimination value of the edge contour of the j-th hole position. If it is greater than the preset threshold b, it indicates that the hole position represented by the edge contour of the j-th hole position has deformed. In this embodiment, b is taken as 10.
[0088] Thus, it can be determined whether each hole position in the side image of the motorcycle cylinder head hole positions has deformed.
[0089] The embodiment of the present application also proposes a detection device for the deformation side of the motorcycle cylinder head hole positions, including 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 implements the steps of any one of the above-mentioned detection methods for the deformation side of the motorcycle cylinder head hole positions. Since the detection method for the deformation side of the motorcycle cylinder head hole positions has been described in detail above, it will not be repeated here.
[0090] Each embodiment in the present application is described in a progressive manner. The same or similar parts among the embodiments can be referred to each other, and the key points of each embodiment are the differences from other embodiments.
[0091] It should be noted that unless otherwise specified and limited, terms such as "including", "comprising" or any other variant thereof are intended to cover non-exclusive inclusion, so that a circuit structure, an article or a device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such an article or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the article or device including the element. In addition, the term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0092] Those skilled in the art will readily think of other implementation schemes of the present application after considering the specification and practicing the invention herein. The present application aims to cover any variations, uses or adaptations of the present application, and these variations, uses or adaptations follow the general principles of the present application and include common general knowledge or conventional technical means in the technical field not invented by the present application.
[0093] It should be understood that the present application is not limited to the exact structure already described and shown in the drawings, and various modifications and changes can be made without departing from its scope.
Claims
1. A method for detecting the deformation of a motorcycle cylinder head hole, characterized in that: The method comprises the following steps: Collect the side image of the motorcycle cylinder head hole; The edge contour features in the side image of the motorcycle cylinder head hole are used to identify whether the hole edge contour is deformed. Specifically: A1, based on the shape features of the edge contour detected in the side image of the motorcycle cylinder head hole, the edge contour circle value of the edge contour is constructed, and the expression is: ; In the formula, represents the edge contour circularity value of the i-th edge contour; Represents the sequence of curvatures of all edge points in the i-th edge contour; express The average value of all data in; D represents the variance function, which is used to calculate the variance of the input sequence; represents the sequence composed of the gradient directions of all edge points in the ith edge contour; S represents the information entropy function, which is used to calculate the information entropy of the input sequence; B represents the range function, which is used to calculate the range of the input sequence, and uses the circle-like value of the edge contour to filter out the edge contour of the hole; A2: Based on the center distance and radius difference between the hole edge contour and the Hough circle, the edge contour Hough matching degree is constructed, and the matching Hough circle of each hole edge contour is screened out using the edge contour Hough matching degree; A3, based on the edge between the hole edge contour and its matching Hough circle, and the overlapping difference between the hole edge contour and the enclosed area of the matching Hough circle, a hole deformation discrimination value of the hole edge contour is constructed to identify whether the hole edge contour is deformed.
2. A method for detecting the deformation of a motorcycle cylinder head hole according to claim 1, characterized in that: The shape features include the curvature of edge points on the edge contour and the overall distribution of gradient directions.
3. A method for detecting the deformation of a motorcycle cylinder head hole according to claim 1, characterized in that: The screening method of the hole edge profile is: Get the segmentation threshold value in the edge contour circle-like value of all edge contours; The edge contour corresponding to the circle-like value of the edge contour greater than the segmentation threshold is taken as the hole edge contour.
4. A method for detecting the deformation of a motorcycle cylinder head hole according to claim 1, characterized in that: The center coordinates of the hole edge contour used in calculating the center distance are determined by the center of the minimum circumscribed rectangle of the hole edge contour.
5. The method for detecting the deformation of a motorcycle cylinder head hole according to claim 1, characterized in that: The radius of the hole edge profile used in calculating the radius difference is determined by half of the average value of the distance between the two edge points that are farthest apart in the longitudinal direction and the distance between the two edge points that are farthest apart in the transverse direction on the hole edge profile.
6. A method for detecting the deformation of a motorcycle cylinder head hole according to claim 1, characterized in that: The Hough circle is obtained by using a Hough circle detection algorithm from a binary image of a motorcycle cylinder head hole side image.
Citation Information
Patent Citations
Stamping part circular hole positioning and deformation detection method based on sub-pixel edge extraction
CN116542910A
Method for quickly tracing quality of blast bead product
CN116721102A
Welded pipe surface defect edge visual extraction method
CN117314922A