Charging gun plugging test focusing adjustment method, electronic equipment and storage medium

The focus adjustment method of the charging gun plug-in test through real-time image collection and angle adjustment solves the mismatch problem caused by the wear and tear of the contact surfaces of the charging gun and the charging base, ensuring the adaptability and safety of the charging gun and the charging base.

CN118736779APending Publication Date: 2024-10-01GUANGDONG RUCKUS TESTING & CERTIFICATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410710754.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-04
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Frequent plugging and unplugging of the charging gun and charging base will cause the contacts on the contact surfaces to wear, which may lead to mismatch and short circuit problems.

Method used

Using the charging gun plug-in test focus adjustment method, the images of the contact surface are collected in real time through the charging base image acquisition device and the charging gun image acquisition device, and the matching degree is compared and the angle is adjusted to ensure that the contacts of the charging gun and the charging base are accurately attached. combine.

Benefits of technology

It achieves accurate focusing of the charging gun and charging base, avoids short circuit problems caused by mismatched wear areas, and ensures the adaptability and safety of the charging gun and charging base.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118736779A_ABST
    Figure CN118736779A_ABST
Patent Text Reader

Abstract

The invention provides a charging gun plugging test focusing adjustment method, electronic equipment and a storage medium, and the method comprises the steps: determining the focusing state of a target charging gun and a target charging base according to an image collected by a charging base image collection device and an image collected by a charging gun image collection device; if the target charging gun and the target charging base fail to focus, determining a relative adjustment angle of the target charging gun and the target charging base; if the relative adjustment angle is determined to be the abnormal angle, controlling the focusing indicating lamp to light up a second state color; otherwise, controlling the focusing indicator lamp to light up a third state color, and controlling the target charging gun to rotate along the center line of the contact surface of the target charging gun by a relative adjustment angle, so that when the target charging gun moves to the target charging base at the current angle, the contact of the target charging gun can be accurately attached to the contact of the target charging base, and the charging efficiency is improved. And a user can check the focusing state of the target charging gun and the target charging base at any time.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] Before the charging gun is put on the market, it is necessary to conduct a plug-in and unplug test to detect whether the produced charging gun is compatible with its corresponding charging base. When the charging gun is undergoing a charging test, it is also necessary to frequently plug and unplug the charging gun. During the frequent plugging and unplugging of the charging gun and the charging base, as the number of plug-ins and unplugging increases, the contacts on the contact surfaces of the charging gun and the charging base will wear out. When the area of ​​the wear area is large or the degree of wear is large, if the charging gun is still plugged and unplugged on the charging base according to the predetermined direction and angle, the contacts in the wear area of ​​the charging gun may not overlap with the contacts in the wear area of ​​the charging base, resulting in the charging gun and the charging base being unable to adapt to each other, causing a short circuit in the circuits of the charging gun and the charging base. Summary of the invention

[0003] In view of the above technical problems, the technical solution adopted by the present invention is:

[0004] According to one aspect of the present application, a focus adjustment method for a charging gun plug-in test is provided, which is applied to a charging gun plug-in test system, wherein the charging gun plug-in test system is connected to a target charging gun, a target charging base, and a focus indicator light, wherein the target charging base is used to match the target charging gun, and the target charging gun is used to charge a load connected to the target charging base, wherein a contact surface of the target charging gun is arranged opposite to a contact surface of the target charging base, and the focus indicator light is used to indicate a focus state of the target charging gun and the target charging base;

[0005] A charging base image acquisition device is provided on the side of the target charging gun, and the charging base image acquisition device is rotated on the side of the target charging gun by a first motor, and the charging base image acquisition device is used to acquire an image of a contact surface of the target charging base;

[0006] A charging gun image acquisition device is provided on the side of the target charging base, and the charging gun image acquisition device is rotated on the side of the target charging base by a second motor, and the charging gun image acquisition device is used to acquire an image of the contact surface of the target charging gun;

[0007] The charging gun plug-in test focus adjustment method comprises the following steps:

[0008] Step S100, in response to receiving the plug-in test instruction, controlling the target charging gun to move toward the target charging base at a uniform speed;

[0009] Step S200: Compare the image captured in real time by the charging base image capture device with the image captured in real time by the charging gun image capture device to determine the focus state of the target charging gun and the target charging base;

[0010] Step S300: If the target charging gun and the target charging base are focused successfully, the focus indicator light is controlled to light up in the first state color, and step S200 is executed; otherwise, step S400 is executed;

[0011] Step S400: determining a relative adjustment angle between a target charging gun and a target charging base according to an image captured by the charging base image capture device and an image captured by the charging gun image capture device;

[0012] Step S500: If the relative adjustment angle is determined to be an abnormal angle, the focus indicator light is controlled to light up in a second state color, and the target charging gun is controlled to stop moving; otherwise, step S600 is executed;

[0013] Step S600: Control the focus indicator light to light up in a third state color, and control the target charging gun to rotate along the center line of the contact surface of the target charging gun to a relative adjustment angle.

[0014] In an exemplary embodiment of the present application, step S200 includes:

[0015] Step S210: Determine a first target image corresponding to the contact surface of the target charging base and a second target image corresponding to the contact surface of the target charging gun according to the image of the contact surface of the target charging base acquired in real time by the charging base image acquisition device and the image of the contact surface of the target charging gun acquired in real time by the charging gun image acquisition device;

