Automobile gearbox housing processing monitoring method based on machine vision
By using machine vision technology to calculate pixel probability and filter processing, surface defects of the gearbox housing can be identified, solving the problem of difficult surface defect detection in existing technologies and improving product quality and safety.
Patent Information
- Application Number
- CN202510764502.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-10
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-06-10
AI Technical Summary
During the processing of automobile transmission housings, existing technologies make it difficult to effectively detect and monitor surface defects such as cracks, pores, and sand holes, which affect the quality and safety of the housing.
A machine vision-based method is used to obtain the outer surface image of the gearbox housing, calculate the noise probability and defect probability of the pixel points, perform filtering processing, use the Otsu threshold and defect detection model to identify the defect area, and output the detection results.
It achieves efficient identification and monitoring of surface defects on the gearbox housing, improves product quality and safety, and reduces the labor intensity and time of manual inspection.
Smart Images

Figure CN120279023B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of image data processing, and in particular to a method for monitoring the processing of an automobile transmission housing based on machine vision. Background Art
[0002] The automobile transmission housing is a component of the automobile transmission system and is used to install the transmission transmission mechanism and its accessories. In addition to providing installation space for the transmission's gears, shafts, bearings and other components, the transmission housing can also enable the transmission's key components such as load-bearing gears, shafts and bearings to be in precise relative positions during high-speed operation, ensuring that the transmission components can remain stable during high-speed operation.
[0003] During the manufacturing process of automobile gearbox housing, the gearbox housing can be produced through multiple processes such as casting, cutting and grinding. The surface of the produced automobile gearbox housing may have defects such as cracks, pores and sand holes.
[0004] Defects on the surface of a car's gearbox housing can reflect defects inside it. When defects exist on the surface of a car's gearbox housing, it will not only affect the structural strength of the housing, but may also cause the relative positions of key components such as the transmission's load-bearing gears, shafts, and bearings carried by the housing to be unbalanced at high speeds, thereby threatening the vehicle's operating safety.
[0005] Inspecting the finished automobile gearbox housing during the processing stage can not only prevent defective automobile gearbox housings from being installed in automobiles, thereby ensuring the user's driving safety, but also facilitate manufacturers to optimize the production process or process of automobile gearbox housings to ensure the quality of the produced automobile gearbox housings. Therefore, it is necessary to monitor the automobile gearbox housing processing process. Summary of the Invention
[0006] In order to monitor the processing process of an automobile gearbox housing, the present application provides a machine vision-based automobile gearbox housing processing monitoring method, including: obtaining an outer surface image of an automobile gearbox housing to be inspected, and determining a noise probability value of a target pixel point in the outer surface image, the noise probability value being used to characterize the degree of difference in pixel values between pixels in the row or column where the target pixel point is located; the target pixel point is any pixel point in the outer surface image; pixels in the outer surface image whose pixel values are less than a preset threshold and are adjacent to each other are divided into the same candidate area to obtain multiple candidate areas in the outer surface image; determining a defect probability value of the target pixel point based on a positional relationship between the target pixel point and the candidate area; determining a target filtering side length of the target pixel point based on the defect probability value and the noise probability value of the target pixel point, and filtering the target pixel point according to the target filtering side length to obtain a target image after filtering; determining a defect detection result of the automobile gearbox housing to be inspected based on the target image, so as to monitor the processing of the automobile gearbox housing using the defect detection result.
[0007] In this way, the processing process of the automobile gearbox housing can be better monitored, thereby ensuring the quality of the obtained automobile gearbox housing.
[0008] Optionally, the noise probability value of the target pixel is determined by: , where N is the noise probability value of the target pixel, norm is the normalization function, is the number of pixels in the row where the target pixel is located, as well as are the pixel values of the bth and b-1th pixels in the row where the target pixel is located, L is the number of pixels in the column where the target pixel is located, as well as are the pixel values of the ath and a-1th pixels in the column where the target pixel is located; P is the neighborhood difference value of the target pixel, which is used to represent the degree of difference in grayscale value between the target pixel and the pixels in the neighborhood.
[0009] In this way, the noise probability value of the target pixel can be comprehensively determined from the three dimensions of row, column and neighborhood, so that the noise probability value can better represent the probability that the target pixel is noise.
[0010] Optionally, the neighborhood difference value of the target pixel is determined by: , P is the neighborhood difference value of the target pixel, M is the number of pixels in the neighborhood of the target pixel, Q is the set of pixel values of the pixels in the neighborhood of the target pixel, is the pixel value of the pixel located in the i-th row and j-th column within the neighborhood of the target pixel, is the mean of the pixel values of the pixels in the neighborhood of the target pixel, and exp is an exponential function with a natural constant as the base; is the distance between the pixel in the i-th row and j-th column in the neighborhood of the target pixel and the target pixel.
[0011] In this way, the pixel values of the pixels in the neighborhood of the target pixel are compared with the average pixel values of the pixels in the neighborhood of the target pixel, and the neighborhood difference value can better represent the probability that the target pixel is a noise pixel.
[0012] Optionally, the defect probability value of the target pixel point is determined based on the positional relationship between the target pixel point and the candidate area, including: when the target pixel point is located within the candidate area, the defect probability value of the target pixel point is determined based on the extreme difference of the pixel values of the neighboring pixel points of the outer edge pixel points of the candidate area where the target pixel point is located; when the target pixel point is located outside the candidate area, the absolute value of the difference between the preset threshold and the pixel value of the target pixel point is determined, and the normalized result of the absolute value is used as the defect probability value of the target pixel point.
[0013] In this way, according to whether the target pixel is located within the candidate area, the defect probability value of the target pixel can be adaptively determined, so as to use the defect probability value to represent the probability that the target pixel is a defective pixel.
[0014] Optionally, determining the defect probability value of the target pixel point based on the range of pixel values of neighboring pixels of the outer edge pixels of the candidate area where the target pixel point is located includes: ,in, is the defect probability value of the target pixel, is the normalization function, T is the pixel value of the target pixel, t is the preset threshold, is the number of pixels on the outer edge of the candidate area where the target pixel is located, It is the range of the pixel values of the neighboring pixels of the y-th pixel on the outer edge of the candidate area where the target pixel is located.
[0015] In this way, when the target pixel is located within the candidate area, the defect probability value of the target pixel can comprehensively consider the situation of the target pixel itself and the situation of the candidate area where it is located.
[0016] Optionally, determining a target filtering side length of a target pixel point according to a defect probability value and a noise probability value of the target pixel point includes: ,in, is the target filter side length of the target pixel, is the noise probability value of the target pixel, is the defect probability value of the target pixel, is the initial filter side length.
[0017] Optionally, the defect detection result of the automobile gearbox housing to be inspected is determined based on the target image, including: using the Otsu threshold to determine the target threshold of the target image, and taking the pixel points in the target image with a grayscale value less than the target threshold as defective pixel points to obtain a defect area composed of the defective pixel points; according to the position and area of the defective area in the target image, the defect detection result of the automobile gearbox housing to be inspected is output.
[0018] Optionally, the defect detection result of the automobile gearbox housing to be inspected is determined based on the target image, including: inputting the target image into a pre-trained defect detection model to obtain the defect detection result of the automobile gearbox housing in the target image output by the defect detection model; the defect detection model is used to output the defect detection result of the automobile gearbox housing in the input image.
[0019] Optionally, the defect detection model is obtained by training in the following manner: using sample images of the automobile gearbox housing as input to a pre-built network model, and using defect detection labels corresponding to the sample images as output of the network model, and training the network model to obtain the defect detection model.
[0020] Optionally, the defect detection result includes the location of the defect and the area of the defect; the defect detection result is used to monitor the processing of the automobile gearbox housing, including: when the area of the defect is greater than a preset area threshold, moving the automobile gearbox housing to be inspected to the space where the defect handler is located, and sending the location of the defect to the terminal device bound to the defect handler.
[0021] The technical solution provided by the embodiments of the present application may include the following beneficial effects: obtaining an outer surface image of the automobile gearbox housing to be inspected, and adaptively determining the side length of the target pixel points when filtering the target pixel points according to the situation of the target pixel points in the outer surface image. Using the side length suitable for the target pixel points for filtering can avoid noise pixels that may exist in the outer surface image. Therefore, the obtained target image can better reflect the surface defect situation of the automobile gearbox housing to be inspected, and the target image can be used to better realize the monitoring of the processing process of the automobile gearbox housing.
[0022] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 The present invention is a flowchart of a method for monitoring the machining of an automobile transmission housing based on machine vision according to an exemplary embodiment. DETAILED DESCRIPTION
[0024] First, a brief introduction to the application scenario of the embodiment of the present application is given. In the application scenario of the present application, there may be defects such as cracks, pores and sand holes on the surface of the automobile gearbox housing. In order to ensure the quality of the produced automobile gearbox housing, it is necessary to monitor the processing process of the automobile gearbox housing.
[0025] In order to solve the above technical problems, the present invention provides a method for monitoring the machining of an automobile transmission housing based on machine vision. Figure 1 FIG. 1 is a flow chart showing a method for monitoring the machining of an automobile transmission housing based on machine vision according to an exemplary embodiment. Figure 1 As shown, the method includes the following steps.
[0026] In step S101 , an outer surface image of a vehicle gearbox housing to be inspected is acquired, and a noise probability value of a target pixel point in the outer surface image is determined.
[0027] An image acquisition device can be used to obtain an outer surface image of the automobile gearbox housing to be inspected; in order to avoid the influence of possible background in the image, the pixel values of the pixels of other parts of the outer surface image except the automobile gearbox housing can be equal to 0.
[0028] In order to reduce the amount of calculation required in subsequent calculation processes, the outer surface image of the automobile gearbox housing to be inspected may be a grayscale image that has been subjected to grayscale processing.
[0029] The noise probability value is used to characterize the degree of difference in pixel values between the pixels in the row or column where the target pixel is located; the target pixel is any pixel in the outer surface image.
[0030] There may be some noise pixels in the outer surface image of the automobile gearbox housing. In order to avoid the influence of the noise pixels that may exist in the outer surface image of the automobile gearbox housing on the detection results, the noise probability value of the target pixel in the outer surface image can be determined.
[0031] The noise probability value is used to characterize the degree of difference in pixel values among the rows or columns where the target pixel is located. Since noise pixels are random and isolated to a certain extent, and the defects that may exist in the outer surface image of the automobile transmission housing are usually concentrated in a certain area or multiple areas, the grayscale values of the pixels in the row where the noise pixel is located are more different, or the grayscale values of the pixels in the column where the noise pixel is located are more different. The noise probability value of the target pixel can characterize the probability that the target pixel is noise.
[0032] With reference to the determination process of the noise probability value of the target pixel point, the noise probability value of each pixel point of the outer surface image of the automobile gearbox housing can be obtained respectively.
[0033] In one embodiment, the noise probability value of the target pixel is determined by: , where N is the noise probability value of the target pixel, norm is the normalization function, is the number of pixels in the row where the target pixel is located, as well as are the pixel values of the bth and b-1th pixels in the row where the target pixel is located, L is the number of pixels in the column where the target pixel is located, as well as are the pixel values of the ath and a-1th pixels in the column where the target pixel is located; P is the neighborhood difference value of the target pixel, which is used to represent the degree of difference in grayscale value between the target pixel and the pixels in the neighborhood.
[0034] Due to the isolation of noise pixels, the grayscale values of pixels in a pixel row or pixel column with noise pixels are more different than those in a pixel row or pixel column without noise pixels. Therefore, by comparing the pixel values of the pixels in the row where the target pixel is located and comparing the pixel values of the pixels in the column where the target pixel is located, the probability of the existence of noise pixels in the row or column where the target pixel is located can be characterized.
[0035] For example, when the probability that there are noise pixels in the row where the target pixel is located is high, and the probability that there are noise pixels in the column where the target pixel is located is high, the probability that the target pixel is a noise pixel is high. Therefore, by comparing the pixel values of adjacent pixels in the column where the target pixel is located, and comparing the pixel values of adjacent pixels in the row where the target pixel is located, the noise probability value obtained can better distinguish between noise pixels and non-noise pixels, and the noise probability value can better characterize the probability that the target pixel is a noise pixel.
[0036] When the target pixel is a non-noise pixel, since the defects on the outer surface of the automobile transmission housing usually do not appear as a single point, but rather as a defective area with a certain concentration, if the target pixel is significantly different from the surrounding pixels, it means that the target pixel is more likely to be caused by a noise data point.
[0037] In this way, by considering the neighborhood difference value of the target pixel point, the noise probability value of the target pixel point can be obtained, and the noise probability value of the target pixel point can be comprehensively determined from the three dimensions of row, column and neighborhood, so that the noise probability value can better represent the probability that the target pixel point belongs to noise.
[0038] In one embodiment, the neighborhood difference value of the target pixel is determined by: , P is the neighborhood difference value of the target pixel, M is the number of pixels in the neighborhood of the target pixel, Q is the set of pixel values of the pixels in the neighborhood of the target pixel, is the pixel value of the pixel located in the i-th row and j-th column within the neighborhood of the target pixel, is the mean of the pixel values of the pixels in the neighborhood of the target pixel, and exp is an exponential function with a natural constant as the base; is the distance between the pixel in the i-th row and j-th column in the neighborhood of the target pixel and the target pixel.
[0039] The size of the neighborhood range can be set according to actual needs. For example, the neighborhood range can be a range of 3×3, 5×5, or 7×7.
[0040] The distance between the target pixel and the target pixel within the neighborhood of the target pixel can be determined by the Euclidean distance or Manhattan distance between the two pixels. The embodiment of the present application does not limit the specific algorithm for distance calculation.
[0041] For a first pixel and a second pixel among the pixels other than the target pixel within the neighborhood of the target pixel, the distance from the first pixel to the target pixel is greater than the distance from the second pixel to the target pixel, so that the probability that the first pixel is associated with the target pixel is less than the probability that the second pixel is associated with the target pixel; or, the correlation between the first pixel and the target pixel is lower than the correlation between the second pixel and the target pixel.
[0042] Compared with the distance from the second pixel to the target pixel, since the distance from the first pixel to the target pixel is larger, in the calculation formula of the neighborhood difference value of the target pixel, the contribution of the first pixel to the neighborhood difference value of the target pixel is smaller, so that the target pixel with a higher correlation with the target pixel contributes more to the neighborhood difference value.
[0043] Compared with the pixel values of two non-adjacent position points on the outer surface of the automobile transmission housing, the degree of influence or correlation between the pixel values of two adjacent position points on the outer surface of the automobile transmission housing is greater. Therefore, according to the distance from the pixel point in the neighborhood range in the outer surface image to the target pixel point, the neighborhood difference value of the target pixel point is determined, and the degree to which the target pixel point is affected by noise can be better determined according to the neighborhood difference value.
[0044] The pixel values of the pixels in the neighborhood of the target pixel are compared with the average value of the pixel values of the pixels in the neighborhood of the target pixel. The greater the difference between the pixel values of the pixels in the neighborhood of the target pixel and the average value of the pixel values of the pixels in the neighborhood of the target pixel, the greater the probability that there are noise pixels in the neighborhood of the target pixel, which makes the probability that the target pixel is a noise pixel greater.
[0045] In this way, by comparing the pixel values of the pixels within the neighborhood of the target pixel with the average value of the pixel values of the pixels within the neighborhood of the target pixel, and considering the distance from the pixels within the neighborhood of the target pixel to the target pixel, the obtained neighborhood difference value can better characterize the probability that there are noise pixels within the neighborhood where the target pixel is located, thereby better characterizing the probability that the target pixel is a noise pixel through the neighborhood difference value.
[0046] In step S102, pixel points in the outer surface image whose pixel values are less than a preset threshold and are adjacent to each other are divided into the same candidate area to obtain multiple candidate areas in the outer surface image; and the defect probability value of the target pixel point is determined based on the positional relationship between the target pixel point and the candidate area.
[0047] Since the defective areas on the outer surface of the automobile transmission housing have a certain degree of aggregation, the pixel values of the defective pixels adjacent to each other in the automobile transmission housing have a certain degree of similarity.
[0048] The defects on the outer surface of the automobile transmission housing mainly manifest as cracks, pores or sand holes. Therefore, compared with the non-defective positions on the outer surface of the automobile transmission housing, the brightness of the defective positions on the outer surface of the automobile transmission housing is lower.
[0049] Since the brightness of the defective location points on the outer surface of the automobile gearbox housing is lower, and the pixel values of adjacent pixels with defects in the automobile gearbox housing have a certain similarity, the defective area on the outer surface of the automobile gearbox housing appears in the outer surface image as having a smaller pixel value and a certain degree of aggregation.
[0050] Dividing adjacent pixel points in the outer surface image whose pixel values are less than a preset threshold into the same candidate area can achieve preliminary screening of image areas in the outer surface image that may correspond to defective areas on the surface of the automobile gearbox housing, thereby narrowing the search range for defective areas.
[0051] Multiple candidate regions in the outer surface image may be scattered in multiple independent image regions in the outer surface image. Multiple candidate regions may respectively correspond to defect regions at different positions on the outer surface of the automobile gearbox housing. In order to further determine a more accurate defect region, the defect probability value of the target pixel point can be determined based on the positional relationship between the target pixel point and the candidate region.
[0052] For example, if a target pixel point is located within a candidate area, the target pixel point is more likely to correspond to a defective pixel point on the surface of a vehicle transmission housing. Therefore, based on the positional relationship between the target pixel point and the candidate area, the defect probability value of the target pixel point can be determined, so as to more accurately determine the surface defects of the vehicle transmission housing.
[0053] In one embodiment, the defect probability value of the target pixel point is determined based on the positional relationship between the target pixel point and the candidate area, including: when the target pixel point is located within the candidate area, the defect probability value of the target pixel point is determined based on the extreme difference of the pixel values of the neighboring pixel points of the outer edge pixel points of the candidate area where the target pixel point is located; when the target pixel point is located outside the candidate area, the absolute value of the difference between the preset threshold and the pixel value of the target pixel point is determined, and the normalized result of the absolute value is used as the defect probability value of the target pixel point.
[0054] When there is a defective area on the surface of the automobile transmission housing, there is a certain difference between the thickness at the outer edge line and the thickness on both sides of the outer edge line. When the target pixel point is located within the candidate area, for the outer edge pixels of the candidate area where the target pixel point is located, the larger the range of the pixel values of the neighboring pixels of these outer edge pixels is, the greater the probability that the position point on the outer surface of the automobile transmission housing is actually at the edge of the defective area, and the target pixel point located within the candidate area is more likely to be a defective pixel point.
[0055] At the same time, the edges in the defective area on the outer surface of the automobile gearbox housing are usually more obvious. Paying attention to the neighboring pixels of the outer edge pixels of the candidate area can help to more keenly discover early defects on the outer surface of the automobile gearbox housing.
[0056] When the target pixel point is outside the candidate area, it means that the number of other position points with similar pixel values within a certain range around the position point corresponding to the target pixel point on the outer surface of the automobile gearbox housing is small; and because the candidate area includes pixel points whose pixel values are less than a preset threshold and are adjacent to each other, when the target pixel point is outside the candidate area, the pixel value of the target pixel point has a greater probability of being greater than the preset threshold, and the probability that the target pixel point belongs to the defective area is even lower.
[0057] In this way, when the target pixel point is located within the candidate area, the defect probability value of the target pixel point is determined according to the extreme difference of the pixel values of the neighboring pixel points of the outer edge pixel points of the candidate area where the target pixel point is located, so that the defect probability value can better characterize the probability that the target pixel point is a defective pixel point.
[0058] In one embodiment, determining the defect probability value of the target pixel point based on the range of pixel values of neighboring pixels of the outer edge pixels of the candidate area where the target pixel point is located includes: ,in, is the defect probability value of the target pixel, is the normalization function, T is the pixel value of the target pixel, t is the preset threshold, is the number of pixels on the outer edge of the candidate area where the target pixel is located, It is the range of the pixel values of the neighboring pixels of the y-th pixel on the outer edge of the candidate area where the target pixel is located.
[0059] The normalization processing function is used to normalize the variables to be normalized to the range of 0 to 1; when the target pixel point is located within the candidate area, the extreme difference of the pixel values of the neighboring pixels of the y-th pixel point on the outer edge of the candidate area where the target pixel point is located can reflect the probability that the candidate area actually has defects in the area corresponding to the surface of the automobile gearbox housing. The difference between the target pixel point and the preset threshold can reflect the probability that the target pixel point has defects on the surface of the automobile gearbox housing. Therefore, the defect probability value can combine the situation of the target pixel point itself with the situation of the candidate area where the target pixel point is located.
[0060] In this way, when the target pixel is located within the candidate area, the defect probability value of the target pixel can comprehensively consider the situation of the target pixel itself and the situation of the candidate area where the target pixel is located. Therefore, the defect probability value can better characterize the probability that the target pixel is a defective pixel.
[0061] In step S103, the target filtering side length of the target pixel is determined according to the defect probability value and the noise probability value of the target pixel, and the target pixel is filtered according to the target filtering side length to obtain a filtered target image.
[0062] Under different filter side lengths, the range considered when filtering pixels is different. For example, the larger the filter side length used when filtering, the better the filtering effect on noise pixels; the larger the filter side length used when filtering, the better the retention effect on pixel features. Therefore, according to the defect probability value and noise probability value of the target pixel, the target filter side length of the target pixel can be adaptively determined.
[0063] In one embodiment, determining a target filtering side length of a target pixel point based on a defect probability value and a noise probability value of the target pixel point includes: ,in, is the target filter side length of the target pixel, is the noise probability value of the target pixel, is the defect probability value of the target pixel, is the initial filter side length.
[0064] In this way, since the larger the defect probability value of the target pixel point, the greater the probability that the position point corresponding to the target pixel point on the surface of the automobile transmission housing actually has a defect; the larger the noise probability value of the target pixel point, the greater the probability that the position point corresponding to the target pixel point on the surface of the automobile transmission housing is a noise pixel point. Therefore, by combining the defect probability value and the noise probability value of the target pixel point, it is possible to determine a target filter side length that better matches the target pixel point.
[0065] The filtering processing performed on the target pixel point can be Gaussian filtering, mean filtering, median filtering, etc. The embodiment of the present application does not limit the filtering algorithm adopted, and technical personnel in this field can adapt the filtering algorithm according to actual needs.
[0066] In step S104, a defect detection result of the automobile gearbox housing to be detected is determined according to the target image, so as to monitor the processing of the automobile gearbox housing by using the defect detection result.
[0067] After filtering the pixels in the outer surface image, and the filtering side lengths of different pixels are determined according to the actual conditions of the pixels, the pixel values of the obtained pixels can avoid the influence of noise pixels, and the pixel values of the pixels in the target image can better reflect the surface defect characteristics of the automobile gearbox housing.
[0068] In one embodiment, a defect detection result of an automobile transmission housing to be inspected is determined based on a target image, including: using an Otsu threshold to determine a target threshold of the target image, and taking pixels in the target image with grayscale values less than the target threshold as defective pixels to obtain a defect area composed of the defective pixels; and outputting the defect detection result of the automobile transmission housing to be inspected based on the position and area of the defective area in the target image.
[0069] The Otsu method can adaptively select the optimal threshold value based on the statistical characteristics of the image data. Therefore, using the Otsu method to determine the target threshold value of the target image improves the objectivity and accuracy of the detection; it can also facilitate the detection process of defects on the outer surface of the automobile gearbox housing to adapt to different detection lighting conditions.
[0070] Since the pixel value of a pixel point in the target image can better reflect the probability of defects at the surface position point of the automobile gearbox housing, when the pixel value of a pixel point in the target image is less than the target threshold, the pixel point in the target image with a pixel value less than the preset threshold is regarded as a defective pixel point, which can simply and effectively screen out the defective area on the surface of the automobile gearbox housing.
[0071] Based on the position and area of the defective area in the target image, a defective image can be outputted with one or more defective areas in the outer surface image distributed therein; alternatively, one or more defective areas can be annotated in the outer surface image to obtain an annotated image, and the annotated image with the defects can be outputted so that the user can process the defective automobile gearbox housing.
[0072] Since the location of defects in the automobile transmission housing to be inspected is output, the user can reduce the time or labor intensity required for visual search for defects when handling the defects, thereby improving the efficiency or experience of handling defective automobile transmission housings.
[0073] In one embodiment, a defect detection result of an automobile transmission case to be inspected is determined based on a target image, including: inputting the target image into a pre-trained defect detection model to obtain a defect detection result of the automobile transmission case in the target image output by the defect detection model; the defect detection model is used to output the defect detection result of the automobile transmission case in the input image.
[0074] Since different defects on the surface of an automobile transmission housing have different characteristics, for example, the area characteristics or distribution characteristics of defects such as cracks, pores, and sand holes that may exist on the surface of an automobile transmission housing are different, and the target image is obtained after adaptive filtering of the pixels in the outer surface image, the target image can more clearly reflect the possible defects. Therefore, inputting the target image into a pre-trained defect detection model can obtain more accurate defect detection results.
[0075] The model structure of the defect detection model can be, for example, a deep residual network and an FCN (Fully Convolutional Network), etc. The embodiment of the present application does not impose any limitation on the model structure of the defect detection model.
[0076] The defect detection results can be used to indicate one or more defect types existing in the outer surface of the automobile transmission housing, so that the user can carry out targeted treatment on the defective automobile transmission housing according to the defect type existing on the outer surface of the automobile transmission housing.
[0077] For example, for slight scratches on the surface of a car gearbox housing, the user can grind or polish the location of the slight scratches on the surface of the car gearbox housing.
[0078] In one embodiment, the defect detection model can be obtained by training in the following manner: using sample images of a car gearbox housing as input to a pre-built network model, and using the defect detection labels corresponding to the sample images as outputs of the network model, and training the network model to obtain the defect detection model.
[0079] According to different conditions of the outer surface of the automobile gearbox housing, a matching defect detection label can be determined for a sample image of the outer surface of the automobile gearbox housing. The defect detection label is used to indicate at least one type of defect in the sample image.
[0080] When the number of times the network model is trained reaches a preset number, or the accuracy of the defect detection label output by the network model reaches a preset accuracy, it can be determined that the training of the network model is completed, and the trained network model can be used as a defect detection model; wherein the network model can be, for example, a neural network model such as a convolutional neural network or a deep residual network.
[0081] In one embodiment, the defect detection result includes the location of the defect and the area of the defect; the defect detection result is used to monitor the processing of the automobile transmission housing, including: when the area of the defect is greater than a preset area threshold, moving the automobile transmission housing to be inspected to the space where the defect handler is located, and sending the location of the defect to the terminal device bound to the defect handler.
[0082] When the defect detection result indicates that the automobile gearbox housing to be detected has defects, a prompt message can be output. The prompt message is used to remind the user that the automobile gearbox housing to be detected has defects, so that the user can handle the defective automobile gearbox housing.
[0083] Alternatively, the machine vision-based automobile gearbox housing processing process may be adjusted according to the defect conditions of the defective automobile gearbox housing; for example, the temperature or speed of different processes of the machine vision-based automobile gearbox housing may be adjusted, which will not be further described in the embodiments of the present application.
[0084] In one embodiment, the defect detection result includes the location of the defect and the area of the defect; the defect detection result is used to monitor the processing of the automobile transmission housing, including: when the area of the defect is greater than a preset area threshold, moving the automobile transmission housing to be inspected to the space where the defect handler is located, and sending the location of the defect to the terminal device bound to the defect handler.
[0085] The preset area threshold may be determined based on the total area of the surface to be inspected of the automobile transmission housing to be inspected; for example, the preset area threshold may be between 2% and 5% of the total area of the surface to be inspected.
[0086] Moving the automobile transmission housing to be inspected to the space where the defect handler is located, and sending the location of the defect to the terminal device bound to the defect handler, the defect handler can focus on handling the defective automobile transmission housing in the space where he is located, thereby improving the efficiency of handling the defective automobile transmission housing, reducing the moving distance required by the defect handler, and minimizing unnecessary physical exertion of the defect handler.
[0087] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art not disclosed herein, and the description and examples are to be considered merely as exemplary.
[0088] It will be understood that the present application is not limited to the exact construction that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof.
Claims
1. A method for monitoring the processing of an automobile gearbox housing based on machine vision, characterized in that: include: Acquire an outer surface image of a vehicle gearbox housing to be inspected, and determine a noise probability value of a target pixel point in the outer surface image; The noise probability value is used to characterize the degree of difference in pixel values between the pixels in the row or column where the target pixel is located; the target pixel is any pixel in the outer surface image; The noise probability value of the target pixel is determined as follows: , where N is the noise probability value of the target pixel, norm is the normalization function, is the number of pixels in the row where the target pixel is located, as well as are the pixel values of the bth and b-1th pixels in the row where the target pixel is located, L is the number of pixels in the column where the target pixel is located, as well as are the pixel values of the ath and a-1th pixels in the column where the target pixel is located; P is the neighborhood difference value of the target pixel, which is used to represent the difference in grayscale value between the target pixel and the pixels in the neighborhood; Divide adjacent pixels in the outer surface image whose pixel values are less than a preset threshold into the same candidate area to obtain multiple candidate areas in the outer surface image; determine the defect probability value of the target pixel based on the positional relationship between the target pixel and the candidate area; Determine the target filtering side length of the target pixel point according to the defect probability value and the noise probability value of the target pixel point, and perform filtering processing on the target pixel point according to the target filtering side length to obtain a target image after filtering processing; The defect detection result of the automobile gearbox housing to be inspected is determined according to the target image, so as to monitor the processing of the automobile gearbox housing by using the defect detection result.
2. The method for monitoring automobile transmission housing processing based on machine vision according to claim 1, characterized in that: The neighborhood difference value of the target pixel is determined in the following way: , P is the neighborhood difference value of the target pixel, M is the number of pixels in the neighborhood of the target pixel, Q is the set of pixel values of the pixels in the neighborhood of the target pixel, is the pixel value of the pixel located in the i-th row and j-th column within the neighborhood of the target pixel, is the mean of the pixel values of the pixels in the neighborhood of the target pixel, and exp is an exponential function with a natural constant as the base; is the distance between the pixel in the i-th row and j-th column in the neighborhood of the target pixel and the target pixel.
3. The method for monitoring automobile gearbox housing processing based on machine vision according to claim 1, characterized in that: According to the positional relationship between the target pixel and the candidate area, the defect probability value of the target pixel is determined, including: When the target pixel is located within the candidate area, the defect probability value of the target pixel is determined based on the range of pixel values of the neighboring pixels of the outer edge pixels of the candidate area where the target pixel is located; When the target pixel is outside the candidate area, the absolute value of the difference between the preset threshold and the pixel value of the target pixel is determined, and a normalized result of the absolute value is used as the defect probability value of the target pixel.
4. The method for monitoring automobile gearbox housing processing based on machine vision according to claim 3, characterized in that: The defect probability value of the target pixel is determined based on the range of the pixel values of the neighboring pixels of the outer edge pixels of the candidate area where the target pixel is located, including: ,in, is the defect probability value of the target pixel, is the normalization function, T is the pixel value of the target pixel, t is the preset threshold, is the number of pixels on the outer edge of the candidate area where the target pixel is located, It is the range of the pixel values of the neighboring pixels of the y-th pixel on the outer edge of the candidate area where the target pixel is located.
5. The method for monitoring automobile gearbox housing processing based on machine vision according to claim 1, characterized in that: According to the defect probability value and noise probability value of the target pixel point, the target filtering side length of the target pixel point is determined, including: ,in, is the target filter side length of the target pixel, is the noise probability value of the target pixel, is the defect probability value of the target pixel, is the initial filter side length.
6. The method for monitoring automobile transmission housing processing based on machine vision according to claim 1, characterized in that: Determine the defect detection results of the automobile gearbox housing to be inspected based on the target image, including: The target threshold of the target image is determined by using the Otsu threshold, and the pixels in the target image whose grayscale values are less than the target threshold are regarded as defective pixels to obtain the defect area composed of the defective pixels; According to the position and area of the defect area in the target image, the defect detection result of the automobile gearbox housing to be inspected is output.
7. The method for monitoring automobile transmission housing processing based on machine vision according to claim 1, characterized in that: Determine the defect detection results of the automobile gearbox housing to be inspected based on the target image, including: The target image is input into a pre-trained defect detection model to obtain the defect detection result of the automobile gearbox housing in the target image output by the defect detection model; the defect detection model is used to output the defect detection result of the automobile gearbox housing in the input image.
8. The method for monitoring automobile transmission housing processing based on machine vision according to claim 7, characterized in that: The defect detection model is trained in the following way: The sample pictures of the automobile gearbox housing are used as the input of the pre-built network model, and the defect detection labels corresponding to the sample pictures are used as the output of the network model. The network model is trained to obtain the defect detection model.
9. The method for monitoring automobile transmission housing processing based on machine vision according to claim 1, characterized in that: The defect detection results include the location of the defect and the area of the defect; Use defect detection results to monitor the processing of automobile gearbox housings, including: When the area of the defect is larger than the preset area threshold, the automobile gearbox housing to be inspected is moved to the space where the defect handler is located, and the location of the defect is sent to the terminal device bound to the defect handler.
Citation Information
Patent Citations
Three-axis turntable defect detection method based on machine vision
CN117455915A