Automatic nailing positioning system for electric vehicle saddle based on machine vision
Through a machine vision-based system, the degree of edge interference and cortical edges in the saddle image of the electric vehicle is analyzed, and the nail position error caused by uneven light and three-dimensional structure at the top view angle is solved, achieving higher positioning accuracy and Product quality.
Patent Information
- Application Number
- CN202411223870.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-09-03
AI Technical Summary
The existing automatic nailing positioning system for saddles in electric vehicles under the influence of uneven light and three-dimensional structure under the top view angle, resulting in multiple edges of the saddle contour in the image, resulting in nailing position errors and affecting product quality and safety.
Using a machine vision-based system, saddle images are collected through high-definition cameras for pre-processing and Canny edge detection, to obtain the degree of interference at the edge and cortical edges, and to determine the accurate nailing point. Specific methods include obtaining the degree of distance change between adjacent edges, analyzing the degree of edge interference, identifying the cortical edge, and determining the nailing position based on the pixel points of the cortical edge.
The positioning accuracy of the nailing position is optimized, the interference of uneven light and three-dimensional structure on the nailing position is reduced, the accuracy of automatic nailing is improved, and the quality and safety of the electric vehicle saddle is ensured.
Smart Images

Figure CN118761996B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of image data processing, and in particular to an automatic nailing and positioning system for an electric vehicle saddle based on machine vision. Background Art
[0002] The automatic nailing and positioning of electric vehicle saddles is an efficient solution that uses advanced image recognition technology and automated control to achieve precise nailing operations on electric vehicle saddles. The system captures the saddle image through a high-resolution camera, uses a powerful image processing algorithm to quickly and accurately identify and locate the nailing points, and then controls a robotic arm or similar device to perform nailing operations at precise locations.
[0003] Due to uneven lighting from a bird's-eye view and the influence of the saddle's three-dimensional structure, the saddle in the image will be shadowed, which results in multiple edges appearing on the saddle's outline during edge detection. These edges are formed for different reasons, which interfere with the accurate positioning of the nailing position, causing errors in the nailing position, leading to product quality problems and even safety hazards. Summary of the invention
[0004] The invention provides an automatic nailing and positioning system for an electric vehicle saddle based on machine vision to solve the existing problems.
[0005] The electric vehicle saddle automatic nailing positioning system based on machine vision of the present invention adopts the following technical solutions:
[0006] An embodiment of the present invention provides an automatic nailing positioning system for an electric vehicle saddle based on machine vision, the system comprising the following modules:
[0007] An image acquisition and processing module is used to acquire an image of the bottom of the electric vehicle saddle, pre-process the image of the electric vehicle saddle, and obtain an image of the edge of the saddle after processing;
[0008] The interference edge determination module is used to obtain the distance change degree between adjacent edges according to the distance difference between adjacent edges in the processed saddle edge image; and obtain the interference degree of the edges according to the distance change degree between adjacent edges;
[0009] The module for determining the nailing point is used to obtain the cortical edge according to the degree of interference of the edge and the degree of change of the edge pixel points; obtain the accuracy of the cortical edge pixel points as the nailing point according to the positional relationship between the cortical edge and the inner and outer adjacent edges, the degree of interference, and the cortical reference degree; and determine the nailing point on the electric vehicle saddle through the accuracy of the cortical edge pixel points as the nailing point.
[0010] Furthermore, the collecting of the electric vehicle saddle bottom image, preprocessing of the electric vehicle saddle image, and obtaining of the processed saddle edge image include the following specific methods:
[0011] A high-definition camera is installed just above the saddle to collect the bottom image of the electric vehicle saddle. The bottom image of the electric vehicle saddle is preprocessed by grayscale processing, image enhancement and filtering denoising to obtain the processed saddle image. Canny edge detection is performed on the processed saddle image to obtain several edges.
[0012] Furthermore, the specific method of obtaining the distance change degree between adjacent edges according to the distance difference between adjacent edges is as follows:
[0013] Get the inner adjacent edge of each edge;
[0014] The method for obtaining the degree of change in the distance between adjacent edges is:
[0015]
[0016] in, Indicates The degree of variation in the distance between the edge of the strip and the inner adjacent edge; Indicates The number of pixels in the strip edge; Indicates The edge of the strip The distance between a pixel and the inner adjacent edge; Indicates The edge of the strip The distance between a pixel and the inner adjacent edge, is the absolute value function.
[0017] Furthermore, the specific method for obtaining the inner adjacent edge of each edge is:
[0018] Any edge in the processed saddle edge image is recorded as a target edge, and the average distance between all pixel points on the target edge and the centroid pixel point of the processed saddle edge image is obtained, which is recorded as the center distance of the target edge; for each edge in the processed saddle edge image, all adjacent edges of the target edge are obtained, and among all adjacent edges whose center distance is smaller than that of the target edge, the adjacent edge with the largest center distance is recorded as the inner adjacent edge.
[0019] Furthermore, the method of obtaining the interference degree of the edges according to the degree of change of the distance between adjacent edges includes the following specific methods:
[0020] Obtain the inner neighborhood and the outer neighborhood of the edge according to the adjacent pixel points of the edge;
[0021] The method for obtaining the interference degree of any edge is:
[0022]
[0023] in, Indicates The degree of interference of the strip edge, Indicates The mean gray value of all pixels in the inner neighborhood of the edge of the strip, Indicates The mean gray value of all pixels in the neighborhood outside the edge of the strip, Indicates The degree of change in the distance between the edge of a strip and its inner adjacent edge, Indicates The number of pixels on the edge of the strip, Represents an exponential function with a natural constant as base.
[0024] Furthermore, the specific method for obtaining the inner neighboring area of the edge and the outer neighboring area of the edge is:
[0025] The centroid direction of the processed saddle edge image is recorded as the inner side, and the image edge is recorded as the outer side; a perpendicular line is drawn for each pixel point of each edge in the edge direction, and several pixels are taken on both sides of the perpendicular line to form the inner neighborhood and the outer neighborhood of the edge respectively.
[0026] Furthermore, the cortical edge is obtained according to the degree of interference of the edge and the degree of change of the edge pixels, and the specific method includes:
[0027] The method for obtaining the cortical reference of any edge is:
[0028]
[0029] in, Indicates Cortical reference of the strip edge, Indicates The degree of interference of the strip edge, Indicates The variance of the gradient direction of all pixels at the edge of the strip, represents an exponential function with a natural constant as base;
[0030] The edge whose cortical reference degree is greater than or equal to the preset first parameter is recorded as the cortical edge.
[0031] Furthermore, the accuracy of using the cortical edge pixel point as the nailing point according to the positional relationship between the cortical edge and the inner and outer adjacent edges, the interference degree, and the cortical reference degree is obtained, including the specific method of:
[0032] Among all adjacent edges whose center distance is greater than the center distance of the target edge, the adjacent edge with the smallest center distance is recorded as the outer adjacent edge;
[0033] The distance between the cortical edge pixel point and the outer adjacent edge with the lowest interference degree is obtained according to the distance between the cortical edge pixel point and the inner and outer adjacent edges;
[0034] The method for obtaining the accuracy of any pixel point on the cortical edge as the nailing point is:
[0035]
[0036] in, Indicates The accuracy of using the cortical edge pixel as the nailing point; Indicates The cortical reference of the inner adjacent edge of each cortical edge pixel; Indicates The degree of interference of the adjacent edges outside the cortical edge pixel; Indicates The distance between a cortical edge pixel and the outer adjacent edge with the lowest interference level; Represents an exponential function with a natural constant as base.
[0037] Furthermore, the specific method for obtaining the distance between the cortical edge pixel point and the outer adjacent edge with the lowest interference degree is:
[0038] For any cortical edge pixel point, the shortest distance between the cortical edge pixel point and the inner adjacent edge is subtracted from the shortest distance between the cortical edge pixel point and the outer adjacent edge, and the absolute value is taken to obtain the distance between the cortical edge pixel point and the outer adjacent edge with the lowest interference degree.
[0039] Furthermore, the specific method for determining the nailing points on the electric vehicle saddle by using the cortical edge pixel points as the accuracy of the nailing points is:
[0040] The cortical edge pixel point with the highest accuracy is selected as the starting nailing point. At a point two nail lengths away and parallel to the outer contour edge adjacent to the starting point, the cortical edge pixel point is selected again as the point with the highest accuracy as the next nailing point, and so on, until the nailing point is within the range of two nail lengths before and after the starting point, and the search for nailing points is stopped to obtain all the nailing points.
[0041] The beneficial effect of the technical solution of the present invention is that the solution optimizes the problem of error in the positioning of nailing positions caused by uneven illumination from a top-down perspective and the influence of the three-dimensional structure of the saddle during the automatic nailing process of the electric vehicle saddle, by processing the acquired electric vehicle saddle image, analyzing the nailing position, obtaining the interference edge according to the change in the distance of the edge obtained by edge detection, and then obtaining the cortical edge, and finally determining the nailing position. The interference of uneven illumination and the influence of the three-dimensional structure of the saddle on the nailing position is reduced, the accuracy of automatic nailing positioning is improved, and the quality of the electric vehicle saddle is guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0043] Figure 1 The present invention is a structural block diagram of the automatic nailing and positioning system for an electric vehicle saddle based on machine vision.
[0044] Figure 2 It is a processed saddle edge image of the electric vehicle saddle automatic nailing positioning system based on machine vision of the present invention.
[0045] Figure 3 It is a schematic diagram of frame a and frame b of the processed saddle edge image of the automatic nailing positioning system for an electric vehicle saddle based on machine vision of the present invention. DETAILED DESCRIPTION
[0046] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation method, structure, features and effects of the automatic nailing positioning system for electric vehicle saddles based on machine vision proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0047] Unless defined otherwise, 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 invention belongs.
[0048] The specific scheme of the automatic nailing and positioning system for an electric vehicle saddle based on machine vision provided by the present invention is described in detail below with reference to the accompanying drawings.
[0049] See also Figure 1 , which shows a structural block diagram of an electric vehicle saddle automatic nailing positioning system based on machine vision provided by an embodiment of the present invention, the system includes the following modules:
[0050] The image acquisition and processing module is used to acquire the bottom image of the electric vehicle saddle, pre-process the electric vehicle saddle image, and obtain the processed saddle edge image.
[0051] In order to realize the automatic nailing positioning system for electric vehicle saddles based on machine vision proposed in this embodiment, it is first necessary to collect an image of the bottom of the saddle and process the image. The specific process is as follows:
[0052] A high-definition camera is installed directly above the saddle to collect the bottom image of the electric vehicle saddle. The bottom image of the electric vehicle saddle is preprocessed by grayscale processing, image enhancement, and filtering and denoising to obtain the processed saddle image; Canny edge detection is performed on the processed saddle image to obtain the processed saddle edge image, such as Figure 2 shown.
[0053] It should be noted that the nailing position of the electric vehicle saddle is between the inner side of the saddle contour edge and the outer side of the leather edge. This area is usually narrow and requires extremely high nailing accuracy. Therefore, obtaining clear and accurate edge information is the key to ensuring accurate nailing position.
[0054] It should be noted that the image processed by the Canny edge detection algorithm provides clear and coherent edge information, which provides a high-quality data basis for the subsequent steps of the automatic nailing system. The clear edge information can significantly simplify the complexity of these subsequent processing steps and improve the operating efficiency and nailing accuracy of the entire system.
[0055] So far, the electric vehicle saddle bottom image, the processed saddle image and the processed saddle edge image are obtained through the above method.
[0056] The interference edge determination module is used to obtain the distance change degree between adjacent edges according to the distance difference between adjacent edges in the processed saddle edge image; and obtain the interference degree of the edge according to the distance change degree between adjacent edges.
[0057] It should be noted that in the automatic nailing positioning system of the electric vehicle saddle, in order to accurately identify the outline of the saddle, the edge features of the saddle edge image are analyzed and processed to distinguish the real edge from the interference edge caused by shadows or reflections, and by identifying and excluding these interference edges, the reference position for nailing is accurately determined; then, since the three-dimensional structure of the saddle and the viewing angle of the camera may affect the visual distance between the edges, in order to ensure the accuracy and consistency of the nailing position, the nailing position is corrected according to the distance change relationship between the edges to determine the actual nailing point of the electric vehicle saddle.
[0058] It should be noted that the outermost edge in the edge detection image is recorded as the first layer edge, and the second layer, the third layer, etc. are recorded inward. Figure 3 It can be seen that there are multiple edges at the bottom contour of the electric vehicle saddle. The upper and middle part of the bottom of the electric vehicle saddle in the edge detection image (such as Figure 3 The outermost layer of the frame a) is the first edge, which is the actual bottom contour edge of the saddle. The second layer is the edge caused by the thickness of the saddle contour. The third layer is the shadow edge caused by the illumination and the three-dimensional structure of the bottom of the saddle. The fourth layer is the edge of the cortex that wraps the saddle. However, due to the three-dimensional structure of the saddle, the bottom of the saddle in the edge detection image (such as Figure 3 The outermost layer of frame b, i.e. the first layer edge, is the edge of the cushion part above the saddle captured by the camera, recorded as the cushion layer, the second layer is the actual contour edge of the saddle bottom, and the remaining layers are the shell thickness edge layer, the shadow edge layer (which may not exist) and the cortex edge layer. The nailing position of the real electric vehicle saddle is between the shell thickness layer and the cortex edge layer.
[0059] It should be noted that in the automatic nailing positioning system of the electric vehicle saddle, one of the main challenges in identifying the nailing position by image processing technology is to deal with the interference edges caused by the influence of lighting and the three-dimensional structure of the saddle. The interference edges mainly include the cushion edge and the shadow edge, which are easily confused with the real saddle contour edge and cortical edge from a top-down perspective. Due to the existence of these interference edges, direct edge detection may mislead the determination of the nailing position. If the system cannot effectively distinguish the interference edge from the actual edge, it may cause the nailing position deviation, affecting the structural stability and functional performance of the saddle. Therefore, it is necessary to first obtain the interference degree of the edge and eliminate the influence of the interference edge. The interference edge mainly includes the cushion edge and the shadow edge, where the distance between the cushion edge and the saddle contour edge will change. At the same time, since one side of the shadow edge is a wavy cortical edge, the distance between the edges will also change continuously; at the same time, the formation of the shadow edge causes a large grayscale difference on both sides of the edge; and it can be found from the edge detection image that compared with the interference edge, the saddle contour edge is often a continuous and complete edge. Therefore, the possibility of the edge being an interference edge and the interference degree of the interference edge can be obtained by the degree of change in the distance between the edges.
[0060] Specifically, firstly, according to the distance difference between adjacent edges in the processed saddle edge image, the distance change degree between adjacent edges is obtained.
[0061] Any edge in the processed saddle edge image is recorded as a target edge, and the average distance between all pixel points on the target edge and the centroid pixel point of the processed saddle edge image is obtained, which is recorded as the center distance of the target edge; for each edge in the processed saddle edge image, all adjacent edges of the target edge are obtained, and among all adjacent edges whose center distance is smaller than the center distance of the target edge, the adjacent edge with the largest center distance is recorded as an inner adjacent edge; among all adjacent edges whose center distance is larger than the center distance of the edge, the adjacent edge with the smallest center distance is recorded as an outer adjacent edge.
[0062] As an embodiment, a method for obtaining the degree of change of the distance between adjacent edges is:
[0063]
[0064] in, Indicates The degree of variation in the distance between the edge of the strip and the inner adjacent edge; Indicates The number of pixels in the strip edge; Indicates The edge of the strip The distance between a pixel and the inner adjacent edge; Indicates The edge of the strip The distance between a pixel and the inner adjacent edge, is the absolute value function.
[0065] It should be noted that Indicates The average value of the distance difference between the pixel points of the strip edge and the inner adjacent edge represents the degree of change of the distance between the two edges. The larger the value, the greater the degree of change of the distance between the edge and the adjacent edge.
[0066] It should be noted that from the processed saddle edge image, it can be seen that when an edge is an interference edge, when it is a shadow edge, it shows a large degree of variation in the distance from the inner cortical edge with large fluctuations; when an edge is a cushion edge, it shows a large degree of variation in the distance from the inner contour electric vehicle edge.
[0067] Then, the interference degree of the edges is obtained according to the change degree of the distance between adjacent edges.
[0068] The centroid direction of the processed saddle edge image is recorded as the inner side, and the image edge is recorded as the outer side. A perpendicular line is drawn for each pixel point of each edge in the direction of the edge, and several pixels are taken on both sides of the perpendicular line to form the neighborhood of the inner side and the outer side of the edge.
[0069] As an embodiment, a method for obtaining the interference degree of any edge is:
[0070]
[0071] in, Indicates The degree of interference of the strip edge, Indicates The mean gray value of all pixels in the inner neighborhood of the edge of the strip, Indicates The mean gray value of all pixels in the neighborhood outside the edge of the strip, Indicates The degree of change in the distance between the edge of a strip and its inner adjacent edge, Indicates The number of pixels at the edge of the strip, Represents an exponential function with a natural constant as base.
[0072] It should be noted that Indicates The difference between the mean grayscale values of all pixels in the inner and outer neighborhoods of the edge of the strip. Due to the influence of light and the three-dimensional structure of the electric vehicle saddle, the shadow generated is outside the shadow edge. From the image, it can be seen that the shadow is on the outside of the shadow edge, and the average grayscale value on the inside of the shadow edge is higher. Therefore, the greater the difference between the average grayscale value on the inside and the average grayscale value on the outside, the higher the grayscale contrast on both sides of the edge, and the greater the degree of interference on the edge.
[0073] So far, the interference degree of the edge is obtained through the above method.
[0074] The module for determining the nailing point is used to obtain the cortical edge according to the degree of interference of the edge and the degree of change of the edge pixel points; obtain the accuracy of the cortical edge pixel points as the nailing point according to the positional relationship between the cortical edge and the inner and outer adjacent edges, the degree of interference, and the cortical reference degree; and determine the nailing point.
[0075] It should be noted that if the nailing position of the electric vehicle saddle is too close to the edge of the leather, especially the thinner leather edge, the material may break or deform due to long-term use; at the same time, if the nailing position is close to the edge of the contour, it is easy to hit the shell, resulting in failure to nail it firmly and falling off. The middle position helps to disperse the pressure from riding and reduce material fatigue. Therefore, the most suitable nailing position for electric vehicle saddles is in the middle of the edge of the contour thickness and the edge of the leather. This position is usually easier to accurately locate through image processing technology, which improves production efficiency and nailing accuracy, and ensures the overall quality and performance of the saddle.
[0076] It should be noted that the interference edge is obtained in the interference edge determination module. Since the cortical edge is related to whether the cortex that wraps the saddle can be nailed, in order to ensure that the edge on the inner side of the nailing point is the cortical edge, the cortical edge needs to be further determined. When the cortex is wrapped on the saddle, a certain pulling force needs to be applied, and the cortex is elastic. This pulling force will cause the cortical edge to have a wavy shape, which appears as a wavy shape in the image. Therefore, the fluctuation of the edge can be used to determine whether the edge is the cortical edge, and then the accuracy of the pixel point on the cortical edge as the nailing point can be obtained.
[0077] Specifically, first, the cortical edge is obtained according to the degree of edge interference and the degree of change of edge pixels.
[0078] As an embodiment, the method for obtaining the cortical reference degree of any edge is:
[0079]
[0080] in, Indicates Cortical reference of the strip edge, Indicates The degree of interference of the strip edge, Indicates The variance of the gradient direction of all pixels at the edge of the strip, Represents an exponential function with a natural constant as base.
[0081] It should be noted that It represents the degree of fluctuation of the edge. The larger the value, the larger the variance. The greater the difference in gradient angles of all pixels, the greater the degree of fluctuation of the edge, the higher the possibility that the edge belongs to the cortical edge, and the greater the cortical reference degree of the edge.
[0082] The edge whose cortical reference degree is greater than or equal to the preset first parameter is recorded as an interference edge.
[0083] It should be noted that the preset first parameter is set to 0.7 based on experience, and can be adjusted according to actual conditions, and is not specifically limited in this embodiment.
[0084] Secondly, the accuracy of the cortical edge pixel point as the nailing point is obtained based on the positional relationship between the cortical edge and the inner and outer adjacent edges, the degree of interference, and the cortical reference.
[0085] As an embodiment, the distance between the cortical edge pixel and the outer adjacent edge with the lowest interference degree is obtained by:
[0086]
[0087] in, Indicates The distance between a cortical edge pixel and the outer adjacent edge with the lowest interference level, Indicates The shortest distance between a cortical edge pixel and its medial adjacent edge; Indicates The shortest distance between a cortical edge pixel and its outer adjacent edge; represents the absolute value function.
[0088] It should be noted that It reflects the centrality of the position of the cortical edge pixel point between the inner edge of the saddle contour and the cortical edge. The smaller the distance difference is, the more central the nailing point is, and the higher the accuracy of the point is.
[0089] As an embodiment, the method for obtaining the accuracy of any pixel point on the cortical edge as a nailing point is:
[0090]
[0091] in, Indicates The accuracy of using the cortical edge pixel as the nailing point; Indicates The cortical reference of the inner adjacent edge of each cortical edge pixel; Indicates The degree of interference of the adjacent edges outside the cortical edge pixel; Indicates The distance between a cortical edge pixel and the outer adjacent edge with the lowest interference level; Represents an exponential function with a natural constant as base.
[0092] Finally, the nailing points on the electric vehicle saddle are determined by using the cortical edge pixel points as the accuracy of the nailing points.
[0093] The cortical edge pixel point with the highest accuracy is selected as the starting nailing point. At a point two nail lengths away and parallel to the outer contour edge adjacent to the starting point, the cortical edge pixel point is selected again as the point with the highest accuracy as the next nailing point, and so on, until the nailing point is within the range of two nail lengths before and after the starting point, and the search for nailing points is stopped to obtain all the nailing points.
[0094] At this point, the nailing points of the electric vehicle saddle are determined by the above method.
[0095] At this point, this embodiment is completed.
[0096] It should be noted that the The model is only used to represent negative correlation and constrain the output of the model to be in In the specific implementation, it can be replaced by other models with the same purpose. This embodiment is only based on The model is described as an example without any specific limitation. is the input to the model.
[0097] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. The automatic nailing and positioning system for electric vehicle saddles based on machine vision is characterized by: The system includes the following modules: An image acquisition and processing module is used to acquire an image of the bottom of the electric vehicle saddle, pre-process the image of the electric vehicle saddle, and obtain an image of the edge of the saddle after processing; The interference edge determination module is used to obtain the distance change degree between adjacent edges according to the distance difference between adjacent edges in the processed saddle edge image; and obtain the interference degree of the edges according to the distance change degree between adjacent edges; The module for determining the nailing point is used to obtain the cortical edge according to the interference degree of the edge and the change degree of the edge pixel point; obtain the accuracy of the cortical edge pixel point as the nailing point according to the positional relationship between the cortical edge and the inner and outer adjacent edges, the interference degree, and the cortical reference degree; determine the nailing point on the electric vehicle saddle by the accuracy of the cortical edge pixel point as the nailing point; The specific method of obtaining the interference degree of the edges according to the change degree of the distance between adjacent edges is as follows: Obtain the inner neighborhood and the outer neighborhood of the edge according to the adjacent pixel points of the edge; The method for obtaining the interference degree of any edge is: in, Indicates The degree of interference of the strip edge, Indicates The mean gray value of all pixels in the inner neighborhood of the edge of the strip, Indicates The mean gray value of all pixels in the neighborhood outside the edge of the strip, Indicates The degree of change in the distance between the edge of a strip and its inner adjacent edge, Indicates The number of pixels on the edge of the strip, represents an exponential function with a natural constant as base; The method of obtaining the cortical edge according to the interference degree of the edge and the change degree of the edge pixel points includes: The method for obtaining the cortical reference of any edge is: in, Indicates Cortical reference of the strip edge, Indicates The degree of interference of the strip edge, Indicates The variance of the gradient direction of all pixels at the edge of the strip, represents an exponential function with a natural constant as base; An edge whose cortical reference degree is greater than or equal to a preset first parameter is recorded as a cortical edge; The method of obtaining the accuracy of the cortical edge pixel point as the nailing point according to the positional relationship between the cortical edge and the inner and outer adjacent edges, the interference degree, and the cortical reference degree includes the following specific methods: Record any edge in the processed saddle edge image as a target edge, and record the adjacent edge with the smallest center distance among all adjacent edges whose center distance is greater than the target edge as an outer adjacent edge; The distance between the cortical edge pixel point and the outer adjacent edge with the lowest interference degree is obtained according to the distance between the cortical edge pixel point and the inner and outer adjacent edges; The method for obtaining the accuracy of any pixel point on the cortical edge as the nailing point is: in, Indicates The accuracy of using the cortical edge pixel as the nailing point; Indicates The cortical reference of the inner adjacent edge of each cortical edge pixel; Indicates The degree of interference of the adjacent edges outside the cortical edge pixel; Indicates The distance between a cortical edge pixel and the outer adjacent edge with the lowest interference level; Represents an exponential function with a natural constant as base.
2. The automatic nailing and positioning system for electric vehicle saddles based on machine vision according to claim 1 is characterized in that: The method of collecting the bottom image of the electric vehicle saddle, preprocessing the electric vehicle saddle image, and obtaining the processed saddle edge image includes the following specific methods: A high-definition camera is installed directly above the saddle to collect an image of the bottom of the electric vehicle saddle, and grayscale processing, image enhancement, and filtering and denoising are performed on the image of the bottom of the electric vehicle saddle to obtain a processed saddle image; Perform Canny edge detection on the processed saddle image to obtain several edges.
3. The automatic nailing and positioning system for electric vehicle saddles based on machine vision according to claim 1 is characterized in that: The specific method of obtaining the distance change degree between adjacent edges according to the distance difference between adjacent edges is as follows: Get the inner adjacent edge of each edge; The method for obtaining the degree of change in the distance between adjacent edges is: in, Indicates The degree of variation in the distance between the edge of the strip and the inner adjacent edge; Indicates The number of pixels in the strip edge; Indicates The edge of the strip The distance between a pixel and the inner adjacent edge; Indicates The edge of the strip The distance between a pixel and the inner adjacent edge, is the absolute value function.
4. The automatic nailing and positioning system for electric vehicle saddles based on machine vision according to claim 3 is characterized in that: The specific method for obtaining the inner adjacent edge of each edge is: The average distance between all pixel points on the target edge and the centroid pixel point of the processed saddle edge image is obtained, and recorded as the center distance of the target edge; for each edge in the processed saddle edge image, all adjacent edges of the target edge are obtained, and among all adjacent edges whose center distance is smaller than that of the target edge, the adjacent edge with the largest center distance is recorded as the inner adjacent edge.
5. The automatic nailing and positioning system for electric vehicle saddles based on machine vision according to claim 1 is characterized in that: The specific method for obtaining the inner neighboring area and the outer neighboring area of the edge is as follows: The centroid direction of the processed saddle edge image is recorded as the inner side, and the image edge is recorded as the outer side; a perpendicular line is drawn for each pixel point of each edge in the direction of the edge, and several pixels are taken on both sides of the perpendicular line to form the inner neighborhood and the outer neighborhood of the edge respectively.
6. The automatic nailing and positioning system for electric vehicle saddles based on machine vision according to claim 1 is characterized in that: The specific method for obtaining the distance between the cortical edge pixel point and the outer adjacent edge with the lowest interference degree is: For any cortical edge pixel point, the shortest distance between the cortical edge pixel point and the inner adjacent edge is subtracted from the shortest distance between the cortical edge pixel point and the outer adjacent edge, and the absolute value is taken to obtain the distance between the cortical edge pixel point and the outer adjacent edge with the lowest interference degree.
7. The automatic nailing and positioning system for electric vehicle saddles based on machine vision according to claim 1 is characterized in that: The specific method for determining the nailing point on the electric vehicle saddle by using the cortical edge pixel point as the accuracy of the nailing point is: The cortical edge pixel point with the highest accuracy is selected as the starting nailing point. At a point two nail lengths away and parallel to the outer contour edge adjacent to the starting point, the cortical edge pixel point is selected again as the point with the highest accuracy as the next nailing point, and so on, until the nailing point is within the range of two nail lengths before and after the starting point, and the search for nailing points is stopped to obtain all the nailing points.