[0016] Step S220: If the matching degree between the first target image and the second target image is greater than a preset matching degree threshold, it is determined that the target charging gun and the target charging base are focused successfully at this time; otherwise, it is determined that the target charging gun and the target charging base are focused unsuccessfully at this time.

[0017] In an exemplary embodiment of the present application, step S210 includes:

[0018] Step S211: Obtain the identifiers corresponding to the feature points of the contact surface of the target charging base included in the image captured by the charging base image acquisition device at the current moment, so as to obtain a first feature point identifier list A. now =(A1,A2,...,A i ,...,A n ); wherein i = 1, 2, ..., n; n is the number of feature points of the contact surface of the target charging base included in the image captured by the charging base image acquisition device at the current moment; A i is the identifier corresponding to the i-th feature point of the contact surface of the target charging base included in the image captured by the charging base image capture device at the current moment;

[0019] Step S212: Obtain the identifiers corresponding to the target feature points on the contact surface of the target charging base to obtain a second feature point identifier list B=(B1, B2, ..., B j ,...,B k ), wherein j = 1, 2, ..., k, k is the number of target feature points on the contact surface of the target charging base; B j is the identifier corresponding to the jth target feature point on the contact surface of the target charging base;

[0020] Step S213: If B∈A now , then the image captured by the charging base image acquisition device at the current moment is determined as the first target image;

[0021] Step S214: Obtain the identifiers corresponding to the feature points of the contact surface of the target charging gun included in the image collected by the charging gun image collection device at the current moment, so as to obtain a third feature point identifier list C. now =(C1,C2,...,C g ,...,C h ); wherein g = 1, 2, ..., h; h is the number of feature points of the contact surface of the target charging gun included in the image collected by the charging gun image acquisition device at the current moment; C g is the identifier corresponding to the g-th feature point of the contact surface of the target charging gun included in the image collected by the charging gun image collection device at the current moment;

[0022] Step S215: Obtain the identifiers corresponding to the target feature points on the contact surface of the target charging gun to obtain a fourth feature point identifier list D=(D1, D2, ..., D p ,...,D q ), wherein p = 1, 2, ..., q, q is the number of target feature points on the contact surface of the target charging gun; D p is the identifier corresponding to the pth target feature point on the contact surface of the target charging gun;

[0023] Step S216: If D∈C now , the image captured by the charging gun image acquisition device at the current moment is determined as the second target image.

[0024] In an exemplary embodiment of the present application, step S213 further includes:

[0025] Step S2131: If B does not belong to A now , then obtain the list of identifiers that exist in the first feature point A now and several feature point identifiers in the second feature point identifier list B to obtain a fifth feature point identifier list E=(E1, E2, ..., E a,...,E b ); where a=1,2,...,b; b is the number of points that exist in the first feature point identification list A at the same time. now and the number of feature point identifiers in the second feature point identifier list B; E a List A is a list of features that exist at the same time in the first feature point now and the ath feature point identifier in the second feature point identifier list B;

[0026] Step S2132: If The image captured by the charging base image acquisition device at the current moment is determined as the first initial image, and step S2133 is executed; otherwise, the image acquisition angle of the charging base image acquisition device is adjusted so that the charging base image acquisition device captures at least half of the image of the contact surface of the target charging base, and step S2133 is executed;

[0027] Step S2133, controlling the first motor to rotate the charging base image acquisition device on the side of the target charging gun for one circle, and acquiring an image acquired by the charging base image acquisition device each time the charging base image acquisition device rotates on the side of the target charging gun by a first preset angle, and determining the acquired image as the first initial image;

[0028] Step S2134: based on a number of image features in a number of first initial images, stitch the images of the contact surface of the target charging base included in the number of first initial images to obtain an image of the contact surface of the target charging base at the current moment, and determine the image as the first target image.

[0029] In an exemplary embodiment of the present application, step S216 further includes:

[0030] Step S2161: If D does not belong to C now , then obtain the list of identifiers that exist in the third feature point C now and several feature point identifiers in the fourth feature point identifier list D to obtain a sixth feature point identifier list F = (F1, F2, ..., F c ,...,F d ), where c = 1, 2, ..., d; d is the number of points that exist in the third feature point identification list C. now and the number of feature point identifiers in the fourth feature point identifier list D; F c List C is a list of features that exist at the same time in the third feature point now and the cth feature point identifier in the fourth feature point identifier list D;

[0031] Step S2162: If The image captured by the charging gun image acquisition device at the current moment is determined as the second initial image, and step S2163 is executed; otherwise, the image acquisition angle of the charging gun image acquisition device is adjusted so that the charging gun image acquisition device captures at least half of the image of the contact surface of the target charging gun, and step S2163 is executed;

[0032] Step S2163, controlling the second motor to rotate the charging gun image acquisition device on the side of the target charging base for one circle, and acquiring an image acquired by the charging gun image acquisition device every time the charging gun image acquisition device rotates on the side of the target charging base by a second preset angle, and determining the acquired image as the second initial image;

[0033] Step S2164: splice the images of the contact surface of the target charging gun included in the plurality of second initial images according to the plurality of image features in the plurality of second initial images to obtain an image of the contact surface of the target charging gun at the current moment, and determine the image as the second target image.

