A carbon fiber piston assembly visual inspection method, system and device
By using multi-view image processing technology, the blind spot problem in the assembly quality inspection of carbon fiber piston rings was solved, enabling full-dimensional evaluation of piston rings and improving inspection accuracy and reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG DESHI ELECTRICAL APPLIANCE CO LTD
- Filing Date
- 2026-02-10
- Publication Date
- 2026-06-05
Smart Images

Figure CN121708007B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, specifically to a visual verification method, system, and device for carbon fiber piston assembly. Background Technology
[0002] In the field of mechanical manufacturing, carbon fiber pistons have become key components for improving engine efficiency and reliability due to their lightweight and high strength. Among them, piston rings, as the core component of the piston, directly determine the sealing between the piston and the cylinder wall, lubricating oil consumption control, wear resistance, and the final overall power consumption and emission levels during operation.
[0003] When inspecting the assembly quality of carbon fiber pistons, although a single perspective can quickly determine the presence of piston rings and the macroscopic surface condition, it cannot effectively assess the assembly status of piston rings in multiple dimensions, such as axial assembly depth, circumferential warping and uniformity, local jamming, and microscopic defects in the sidewall rings. This results in blind spots in the inspection and makes it impossible to accurately determine whether the piston rings are completely and correctly embedded in the ring grooves. Consequently, the accuracy and reliability of the inspection of the assembly quality of piston rings on carbon fiber pistons are insufficient. Summary of the Invention
[0004] To address the aforementioned technical problems, a visual verification method, system, and device for carbon fiber piston assembly are provided to resolve existing issues.
[0005] The solution to the technical problem in this application is to provide a visual verification method, system, and equipment for carbon fiber piston assembly, including the following steps:
[0006] In a first aspect, embodiments of this application provide a visual verification method for carbon fiber piston assemblies, the method comprising the following steps:
[0007] Acquire grayscale images of the carbon fiber piston from different perspectives, including top-view images and multiple frames of side-view images;
[0008] For the top view image, analyze the positional distribution characteristics of the pixels on the upper edge of the circle to locate the ring groove area where each piston ring is located;
[0009] The first evaluation value of each piston ring is calculated by using the grayscale changes and texture features of pixels in the neighborhood within the annular groove region, and based on the discontinuity of the distribution of edge pixels on the edge of the annular groove region.
[0010] For each frame of side view image, the ROI region where each piston ring is located is predefined. The distance relationship and parallel characteristics of different edges belonging to straight lines in the ROI region are analyzed, as well as the grayscale changes of edge pixels, to identify the upper and lower edges of the ring groove and the upper and lower edges of the piston ring.
[0011] By measuring the spacing between the upper and lower edges of the piston ring and the groove, we determine whether it is within the allowable range and calculate the fit coefficient of each piston ring. We also evaluate the extreme variability of the spacing between the same piston ring in all side view images, as well as the smoothness of the piston ring edge and the fit coefficient, to determine a second evaluation value for each piston ring.
[0012] Based on the first and second evaluation values, the assembly quality coefficient of each piston ring is determined, and the assembly quality of the piston rings on the carbon fiber piston is evaluated and tested.
[0013] Preferably, the positioning of the ring groove region where each piston ring is located includes:
[0014] Extract all circular edges in the top view image and obtain the radius of each circular edge; establish a polar coordinate system with the piston center in the top view image as the pole, and cluster the polar radii of all edge pixels on circular edges with radii greater than the preset reference radius in the polar coordinate system;
[0015] For the extreme radius of the cluster center of all clusters, select the cluster corresponding to the smallest extreme radius, and mark the circular edge to which the inner edge pixel of the cluster belongs as the inner edge of the first annular groove; calculate the difference in extreme radius between the cluster center of the cluster corresponding to the inner edge of the first annular groove and the other clusters, and record it as the radial distance; from all the other clusters, select the cluster whose radial distance is closest to the preset radial width of the first annular groove, and mark the circular edge to which the inner edge pixel of the cluster belongs as the outer edge of the first annular groove. Repeat this operation to obtain the inner edge and outer edge of each annular groove.
[0016] The area between the inner and outer edges of each ring groove is defined as the ring groove area where each piston ring is located.
[0017] Preferably, the calculation of the first evaluation value for each piston ring includes:
[0018] For each piston ring in the ring groove region, calculate the LBP value of each pixel in the ring groove region, and positively fuse the gray values and LBP values of all pixels in the neighborhood of each pixel as the outlier factor of each pixel.
[0019] The abnormal assessment values in the annular groove region are positively correlated with the abnormal factors.
[0020] The number of edge pixels actually detected on the edge of the annular groove region is counted as the detection count; the number of pixels corresponding to the side length of the annular groove region edge is counted as the theoretical count; the difference between the detection count and the theoretical count is used as the edge discontinuity of the annular groove region.
[0021] The first evaluation value is negatively correlated with the abnormal evaluation value and the edge discontinuity.
[0022] Preferably, identifying the upper and lower edges of the annular groove and the upper and lower edges of the piston ring includes:
[0023] For each piston ring in the ROI region, extract all straight edges in the ROI region, calculate the relative distance between any two straight edges, select the two parallel straight edges with the largest relative distance, and mark them as the upper and lower edges of the ring groove;
[0024] Calculate the average gray value of all edge pixels on each straight edge, and use it as the edge gray value. Sort the edge gray values of all straight edges in descending order, and select the straight edges corresponding to the two edge gray values at the top of the sort, and mark them as the upper edge and lower edge of the piston ring.
[0025] Preferably, the calculation of the fit coefficient for each piston ring includes:
[0026] Calculate the minimum vertical distance between the upper edge of the piston ring and the upper edge of the ring groove, and denot it as the upper distance; calculate the minimum vertical distance between the lower edge of the piston ring and the lower edge of the ring groove, and denot it as the lower distance.
[0027] The differences between the upper spacing, the lower spacing and the preset allowable gap are respectively regarded as the first difference and the second difference;
[0028] The fitting coefficient is negatively correlated with both the first and second differences.
[0029] Preferably, determining the second evaluation value for each piston ring includes:
[0030] Calculate the range of the upper and lower spacing of the same ROI region in all side view images, and use the result of positive mapping between the preset allowable tolerance and the range as the consistency coefficient of each piston ring.
[0031] Corner detection is performed on the upper and lower edges of the piston rings in all side view images for the same ROI region. The corner response values of all pixels are calculated and positively fused to serve as the edge roughness of each piston ring. The minimum fitting coefficient of the same ROI region in all frame side view images is obtained.
[0032] The second evaluation value is positively correlated with the consistency coefficient and the minimum fit coefficient, but negatively correlated with the edge roughness.
[0033] Preferably, the assembly quality coefficient is the result of a positive fusion of the first evaluation value and the second evaluation value.
[0034] Preferably, the evaluation and detection of the assembly quality of the piston rings on the carbon fiber piston includes: if there are piston rings on the carbon fiber piston with an assembly quality coefficient less than a preset threshold, then the assembly quality of the carbon fiber piston is unqualified; otherwise, the assembly quality of the carbon fiber piston is qualified.
[0035] Secondly, embodiments of this application also provide a visual verification system for carbon fiber piston assembly. The system includes a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of any of the above-described visual verification methods for carbon fiber piston assembly.
[0036] Thirdly, this application also provides a visual verification device for carbon fiber piston assembly, wherein the device stores a computer program, and when the computer program is executed by a processor, it implements the steps of any of the above-described visual verification methods for carbon fiber piston assembly.
[0037] This application has at least the following beneficial effects:
[0038] This application provides comprehensive spatial information for assessing the assembly quality of individual piston rings by acquiring images of carbon fiber pistons from multiple perspectives. It locates the ring groove region for each piston ring using prior knowledge that the edge of the piston ring groove is approximately circular when viewed from above, accurately eliminating interference such as pits on the piston top. Geometric distribution features are used to precisely separate each ring groove, thereby improving the accuracy and specificity of locating the ring groove region for each piston ring. A first evaluation value is calculated for each piston ring, which benefits from considering the local grayscale, texture features, and edge discontinuities of the ring groove region. It quantifies the integrity of the piston ring circumference and the macroscopic defect features of the surface from a top-down perspective, providing a preliminary assessment of the assembly quality of the piston rings on the carbon fiber piston. The application also identifies the upper and lower edges of the ring grooves and piston rings. This is beneficial because it accurately identifies and extracts the ring grooves and piston rings by using the distance relationship and parallel features of straight edges within the ROI region, combined with the grayscale changes of edge pixels. The upper and lower edges of the piston rings are analyzed. The fit coefficient of each piston ring is calculated, which is beneficial because it reflects whether the piston ring is completely embedded in the bottom of the ring groove by observing the gap between the piston ring edge and the ring groove edge, thus assessing the fit accuracy between the piston ring and the ring groove. The fit coefficient of each piston ring is also calculated, which is beneficial because it quantifies the unevenness of piston ring loosening in the ring groove, local warping, and microscopic defect characteristics from a side-view perspective by analyzing the maximum fluctuation range of the gap of the same piston ring in multiple side-view images and the smoothness of the piston ring edge, further evaluating the assembly quality of the piston rings on the carbon fiber piston. Finally, the assembly quality coefficient of each piston ring is determined to evaluate and inspect the assembly quality of the piston rings on the carbon fiber piston. This is beneficial because it integrates complementary evaluation information from multiple perspectives to assess the assembly quality status of the piston rings, accurately determining whether the piston rings are completely and correctly embedded in the ring groove, thus improving the verification accuracy of the piston ring assembly quality on the carbon fiber piston. Attached Figure Description
[0039] The following is a detailed description of a visual verification method for carbon fiber piston assembly according to the present application, with reference to the accompanying drawings.
[0040] Figure 1 A flowchart illustrating the steps of a visual verification method for carbon fiber piston assembly provided in this application embodiment;
[0041] Figure 2 A flowchart illustrating the steps of a method for obtaining a second evaluation value for each piston ring provided in an embodiment of this application. Detailed Implementation
[0042] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description, in conjunction with the accompanying drawings and embodiments, provides a visual verification method, system, and device for carbon fiber piston assembly proposed in this application. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0043] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.
[0044] Please see Figure 1 The diagram illustrates a flowchart of a visual verification method for carbon fiber piston assembly according to an embodiment of this application. The method includes the following steps:
[0045] Step 1: Obtain grayscale images of the carbon fiber piston from different perspectives, including top-view images and multiple side-view images.
[0046] Carbon fiber pistons play a crucial role in mechanical devices such as engines. They fit tightly against the cylinder wall to form a sealed space. During engine operation, the piston seals the air-fuel mixture or fuel within the cylinder. As the piston moves up and down, the gas inside the cylinder is compressed, creating the necessary pressure conditions for combustion. Therefore, the assembly quality of the piston affects its sealing performance with the cylinder, wear resistance, and power consumption during operation. Thus, it is necessary to inspect the piston assembly quality.
[0047] Based on the above analysis, the carbon fiber piston is transported to the piston ring verification station via a conveyor belt. When the piston reaches the designated station, the photoelectric sensor is blocked, generating a high-level trigger signal. This signal is sent to the vision controller, which controls the lighting source to turn on. After the light source reaches a stable brightness, a hardware trigger exposure signal is sent to the camera. Then, cameras located at different angles take pictures of the surface of the carbon fiber piston. Specifically, a camera is deployed above the carbon fiber piston to capture a top view image of the carbon fiber piston; and a camera is also deployed on the side of the carbon fiber piston. As the piston slowly rotates on the station platform, the side camera continuously captures a side view image of the carbon fiber piston.
[0048] In this embodiment, a high-resolution global shutter CMOS camera is used for image acquisition. When acquiring top-view images, a wide-angle ring light or dome light source is used to produce uniform diffuse reflection, which can simultaneously illuminate the highly reflective ring and the dark piston top, obtaining a top-view image with consistent overall lighting. When acquiring side-view images, a low-angle strip light source is used, shining from a direction almost parallel to the side of the piston. This causes the smooth, intact ring surface to reflect light away from the camera, appearing as dark in the image. However, irregular areas such as burrs, scratches, and gaps will scatter light into the camera, thus appearing as bright spots. Furthermore, one frame of side-view image is acquired for every 10 degrees of rotation of the carbon fiber piston, and 36 frames are acquired for one rotation. As other implementation methods, the implementer can set the parameters according to the actual situation.
[0049] All acquired images were converted to grayscale, thus obtaining a top view image of the carbon fiber piston and multiple frames of side view images.
[0050] In this embodiment, a weighted average method is used for grayscale processing. The weighted average method is a well-known technique and will not be described in detail here.
[0051] At this point, a top view image and multiple side view images of the carbon fiber piston were obtained.
[0052] Step 2: For the top view image, analyze the positional distribution characteristics of the edge pixels on the circular edge to locate the ring groove region where each piston ring is located; calculate the first evaluation value of each piston ring based on the grayscale changes and texture features of the pixels in the neighborhood within the ring groove region, and based on the discontinuity of the distribution of edge pixels on the ring groove region.
[0053] Since piston rings are installed in grooves on the side of the piston, when viewed from above, these grooves typically appear as a series of dark, narrow, and uniform concentric rings. Assuming a carbon fiber piston has three grooves—the first and second being compression ring grooves, and the third being an oil ring groove—with one piston ring mounted on each groove, the concentric circles formed by these grooves provide a perfect reference for locating the piston center and inspecting the piston rings. Based on this analysis, different grooves are extracted from the top-view image.
[0054] First, extract all the circular edges of the top view image, specifically:
[0055] Perform edge detection on the top-view image and extract edge pixels;
[0056] In this embodiment, the Canny edge detection algorithm is used for edge detection. The Canny edge detection algorithm is a well-known technology and will not be described in detail here. As other implementation methods, implementers may use other methods of existing technology, such as the Sobel operator, etc. This embodiment does not impose any special restrictions on this.
[0057] Perform Hough circle detection on all edge pixels to extract all circular edges in the top view image;
[0058] It should be noted that the Hough circle detection is a well-known technique and will not be elaborated upon here.
[0059] Secondly, due to the presence of various recesses on the top of the carbon fiber piston, such as combustion chamber recesses and valve clearance recesses, the edges of these recesses form a circle, an independent arc, or a near-circular outline in the top-view image, resulting in a large number of circles detected by the Hough circle. Furthermore, if piston rings are installed in the piston's ring grooves, the radius of the circle corresponding to that edge is usually slightly larger than the radius of the circle corresponding to the outer contour of the piston head. Therefore, the circular edges are filtered based on their radius, and the area containing each ring groove is extracted, specifically:
[0060] Obtain the radius of each circle's edge, and mark the circles with radii greater than a preset reference radius as candidate circle edges;
[0061] In this embodiment, the preset reference radius is the radius of the outer contour of the piston head, which is obtained from the piston product design data manual.
[0062] With the center of the piston as the pole, draw a ray in the horizontal direction as the polar axis to transform all edge pixels on the candidate circle edge to the polar coordinate system;
[0063] In this embodiment, the polar coordinates of each edge pixel are represented as follows: ,in, Indicates the polar radius. Indicates the polar angle.
[0064] In the polar coordinate system, cluster the polar radii of all edge pixels to obtain multiple clusters;
[0065] It should be noted that each cluster corresponds to an edge, thus grouping edge pixels belonging to the same annular groove into a cluster. Edge pixels of different annular grooves form different clusters, and the upper and lower edges of each annular groove will form two closely adjacent clusters, while there are obvious gaps between the clusters corresponding to different annular grooves.
[0066] For the extreme radius of the cluster center of all clusters, select the cluster to which the cluster center with the smallest extreme radius belongs, and mark the candidate circular edge to which the edge pixel of the cluster belongs as the inner edge of the first annular groove.
[0067] Calculate the difference in the polar radius of the cluster center between the inner edge of the first annular groove and the other clusters, and denote it as the radial distance;
[0068] In this embodiment, the absolute value of the difference between the polar radius of the cluster center between the inner edge of the first annular groove and the other clusters is calculated and denoted as the radial distance.
[0069] From all the remaining clusters, select the cluster whose radial distance is closest to the preset radial width of the first annular groove. Mark the candidate circular edge to which the inner edge pixel of the cluster belongs as the outer edge of the first annular groove. Take the inner edge of the first annular groove and the two clusters corresponding to the outer edge as a matching cluster. Repeat the operation on the remaining unmatched clusters to obtain the inner edge and outer edge of each annular groove.
[0070] In this embodiment, the preset radial width refers to the difference in radius between the two concentric circles corresponding to each annular groove, which is set by consulting the design data manual of the piston product.
[0071] The area encompassed by the inner and outer edges of each ring groove is marked as the ring groove area where each piston ring is located;
[0072] If the piston rings in the groove area have severe scratches, breaks, or foreign objects, abnormal bright spots, dark spots, or textures will appear in the groove area. Therefore, the grayscale changes and texture information of pixels in each groove area are analyzed in a local range to calculate the anomaly factor, specifically:
[0073] Calculate the LBP value of each pixel within the annular groove region, and perform a forward fusion of the grayscale value and LBP value of all pixels in the neighborhood of each pixel to serve as the outlier factor for each pixel.
[0074] In this embodiment, the neighborhood range is an eight-neighborhood. As for other implementation methods, the implementer can set it according to the actual situation. Secondly, the specific process of forward fusion is as follows: the product between the mean of the gray values of all pixels in the neighborhood and the mean of the LBP values of all pixels is used as the anomaly factor of each pixel. As for other implementation methods, the implementer can also calculate the product between the sum of the gray values of all pixels in the neighborhood and the sum of the LBP values of all pixels as the anomaly factor of each pixel. Among them, Local Binary Pattern (LBP) is a well-known technology and will not be described in detail here.
[0075] The abnormal assessment value of the anomaly factor in the annular groove region where each piston ring is located is positively correlated;
[0076] It should be noted that a positive correlation means that the dependent variable increases as the independent variable increases and decreases as the independent variable decreases.
[0077] In this embodiment, the sum of the abnormal factors of all pixels within the annular groove region is used as the abnormality evaluation value of the annular groove region. In other implementations, the implementer may also use the mean of the abnormal factors of all pixels within each annular groove region as the abnormality evaluation value of each annular groove region.
[0078] It should be noted that the larger the anomaly factor, the more likely the neighborhood of the pixel is to contain texture information caused by scratches, breaks, foreign objects, etc., and the more likely the piston ring is to have scratches, breaks, foreign objects, etc., the larger the obtained anomaly evaluation value, reflecting the defect status of the piston ring itself during piston ring assembly.
[0079] Furthermore, the abnormal assessment value can only reflect the defect condition of the piston ring itself during piston ring assembly, and cannot reflect the specific assembly details of the piston ring. If the piston ring is not fully inserted into the ring groove, its top will block part of the ring groove, causing the originally clear and continuous dark ring to become discontinuous.
[0080] Therefore, the edge discontinuity is calculated based on the actual number of edge pixels detected on the outer edge of the annular groove region, specifically as follows:
[0081] The number of edge pixels actually detected on the inner and outer edges of the annular groove region is used as the detection count.
[0082] The number of pixels corresponding to the side lengths of the inner and outer edges of each annular groove region is counted as the theoretical number;
[0083] The difference between the number of tests and the theoretical number is used as the edge discontinuity of the ring groove region where each piston ring is located;
[0084] In this embodiment, the calculation process of edge discontinuity is as follows: calculate the absolute value of the difference between the number of detections and the theoretical number, and use the ratio of this difference to the theoretical number as the edge discontinuity.
[0085] It should be noted that the greater the edge discontinuity, the more missing edge pixels there are, and the more discontinuous the edge is, reflecting that the more discontinuous the edge is, the more likely there is severe occlusion.
[0086] Furthermore, based on the anomaly evaluation value and the edge discontinuity, the first evaluation value is determined, specifically as follows:
[0087] The first evaluation value of the ring groove region where each piston ring is located is negatively correlated with the abnormal evaluation value and the edge discontinuity.
[0088] It should be noted that a negative correlation means that the dependent variable decreases as the independent variable increases, and increases as the independent variable decreases.
[0089] In this embodiment, the calculation process of the first evaluation value is as follows: the result of negatively mapping the product of edge discontinuity and anomaly evaluation value is used as the first evaluation value. In other implementations, the result of negatively mapping the sum of the anomaly evaluation value and the edge discontinuity can be used as the first evaluation value. Specifically, the negative mapping process involves using an exponential function. Assume that the product of edge deformation and edge discontinuity is denoted as... ,but The result is used as the result of the negative mapping, where, This represents an exponential function with the natural constant as its base.
[0090] It should be noted that the smaller the first evaluation value, the more discontinuous and irregular the edge of the ring groove area is, and the more defects exist in the piston ring, reflecting the lower the assembly quality of the piston ring.
[0091] At this point, the first evaluation value for each piston ring in the top-view image is obtained.
[0092] Step 3: For each frame of side view image, predefine the ROI region where each piston ring is located, analyze the distance relationship and parallel characteristics of different edges belonging to straight lines in the ROI region, as well as the grayscale changes of edge pixels, to identify the upper and lower edges of the ring groove and the upper and lower edges of the piston ring; determine whether the interval distance between the upper and lower edges of the ring groove and the piston ring is within the allowable range by using the interval distance between the upper and lower edges of the ring groove and the piston ring, and calculate the fitting coefficient of each piston ring; evaluate the extreme variability of the interval distance of the same piston ring in all side view images, as well as the smoothness of the piston ring edge and the fitting coefficient, to determine the second evaluation value of each piston ring.
[0093] Furthermore, top-view images cannot assess axial assembly depth or circumferential integrity information, making it difficult to determine whether the piston rings have completely settled into the groove. Therefore, inspection is performed using the annular groove in the side-view image, specifically:
[0094] Image registration is performed on the side view images of all frames, and multiple ROI regions are predefined in each matched side view image, where a piston ring exists in each ROI region;
[0095] It should be noted that image registration is performed using the SIFT image registration algorithm to match regions belonging to the same piston ring. The SIFT image registration algorithm is a well-known technique and will not be elaborated here. Secondly, the definition process of the ROI region is as follows: by using a standard image of a standard carbon fiber piston with piston ring assembly in the side direction, the axial position of the piston ring on each ring groove is marked in the standard image, thereby taking the region where each piston ring in the standard image is located as the ROI region, and recording the position coordinates of the ROI region; when detecting the piston, the piston in the side view image is first coarsely located using a template matching algorithm, and its offset relative to the standard image is obtained. Then, based on this offset, the cropping coordinates of the ROI region on the side view image are dynamically adjusted to obtain the ROI region in each frame of the side view image.
[0096] Edge detection is performed on each ROI region in the side view image to obtain edge pixels. Then, Hough line detection is performed on the ROI regions to extract all straight line edges in each ROI region.
[0097] In this embodiment, the Canny edge detection algorithm is used for edge detection. Both the Canny edge detection algorithm and the Hough line detection algorithm are well-known technologies and will not be described in detail here. As other implementation methods, implementers may use other methods of existing technology, such as the Sobel operator, etc. This embodiment does not impose any special restrictions on this.
[0098] For each ROI region where the piston ring is located, calculate the relative distance between any two straight line edges, select the two parallel straight line edges with the largest relative distance, and mark them as the upper and lower edges of the ring groove;
[0099] In this embodiment, the relative distance is measured by calculating the Euclidean distance between the edges of any two straight lines. The Euclidean distance is a well-known technique and will not be described in detail here.
[0100] It should be noted that for two parallel straight line edges with the largest relative distance, the straight line edge located above the ROI region is marked as the upper edge of the annular groove, while the straight line edge located below the ROI region is marked as the lower edge of the annular groove.
[0101] Calculate the average gray value of all edge pixels on each straight edge, and use it as the edge gray value. Sort the edge gray values of all straight edges in descending order, and select the straight edges corresponding to the two edge gray values at the top of the sort, and mark them as the upper edge and lower edge of the piston ring.
[0102] It should be noted that the higher the gray level of the edge, the more likely it is to belong to the edge of the piston ring. For the straight edges corresponding to the two edges with the highest gray levels, the straight edge located above the ROI area is marked as the upper edge of the piston ring, while the straight edge located below the ROI area is marked as the lower edge of the piston ring.
[0103] Secondly, by checking whether the gap between the upper and lower edges of the piston ring and the upper and lower edges of the ring groove is within the allowable range, the fit coefficient is calculated to assess whether the piston ring is located within the ring groove. Specifically:
[0104] Calculate the minimum vertical distance between the upper edge of the piston ring and the upper edge of the ring groove, and denot it as the upper gap.
[0105] Calculate the minimum vertical distance between the lower edge of the piston ring and the lower edge of the ring groove, and denote it as the lower gap.
[0106] In this embodiment, the vertical distance is measured using the minimum Euclidean distance.
[0107] The difference between the upper spacing and the preset allowable gap is taken as the first difference;
[0108] The difference between the lower spacing and the preset allowable gap is taken as the second difference;
[0109] In this embodiment, the absolute value of the difference between the upper spacing and the preset allowable gap is calculated, and the ratio of this difference to the preset allowable gap is taken as the first difference; the absolute value of the difference between the lower spacing and the preset allowable gap is calculated, and the ratio of this difference to the preset allowable gap is taken as the second difference; secondly, the process of setting the preset allowable gap is as follows: by consulting the data manual, the axial width of the ring groove and the axial width of the piston ring are obtained, and half of the absolute value of the difference between the two axial widths is taken as the preset allowable gap.
[0110] The fit coefficient of the ROI region where each piston ring is located is negatively correlated with both the first and second differences;
[0111] In this embodiment, the reciprocal of the sum of the first difference and the second difference is used as the fitting coefficient. In other implementations, the fit coefficient can also be the result of an exponential function with a natural constant as the base and the opposite of the sum of the first difference and the second difference as the exponent. Secondly, to avoid a denominator of 0 when calculating the ratio, a parameter adjustment factor is added to the denominator. The range of values for the parameter adjustment factor is... In this embodiment, the parameter tuning factor is set to 1. In other implementation methods, the implementer can set it according to the actual situation.
[0112] It should be noted that the smaller the first or second difference, the closer the vertical spacing is to the preset allowable gap, the larger the resulting fit coefficient, and the more likely the piston ring is to fall completely into the bottom of the ring groove during assembly and fit parallel to the upper and lower surfaces of the ring groove, resulting in higher assembly accuracy.
[0113] Furthermore, by considering the differences in the vertical spacing between the piston ring edge and the ring groove edge within the same ROI region in all frame side view images, as well as the occurrence of corner points on the piston ring edge and the fit coefficient, a second evaluation value is determined. The flowchart of the method for obtaining the second evaluation value for each piston ring provided in this application embodiment is shown below. Figure 2 As shown, it specifically includes:
[0114] Calculate the range of the upper and lower spacing of the same ROI region in all side view images;
[0115] In this embodiment, the specific calculation process of the range is as follows: obtain the maximum and minimum values of the upper spacing of the same ROI region in the side view images of all frames, obtain the maximum and minimum values of the lower spacing of the same ROI region in the side view images of all frames, take the difference between the maximum value of the upper spacing and the minimum value of the lower spacing as the first difference, take the difference between the maximum value of the lower spacing and the minimum value of the upper spacing as the second difference, and select the maximum value of the first difference and the second difference as the range.
[0116] The result of positively mapping the difference between the preset allowable tolerance and the range is used as the consistency coefficient for each piston ring.
[0117] In this embodiment, the preset allowable tolerance is 0.01mm, representing the maximum permissible deviation of the vertical spacing when the piston rings are assembled in the ring groove. This value is set based on the assembly precision. The consistency coefficient is calculated as follows: the difference between the preset allowable tolerance and the range is calculated, and the result of a positive mapping between the ratio of this value and the preset allowable tolerance is used as the consistency coefficient for each ROI region. The specific process of the positive mapping is as follows: the ratio is denoted as... ,but The result is taken as the result of the positive mapping, where, This represents an exponential function with the natural constant as its base, through a positive mapping process, such that the result of the positive mapping is greater than 0.
[0118] It should be noted that the larger the consistency coefficient, the more uniform the tightness of the piston rings is on the entire circumference, with no deformation or jamming, indicating high assembly quality.
[0119] For the same ROI region, corner points are detected at the upper and lower edges of the piston rings in all side view images. The corner response values of all corner points are calculated and positively fused to serve as the edge roughness of each piston ring.
[0120] In this embodiment, the Harris corner detection algorithm is used to detect corners and obtain corner response values. The Harris corner detection algorithm is a well-known technology and will not be described in detail here. Secondly, the specific process of forward fusion is as follows: the average value of the corner response values of all corners is used as the edge roughness of each ROI region. In other implementation methods, the implementer can also calculate the sum of the corner response values of all corners as the edge roughness of each ROI region.
[0121] It should be noted that the larger the corner response value, the more significant the corner point is, and the greater the resulting edge roughness. This indicates that there are more corner points on the piston ring edge, reflecting that there are many scratches, bumps, and foreign objects on the piston ring surface, and the edge is extremely rough.
[0122] Obtain the minimum fitting coefficient of the same ROI region in all frame side view images;
[0123] The second evaluation value of each piston ring is positively correlated with the consistency coefficient and the minimum fit coefficient, but negatively correlated with the edge roughness.
[0124] In this embodiment, the calculation process for the second evaluation value is as follows: calculate the product of the consistency coefficient and the minimum fit coefficient, and use the ratio of this product to the edge roughness as the second evaluation value for each piston ring.
[0125] It should be noted that, to avoid the denominator being zero when calculating the ratio, a parameter tuning factor is added to the denominator. The range of values for the parameter tuning factor is [range missing]. In this embodiment, the parameter adjustment factor is set to 1. As for other implementation methods, the implementer can set it according to the actual situation. Secondly, the larger the minimum fit coefficient, the more accurate and close the piston ring is to install it even at the worst fit angle. This reflects that the fit between the piston ring and the ring groove is better and the assembly quality is higher. The larger the second evaluation value is, the higher the piston ring assembly quality and the better the surface quality.
[0126] This gives us the second evaluation value for each piston ring.
[0127] Step 4: Based on the first evaluation value and the second evaluation value, determine the assembly quality coefficient of each piston ring, and evaluate and inspect the assembly quality of the piston rings on the carbon fiber piston.
[0128] Furthermore, based on the first and second evaluation values, the assembly quality coefficient is determined as follows:
[0129] The first evaluation value and the second evaluation value of each piston ring are positively integrated to form the assembly quality coefficient of each piston ring.
[0130] It should be noted that, since each annular groove region in the top view image corresponds to one piston ring, and each ROI region in the side view image corresponds to one piston ring, the annular groove regions and ROI regions belonging to the same piston ring are matched according to the positional order of the piston rings.
[0131] In this embodiment, the specific process of forward fusion is as follows: based on the preset first weight and the preset second weight, the first evaluation value and the second evaluation value corresponding to the same piston ring are weighted and summed to obtain the assembly quality coefficient of each piston ring; wherein, the sum of the preset first weight and the preset second weight is 1, and the preset first weight is less than the preset second weight. In this embodiment, the preset first weight is 0.4 and the preset second weight is 0.6. As other implementation methods, the implementer can set it according to the actual situation.
[0132] It should be noted that the larger the assembly quality coefficient, the higher the assembly precision of the piston rings in this ring groove on the carbon fiber piston, and the better the assembly quality.
[0133] Therefore, the assembly quality of the carbon fiber piston is evaluated using an assembly quality coefficient, specifically as follows:
[0134] If a piston ring on the carbon fiber piston has an assembly quality coefficient less than a preset threshold, the assembly quality of the carbon fiber piston is unqualified; otherwise, the assembly quality of the carbon fiber piston is qualified.
[0135] For carbon fiber pistons that are not properly assembled, the piston rings are reassembled.
[0136] In this embodiment, a qualified carbon fiber piston with piston rings is selected by manual inspection, and top view and side view images are collected. Following the above process, the assembly quality coefficient is calculated, and the average value of the assembly quality coefficients of all piston rings assembled on the qualified carbon fiber piston is used as a preset threshold.
[0137] This application also provides a visual verification system for carbon fiber piston assembly, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of any one of the above-described methods for visual verification of carbon fiber piston assembly.
[0138] Based on the same inventive concept as the above method, this application embodiment also provides a visual verification device for carbon fiber piston assembly. The device stores a computer program, and when the computer program is executed by a processor, it implements the steps of any one of the above-described visual verification methods for carbon fiber piston assembly.
[0139] It should be understood that, although Figure 1The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0140] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0141] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application. Therefore, any simple modifications, equivalent changes, and alterations made to the above embodiments based on the technical essence of this application, without departing from the content of the technical solution of this application, shall fall within the protection scope of the technical solution of this application.
Claims
1. A visual verification method for carbon fiber piston assembly, characterized in that, The method includes the following steps: Acquire grayscale images of the carbon fiber piston from different perspectives, including top-view images and multiple frames of side-view images; For the top view image, analyze the positional distribution characteristics of the pixels on the upper edge of the circle to locate the ring groove area where each piston ring is located; The first evaluation value of each piston ring is calculated by using the grayscale changes and texture features of pixels in the neighborhood within the annular groove region, and based on the discontinuity of the distribution of edge pixels on the edge of the annular groove region. For each frame of side view image, the ROI region where each piston ring is located is predefined. The distance relationship and parallel characteristics of different edges belonging to straight lines in the ROI region are analyzed, as well as the grayscale changes of edge pixels, to identify the upper and lower edges of the ring groove and the upper and lower edges of the piston ring. By measuring the spacing between the upper and lower edges of the piston ring and the groove, we determine whether it is within the allowable range and calculate the fit coefficient of each piston ring. We also evaluate the extreme variability of the spacing between the same piston ring in all side view images, as well as the smoothness of the piston ring edge and the fit coefficient, to determine a second evaluation value for each piston ring. Based on the first and second evaluation values, the assembly quality coefficient of each piston ring is determined, and the assembly quality of the piston rings on the carbon fiber piston is evaluated and tested. The positioning of the ring groove area where each piston ring is located includes: Extract all circular edges in the top view image and obtain the radius of each circular edge; establish a polar coordinate system with the piston center in the top view image as the pole, and cluster the polar radii of all edge pixels on circular edges with radii greater than the preset reference radius in the polar coordinate system; For the extreme radius of the cluster center of all clusters, select the cluster corresponding to the smallest extreme radius, and mark the circular edge to which the inner edge pixel of the cluster belongs as the inner edge of the first annular groove; calculate the difference in extreme radius between the cluster center of the cluster corresponding to the inner edge of the first annular groove and the other clusters, and record it as the radial distance; from all the other clusters, select the cluster whose radial distance is closest to the preset radial width of the first annular groove, and mark the circular edge to which the inner edge pixel of the cluster belongs as the outer edge of the first annular groove. Repeat this operation to obtain the inner edge and outer edge of each annular groove. The area between the inner and outer edges of each ring groove is defined as the ring groove area where each piston ring is located. The calculation of the first evaluation value for each piston ring includes: For each piston ring in the ring groove region, calculate the LBP value of each pixel in the ring groove region, and positively fuse the gray values and LBP values of all pixels in the neighborhood of each pixel as the outlier factor of each pixel. The abnormal assessment values in the annular groove region are positively correlated with the abnormal factors. The number of edge pixels actually detected on the edge of the annular groove region is counted as the detection count; the number of pixels corresponding to the side length of the annular groove region edge is counted as the theoretical count; the difference between the detection count and the theoretical count is used as the edge discontinuity of the annular groove region. The first evaluation value is negatively correlated with the abnormal evaluation value and the edge discontinuity.
2. The visual verification method for carbon fiber piston assembly as described in claim 1, characterized in that, The identification of the upper and lower edges of the annular groove and the upper and lower edges of the piston ring includes: For each piston ring in the ROI region, extract all straight edges in the ROI region, calculate the relative distance between any two straight edges, select the two parallel straight edges with the largest relative distance, and mark them as the upper and lower edges of the ring groove; Calculate the average gray value of all edge pixels on each straight edge, and use it as the edge gray value. Sort the edge gray values of all straight edges in descending order, and select the straight edges corresponding to the two edge gray values at the top of the sort, and mark them as the upper edge and lower edge of the piston ring.
3. The visual verification method for carbon fiber piston assembly as described in claim 1, characterized in that, The calculation of the fit coefficient for each piston ring includes: Calculate the minimum vertical distance between the upper edge of the piston ring and the upper edge of the ring groove, and denot it as the upper distance; calculate the minimum vertical distance between the lower edge of the piston ring and the lower edge of the ring groove, and denot it as the lower distance. The differences between the upper and lower spacing and the preset allowable gap are respectively regarded as the first difference and the second difference; The fitting coefficient is negatively correlated with both the first and second differences.
4. The visual verification method for carbon fiber piston assembly as described in claim 3, characterized in that, The determination of the second evaluation value for each piston ring includes: Calculate the range of the upper and lower spacing of the same ROI region in all side view images, and use the result of positive mapping between the preset allowable tolerance and the range as the consistency coefficient of each piston ring. Corner detection is performed on the upper and lower edges of the piston rings in all side view images for the same ROI region. The corner response values of all pixels are calculated and positively fused to serve as the edge roughness of each piston ring. The minimum fitting coefficient of the same ROI region in all frame side view images is obtained. The second evaluation value is positively correlated with the consistency coefficient and the minimum fit coefficient, but negatively correlated with the edge roughness.
5. The visual verification method for carbon fiber piston assembly as described in claim 1, characterized in that, The assembly quality coefficient is the result of a positive fusion of the first evaluation value and the second evaluation value.
6. The visual verification method for carbon fiber piston assembly as described in claim 1, characterized in that, The evaluation and testing of the assembly quality of the piston rings on the carbon fiber piston includes: if there are piston rings on the carbon fiber piston with an assembly quality coefficient less than a preset threshold, the assembly quality of the carbon fiber piston is unqualified; otherwise, the assembly quality of the carbon fiber piston is qualified.
7. A visual verification system for carbon fiber piston assembly, the system comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the visual verification method for carbon fiber piston assembly as described in any one of claims 1-6.
8. A visual verification device for carbon fiber piston assembly, wherein the device stores a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the visual verification method for carbon fiber piston assembly as described in any one of claims 1-6.