Rearview mirror mold precision detection method based on machine vision
Through machine vision-based detection methods, the edges and pixel points of the reflective area of the rearview mirror mold are identified and the edge probability is calculated, which solves the problems of inaccurate detection and high cost in the prior art, and achieves higher precision and low cost mold size detection.
Patent Information
- Application Number
- CN202510608031.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-13
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2045-05-13
AI Technical Summary
The prior art is costly and inaccurate in the detection of rearview mirror mold dimensional accuracy, especially due to inaccurate edges caused by reflective areas.
Using a detection method based on machine vision, the grayscale image of the rearview mirror mold is obtained, edge information is extracted, the contour is screened, the target edge and pixel points in the reflective area are identified, the edge probability is calculated, the final edge and contour is determined, and the size of the mold is obtained.
Improves the accuracy and cost-effectiveness of rearview mirror mold dimensional accuracy detection, reduces errors, and provides more accurate mold dimensional data.
Smart Images

Figure CN120147309A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing. More specifically, the present invention relates to a method for detecting the accuracy of a rearview mirror mold based on machine vision. Background Art
[0002] As an important component of automotive safety and functionality, the accuracy of the dimensions of the rearview mirror determines its assembly accuracy with other components (such as the vehicle body, brackets, etc.). If the dimensions of the mold are inaccurate, it may lead to insecure installation of the rearview mirror and even affect driving safety. High-precision molds can reduce the time for processing and adjustment, reduce the number of reworks and inspections, improve production efficiency, and reduce the scrap rate, thereby saving time and costs.
[0003] When detecting the accuracy of an automotive rearview mirror mold, it is usually detected from various aspects such as the dimensional accuracy, shape accuracy, surface quality, and assembly accuracy of the mold. Among them, dimensional accuracy is one of the core indicators of mold manufacturing quality, which determines the deviation degree between the actual size and the designed size of the mold.
[0004] Currently, optical detection technology, image processing technology, etc. can be used to detect the dimensional accuracy of the rearview mirror mold. Among them, optical detection technology is an automated optical detection system. Although it can achieve the detection of the dimensional accuracy of the rearview mirror mold, it is expensive and has poor adaptability to complex and changeable detection requirements, and it is difficult to adjust the detection items and parameters. The image processing technology obtains the image of the mold by using an industrial camera and obtains the edge contour of the image to judge the corresponding scale data of the mold. However, due to the special outer shape structure of the rearview mirror mold, there are some local reflective areas at some edge positions. Then, during the canny edge detection of the rearview mirror mold, the contours of these reflective areas are not easily recognized, making the contour of the rearview mirror mold inaccurate.
[0005] Therefore, due to the problem that the obtained image is sensitive to light and the reflection characteristics of objects, there may be inaccuracies when obtaining the edge of the image of the rearview mirror mold. Therefore, it is particularly important to improve the detection of the dimensional accuracy of the rearview mirror mold while taking cost into account. Summary of the Invention
[0006] The purpose of the present invention is to propose a method for detecting the accuracy of a rearview mirror mold based on machine vision to solve the problems of high cost and inaccurate detection in the prior art when detecting the dimensional accuracy of the rearview mirror mold; for this purpose, the present invention provides a solution in the following aspect.
[0007] A method for detecting the accuracy of a rearview mirror mold based on machine vision provided by the present invention includes: Obtaining a grayscale image of the rearview mirror mold; extracting the edge information from the grayscale image; Filter out the contour of the rearview mirror from the edge information; Obtain the target edges belonging to the reflective area in the contour; and obtain the target pixel points in the reflective area; the target pixel points are starting from any pixel point in each edge. If the gray-scale difference between any pixel point and its adjacent point in the gradient direction is greater than the threshold, then calculate the gray-scale difference between the adjacent point and the point in the gradient direction of the adjacent point, and so on until the pixel point when the gray-scale difference is less than or equal to the threshold is obtained; Calculate the edge probability of each target pixel point, and use the target pixel points with edge probability greater than the set value as edge pixel points; the edge probability is inversely correlated with the average gray-scale change of the corresponding target pixel point; the average gray-scale change is the average value of the gray-scale differences between all adjacent pixel points in the pixel set; the pixel set includes the target pixel point and a set number of pixel points along the gradient direction of the target pixel point; Use the new edge formed by all edge pixel points as the final edge of the reflective area, and then obtain the final contour of the rearview mirror; obtain the size of the rearview mirror mold according to the final contour.
[0008] The above solution extracts the target edges belonging to the reflective area, and based on the gray-scale change amount between the pixel points on any edge and the adjacent pixel points in the corresponding gradient direction, determines the suspected edge pixel points (target pixel points) in the reflective area, and calculates the edge probability of the target pixel points to determine whether the target pixel point is a real edge pixel point, so as to determine the final edge of the reflective area, obtain the final contour of the rearview mirror mold, and then obtain the size of the rearview mirror mold contour. That is, the present invention can accurately obtain edge pixel points through the refined analysis of the pixel points on each edge and the target pixel points in the reflective area, provide accurate data for the subsequent size of the rearview mirror mold, and the cost of measuring the size is lower.
[0009] Optionally, the edge probability is: ; where is the average gray-scale change of the (n + 1)-th target pixel point, is the edge probability of the (n + 1)-th target pixel point.
[0010] The above provides a method for accurately calculating the edge probability of target pixel points.
[0011] Optionally, the specific process of obtaining the target edges belonging to the reflective area in the contour is: Obtain the endpoints of all edges on the contour of the rearview mirror; Calculate the possibility that each endpoint's edge belongs to the reflective area; Use the edges where the endpoints with possibility greater than the set threshold are located as the target edges of the reflective area; Among them, the possibility is positively correlated with the included angle of the corresponding endpoint and the modulus length of the second vector; the included angle is the included angle between the first vector and the second vector, the first vector is the vector pointing from the pixel point adjacent to any endpoint to any endpoint, and the second vector is the vector pointing from any endpoint to the second endpoint; the second endpoint is the endpoint with the minimum distance from the any endpoint when starting from the any endpoint and obtaining it in the clockwise direction.
[0012] In the above solution, by analyzing the shape of the rearview mirror mold and the characteristics of the collected image, the target edge belonging to the reflective area can be accurately determined.
[0013] Optionally, the possibility is: ; represents the included angle of the m-th endpoint, is the m-th endpoint, is the endpoint with the minimum distance from the m-th endpoint selected in the clockwise direction, represents the modulus length of the second vector, represents the possibility that the edge where the m-th endpoint is located is the reflective area, and norm( ) is the normalization function.
[0014] Optionally, the specific process of obtaining the target edge belonging to the reflective area in the obtained contour is: Obtain the endpoints of all edges on the contour of the rearview mirror, cluster the endpoints to obtain multiple clustering clusters, and select the edges in the area where the number of endpoints in the cluster is greater than the set number as the target edges of the reflective area.
[0015] In the above solution, by clustering the endpoints on the edge, the target edge belonging to the reflective area can be determined.
[0016] Optionally, screening out the contour of the rearview mirror from the edge information includes: selecting the edge corresponding to the maximum circularity as the contour of the rearview mirror; Or, use the contour detection algorithm to obtain the boundary in the edge information to obtain the contour of the rearview mirror.
[0017] Optionally, the reflective area is the minimum circumscribed rectangle corresponding to the target edge.
[0018] Optionally, extracting the edge information in the grayscale image includes: using the canny algorithm to obtain the edge information in the grayscale image.
[0019] Optionally, taking the new edge formed by all edge pixel points as the final edge of the reflective area includes: connecting all edge pixel points in sequence to obtain the final edge.
[0020] Optionally, obtaining the dimensions of the rearview mirror mold based on the final contour includes: Obtaining the maximum and minimum values of the abscissas of the pixel points in the final contour, and the maximum and minimum values of the ordinates respectively; Taking the absolute value of the difference between the maximum and minimum values of the abscissa as the length of the rearview mirror mold; taking the absolute value of the difference between the maximum and minimum values of the ordinate as the width of the rearview mirror mold.
[0021] The above solution can obtain more accurate dimensions of the rearview mirror mold.
[0022] The beneficial effects of the present invention are: The solution of the present invention analyzes the target edges belonging to the reflective area in the grayscale image of the obtained rearview mirror mold based on the shape characteristics of the obtained rearview mirror mold, determines the final edge of the reflective area, and further obtains the final contour of the rearview mirror mold, solving the problem that the obtained contour shape is not accurate enough in the case of the complex shape of the rearview mirror mold, and at the same time reducing the error generated when obtaining the dimensions of the rearview mirror mold. Description of the Drawings
[0023] Figure 1 Schematically shows the flowchart of the steps of a method for detecting the accuracy of a rearview mirror mold based on machine vision in this embodiment; Figure 2 Schematically shows the edge image of the rearview mirror mold in this embodiment; Figure 3 Schematically shows the contour of the rearview mirror mold in this embodiment; Figure 4 Schematically shows the reflective area in this embodiment. Detailed Embodiments
[0024] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention.
[0025] The present invention aims at the problem that the complex shape of the mold edge easily leads to the appearance of a reflective area, and the gray level of the reflective area is relatively close to that of the background area. Therefore, when transitioning from the reflective area to the background area, there is no obvious boundary. At this time, the canny edge detection cannot accurately identify the edge of the rearview mirror mold in the reflective area, so the problem of accurately detecting the dimensions of the rearview mirror mold cannot be solved. Therefore, a method for detecting the accuracy of a rearview mirror mold based on machine vision is proposed, that is, by accurately obtaining the complete contour of the rearview mirror and obtaining the length and width of the mold according to the distance between the edge pixel points in the contour.
[0026] Specifically, as Figure 1As shown, a method for detecting the accuracy of a rearview mirror mold based on machine vision in this embodiment includes the following steps: Step S1: Obtain a grayscale image of the rearview mirror mold.
[0027] Specifically, in this embodiment, when collecting the image of the rearview mirror mold, a digital camera or an industrial camera with a relatively high resolution is selected to ensure the clarity and detail capture ability of the image. At the same time, it is also necessary to ensure that the rearview mirror mold is placed stably and kept horizontal or vertical to avoid errors caused by angles.
[0028] After obtaining the image, a filtering algorithm (such as Gaussian filtering) is also used to remove the noise in the captured image to enhance the image quality. And the filtered image is grayscaled to obtain a grayscale image.
[0029] Step S2: Determine the contour of the rearview mirror in the grayscale image of the rearview mirror mold, and correct the contour to obtain the final contour.
[0030] According to Figure 2 It can be seen that since the external forms of some rearview mirror molds are relatively complex, when performing edge detection on the grayscale image, there is reflection in some edge areas, and at this time, the edges are not accurately extracted, so there are errors in the obtained edges of the rearview mirror mold, which will further lead to errors in the obtained size data of the rearview mirror mold. Therefore, it is necessary to obtain the contour of the rearview mirror mold and analyze the contour to obtain the final contour.
[0031] The process of obtaining the final contour includes steps S21 - S24, specifically: Step S21: Extract the edge information in the grayscale image.
[0032] Specifically, in this embodiment, the canny algorithm is used to obtain the edge image in the image, as Figure 2 shown; and then the edge information in the edge image is obtained; the edge information therein is the edge in the edge image.
[0033] Step S22: Screen out the contour of the rearview mirror mold from the edge information.
[0034] In one embodiment, the boundary in the edge information is obtained by using a contour detection algorithm to obtain the contour of the rearview mirror.
[0035] In another embodiment, the edge corresponding to the maximum circularity is selected as the contour of the rearview mirror. Since the calculation of circularity is a prior art, it will not be elaborated here.
[0036] The reason for calculating the circularity above is that by Figure 2It can be seen that the contour of the rearview mirror mold shows a smooth curve approximately in a circular shape, and this curve presents an approximately closed state. That is, through the shape characteristics of the mold, the edges of the rearview mirror mold in the edge detection image are extracted.
[0037] Step S23: Screen out the target edges belonging to the reflective area from the contour.
[0038] In this embodiment, considering that when collecting the image of the entire rearview mirror mold, due to the relatively complex edge shape of the rearview mirror mold, light emission may occur, that is, there is a reflective area at the edge and the edge of the reflective area is blurred, making the edges in the obtained edge image present a complex and uneven state. Therefore, in this embodiment, by using the morphological characteristics of the target edges in the reflective area (the edges in the reflective area are more irregular and not smooth), the target edges belonging to the reflective area in the contour can be obtained.
[0039] In one embodiment, the process of obtaining the target edges belonging to the reflective area from the contour is as follows: First, obtain the end points of all the edges on the contour of the rearview mirror.
[0040] In this embodiment, considering that the contour of the rearview mirror may not be a closed contour, it may be composed of multiple sequentially continuous edges, and there are breaks between the edges, and the distance between the end points is relatively close.
[0041] Second, calculate the possibility that the edges where each end point is located belong to the reflective area.
[0042] In this embodiment, after obtaining all the end points, it is necessary to judge the possibility that each end point belongs to the reflective area. The specific process is as follows: First, obtain the first vector and the second vector of each end point, then obtain the included angle between the first vector and the second vector, and calculate the possibility that the corresponding end point belongs to the reflective area according to the included angle and the modulus length of the second vector.
[0043] The above-mentioned first vector is the vector from the pixel point adjacent to any end point to any end point; the second vector is the vector from any end point to the second end point; the second end point is the end point with the smallest distance from the any end point when starting from the any end point and obtaining it in the clockwise direction.
[0044] Exemplarily, select the end point on any edge and, along the clockwise direction, obtain the end point with the smallest distance from the end point . At this time, connect these two end points and generate the second vector ; obtain the adjacent pixel point on the same edge as the end point and obtain the first vector The included angle between the second vector and the first vector is denoted as .
[0045] The specific expression formula for the possibility is: ; represents the included angle of the m-th endpoint, is the m-th endpoint, is the endpoint with the smallest distance from the m-th endpoint selected in the clockwise direction, represents the modulus length of the second vector, represents the possibility that the edge where the m-th endpoint is located is a reflective area, and norm( ) is a normalization function.
[0046] The above included angle is the angular change of the second vector relative to the first vector (the first vector can represent the edges where two pixel points are located). The smaller the angular change, the greater the possibility that the area where the edge corresponding to the endpoint is located is a normal area; conversely, the greater the angular change, the greater the possibility that the area where the edge corresponding to the endpoint is located is a reflective area. At the same time, since the distance between the endpoints in the reflective area is relatively large, therefore, the modulus length of the second vector is used to represent the distance between two endpoints on two different edges; that is, the greater the modulus length, the greater the possibility that the edges where the two endpoints are located belong to the reflective area.
[0047] The above normalization function can be min-max normalization, tangent hyperbolic normalization, etc.
[0048] In this embodiment, due to the shape of the rearview mirror mold and light reflection, the edges in the reflective area in the grayscale image appear bifurcated, with large fractures and other irregular forms. The distance between the tail endpoint of the edge and the head endpoint of the next edge that forms the second vector is generally far, and the included angle between the first vector formed by the tail endpoint of the edge and its adjacent pixel points and the second vector is also large; while the edges in the normal area often present smooth and single arc curve segments, the distance between the tail endpoint of the edge and the head endpoint of the next edge is relatively close, and the angular change of the vector formed by the connection line between the two endpoints is relatively small with respect to the edge. Therefore, the possibility that the edge where the corresponding endpoint is located belongs to the reflective area is calculated through the included angle and the modulus length of the second vector.
[0049] In another embodiment, the process of obtaining the target edge belonging to the reflective area is as follows: Obtain the endpoints of all the edges on the contour of the rearview mirror, cluster the positions of the endpoints to obtain multiple clustering clusters, and select the edges in the area where the cluster with the number of endpoints greater than the set number is located as the edges of the reflective area. The value of the set number is 4.
[0050] Then, the edge where the endpoint with a possibility greater than the set threshold is located is used as the edge of the reflective area.
[0051] In this embodiment, the set threshold is 0.85, that is, the endpoints with a possibility greater than 0.85 are extracted, and the area where the edge where the corresponding endpoints are located is used as the reflective area.
[0052] It should be noted that when there are two endpoints on an edge, as long as there is an endpoint with a possibility greater than 0.85, the area where the corresponding edge is located is used as the reflective area.
[0053] After determining the target edges belonging to the reflective area, the minimum circumscribed rectangle of the determined one or more target edges is used as the reflective area, such as Figure 4 the area corresponding to the white box in.
[0054] It should be noted that there is one reflective area in this embodiment. Of course, as other implementation manners, there may be multiple reflective areas. At this time, each reflective area corresponds to a target edge.
[0055] When there are multiple reflective areas, the target edges can be clustered to obtain clusters of different categories, and the minimum circumscribed rectangle of the target edges in each cluster is used as the corresponding reflective area.
[0056] Step S24, obtain the target pixel points in the reflective area, calculate the edge probability of each target pixel point, use the target pixel points with an edge probability greater than the set value as edge pixel points, and use the new edge formed by all the edge pixel points as the final edge of the reflective area, thereby obtaining the final contour of the rearview mirror.
[0057] After obtaining the target edges belonging to the reflective area, in order to obtain a more real final edge in the reflective area, this embodiment analyzes each pixel point in the target edges of the reflective area to determine the real edge pixel points, so as to obtain the final edge.
[0058] Among them, before determining the edge pixel points, each pixel point in the target edges belonging to the reflective area is also analyzed to obtain the target pixel points, and then the edge probability of the target pixel points is analyzed.
[0059] Specifically, the method for selecting the target pixel points is as follows: Obtain any pixel point in any edge in the reflective area. Starting from this any pixel point, along the gradient direction of the any pixel point, obtain the adjacent first pixel point, calculate the gray difference value between the any pixel point and the first pixel point. If the gray difference value is greater than the threshold, continue to locate the second pixel point along the gradient direction of the first pixel point, and continue to judge the gray difference value until the gray difference value is less than or equal to the threshold and stop, and use the pixel point when the gray difference value is less than or equal to the threshold as the target pixel point.
[0060] Exemplarily, based on any pixel point O1 on any edge extracted, locate the next pixel point O2 along its gradient direction, and represent the gray - level difference between the two pixel points as I 12 , if I 12 is greater than the threshold value, continue to locate the next pixel point O3 along the gradient direction of pixel point O2, and calculate the gray - level difference I 23 of the two pixel points, and compare it with the threshold value until the pixel point On + 1 corresponding to the situation where I n,n+1 is less than or equal to the threshold value is obtained. Take the pixel point On + 1 as the target pixel point; continue to traverse other pixel points on any edge to obtain all target pixel points.
[0061] The value of the above - mentioned threshold is 5. Of course, it can also be determined according to the actual situation. The above - mentioned gray - level difference is the absolute value of the difference between the gray - level values of two adjacent pixel points.
[0062] Since when transitioning from the reflective area to the background area, the gray - level value of the pixel points gradually decreases along the direction of the maximum gradient change, and finally the gray - level value is approximately unchanged in the background area. Therefore, in this embodiment, according to the approximately unchanged characteristic of the gray - level value of the pixel points on the target edge in the reflective area along the gradient direction, the target pixel points (suspected edge pixel points) are located.
[0063] It should be noted that when determining the target pixel points above, it is for all target edges in the reflective area; of course, as other implementation manners, it is also possible to determine the target edge where the pixel point with the maximum gradient is located, and analyze this target edge without analyzing other target edges, which can simplify the calculation.
[0064] In this embodiment, after obtaining the target pixel points, along the gradient direction of the target pixel points, obtain a set number of pixel points in the extending direction of the gradient direction. The set number of pixel points and the corresponding target pixel points form a pixel - point set, and obtain the gray - level difference between two adjacent pixel points in the pixel - point set. Take the mean value of all gray - level differences as the mean value of the gray - level change amount, and based on the mean value of the gray - level change amount, calculate the edge probability of the corresponding target pixel point.
[0065] Specifically, the edge probability is: ; where, is the mean value of the gray - level change of the (n + 1) - th target pixel point, is the edge probability of the (n + 1) - th target pixel point.
[0066] In this embodiment, after obtaining the edge probabilities of each target pixel, the corresponding edge probabilities are further compared with a set value. That is, when the edge probability of a target pixel is greater than the set value, the target pixel is an edge pixel, and then all edge pixels are obtained. All the edge pixels are connected in sequence to obtain the final edge of the reflective area.
[0067] The value of the above set value is 0.85. Of course, in other embodiments, it can also be determined according to the actual situation.
[0068] The reason for calculating the edge probability of the edge pixel is that due to the special ribbed structure of the rearview mirror mold, in the grayscale image of the collected image, the gray values of the pixels in the edge area are relatively similar to those in the background area, so the true edge cannot be accurately determined during edge detection. Therefore, it is necessary to calculate the edge probability of the target pixel.
[0069] In this embodiment, the final edge of the obtained reflective area and the edges of other normal areas are connected to obtain the final contour of the rearview mirror.
[0070] Step S5, obtaining the size of the rearview mirror mold according to the final contour.
[0071] Specifically, in this embodiment, the maximum and minimum values of the abscissas of the pixels in the final contour and the maximum and minimum values of the ordinates are obtained respectively; the absolute value of the difference between the maximum and minimum values of the abscissa is used as the length of the rearview mirror mold; the absolute value of the difference between the maximum and minimum values of the ordinate is used as the width of the rearview mirror mold.
[0072] Exemplarily, the coordinate values of all pixels in the mold edge are extracted, and the four pixels with the largest and smallest abscissas and ordinates are located . Represent the width of the mold as W and the length as L. The specific calculation method is as follows: ; .
[0073] The solution of the present invention obtains the true contour of the rearview mirror mold in the image of the rearview mirror mold, and then obtains the distance between the pixels in the contour to obtain the size of the non-contact high-precision rearview mirror mold.
[0074] Although this specification has shown and described multiple embodiments of the present invention, it is obvious to those skilled in the art that such embodiments are provided only by way of example. Those skilled in the art will think of many changes, alterations, and alternative ways without departing from the spirit and scope of the present invention. It should be understood that various alternative solutions to the embodiments of the present invention described herein can be adopted in the practice of the present invention.
Claims
1. A rearview mirror mold precision detection method based on machine vision, characterized in that: include: Acquire a grayscale image of the rearview mirror mold; Extracting edge information from the grayscale image; Filter out the outline of the rearview mirror from the edge information; Get the target edge belonging to the reflective area in the contour; And obtain the target pixel point in the reflective area; the target pixel point is to take any pixel point in each edge as the starting point, if the grayscale difference between any pixel point and its adjacent point in the gradient direction is greater than the threshold, then calculate the grayscale difference between the adjacent points and the points in the gradient direction of the adjacent points, and so on, until the pixel point with the grayscale difference less than or equal to the threshold is obtained; Calculate the edge probability of each target pixel point, and take the target pixel point whose edge probability is greater than a set value as the edge pixel point; the edge probability is inversely correlated with the grayscale change mean of the corresponding target pixel point; the grayscale change mean is the mean of the grayscale differences between all two adjacent pixels in the pixel set; the pixel set includes the target pixel point and a set number of pixels along the gradient direction of the target pixel point; The new edge formed by all edge pixels is used as the final edge of the reflective area, thereby obtaining the final outline of the rearview mirror; and the size of the rearview mirror mold is obtained according to the final outline.
2. The method for detecting rearview mirror mold accuracy based on machine vision according to claim 1, characterized in that: The marginal probability is: ;in, is the mean grayscale change of the n+1th target pixel, is the edge probability of the n+1th target pixel.
3. The method for detecting rearview mirror mold accuracy based on machine vision according to claim 1, characterized in that: The specific process of obtaining the target edge belonging to the reflective area in the contour is: Get the endpoints of all edges on the outline of the rearview mirror; Calculate the possibility that the edge of each endpoint belongs to the reflective area; The edge where the endpoint with a probability greater than a set threshold is located is taken as the target edge of the reflective area; Among them, the possibility is positively correlated with the angle between the corresponding endpoints and the modulus of the second vector; the angle is the angle between the first vector and the second vector, the first vector is a vector pointing from the pixel point adjacent to any endpoint to any endpoint, and the second vector is a vector pointing from any endpoint to the second endpoint; the second endpoint is the endpoint with the smallest distance from any endpoint obtained in a clockwise direction.
4. The method for detecting rearview mirror mold accuracy based on machine vision according to claim 3, characterized in that: The possibilities are: ; represents the angle between the mth endpoints, is the mth endpoint, is the endpoint selected in the clockwise direction with the smallest distance from the mth endpoint, represents the magnitude of the second vector, It indicates the possibility that the edge where the mth endpoint is located is a reflective area, and norm() is the normalization function.
5. The method for detecting rearview mirror mold accuracy based on machine vision according to claim 1, characterized in that: The specific process of obtaining the target edge belonging to the reflective area in the contour is: The endpoints of all edges on the contour of the rearview mirror are obtained, the endpoints are clustered to obtain multiple clusters, and the edges in the area where the clusters with more endpoints than a set number are located are selected as the target edges of the reflective area.
6. The method for detecting rearview mirror mold accuracy based on machine vision according to claim 1, characterized in that: The step of selecting the contour of the rearview mirror from the edge information includes: selecting an edge corresponding to the maximum circularity as the contour of the rearview mirror; Alternatively, a contour detection algorithm is used to obtain the boundary in the edge information to obtain the contour of the rearview mirror.
7. The method for detecting rearview mirror mold accuracy based on machine vision according to claim 1, characterized in that: The reflective area is the minimum circumscribed rectangle corresponding to the edge of the target.
8. The method for detecting rearview mirror mold accuracy based on machine vision according to claim 1, characterized in that: The extracting edge information in the grayscale image includes: using a Canny algorithm to obtain the edge information in the grayscale image.
9. The method for detecting rearview mirror mold accuracy based on machine vision according to claim 1, characterized in that: The method of taking the new edge formed by all edge pixels as the final edge of the reflective area includes: connecting all edge pixels in sequence to obtain the final edge.
10. The method for detecting rearview mirror mold accuracy based on machine vision according to claim 1, characterized in that: The step of obtaining the size of the rearview mirror mold according to the final contour includes: Respectively obtain the maximum and minimum values of the horizontal coordinates and the maximum and minimum values of the vertical coordinates of the pixel points in the final contour; The absolute value of the difference between the maximum value and the minimum value of the horizontal coordinate is used as the length of the rearview mirror mold; the absolute value of the difference between the maximum value and the minimum value of the vertical coordinate is used as the width of the rearview mirror mold.
Citation Information
Patent Citations
Image edge detection method, and image target identification method and device
CN104077773A
Automobile rearview mirror mold forming detection method
CN116703930A
Scanning electron microscope image contour extraction method based on morphological processing
CN119068006A
Method and apparatus for detecting edges in a mixed image
US6674906B1