[0034] In an exemplary embodiment of the present application, step S400 includes:

[0035] Step S410: Real-time acquisition of several image features of the contact surface of the target charging base included in the first target image at the current moment, and obtaining a first target image feature list G now =(G1,G2,...,G e ,...,G f ); wherein, e=1, 2, ..., f; f is the number of image features of the contact surface of the target charging base included in the first target image at the current moment; G e is the e-th image feature of the contact surface of the target charging base included in the first target image at the current moment;

[0036] Step S420: traverse the first target image feature list G now , if G e If the target image feature of the contact surface of the target charging base is not present, G e Determined as a first missing image feature;

[0037] Step S430: determine an area surrounded by a plurality of feature points corresponding to the first missing image features as a first missing area, and an image corresponding to the first missing area in the first target image is a first missing area image;

[0038] Step S440: Real-time acquisition of several image features of the contact surface of the target charging gun included in the second target image at the current moment, and obtaining a second target image feature list H. now =(H1,H2,...,H m,...,H r ); wherein m = 1, 2, ..., r; r is the number of image features of the contact surface of the target charging gun included in the second target image at the current moment; H m is the mth image feature of the contact surface of the target charging gun included in the second target image at the current moment;

[0039] Step S450: traverse the second target image feature list H now , if H m If the target image feature is not the contact surface of the target charging gun, H m Determined as the second missing image feature;

[0040] Step S460: determine an area surrounded by a plurality of feature points corresponding to the second missing image features as a second missing area, and an image corresponding to the second missing area in the second target image is a second missing area image;

[0041] Step S470: Determine the relative adjustment angle between the target charging gun and the target charging base according to the first missing area image and the second missing area image.

[0042] In an exemplary embodiment of the present application, step S470 includes:

[0043] Step S471, rotating the first missing region image along its midpoint, and determining a real-time matching degree between the second missing region image and the rotating first missing region image;

[0044] Step S472: when the real-time matching degree is greater than or equal to a preset matching degree threshold, the rotation angle of the first missing area image at the current moment is determined as the relative adjustment angle of the target charging gun and the target charging base;

[0045] Step S473: If any real-time matching degree is less than a preset matching degree threshold during one rotation of the first missing area image, the relative adjustment angle between the target charging gun and the target charging base is determined as an abnormal angle.

[0046] In an exemplary embodiment of the present application, step S600 includes:

[0047] Step S610, controlling the focus indicator light to light up in a third state color;

[0048] Step S620, control the target charging gun to rotate along the center line of the contact surface of the target charging gun at a relative adjustment angle, and for each unit angle the target charging gun rotates, the pixel value of the color of the focus indicator light increases by (W3-W1) / T; wherein W3 is the pixel value of the third state color; W1 is the pixel value of the first state color; and T is the relative adjustment angle.

[0049] According to one aspect of the present application, a non-transitory computer-readable storage medium is provided, in which at least one instruction or at least one program is stored. The at least one instruction or the at least one program is loaded and executed by a processor to implement the aforementioned charging gun plug-in test focus adjustment method.

[0050] According to one aspect of the present application, an electronic device is provided, including a processor and the aforementioned non-transitory computer-readable storage medium.

[0051] The present invention has at least the following beneficial effects:

[0052] The focus adjustment method for the charging gun plug-in test of the present invention determines the focus state of the target charging gun and the target charging base by comparing the image collected in real time by the charging base image acquisition device with the image collected in real time by the charging gun image acquisition device. If the target charging gun and the target charging base are focused successfully, the focus indicator light is controlled to light up the first state color. Otherwise, the relative adjustment angle of the target charging gun and the target charging base is determined according to the image collected by the charging base image acquisition device and the image collected by the charging gun image acquisition device. If the relative adjustment angle is determined to be an abnormal angle, the focus indicator light is controlled to light up the second state color, and the target charging gun is controlled to stop moving. Otherwise, the focus indicator light is controlled to light up the third state color, and the target charging gun is controlled to rotate along the center line of the contact surface of the target charging gun at the relative adjustment angle, so that when the target charging gun moves to the target charging base at the current angle, the contact of the target charging gun and the contact of the target charging base can be accurately fitted, the target charging gun and the target charging base can be adapted, and the user can check the focus state of the target charging gun and the target charging base at any time. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. 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 creative work.

[0054] Figure 1 A flowchart of a focus adjustment method for a charging gun plug and unplug test provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0055] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0056] A focus adjustment method for a charging gun plug-in test is applied to a charging gun plug-in test system. The charging gun plug-in test system is connected to a target charging gun, a target charging base and a focus indicator light. The target charging base is used to match the target charging gun. The target charging gun is used to charge the load connected to the target charging base. The contact surface of the target charging gun is arranged opposite to the contact surface of the target charging base. The contact surface of the target charging gun and the contact surface of the target charging base both have a number of concave and convex contacts. When the contacts on the target charging gun fit with the contacts on the target charging base, the target charging base and the target charging gun form a circuit. At this time, the target charging gun can supply power to the target charging base. The focus indicator light is used to indicate the focus state of the target charging gun and the target charging base.

[0057] A charging base image acquisition device is provided on the side of the target charging gun. The charging base image acquisition device is rotated on the side of the target charging gun by a first motor. The charging base image acquisition device is used to acquire an image of the contact surface of the target charging base.

