A charging gun plug-in test method and system based on multi-view positioning
Patent Information
- Application Number
- CN202610275102.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-09
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2046-03-09
AI Technical Summary
[0005]为解决现有技术在充电枪插拔测试中出现边缘漂移且无法感知自身定位误差的技术问题,本发明在如下的多个方面中提供方案
[0009] This invention utilizes the smoothing effect of logarithmic functions on extreme values and, by comparing the deviation between the centroid and the peak value, can sensitively and robustly reflect edge deformation caused by diffuse reflection and chamfering.
Smart Images

Figure CN122048924B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology. More specifically, this invention relates to a charging gun insertion / removal testing method and system based on multi-view positioning. Background Technology
[0002] The booming development of the new energy vehicle industry has placed extremely high demands on the reliability of charging interfaces. During the research and development and quality verification stages, it is usually necessary to use automated durability testing systems to conduct thousands or even tens of thousands of repeated plug-in and unplugging tests on the charging interfaces. This system typically uses a multi-axis robotic arm carrying a charging gun, in conjunction with a multi-view vision positioning system, to simulate manual plug-in and unplugging operations.
[0003] Currently, mainstream visual positioning methods typically employ model-based edge matching techniques. The core process involves calibrating a standard edge template before testing, extracting edge features from real-time images using Canny or Sobel operators during testing, and then performing a rigid transformation matching with the template to obtain coordinates. However, during long-term durability testing, the edges of the charging dock's plastic ports undergo physical deformation due to repeated friction, such as chamfering or whitening under stress. This physical change causes the highlighted edge positions in the image to expand outwards or shift, a phenomenon known as edge drift.
[0004] Existing visual algorithms lack a self-assessment mechanism for the current image quality and edge reliability. Even if the edges are very blurry or deformed due to wear, traditional algorithms will still force the calculation of a center coordinate. This coordinate often contains huge systematic errors, and the algorithm cannot perceive this risk. This causes the robotic arm to continue to perform insertion and removal actions under incorrect guidance, eventually causing collision accidents, damaging expensive test samples, and resulting in test interruption and economic losses. Summary of the Invention
[0005] To address the technical problem of edge drift and inability to detect self-positioning errors in existing charging gun plug-in / plug-out tests, this invention provides solutions in the following aspects.
[0006] In a first aspect, the present invention provides a charging gun insertion / removal testing method based on multi-view positioning, comprising: controlling a multi-view camera to capture images of the charging socket to obtain an original grayscale image; extracting a region of interest containing key holes; and calculating the gradient magnitude map of the region of interest; drawing multiple rays from the theoretical center of the charging hole as the origin; extracting the gradient value sequence of each ray passing through the edge region in the gradient magnitude map; analyzing the deviation between the maximum gradient position and the centroid of the gradient distribution; calculating the edge wear index, which characterizes the physical deformation of the edge; statistically analyzing the average gradient intensity of the edge region and the average gradient noise intensity of the background region in the region of interest; and calculating the visual confidence of the current positioning result in combination with the edge wear index; obtaining the original center coordinates calculated from the current image; and weighting and fusing the original center coordinates, the compensation amount based on the edge wear index, and the trend drift vector based on historical data according to the visual confidence to obtain the final target center coordinates output to the robotic arm, so as to achieve high-precision guidance for charging gun insertion / removal.
[0007] This invention achieves real-time perception and adaptive positioning of the charging dock's wear status by introducing wear index and visual confidence assessment. When visual features fail due to wear, the system can automatically use historical trend data for accurate compensation, effectively solving the positioning drift problem caused by edge deformation, ensuring testing accuracy throughout the entire life cycle, eliminating the risk of robotic arm collision, and significantly improving the system's robustness and safety.
[0008] Preferably, the edge wear index, which characterizes the physical deformation of the edge, satisfies the following relationship: ;in, This represents the edge wear index for the current testing cycle. This represents the total number of gradient profile lines sampled. For the first The location of the centroid of the gradient distribution along the profile line. For the first The location of the point with the maximum gradient magnitude on the profile line. For the first The standard deviation of the gradient distribution along the cross-section line, This is the illumination correction factor.
[0009] This invention utilizes the smoothing effect of logarithmic functions on extreme values and, by comparing the deviation between the centroid and the peak value, can sensitively and robustly reflect edge deformation caused by diffuse reflection and chamfering.
[0010] Preferably, the centroid position of the gradient distribution is obtained by dividing the sum of the products of the distance index of each position on the gradient profile line and the gradient magnitude of the corresponding position by the sum of the gradient magnitudes of all positions on the gradient profile line; wherein, the distance index represents the pixel distance from the origin along the ray direction.
[0011] Preferably, the visual confidence level satisfies the following relationship: ;in, The confidence level of the current visual localization result. The average gradient peak intensity at the edge of the aperture. The average gradient noise intensity at the center of the aperture or in the background region. It is a very small positive number. The edge wear index, This is the noise sensitivity coefficient. This is the wear penalty factor.
[0012] By combining the signal-to-noise ratio characteristics of the image itself with the physical wear characteristics, the confidence level decreases exponentially with the increase of wear, providing a scientific basis for subsequent weight allocation.
[0013] Preferably, the average gradient peak intensity on the edge of the hole refers to the average gradient value of pixels whose gradient value is greater than a preset threshold in the region of interest; the average gradient noise intensity of the background region refers to the average gradient value of pixels whose gradient value is not greater than a preset threshold in the region of interest.
[0014] Preferably, the target center coordinates satisfy the following relationship: ;in, The final output is the target center coordinates for the robotic arm. The original center coordinates calculated for the current image. For visual confidence, This is the theoretical compensation vector based on the edge wear index. This is the historical trend drift vector. This is the time gain factor.
[0015] The system can correct errors by incorporating historical trends in the event of visual failure, which greatly improves the system's robustness.
[0016] Preferably, the historical trend drift vector is a single-cycle drift vector fitted using the least squares method based on a preset number of historical successful insertion and removal coordinate records.
[0017] Preferably, the direction of the theoretical compensation vector based on the edge wear index is set to be in the opposite direction of the wear gradient, and the magnitude of the theoretical compensation vector is proportional to the edge wear index.
[0018] Preferably, the step of drawing multiple rays from the theoretical center of the charging hole as the origin includes: drawing a ray at every preset angle from the theoretical geometric center of the charging hole as the origin, and extracting the pixel gradient values on each ray path in the gradient amplitude map to form a gradient profile line.
[0019] Secondly, the present invention provides a charging gun insertion and removal test system based on multi-view positioning, including a processor and a memory. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned charging gun insertion and removal test method based on multi-view positioning is implemented.
[0020] By adopting the above technical solution, a computer program for a charging gun insertion and removal test method based on multi-view positioning is generated and stored in a memory so that it can be loaded and executed by a processor. This allows for the creation of a terminal device based on the memory and processor, making it convenient to use.
[0021] This invention, through a confidence assessment mechanism, can keenly perceive visual risks and automatically reduce their weight, effectively avoiding positioning abrupt changes and robotic arm collisions caused by individual frame anomalies or extreme wear.
[0022] Furthermore, by employing a dynamic compensation strategy that combines hardware and software, high signal-to-noise ratio images are used to ensure accuracy in the early stages of testing, while historical trends are used to fill in visual defects in the later stages of testing. This ensures that the system maintains consistent alignment accuracy during insertion and removal from beginning to end, thus solving the drift problem in long-term testing. Attached Figure Description
[0023] The above and other objects, features, and advantages of exemplary embodiments of the present invention will become readily apparent upon reading the following detailed description with reference to the accompanying drawings. In the drawings, several embodiments of the invention are illustrated by way of example and not limitation, and like or corresponding reference numerals denote like or corresponding parts, wherein: Figure 1 This is a flowchart illustrating a charging gun insertion and removal test method based on multi-view positioning in this invention. Figure 2 This is a graph showing the evolution trend of edge wear index and visual confidence as a function of insertion and removal cycles in this invention. Figure 3 This is a comparative analysis chart showing the positioning center deviation between the present invention and existing technologies. Detailed Implementation
[0024] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0025] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0026] This invention discloses a charging gun insertion / removal testing method based on multi-view positioning, referring to... Figure 1 This includes steps S1-S4: S1. Control the multi-view camera to take pictures of the charging dock to obtain the original grayscale image, extract the region of interest containing the key hole positions, and calculate the gradient magnitude map of the region of interest.
[0027] In an optional embodiment, a binocular or quad-camera mounted on the end effector of the robotic arm or a fixed bracket is first activated to synchronously capture images of the current charging dock, thereby obtaining a raw grayscale image. The camera parameters need to be pre-calibrated. After acquiring the image, the region of interest (ROI) containing key holes such as the DC+ hole and DC- hole is extracted from the raw image using the positioning results of the previous frame or a preset coarse positioning template.
[0028] For example, assuming the original image resolution is 2448×2048, the size of the cropped ROI region is 200×200 pixels; then, Gaussian filtering is applied to the ROI region to reduce the impact of ambient light noise; then, the Sobel operator is used to calculate... Horizontal gradient of the region and vertical gradient .
[0029] Furthermore, gradient magnitude maps can be calculated based on horizontal and vertical gradients. The calculation formula is Each pixel value in the gradient magnitude map represents the intensity of the edge at that point; the sharper the edge, the greater the magnitude.
[0030] Thus, by filtering the dataset and constructing the gradient field, a clean underlying data foundation containing rich geometric information can be provided for subsequent wear feature analysis.
[0031] S2. Draw multiple rays from the theoretical center of the charging hole as the origin, extract the gradient value sequence of each ray passing through the edge region in the gradient amplitude diagram, analyze the degree of deviation between the position of the maximum gradient value and the position of the centroid of the gradient distribution, and calculate the edge wear index that characterizes the physical deformation of the edge.
[0032] In an optional embodiment, taking the theoretical geometric center of the charging hole, such as the center of the charging hole image or the coarse positioning center, as the origin, a ray is drawn out at certain angles, for example, 1 degree, for a total of N rays. For example, N is 360. On the gradient magnitude map, the pixel gradient value is read along the path of each ray, and finally N gradient profile lines are formed.
[0033] In this optional embodiment, for the k-th profile line, the location of its corresponding maximum gradient can be calculated. The brightest and most prominent edge points in the image are represented by [a specific element]; and the centroid of the gradient distribution is calculated to represent the center of edge energy. , Satisfying the relation: ,in For distance index along the ray, For the first The distance index on the section line is The gradient magnitude at that point.
[0034] It is worth noting that when the edges are sharp and unworn, the gradient exhibits a steep, single peak. and They almost overlap; however, when edge wear causes diffuse reflection, the gradient distribution becomes wider and asymmetrical. It will shift in the direction of wear, and Separation.
[0035] Furthermore, the edge wear index, which characterizes the physical deformation of the edge, can be calculated. The edge wear index, which characterizes the physical deformation of the edge, satisfies the following relationship:
[0036] in, This represents the edge wear index for the current testing cycle. This represents the total number of gradient profile lines sampled. For the first The location of the centroid of the gradient distribution along the profile line. For the first The location of the point with the maximum gradient magnitude on the profile line. For the first The standard deviation of the gradient distribution along the cross-section line, This is the illumination correction factor, for example, a value of 1.1.
[0037] For example, suppose the first The maximum gradient on the ray occurs at a distance of 50 pixels from the origin, i.e. Due to edge wear causing gradient tailing, the calculated gradient centroid position is 52 pixels, i.e. The standard deviation of the gradient of this profile line is calculated as follows: The contribution of this ray to the wear index is... Assuming the average contribution of all 360 rays is 0.667, then the edge wear index is... If the edges are very sharp, The molecule approaches 0. It will also approach 0.
[0038] In this way, by constructing a wear index, complex physical deformation can be transformed into intuitive numerical values, accurately reflecting the current health status of the charging dock and providing a basis for subsequent decision-making.
[0039] S3. Calculate the visual confidence of the current positioning result by combining the average gradient intensity of the edge region and the average gradient noise intensity of the background region in the region of interest with the edge wear index.
[0040] In an optional embodiment, the average gradient value of all pixels in the ROI region whose gradient values are greater than a preset threshold can be used as the average gradient peak intensity on the edge of the hole; at the same time, the average gradient value of pixels in the ROI region whose gradient values are not greater than the preset threshold can be used as the average gradient noise intensity of the background region.
[0041] In this optional embodiment, the visual confidence level of the current positioning result can be calculated by combining the edge wear index, and the visual confidence level satisfies the following relationship:
[0042] in, The confidence level of the current visual localization result. The average gradient peak intensity at the edge of the aperture. The average gradient noise intensity at the center of the aperture or in the background region. It is a very small positive number; for example, its value is 0.01. This is the noise sensitivity coefficient, for example, a value of 2; This is the wear penalty factor, for example, with a value of 0.5.
[0043] For example, suppose the edge signal intensity is statistically obtained from the image. Background noise intensity Therefore, the final calculated visual confidence level is 0.68.
[0044] Thus, by introducing confidence assessment, the system can identify unreliable positioning results caused by wear and tear, thereby avoiding blind execution when unreliable.
[0045] S4. Obtain the original center coordinates calculated from the current image, and perform weighted fusion of the original center coordinates, the compensation amount based on the edge wear index, and the trend drift vector based on historical data according to the visual confidence level to obtain the final target center coordinates output to the robotic arm, so as to achieve high-precision guidance for plugging and unplugging the charging gun.
[0046] In an optional embodiment, the target center coordinates can be obtained by weighting and fusing the original center coordinates, the compensation amount based on the edge wear index, and the trend drift vector based on historical data according to visual confidence, based on the original center coordinates of the current image. The target center coordinates satisfy the following relationship:
[0047] in, The final output is the target center coordinates for the robotic arm. The original center coordinates calculated for the current image. For visual confidence, This is the theoretical compensation vector based on the edge wear index. This is the historical trend drift vector. This is the time gain factor; for example, it takes a value of 1 (no gain).
[0048] In this optional embodiment, The direction is set to be in the opposite direction of the wear gradient, and the modulus is proportional to the edge wear index. This is because the edge drift caused by wear is usually outward, so the compensation direction should point to the center of the hole, that is, the wear gradient is reversed.
[0049] For example, suppose the original coordinates calculated by the visual algorithm at the current moment... According to the edge wear index Estimated compensation amount Based on the trend of fitting data from the past 50 times, the average rightward drift is 0.05 mm with each insertion and removal, predicting the current drift. Visual confidence at the calculation point Then the final coordinates can be calculated. .
[0050] like Figure 2 The figure shows the evolution trend of edge wear index and visual confidence with the number of insertions and removals in this invention. It can be seen that as the number of tests increases, physical wear accumulation leads to a non-linear increase in the wear index; simultaneously, the visual confidence shows a significant decreasing trend. This negative correlation reflects the algorithm's ability to perceive environmental changes; that is, as hardware ages, the algorithm automatically reduces its trust in real-time visual information.
[0051] like Figure 3The figure shown is a comparative analysis of the positioning center deviation between the present invention and the prior art. It can be seen that the prior art, due to its inability to detect wear, causes the positioning error to drift unidirectionally with the increase of the number of tests, eventually exceeding the safety threshold. In contrast, the present invention, by introducing trend compensation and confidence weighting, keeps the positioning deviation at near 0 degrees, and can maintain it within a safe range even in the later stages of testing, demonstrating its effective robustness.
[0052] In this way, through this dynamic weighted fusion mechanism, the system can use vision to ensure accuracy in the early stage of testing, and use historical experience to ensure stability in the later stage of testing when wear is severe, effectively preventing positioning drift.
[0053] This invention also discloses a charging gun insertion and removal test system based on multi-view positioning, including a processor and a memory. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, a charging gun insertion and removal test method based on multi-view positioning according to the present invention is implemented.
[0054] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.
[0055] In the description of this specification, "multiple" or "several" means at least two, such as two, three or more, unless otherwise expressly and specifically defined.
[0056] While this specification has shown and described numerous embodiments of the invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will occur to those skilled in the art without departing from the spirit and essence of the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in the practice of this invention.
Claims
1. A multi-view positioning-based charging gun plug test method, characterized in that, include: Control a multi-view camera to capture images of the charging dock to obtain raw grayscale images, extract regions of interest containing key hole locations, and calculate the gradient magnitude map of the regions of interest. Multiple rays are drawn from the theoretical center of the charging port as the origin. The gradient value sequence of each ray passing through the edge region in the gradient amplitude diagram is extracted. The deviation between the position of the maximum gradient value and the position of the centroid of the gradient distribution is analyzed, and the edge wear index, which characterizes the physical deformation of the edge, is calculated. The edge wear index, which characterizes the physical deformation of the edge, satisfies the following relationship: in, This represents the edge wear index for the current testing cycle. This represents the total number of gradient profile lines sampled. For the first The location of the centroid of the gradient distribution along the profile line. For the first The location of the point with the maximum gradient magnitude on the profile line. For the first The standard deviation of the gradient distribution along the profile line, The illumination correction coefficient is used; the centroid position of the gradient distribution is obtained by dividing the sum of the products of the distance index and the corresponding gradient magnitude at each position on the gradient profile by the sum of the gradient magnitudes at all positions on the gradient profile; wherein, the distance index represents the pixel distance from the origin along the ray direction; The average gradient intensity of the edge region and the average gradient noise intensity of the background region in the region of interest are statistically analyzed, and the visual confidence score of the current positioning result is calculated in conjunction with the edge wear index; the visual confidence score satisfies the following relationship: in, The confidence level of the current visual localization result. The average gradient peak intensity at the edge of the aperture. The average gradient noise intensity at the center of the aperture or in the background region. It is a very small positive number. The edge wear index, This is the noise sensitivity coefficient. The wear penalty factor is defined as follows: the average gradient peak intensity on the edge of the hole refers to the average gradient value of pixels whose gradient value is greater than a preset threshold in the region of interest; the average gradient noise intensity of the background region refers to the average gradient value of pixels whose gradient value is not greater than a preset threshold in the region of interest. The original center coordinates calculated from the current image are obtained, and then weighted and fused with the original center coordinates, the compensation amount based on the edge wear index, and the trend drift vector based on historical data according to the visual confidence level to obtain the final target center coordinates output to the robotic arm, so as to achieve high-precision guidance for plugging and unplugging the charging gun; the target center coordinates satisfy the following relationship: in, The final output is the target center coordinates for the robotic arm. The original center coordinates calculated for the current image. For visual confidence, This is the theoretical compensation vector based on the edge wear index. This is the historical trend drift vector. This is the time gain factor.
2. The charging gun insertion / removal test method based on multi-view positioning according to claim 1, characterized in that, The historical trend drift vector is a single-cycle drift vector fitted using the least squares method based on a preset number of historical successful insertion and removal coordinate records.
3. The charging gun insertion / removal test method based on multi-view positioning according to claim 1, characterized in that, The direction of the theoretical compensation vector based on the edge wear index is set to be in the opposite direction of the wear gradient, and the magnitude of the theoretical compensation vector is proportional to the edge wear index.
4. The charging gun insertion / removal test method based on multi-view positioning according to claim 1, characterized in that, The multiple rays emanating from the theoretical center of the charging port include: Using the theoretical geometric center of the charging port as the origin, a ray is drawn out at every preset angle, and the pixel gradient value on each ray path is intercepted in the gradient amplitude map to form a gradient profile line.
5. A charging gun insertion / removal testing system based on multi-view positioning, characterized in that, include: A processor and a memory, wherein the memory stores computer program instructions that, when executed by the processor, implement a charging gun insertion / removal test method based on multi-view positioning according to any one of claims 1-4.
Citation Information
Patent Citations
Robot, charging device, charging alignment method and charging system
CN105809944A
Charging control method, flexible charging robot, computer equipment and medium
CN119611126A