[0058] A charging gun image acquisition device is provided on the side of the target charging base. The charging gun image acquisition device is rotated on the side of the target charging base by a second motor. The charging gun image acquisition device is used to acquire an image of the contact surface of the target charging gun.

[0059] The acquisition angle of the charging base image acquisition device faces the target charging base, and the acquisition angle of the charging gun image acquisition device faces the target charging gun. The first motor and the second motor are both preset with a fixed step length, that is, the first motor or the second motor executes a fixed step length each time it moves. The first motor or the second motor has a fixed step length for each movement, and the charging base image acquisition device or the charging gun image acquisition device rotates a fixed angle on the side of the target charging gun or the target charging base. The setting of the fixed step length is associated with the rotation angle, and the angle of each rotation is set to be divisible by 360°, so that the number of rotations required for the charging base image acquisition device or the charging gun image acquisition device to rotate one circle on the side of the target charging gun or the target charging base is an integer, which is convenient for subsequent image acquisition.

[0060] like Figure 1 As shown, the focus adjustment method for the charging gun plug-in test described in this application includes the following steps:

[0061] Step S100, in response to receiving the plug-in test instruction, controlling the target charging gun to move toward the target charging base at a uniform speed;

[0062] After receiving the plug-in test instruction, the target charging gun moves at a uniform speed toward the target charging base so that the target charging gun matches the target charging base.

[0063] Step S200: Compare the image captured in real time by the charging base image capture device with the image captured in real time by the charging gun image capture device to determine the focus state of the target charging gun and the target charging base;

[0064] During the process of the target charging gun moving toward the target charging base, the charging base image acquisition device acquires the image of the contact surface of the target charging base in real time, and the charging gun image acquisition device acquires the image of the contact surface of the target charging gun in real time, and determines whether the relative angles of the target charging gun and the target charging base match based on the acquired images of the target charging gun and the target charging base, that is, whether the target charging gun can focus on the target charging base at the current angle, and whether the contacts on the target charging gun can accurately fit with the contacts on the target charging base.

[0065] Further, step S200 includes steps S210 to S220:

[0066] Step S210: Determine a first target image corresponding to the contact surface of the target charging base and a second target image corresponding to the contact surface of the target charging gun according to the image of the contact surface of the target charging base acquired in real time by the charging base image acquisition device and the image of the contact surface of the target charging gun acquired in real time by the charging gun image acquisition device;

[0067] The first target image is a current image of a contact surface of a determined target charging base, and the second target image is a current image of a contact surface of a determined target charging gun.

[0068] Wherein, step S210 includes steps S211 to S216:

[0069] Step S211: Obtain the identifiers corresponding to the feature points of the contact surface of the target charging base included in the image captured by the charging base image acquisition device at the current moment, so as to obtain a first feature point identifier list A. now =(A1,A2,...,A i ,...,A n ); wherein i = 1, 2, ..., n; n is the number of feature points of the contact surface of the target charging base included in the image captured by the charging base image acquisition device at the current moment; A iis the identifier corresponding to the i-th feature point of the contact surface of the target charging base included in the image captured by the charging base image capture device at the current moment;

[0070] Step S212: Obtain the identifiers corresponding to the target feature points on the contact surface of the target charging base to obtain a second feature point identifier list B=(B1, B2, ..., B j ,...,B k ), wherein j = 1, 2, ..., k, k is the number of target feature points on the contact surface of the target charging base; B j is the identifier corresponding to the jth target feature point on the contact surface of the target charging base;

[0071] The target feature point of the target charging base may be an edge point or a contact point of the contact surface of the target charging base, that is, a point that can represent relevant features of the contact surface of the target charging base.

[0072] Step S213: If B∈A now , then the image captured by the charging base image acquisition device at the current moment is determined as the first target image;

[0073] If all target feature points of the target charging base exist in the image captured by the charging base image acquisition device at the current moment, it means that the image captured by the charging base image acquisition device at the current moment includes a complete image of the target charging base, and the image can be compared for matching, so the image is determined as the first target image.

[0074] Step S214: Obtain the identifiers corresponding to the feature points of the contact surface of the target charging gun included in the image collected by the charging gun image collection device at the current moment, so as to obtain a third feature point identifier list C. now =(C1,C2,...,C g ,...,C h ); wherein g = 1, 2, ..., h; h is the number of feature points of the contact surface of the target charging gun included in the image collected by the charging gun image acquisition device at the current moment; C g is the identifier corresponding to the g-th feature point of the contact surface of the target charging gun included in the image collected by the charging gun image collection device at the current moment;

[0075] Step S215: Obtain the identifiers corresponding to the target feature points on the contact surface of the target charging gun to obtain a fourth feature point identifier list D=(D1, D2, ..., D p ,...,D q ), wherein p = 1, 2, ..., q, q is the number of target feature points on the contact surface of the target charging gun; D pis the identifier corresponding to the pth target feature point on the contact surface of the target charging gun;

[0076] Step S216: If D∈C now , the image captured by the charging gun image acquisition device at the current moment is determined as the second target image.

[0077] The method for determining the target feature points of the target charging gun and the target feature points of the target charging base is the same, and the method for determining the second target image is the same as the method for determining the first target image, so they will not be repeated here.

[0078] On the other hand, step S213 also includes steps S2131-S2134:

[0079] Step S2131: If B does not belong to A now , then obtain the list of identifiers that exist in the first feature point A now and several feature point identifiers in the second feature point identifier list B to obtain a fifth feature point identifier list E=(E1, E2, ..., E a ,...,E b ); where a=1,2,...,b; b is the number of points that exist in the first feature point identification list A at the same time. now and the number of feature point identifiers in the second feature point identifier list B; E a List A is a list of features that exist at the same time in the first feature point now and the ath feature point identifier in the second feature point identifier list B;

[0080] If any target feature point of the target charging base does not exist in the image captured by the charging base image acquisition device at the current moment, it means that the image of the target charging base in the image captured by the charging base image acquisition device at the current moment is not complete, but is a partial image of the target charging base. Therefore, in order to improve the accuracy of determining the matching degree, it is necessary to obtain a complete image of the target charging base at the current moment.

[0081] Step S2132: If The image captured by the charging base image acquisition device at the current moment is determined as the first initial image, and step S2133 is executed; otherwise, the image acquisition angle of the charging base image acquisition device is adjusted so that the charging base image acquisition device captures at least half of the image of the contact surface of the target charging base, and step S2133 is executed;

[0082] like This means that the current image acquisition angle of the charging base image acquisition device can only capture a small half of the image of the target charging base. Even if the charging base image acquisition device rotates one circle along the side of the target charging gun, it is impossible to capture the entire image of the target charging base. Therefore, it is necessary to adjust the image acquisition angle of the charging base image acquisition device so that the charging base image acquisition device can at least capture half of the image of the contact surface of the target charging base.

[0083] Step S2133, controlling the first motor to rotate the charging base image acquisition device on the side of the target charging gun for one circle, and acquiring an image acquired by the charging base image acquisition device each time the charging base image acquisition device rotates on the side of the target charging gun by a first preset angle, and determining the acquired image as the first initial image;

[0084] Step S2134: based on a number of image features in a number of first initial images, stitch the images of the contact surface of the target charging base included in the number of first initial images to obtain an image of the contact surface of the target charging base at the current moment, and determine the image as the first target image.

[0085] On the other hand, step S216 also includes steps S2161-S2164:

[0086] Step S2161: If D does not belong to C now , then obtain the list of identifiers that exist in the third feature point C now and several feature point identifiers in the fourth feature point identifier list D to obtain a sixth feature point identifier list F = (F1, F2, ..., F c ,...,F d ), where c = 1, 2, ..., d; d is the number of points that exist in the third feature point identification list C. now and the number of feature point identifiers in the fourth feature point identifier list D; F c List C is a list of features that exist at the same time in the third feature point now and the cth feature point identifier in the fourth feature point identifier list D;

[0087] Step S2162: If The image captured by the charging gun image acquisition device at the current moment is determined as the second initial image, and step S2163 is executed; otherwise, the image acquisition angle of the charging gun image acquisition device is adjusted so that the charging gun image acquisition device captures at least half of the image of the contact surface of the target charging gun, and step S2163 is executed;

[0088] Step S2163, controlling the second motor to rotate the charging gun image acquisition device on the side of the target charging base for one circle, and acquiring an image acquired by the charging gun image acquisition device every time the charging gun image acquisition device rotates on the side of the target charging base by a second preset angle, and determining the acquired image as the second initial image;

[0089] Step S2164: splice the images of the contact surface of the target charging gun included in the plurality of second initial images according to the plurality of image features in the plurality of second initial images to obtain an image of the contact surface of the target charging gun at the current moment, and determine the image as the second target image.

[0090] Step S220: If the matching degree between the first target image and the second target image is greater than a preset matching degree threshold, it is determined that the target charging gun and the target charging base are focused successfully at this time; otherwise, it is determined that the target charging gun and the target charging base are focused unsuccessfully at this time.

[0091] If the matching degree between the first target image and the second target image is greater than the preset matching degree threshold, it means that when the target charging gun moves to the target charging base along the current angle, the contacts of the target charging gun can accurately fit with the contacts on the target charging base. Therefore, it is determined that the target charging gun and the target charging base are successfully focused.

[0092] Step S300: If the target charging gun and the target charging base are focused successfully, the focus indicator light is controlled to light up in the first state color, and step S200 is executed; otherwise, step S400 is executed;

[0093] Step S400: determining a relative adjustment angle between a target charging gun and a target charging base according to an image captured by the charging base image capture device and an image captured by the charging gun image capture device;

[0094] When the target charging gun and the target charging base fail to focus, it means that if the current target charging gun does not adjust the angle, the contacts of the target charging gun cannot fit with the contacts on the target charging base when it moves to the target charging base. Therefore, it is necessary to determine the relative adjustment angle of the target charging gun and the target charging base so that the target charging gun can be rotated to focus on the target charging gun and the target charging base.

[0095] Further, step S400 includes step S410-step S473:

[0096] Step S410: Real-time acquisition of several image features of the contact surface of the target charging base included in the first target image at the current moment, and obtaining a first target image feature list G now =(G1,G2,...,G e ,...,Gf ); wherein, e=1, 2, ..., f; f is the number of image features of the contact surface of the target charging base included in the first target image at the current moment; G e is the e-th image feature of the contact surface of the target charging base included in the first target image at the current moment;

[0097] Step S420: traverse the first target image feature list G now , if G e If the target image feature of the contact surface of the target charging base is not present, G e Determined as a first missing image feature;

[0098] Step S430: determine an area surrounded by a plurality of feature points corresponding to the first missing image features as a first missing area, and an image corresponding to the first missing area in the first target image is a first missing area image;

[0099] The first missing area is an area surrounded by damaged or abnormal feature points on the contact surface of the target charging base.

[0100] Step S440: Real-time acquisition of several image features of the contact surface of the target charging gun included in the second target image at the current moment, and obtaining a second target image feature list H. now =(H1,H2,...,H m ,...,H r ); wherein m = 1, 2, ..., r; r is the number of image features of the contact surface of the target charging gun included in the second target image at the current moment; H m is the mth image feature of the contact surface of the target charging gun included in the second target image at the current moment;

[0101] Step S450: traverse the second target image feature list H now , if H m If the target image feature is not the contact surface of the target charging gun, H m Determined as the second missing image feature;

[0102] Step S460: determine an area surrounded by a plurality of feature points corresponding to the second missing image features as a second missing area, and an image corresponding to the second missing area in the second target image is a second missing area image;

[0103] Step S471, rotating the first missing region image along its midpoint, and determining a real-time matching degree between the second missing region image and the rotating first missing region image;

[0104] Step S472: when the real-time matching degree is greater than or equal to a preset matching degree threshold, the rotation angle of the first missing area image at the current moment is determined as the relative adjustment angle of the target charging gun and the target charging base;

[0105] Step S473: If any real-time matching degree is less than a preset matching degree threshold during one rotation of the first missing area image, the relative adjustment angle between the target charging gun and the target charging base is determined as an abnormal angle.

[0106] If any real-time matching degree is less than the preset matching degree threshold, it means that the contact wear of the target charging gun or the target charging base is serious. Even if the target charging gun rotates one circle, the target charging gun and the target charging base cannot be focused. Therefore, the relative adjustment angle is set to an abnormal angle. The abnormal angle can be an angle greater than 360 degrees, or an abnormal symbol value.

[0107] Step S500: If the relative adjustment angle is determined to be an abnormal angle, the focus indicator light is controlled to light up in a second state color, and the target charging gun is controlled to stop moving; otherwise, step S600 is executed;

[0108] Step S600, controlling the focus indicator light to light up in a third state color, and controlling the target charging gun to rotate along the center line of the contact surface of the target charging gun to adjust the relative angle;

[0109] Further, step S600 includes step S610-step S620:

[0110] Step S610, controlling the focus indicator light to light up in a third state color;

[0111] Step S620, control the target charging gun to rotate along the center line of the contact surface of the target charging gun at a relative adjustment angle, and for each unit angle the target charging gun rotates, the pixel value of the color of the focus indicator light increases by (W3-W1) / T; wherein W3 is the pixel value of the third state color; W1 is the pixel value of the first state color; and T is the relative adjustment angle.

[0112] During the rotation of the target charging gun, in order to facilitate the user to check the focus status of the target charging gun and the target charging base, the focus indicator light is set to a real-time gradient color. When the target charging gun is rotated to a relative adjustment angle, the color of the focus indicator light also becomes the first state color.

[0113] The focus adjustment method for the charging gun plug-in test of the present invention determines the focus state of the target charging gun and the target charging base by comparing the image collected in real time by the charging base image acquisition device with the image collected in real time by the charging gun image acquisition device. If the target charging gun and the target charging base are focused successfully, the focus indicator light is controlled to light up the first state color. Otherwise, the relative adjustment angle of the target charging gun and the target charging base is determined according to the image collected by the charging base image acquisition device and the image collected by the charging gun image acquisition device. If the relative adjustment angle is determined to be an abnormal angle, the focus indicator light is controlled to light up the second state color, and the target charging gun is controlled to stop moving. Otherwise, the focus indicator light is controlled to light up the third state color, and the target charging gun is controlled to rotate along the center line of the contact surface of the target charging gun at the relative adjustment angle, so that when the target charging gun moves to the target charging base at the current angle, the contact of the target charging gun and the contact of the target charging base can be accurately fitted, the target charging gun and the target charging base can be adapted, and the user can check the focus state of the target charging gun and the target charging base at any time.

[0114] An embodiment of the present invention further provides a computer program product, which includes program code. When the program product is run on an electronic device, the program code is used to enable the electronic device to execute the steps of the method according to various exemplary embodiments of the present invention described above in this specification.

[0115] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0116] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0117] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.

[0118] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as a system, method or program product. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as a "circuit", "module" or "system".

[0119] The electronic device according to this embodiment of the present invention is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0120] The electronic device is presented in the form of a general-purpose computing device. The components of the electronic device may include, but are not limited to: the at least one processor mentioned above, the at least one storage device mentioned above, and a bus connecting different system components (including storage devices and processors).

[0121] The storage stores program codes, which can be executed by the processor, so that the processor executes the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification.

[0122] The memory may include readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory, and may further include read only memory (ROM).

[0123] The storage may also include a program / utility having a set (at least one) of program modules, such program modules including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include an implementation of a network environment.

[0124] The bus may represent one or more of several types of bus structures including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures.

[0125] The electronic device may also communicate with one or more external devices (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device, and / or any device that enables the electronic device to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface. Furthermore, the electronic device may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter.

[0126] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0127] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.

[0128] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0129] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0130] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0131] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0132] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0133] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0134] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A focus adjustment method for a charging gun plug-in test, characterized in that: Applied to a charging gun plug-in test system, the charging gun plug-in test system is connected to a target charging gun, a target charging base and a focus indicator light, the target charging base is used to match the target charging gun, the target charging gun is used to charge the load connected to the target charging base, the contact surface of the target charging gun is arranged opposite to the contact surface of the target charging base, and the focus indicator light is used to indicate the focus state of the target charging gun and the target charging base; A charging base image acquisition device is provided on the side of the target charging gun, and the charging base image acquisition device is rotated on the side of the target charging gun by a first motor, and the charging base image acquisition device is used to acquire an image of the contact surface of the target charging base; A charging gun image acquisition device is provided on the side of the target charging base, and the charging gun image acquisition device is rotated on the side of the target charging base by a second motor, and the charging gun image acquisition device is used to acquire an image of the contact surface of the target charging gun; The method comprises the following steps: Step S100, in response to receiving the plug-in test instruction, controlling the target charging gun to move toward the target charging base at a uniform speed; Step S200: Compare the image captured in real time by the charging base image capture device with the image captured in real time by the charging gun image capture device to determine the focus state of the target charging gun and the target charging base; Step S300: If the target charging gun and the target charging base are focused successfully, control the focus indicator light to light up in a first state color, and execute step S200; Otherwise, execute step S400; Step S400: determining a relative adjustment angle between the target charging gun and the target charging base according to the image captured by the charging base image capture device and the image captured by the charging gun image capture device; Step S500: If the relative adjustment angle is determined to be an abnormal angle, the focus indicator light is controlled to light up in a second state color, and the target charging gun is controlled to stop moving; otherwise, step S600 is executed; Step S600: Control the focus indicator light to light up in a third state color, and control the target charging gun to rotate along the center line of the contact surface of the target charging gun by the relative adjustment angle.

2. The method according to claim 1, characterized in that: The step S200 includes: Step S210: determining a first target image corresponding to the contact surface of the target charging base and a second target image corresponding to the contact surface of the target charging gun according to the image of the contact surface of the target charging base acquired in real time by the charging base image acquisition device and the image of the contact surface of the target charging gun acquired in real time by the charging gun image acquisition device; Step S220: If the matching degree between the first target image and the second target image is greater than a preset matching degree threshold, it is determined that the target charging gun and the target charging base are focused successfully at this time; otherwise, it is determined that the target charging gun and the target charging base are focused unsuccessfully at this time.

3. The method according to claim 2, characterized in that The step S210 includes: Step S211: Obtain the identifiers corresponding to the feature points of the contact surface of the target charging base included in the image captured by the charging base image acquisition device at the current moment, so as to obtain a first feature point identifier list A. now =(A1,A2,...,A i ,...,A n ); wherein i=1, 2, ..., n; n is the number of feature points of the contact surface of the target charging base included in the image captured by the charging base image acquisition device at the current moment; A i is an identifier corresponding to the i-th feature point of the contact surface of the target charging base included in the image captured by the charging base image capture device at the current moment; Step S212: Obtain the identifiers corresponding to the target feature points on the contact surface of the target charging base to obtain a second feature point identifier list B=(B1, B2, ..., B j ,...,B k ), wherein j=1, 2, ..., k, k is the number of target feature points on the contact surface of the target charging base; B j is the identifier corresponding to the j-th target feature point on the contact surface of the target charging base; Step S213: If B∈A now , then the image captured by the charging base image acquisition device at the current moment is determined as the first target image; Step S214: Obtain the identifiers corresponding to the feature points of the contact surface of the target charging gun included in the image collected by the charging gun image collection device at the current moment, so as to obtain a third feature point identifier list C. now =(C1,C2,...,C g ,...,C h ); wherein g = 1, 2, ..., h; h is the number of feature points of the contact surface of the target charging gun included in the image captured by the charging gun image acquisition device at the current moment; C g is an identifier corresponding to the g-th feature point of the contact surface of the target charging gun included in the image collected by the charging gun image collection device at the current moment; Step S215: Obtain the identifiers corresponding to the target feature points on the contact surface of the target charging gun to obtain a fourth feature point identifier list D=(D1, D2, ..., D p ,...,D q ); wherein p = 1, 2, ..., q; q is the number of target feature points on the contact surface of the target charging gun; D p is an identifier corresponding to the pth target feature point on the contact surface of the target charging gun; Step S216: If D∈C now , the image captured by the charging gun image acquisition device at the current moment is determined as the second target image.

4. The method according to claim 3, characterized in that The step S213 further includes: Step S2131: If B does not belong to A now , then obtain the list of identifiers that exist in the first feature point A now and several feature point identifiers in the second feature point identifier list B to obtain a fifth feature point identifier list E = (E1, E2, ..., E a ,...,E b ); where a=1,2,...,b; b is the number of points that exist in the first feature point identification list A at the same time. now and the number of feature point identifiers in the second feature point identifier list B; E a List A is the list of features that exist at the same time in the first feature point now and the ath feature point identifier in the second feature point identifier list B; Step S2132: If The image captured by the charging base image acquisition device at the current moment is determined as the first initial image, and step S2133 is executed; otherwise, the image acquisition angle of the charging base image acquisition device is adjusted so that the charging base image acquisition device captures at least half of the image of the contact surface of the target charging base, and step S2133 is executed; Step S2133, controlling the first motor to make the charging base image acquisition device rotate one circle on the side of the target charging gun, and acquiring an image acquired by the charging base image acquisition device every time the charging base image acquisition device rotates a first preset angle on the side of the target charging gun, and determining the acquired image as the first initial image; Step S2134: based on a number of image features in a number of the first initial images, stitch the images of the contact surface of the target charging base included in the number of the first initial images to obtain an image of the contact surface of the target charging base at the current moment, and determine the image as the first target image.

5. The method according to claim 4, characterized in that The step S216 further includes: Step S2161: If D does not belong to C now , then obtain the list of identifiers that exist in the third feature point C now and several feature point identifiers in the fourth feature point identifier list D to obtain a sixth feature point identifier list F = (F1, F2, ..., F c ,...,F d ), where c = 1, 2, ..., d; d is the number of points that exist in the third feature point identification list C. now and the number of feature point identifiers in the fourth feature point identifier list D; F c List C is a list of features that exist at the same time in the third feature point now and the cth feature point identifier in the fourth feature point identifier list D; Step S2162: If The image captured by the charging gun image acquisition device at the current moment is determined as the second initial image, and step S2163 is executed; otherwise, the image acquisition angle of the charging gun image acquisition device is adjusted so that the charging gun image acquisition device captures at least half of the image of the contact surface of the target charging gun, and step S2163 is executed; Step S2163, controlling the second motor to make the charging gun image acquisition device rotate one circle on the side of the target charging base, and acquiring an image acquired by the charging gun image acquisition device every time the charging gun image acquisition device rotates a second preset angle on the side of the target charging base, and determining the acquired image as the second initial image; Step S2164: based on a plurality of image features in a plurality of second initial images, stitch the images of the contact surface of the target charging gun included in a plurality of second initial images to obtain an image of the contact surface of the target charging gun at the current moment, and determine the image as the second target image.

6. The method according to claim 5, characterized in that The step S400 includes: Step S410: Real-time acquisition of several image features of the contact surface of the target charging base included in the first target image at the current moment, and obtaining a first target image feature list G now =(G1,G2,...,G e ,...,G f ); wherein, e=1, 2, ..., f; f is the number of image features of the contact surface of the target charging base included in the first target image at the current moment; G e is the e-th image feature of the contact surface of the target charging base included in the first target image at the current moment; Step S420: traverse the first target image feature list G now , if G e If the target image feature of the contact surface of the target charging base is not provided, G e Determined as a first missing image feature; Step S430: determining an area surrounded by a plurality of feature points corresponding to the first missing image features as a first missing area, and an image corresponding to the first missing area in the first target image is a first missing area image; Step S440: Real-time acquisition of several image features of the contact surface of the target charging gun included in the second target image at the current moment, and obtaining a second target image feature list H. now =(H1,H2,...,H m ,...,H r ); wherein m=1, 2, ..., r; r is the number of image features of the contact surface of the target charging gun included in the second target image at the current moment; H m is the mth image feature of the contact surface of the target charging gun included in the second target image at the current moment; Step S450: traverse the second target image feature list H now , if H m is not the target image feature of the contact surface of the target charging gun, then H m Determined as the second missing image feature; Step S460: determining an area surrounded by a plurality of feature points corresponding to the second missing image features as a second missing area, and an image corresponding to the second missing area in the second target image as a second missing area image; Step S470: Determine a relative adjustment angle between the target charging gun and the target charging base according to the first missing area image and the second missing area image.

7. The method according to claim 6, characterized in that The step S470 includes: Step S471, rotating the first missing region image along its midpoint, and determining a real-time matching degree between the second missing region image and the rotating first missing region image; Step S472: When the real-time matching degree is greater than or equal to a preset matching degree threshold, the rotation angle of the first missing area image at the current moment is determined as the relative adjustment angle of the target charging gun and the target charging base; Step S473: If any real-time matching degree is less than a preset matching degree threshold during one rotation of the first missing area image, the relative adjustment angle between the target charging gun and the target charging base is determined as an abnormal angle.

8. The method according to claim 7, characterized in that The step S600 includes: Step S610, controlling the focus indicator light to light up in a third state color; Step S620, control the target charging gun to rotate along the center line of the contact surface of the target charging gun by the relative adjustment angle, and for each unit angle rotation of the target charging gun, the pixel value of the color of the focus indicator light increases by (W3-W1) / T; wherein W3 is the pixel value of the third state color; W1 is the pixel value of the first state color; and T is the relative adjustment angle.

9. A non-transitory computer-readable storage medium, wherein at least one instruction or at least one program is stored in the storage medium, characterized in that: The at least one instruction or the at least one program is loaded and executed by the processor to implement the focus adjustment method for the charging gun plug and unplug test as described in any one of claims 1-8.

10. An electronic device, characterized in that: The invention comprises a processor and the non-transitory computer-readable storage medium as claimed in claim 9.