A method and device for identifying an electric vehicle charging port, an electronic device and a medium

By acquiring images of electric vehicle charging ports from different angles, converting them to polar coordinates to determine the center position, and using the target circle and straight line to calculate the charging port position, the problems of small recognition range and low accuracy of monocular vision are solved, and high-precision charging port positioning is achieved.

CN116246159BActive Publication Date: 2026-03-20NAT ENERGY CHANGYUAN HANCHUAN POWER GENERATION CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-02
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

Existing monocular vision recognition has a small positioning range, low positioning accuracy, lacks self-evaluation standards, relies on internal features of the charging port, leading to recognition difficulties, and poses a risk of plugging-in accidents.

Method used

By acquiring images of the target object at different angles from the initial shooting position, converting them to polar coordinates, determining the center position error, adjusting the shooting position until the error is less than a threshold, determining the charging port position using the target circle and a straight line, and calculating the position in the world coordinate system by combining similar transmission relationships.

Benefits of technology

It improves the accuracy and speed of charging port identification, reduces identification complexity, lowers the risk of plug-in accidents, and achieves accurate positioning over a wide range.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116246159B_ABST
    Figure CN116246159B_ABST
Patent Text Reader

Abstract

The application relates to a kind of identification method, device, electronic equipment and medium of electric vehicle charging port, the method comprises: for electric vehicle charging port, in initial shooting position, the image to be identified photographed in different shooting angles is acquired, respectively, non-zero pixel points in each image to be identified are converted into polar coordinates, obtain the circle corresponding to each image to be identified, according to the center position of each circle and the sorting corresponding to each circle, determine the center position error corresponding to each circle, according to the center position error, determine target circle, according to each circle, determine the coordinate origin corresponding to each pixel point;According to each coordinate origin, determine target straight line, according to target straight line and target circle, determine the target position of electric vehicle charging port.The method of the application can extract the most effective position characteristics of charging port through target circle and target straight line, reduce the complexity of identification, and position faster.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of image processing and visual positioning, and particularly relates to a method and device for identifying a charging port of an electric vehicle, an electronic device and a medium. BACKGROUND

[0002] The existing monocular visual recognition positioning range is limited by the field of view of the camera, the positioning range is small, the positioning process relies on the positioning result of a single position, the positioning accuracy is low, the positioning result has no suitable self-evaluation standard, higher positioning accuracy is needed to reduce the plugging accident, and the current positioning method relies on the internal features of the charging port, which is small and not conducive to identification and positioning. SUMMARY

[0003] The present application relates to the field of image processing and visual positioning, and particularly relates to a method and device for identifying a charging port of an electric vehicle, an electronic device and a medium.

[0004] The technical scheme for solving the above technical problems is as follows: a method for identifying a charging port of an electric vehicle, the method comprising:

[0005] S1, for the charging port of the electric vehicle, obtaining the to-be-identified images taken at different shooting angles at an initial shooting position, each of the to-be-identified images is sorted in ascending order of shooting angle, and the initial shooting position is a limit zero position;

[0006] S2, respectively converting non-zero pixel points in each of the to-be-identified images into polar coordinates to obtain a circle corresponding to each of the to-be-identified images;

[0007] S3, determining a center position error of each of the circles according to the center position of each of the circles and the sorting corresponding to each of the circles, if the center position error is less than a first threshold, taking the circle corresponding to the last sorting corresponding to the center position error as a target circle, if the center position error is not less than the first threshold, adjusting the initial shooting position, and obtaining to-be-identified images taken at different shooting angles at the adjusted shooting position, repeating steps S2 to S3 until the center position error is less than the first threshold;

[0008] S4, for each circle, determining a coordinate origin corresponding to each pixel point according to the position coordinates of each pixel point corresponding to the circle and the shooting angle corresponding to the circle;

[0009] S5, determining a target coordinate origin according to each of the coordinate origins, and determining a target straight line according to the target coordinate origin and the shooting angle corresponding to the target coordinate origin;

[0010] S6, determining a target position of the electric vehicle charging port according to the target straight line and the target circle.

[0011] The application has the advantages that: the scheme of the application is based on obtaining the to-be-recognized images photographed at different photographing angles at the initial photographing position, and the most effective position feature representing the charging port can be extracted through the determination of the target circle and the target straight line representing the charging port, so that the complexity of recognition is reduced and the speed of feature positioning is faster.

[0012] Based on the above technical scheme, the application can also be improved as follows.

[0013] Further, the determination of the target position of the electric vehicle charging port according to the target straight line and the target circle comprises:

[0014] determining a target photographing angle according to the target circle and the target straight line, the target photographing angle being a photographing angle corresponding to the electric vehicle charging port in an image coordinate system;

[0015] determining a target position corresponding to the electric vehicle charging port in a world coordinate system according to the target photographing angle, the center position of the target circle and a preset first correspondence relationship, the first correspondence relationship being a conversion relationship between a photographing angle and a center position in the image coordinate system and a photographing angle and a center position in the world coordinate system.

[0016] The application of the above further scheme has the advantage that the target position of the charging port is determined according to the first correspondence relationship, so that the difficulty of positioning is simplified.

[0017] Further, the conversion of each non-zero pixel point in each of the to-be-recognized images into polar coordinates to obtain a circle corresponding to each of the to-be-recognized images comprises:

[0018] For each of the to-be-recognized images, the non-zero pixel point in the to-be-recognized image is converted into polar coordinates through a first formula to obtain a circle corresponding to the to-be-recognized image, wherein the first formula is:

[0019]

[0020] wherein (x, y) represents the coordinates of the non-zero pixel point in the to-be-recognized image, θ represents a photographing angle corresponding to the to-be-recognized image, r represents a radius corresponding to (x, y) in the polar coordinates, and (a, b) represents the coordinates of the center of the circle corresponding to (x, y) in the polar coordinates.

[0021] The application of the above further scheme has the advantage that, since the charging port is usually circular, the features of the charging port can be more accurately represented by converting the to-be-recognized image into a circle through the first formula.

[0022] Further, for each circle, the above determining, according to the position coordinates of each pixel point corresponding to the circle and the shooting angle corresponding to the circle, a coordinate origin corresponding to each pixel point comprises:

[0023] For each pixel point in each circle, according to the position coordinates of the pixel point and the shooting angle corresponding to the circle, a coordinate origin corresponding to the pixel point is determined by a second formula, wherein the second formula is:

[0024]

[0025] Wherein (x, y) represents the position coordinates of a pixel point in a circle, θ represents the shooting angle corresponding to the circle, and ρ represents the coordinate origin corresponding to (x, y).

[0026] The beneficial effect of the above further scheme is that since there is usually a straight line on the charging port, the coordinate origin related to the straight line is determined by the second formula, so that the characteristics of the charging port can be more accurately expressed.

[0027] Further, the above determining, according to each coordinate origin, a target coordinate origin, and determining, according to the target coordinate origin and the shooting angle corresponding to the target coordinate origin, a target straight line comprises:

[0028] Normal distribution is performed on each coordinate origin to obtain a corresponding normal distribution curve;

[0029] The coordinates of the middle value corresponding to the normal distribution curve are determined as the target coordinate origin;

[0030] According to the target coordinate origin and the shooting angle corresponding to the target coordinate origin, a target straight line is determined.

[0031] The beneficial effect of the above further scheme is that by performing normal distribution on each coordinate origin, the coordinate origin representing the target straight line can be more accurately represented by the normal distribution curve.

[0032] Further, the above method further comprises:

[0033] According to the circle center position error and the number of times of acquiring the to-be-recognized image, an executable degree is determined, the executable degree representing the error between the target circle center position and the real circle center position;

[0034] The first threshold value is a second threshold value, if the center position error is less than the first threshold value, a circle corresponding to the last sorting corresponding to the center position error is taken as a target circle, if the center position error is not less than the first threshold value, the initial shooting position is adjusted, and the to-be-identified images shot at different shooting angles are obtained at the adjusted shooting position, steps S2 to S3 are repeated until the center position error is less than the first threshold value, comprising:

[0035] If the executable degree is less than the second threshold value, the circle corresponding to the last sorting corresponding to the center position error is taken as the target circle, if the executable degree is not less than the second threshold value, the initial shooting position is adjusted, and the to-be-identified images shot at different shooting angles are obtained at the adjusted shooting position, steps S2 to S3 are repeated until the executable degree is less than the second threshold value.

[0036] The beneficial effect of the above further scheme is that the higher the executable degree is, the higher the positioning accuracy is, and the smaller the risk of executing the plug-in is.

[0037] Further, if the target circle is an incomplete circle, the above method further comprises:

[0038] Determining the number of missing pixel points in the target circle;

[0039] If the number of missing pixel points is greater than a set number, a fault information is generated.

[0040] The beneficial effect of the above further scheme is that for the charging port with missing, the fault warning can be performed in time through the scheme.

[0041] In a second aspect, the present application also provides an electric vehicle charging port identification device to solve the above technical problems, the device comprises:

[0042] An image acquisition module is configured to acquire to-be-identified images shot at different shooting angles for an electric vehicle charging port at an initial shooting position, each of the to-be-identified images is sorted from small to large according to the shooting angle, and the initial shooting position is a limit zero position.

[0043] A circle conversion module is configured to convert non-zero pixel points in each of the to-be-identified images into polar coordinates respectively, to obtain a circle corresponding to each of the to-be-identified images.

[0044] a target circle determination module, configured to determine a circle center position error corresponding to each of the circles according to the circle center position and the corresponding ranking of each of the circles, and if the circle center position error is less than a first threshold value, take the circle corresponding to the last ranking corresponding to the circle center position error as the target circle, and if the circle center position error is not less than the first threshold value, adjust the initial shooting position, and repeat the processing procedure from the circle conversion module to the target circle determination module for the to-be-identified images taken at different shooting angles at the adjusted shooting position until the circle center position error is less than the first threshold value;

[0045] a coordinate origin determination module, configured to determine, for each circle, a coordinate origin corresponding to each pixel point according to the position coordinates of the pixel points corresponding to the circle and the shooting angle corresponding to the circle;

[0046] a target straight line determination module, configured to determine a target coordinate origin according to each of the coordinate origins, and determine a target straight line according to the target coordinate origin and the shooting angle corresponding to the target coordinate origin;

[0047] a target position determination module, configured to determine a target position of the electric vehicle charging port according to the target straight line and the target circle.

[0048] In a third aspect, the present application provides an electronic device to solve the above technical problems, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the method for identifying the electric vehicle charging port when executing the computer program.

[0049] In a fourth aspect, the present application provides a computer readable storage medium to solve the above technical problems, which stores a computer program, and the computer program is executable on the processor to implement the method for identifying the electric vehicle charging port.

[0050] Additional aspects and advantages of the present application will be made apparent by the following description and the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS

[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the description of the embodiments of the present application will be briefly introduced.

[0052] Figure 1 a flowchart of a method for identifying an electric vehicle charging port provided by an embodiment of the present application;

[0053] Figure 2 a schematic diagram of a visual positioning system provided by an embodiment of the present application;

[0054] Figure 3 A schematic diagram of a target circle and a target straight line provided for an embodiment of the present application;

[0055] Figure 4 A schematic diagram of a similar transmission relationship imaging model principle provided for an embodiment of the present application;

[0056] Figure 5 A structural schematic diagram of an electric vehicle charging port recognition device provided for an embodiment of the present application;

[0057] Figure 6 A structural schematic diagram of an electronic device provided for an embodiment of the present application. DETAILED DESCRIPTION

[0058] The principles and features of the present application are described below, and the examples are only used to explain the present application, and are not used to limit the scope of the present application.

[0059] The technical solutions of the present application and how the technical solutions of the present application solve the above technical problems will be described in detail below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described again in some embodiments. The embodiments of the present application will be described below with reference to the accompanying drawings.

[0060] The scheme provided by the embodiments of the present application can be applied to any application scenario that needs to identify the charging port position of an electric vehicle. The scheme provided by the embodiments of the present application can be executed by any electronic device, such as a terminal device of a user, including at least one of the following: a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a smart television, and a smart vehicle-mounted device.

[0061] The embodiments of the present application provide a possible implementation manner, as shown in Figure 1 A flowchart of an electric vehicle charging port recognition method is provided, and the scheme can be executed by any electronic device, for example, a terminal device, or jointly executed by a terminal device and a server. For the sake of description, the method provided by the embodiments of the present application will be described below by taking a terminal device as an execution subject, as shown in the flowchart of Figure 1 The method can include the following steps:

[0062] S1, for an electric vehicle charging port, acquiring an image to be identified photographed at different photographing angles at an initial photographing position, each of the images to be identified is sorted in ascending order of photographing angle, and the initial photographing position is a limit zero position;

[0063] S2, respectively, convert each non-zero pixel point in the to-be-identified image into polar coordinates to obtain a circle corresponding to each to-be-identified image;

[0064] S3, according to the center position of each circle and the sorting corresponding to each circle, determine the center position error corresponding to each circle, if the center position error is less than a first threshold, then the circle corresponding to the last sorting of the center position error is taken as a target circle, if the center position error is not less than the first threshold, then the initial shooting position is adjusted, and the to-be-identified image shot at different shooting angles is obtained at the adjusted shooting position, and steps S2 to S3 are repeated until the center position error is less than the first threshold;

[0065] S4, for each circle, according to the position coordinates of each pixel point corresponding to the circle and the shooting angle corresponding to the circle, determine the coordinate origin corresponding to each pixel point;

[0066] S5, according to each coordinate origin, determine a target coordinate origin, and according to the target coordinate origin and the shooting angle corresponding to the target coordinate origin, determine a target straight line;

[0067] S6, according to the target straight line and the target circle, determine the target position of the electric vehicle charging port.

[0068] The scheme of the present application is based on obtaining to-be-identified images shot at different shooting angles at an initial shooting position, and through determination of a target circle and a target straight line representing a charging port, the most effective position feature representing the charging port can be extracted, the complexity of identification is reduced, and the speed of feature positioning is faster.

[0069] The scheme of the present application will be further described below in combination with specific embodiments. First, a visual positioning system used to obtain to-be-identified images in the scheme of the present application is introduced, which can be specifically referred to as Figure 2 The visual positioning system includes a mechanical arm body 1, a charging port gun head 2 fixed at the end of the mechanical arm, the shaft center of a stepping motor 3 and the shaft center of the charging gun head are parallel and attached to the rear side of the gun head, a reducer 4 is connected with the stepping motor 3, a correction limit 5 is fixed outside the motor, a field of view rod 6 is vertically connected to the shaft center of the reducer, a camera 7 is connected to the other end of the field of view rod 6, the camera 7 and the field of view rod 6 rotate around the shaft center of the reducer 4, and the positions of 8, 9, …, n are the positions of the camera at different rotation angles. Among them, the above-mentioned stepping motor 3 can be a 42-step motor, and the above-mentioned reducer 4 can be a precision planetary gear reducer. Based on the rotation of the field of view rod 6, the camera 7 reaches different space detection positions, thereby increasing the field of view of camera detection and identification. The above-mentioned correction limit 5 is used for correction of the zero position identification positioning position after multiple camera 7 positioning, thereby improving the accuracy of identification positioning.

[0070] In this embodiment, based on the above visual positioning system, the method for identifying the charging port of the electric vehicle provided by this embodiment can include the following steps:

[0071] S1, for the charging port of the electric vehicle, obtaining the to-be-identified images taken at different shooting angles at the initial shooting position, and sorting each to-be-identified image according to the shooting angle from small to large, wherein the initial shooting position is the zero position.

[0072] Wherein, the different shooting angles are images of the charging port of the electric vehicle taken by the camera at different rotation angles of 8, 9, …, n, and the different rotation angles are achieved by the camera 7 through the mechanical arm 1 driving the charging gun head 2, the stepping motor 3, the reducer 4, the correction limit 5, and the field rod 6. Specifically, the stepping motor 3 drives the field rod 6 to rotate through the reducer 4, and the field rod 6 sends the camera 7 to different identification positions to achieve different rotation angles. Due to the different shooting angles, not all to-be-identified images may contain the charging port, some may not contain the charging port, and some may contain the charging port. Sorting each to-be-identified image according to the shooting angle from small to large facilitates subsequent processing of each to-be-identified image.

[0073] S2, respectively converting non-zero pixel points in each to-be-identified image into polar coordinates to obtain a circle corresponding to each to-be-identified image.

[0074] Wherein, since the shooting angles of each to-be-identified image are different, the circle corresponding to each to-be-identified image may be a circle or an ellipse.

[0075] Optionally, S2 can be realized by Hough circle, specifically:

[0076] For each to-be-identified image, the non-zero pixel points in the to-be-identified image are converted into polar coordinates by a first formula to obtain a circle corresponding to the to-be-identified image, wherein the first formula is:

[0077]

[0078] Wherein, (x, y) represents the coordinates of the non-zero pixel points in the to-be-identified image, θ represents the shooting angle corresponding to the to-be-identified image, r represents the radius corresponding to (x, y) in the polar coordinates, and (a, b) represents the coordinates of the center of the circle corresponding to (x, y) in the polar coordinates.

[0079] As an example, the obtained multiple images to be recognized are denoted as In, n is a positive integer greater than 1, the larger n is, the later the order is, and the larger the corresponding shooting angle is; in the n images to be recognized, the first image to be recognized corresponds to a first circle, and the nth image to be recognized corresponds to an nth circle. The center position of the first circle can be denoted as (x1, y1), and the center position of the second circle can be denoted as (x2, y2).

[0080] It should be noted that after obtaining each circle, considering that the distance between the camera and the charging port is too close or too far, which may affect the recognition result, the radius range can be set according to the actual scene, that is, when the radius of the circle corresponding to the image to be recognized is within the set radius range, the obtained circle has more reference value. As an example, the set radius range can be [120, 320]. In order to detect suitable circular features, the center distance of the detected circle is set to be infinite, excluding irrelevant interference. The circle accumulator is set to 100. Then the collected photos are detected.

[0081] S3, according to the center positions of the circles and the orders corresponding to the circles, determining the center position error corresponding to each circle, if the center position error is less than a first threshold, the circle corresponding to the last order of the center position error is taken as a target circle, if the center position error is not less than the first threshold, the initial shooting position is adjusted, and the images to be recognized taken at different shooting angles are obtained at the adjusted shooting position, steps S2 to S3 are repeated until the center position error is less than the first threshold;

[0082] Based on the above example, the center position error between the first circle and the second circle (also referred to as the center position error corresponding to the second time of obtaining the image to be recognized) can be denoted as The center position error between the first circle and the nth circle (also referred to as the center position error corresponding to the nth time of obtaining the image to be recognized) can be denoted as:

[0083]

[0084] The shooting angle corresponding to each time of obtaining the image to be recognized is different, the order corresponding to each circle in step S3 corresponds to the shooting angle of obtaining the image to be recognized, the smaller the shooting angle is, the smaller the corresponding order is. For example, the first circle in each circle corresponds to the image to be recognized corresponding to the shooting angle a, the second circle corresponds to the image to be recognized corresponding to the shooting angle b, and the shooting angle a is smaller than the shooting angle b.

[0085] ​​In the present example, it can be determined when to stop the acquisition of the to-be-identified images and determine the target circle based on a comparison result between the center position error and the first threshold value. When the center position error of the target circle is less than the first threshold value, it indicates that the center position of the circle corresponding to the to-be-identified image acquired in the current time is very close to the real center position of the charging port. Therefore, the shooting position corresponding to the to-be-identified image acquired in the current time is determined as the position corresponding to the target circle, and the circle corresponding to the last ranking corresponding to the center position error is determined as the target circle. For example, the center position error is the error corresponding to the third to-be-identified image, and the target circle is the circle corresponding to the third to-be-identified image.

[0086] It can be understood that for each to-be-identified image acquired, since the images are all captured in the same shooting position, the shooting positions of the to-be-identified images acquired in the same time are all the same, that is, the center positions of the circles corresponding to the to-be-identified images are all the same. Based on this, the center position of the target circle can be the shooting position corresponding to the center position error less than the first threshold value, and the target circle can be any one of the circles corresponding to the to-be-identified images acquired in the same time.

[0087] As an example, the target circle can refer to the circle a shown in FIG. 1. Figure 3

[0088] Optionally, in the present embodiment, it can also be determined when to stop the acquisition of the to-be-identified images through the executable degree. Specifically, the executable degree is determined according to the center position error and the number of times of acquiring the to-be-identified images, and the executable degree represents the error between the center position of the target circle and the real center position. The real center position refers to the center position of the circle where the charging port is located.

[0089] Specifically, the executable degree can be determined through the following formula:

[0090]

[0091] wherein Y represents the executable degree, m represents the center position error and the positioning number (the number of times of acquiring the to-be-identified images) adjustment factor, △Wn represents the center position error, a represents the number of invalid positioning times, and n represents the positioning number (the number of times of acquiring the to-be-identified images).

[0092] ​The first threshold value is the second threshold value, that is, the threshold value corresponding to the executable degree is the second threshold value. The first threshold value and the second threshold value can be the same or different, and can be adjusted based on actual requirements. If the center position error of the circle is less than the first threshold value, the circle corresponding to the last sorting corresponding to the center position error of the circle is taken as the target circle. If the center position error of the circle is not less than the first threshold value, the initial shooting position is adjusted, and the to-be-identified image shot at different shooting angles is obtained at the adjusted shooting position. Steps S2 to S3 are repeated until the center position error of the circle is less than the first threshold value, including:

[0093] If the executable degree is less than the second threshold value, the circle corresponding to the last sorting corresponding to the center position error of the circle is taken as the target circle. If the executable degree is not less than the second threshold value, the initial shooting position is adjusted, and the to-be-identified image shot at different shooting angles is obtained at the adjusted shooting position. Steps S2 to S3 are repeated until the executable degree is less than the second threshold value.

[0094] After the target circle is determined based on the above scheme, step S4 can be performed.

[0095] S4, for each circle, determining a coordinate origin corresponding to each pixel point according to the position coordinates of each pixel point corresponding to the circle and the shooting angle corresponding to the circle;

[0096] In the method, the coordinate origin corresponding to each pixel point in each circle can be determined by using a Hough line method, that is, the coordinates of the pixel point are converted into a polar coordinate form for representation. S4 specifically includes the following steps.

[0097] For each pixel point in each circle, the coordinate origin corresponding to the pixel point is determined according to the position coordinates of the pixel point and the shooting angle corresponding to the circle by using a second formula. The second formula is as follows.

[0098]

[0099] In the formula, (x, y) represents the position coordinates of a pixel point in a circle, θ represents the shooting angle corresponding to the circle, and p represents the coordinate origin corresponding to (x, y).

[0100] For each circle, an accumulator can be correspondingly set to ensure that each non-zero pixel point in the circle is converted into a corresponding coordinate origin.

[0101] S5, determining a target coordinate origin according to each coordinate origin, and determining a target straight line according to the target coordinate origin and the shooting angle corresponding to the target coordinate origin;

[0102] Optionally, one optional implementation of S5 is: performing normal distribution on each coordinate origin to obtain a corresponding normal distribution curve; determining a coordinate of a middle value of the normal distribution curve as a target coordinate origin; and determining a target straight line according to the target coordinate origin and a shooting angle corresponding to the target coordinate origin.

[0103] Based on the target coordinate origin and the shooting angle corresponding to the target coordinate origin, the target straight line can be determined, which is usually a straight line intersecting the target circle. For details, refer to the schematic diagram of the target straight line b shown in Figure 3

[0104] According to the actual scene, the line segment distance precision is set to 1 pixel point, the accumulator threshold parameter is 100, the minimum length is 20 pixel points, and the maximum fragmentation of the same straight line is 5 pixel points.

[0105] S6, determining a target position of the electric vehicle charging port according to the target straight line and the target circle.

[0106] After the target straight line and the target circle are determined, the specific position of the charging port in the camera coordinate system is known. In order to determine the target position of the charging port in the world coordinate system, the following steps can be performed: determining a target shooting angle according to the target circle and the target straight line, the target shooting angle being a shooting angle corresponding to the electric vehicle charging port in the image coordinate system; and determining a target position corresponding to the electric vehicle charging port in the world coordinate system according to the target shooting angle, the center position of the target circle and a preset first corresponding relationship, the first corresponding relationship being a conversion relationship between the shooting angle and the center position in the image coordinate system and the shooting angle and the center position in the world coordinate system.

[0107] The first corresponding relationship can also be referred to as a similar transmission relationship. As an example, for details, refer to the schematic diagram shown in Figure 4 c O is the camera coordinate system, O is the image physical coordinate system, O i is the image pixel coordinate, O w is the world coordinate system, and the point-dashed line axis is the optical axis. Here, O w is established at the intersection of the charging port rectangular region plane and the optical axis; O w and O c coordinate systems are consistent. It is assumed here that the charging port rectangular region plane is parallel to the camera imaging plane 0-xy. Figure 4 The closed figure composed of the large circle and the straight line on the right side in FIG. 8 is the charging port region in the three-dimensional world coordinate system, and the diameter D w of the circle is 210 mm.​​Figure 4 The closed figure composed of the left small circle and straight line in the middle is the projection of the charging port area on the camera imaging plane (camera coordinate system), the target point A is the center point of the charging port, and it is in the O w coordinate system, and the coordinate in the O i coordinate system is (u, v), and the coordinate in the O w coordinate system is (x, y). c The distance between the O z coordinate system and the O w coordinate system is D c . Because the O c coordinate system and the O z coordinate system have the same pose, the three-dimensional coordinate of the target point A in the O c coordinate system is (X, Y, D w ), that is, the positioning result, the target position of the charging port. According to the similar transmission relationship, the coordinate value of the target point A under the O i coordinate system can be derived, and the target point A is the charging port.

[0108] The above first correspondence relationship can be expressed by the following formula:

[0109]

[0110] Where (X, Y) is the actual space position of the target point relative to the camera, (x, y) is the position of the pixel point of the target point in the picture; L w represents the size of the target circle; L i represents the size of the pixel point occupied by the target circle, and f is the focal length of the camera. According to the above formula, the charging port position information of the positioning can be calculated, so as to guide the end of the robot to move to the camera focal length position, and provide guarantee for the precise positioning of the charging port.

[0111] Optionally, if the target circle is an incomplete circle, the method further comprises: determining the number of missing pixel points in the target circle; if the number of missing pixel points is greater than a set number, generating a fault information indicating that the current charging port has defects and cannot meet the charging demand, which has a safety risk. It can be understood that if the number of missing pixel points is not greater than the set number, it indicates that the missing part of the charging port does not affect normal charging, and the charging can be normally carried out.

[0112] Through the scheme of the application, a single camera can be used for large range positioning, the execution degree Y is introduced to reduce the misjudgment rate of camera positioning, improve the positioning accuracy, and reduce the plug-in accident rate. The application also proposes a way of fusing Hough circle and Hough line to recognize and position the charging port, extracts the most effective features, reduces the complexity of recognition, uses the similar transmission relationship to simplify the positioning difficulty, and makes the feature positioning faster.

[0113] based on the same principle as the method shown in Figure 1 Embodiments of the present application also provide an electric vehicle charging port identification device 20 based on the same principle as the method shown in Figure 5 The electric vehicle charging port identification device 20 can include an image acquisition module 210, a circle conversion module 220, a target circle determination module 230, a coordinate origin determination module 240, a target straight line determination module 250, and a target position determination module 260, as shown in

[0114] The image acquisition module 210 is configured to acquire a plurality of to-be-identified images of the electric vehicle charging port at different shooting angles at an initial shooting position, and each of the to-be-identified images is sorted in ascending order of the shooting angle, and the initial shooting position is a limit zero position.

[0115] The circle conversion module 220 is configured to convert each non-zero pixel point in each of the to-be-identified images into a polar coordinate to obtain a corresponding circle of each of the to-be-identified images.

[0116] The target circle determination module 230 is configured to determine a circle center position error of each of the circles according to the circle center position of each of the circles and the sorting corresponding to each of the circles, and if the circle center position error is less than a first threshold value, the circle corresponding to the last sorting corresponding to the circle center position error is determined as a target circle, and if the circle center position error is not less than the first threshold value, the initial shooting position is adjusted, and the to-be-identified images at different shooting angles are acquired at the adjusted shooting position to repeat the processing process of the circle conversion module to the target circle determination module until the circle center position error is less than the first threshold value.

[0117] The coordinate origin determination module 240 is configured to determine a coordinate origin corresponding to each pixel point according to the position coordinates of each pixel point corresponding to the circle and the shooting angle corresponding to the circle for each circle.

[0118] The target straight line determination module 250 is configured to determine a target coordinate origin according to each of the coordinate origins, and determine a target straight line according to the target coordinate origin and the shooting angle corresponding to the target coordinate origin.

[0119] The target position determination module 260 is configured to determine a target position of the electric vehicle charging port according to the target straight line and the target circle.

[0120] Optionally, the target position determination module 260 is specifically configured to:

[0121] According to the target circle and the target straight line, a target shooting angle is determined, the target shooting angle being a shooting angle corresponding to the electric vehicle charging port in an image coordinate system;

[0122] According to the target shooting angle, a center position of the target circle, and a preset first correspondence relationship, a target position corresponding to the electric vehicle charging port in a world coordinate system is determined, the first correspondence relationship being a conversion relationship between a shooting angle and a center position in the image coordinate system and a shooting angle and a center position in the world coordinate system.

[0123] Optionally, the circle conversion module 220 is specifically configured to, when converting each non-zero pixel point in each of the to-be-recognized images into a polar coordinate to obtain a circle corresponding to each of the to-be-recognized images:

[0124] For each of the to-be-recognized images, the non-zero pixel point in the to-be-recognized image is converted into a polar coordinate through a first formula to obtain a circle corresponding to the to-be-recognized image, where the first formula is:

[0125]

[0126] where (x, y) represents the coordinate of the non-zero pixel point in the to-be-recognized image, θ represents a shooting angle corresponding to the to-be-recognized image, r represents a radius corresponding to (x, y) in the polar coordinate, and (a, b) represents the coordinate of the center of the circle corresponding to (x, y) in the polar coordinate.

[0127] Optionally, for each circle, the coordinate origin determination module 240 is specifically configured to, when determining the coordinate origin corresponding to each pixel point according to the position coordinates of each pixel point corresponding to the circle and the shooting angle corresponding to the circle:

[0128] For each pixel point in each circle, the coordinate origin corresponding to the pixel point is determined through a second formula according to the position coordinates of the pixel point and the shooting angle corresponding to the circle, where the second formula is:

[0129]

[0130] where (x, y) represents the position coordinates of a pixel point in a circle, θ represents a shooting angle corresponding to the circle, and ρ represents the coordinate origin corresponding to (x, y).

[0131] Optionally, the target straight line determination module 250 is specifically configured to, when determining a target coordinate origin according to each coordinate origin and determining a target straight line according to the target coordinate origin and a shooting angle corresponding to the target coordinate origin:

[0132] Normal distribution is performed on each of the coordinate origins to obtain a corresponding normal distribution curve;

[0133] A coordinate of a middle value corresponding to the normal distribution curve is determined as a target coordinate origin;

[0134] A target straight line is determined according to the target coordinate origin and a shooting angle corresponding to the target coordinate origin.

[0135] Optionally, the apparatus further comprises:

[0136] An executable degree determination module is configured to determine an executable degree according to the circle center position error and a number of times of acquiring the to-be-recognized image, the executable degree representing an error between the target circle center position and the real circle center position;

[0137] The first threshold value is a second threshold value, and the target circle determination module 230 is configured to, if the circle center position error is less than the first threshold value, take a circle corresponding to a last sorting corresponding to the circle center position error as a target circle, and if the circle center position error is not less than the first threshold value, adjust the initial shooting position, acquire the to-be-recognized image shot at different shooting angles at the adjusted shooting position, and repeat the processing procedure of the circle conversion module to the target circle determination module until the circle center position error is less than the first threshold value, including:

[0138] If the executable degree is less than the second threshold value, the circle determination module 230 is configured to take a circle corresponding to a last sorting corresponding to the circle center position error as a target circle, and if the executable degree is not less than the second threshold value, the circle determination module 230 is configured to adjust the initial shooting position, acquire the to-be-recognized image shot at different shooting angles at the adjusted shooting position, and repeat the processing procedure of the circle conversion module to the target circle determination module until the executable degree is less than the second threshold value.

[0139] Optionally, if the target circle is an incomplete circle, the apparatus further comprises:

[0140] A fault information generation module is configured to determine a number of missing pixel points in the target circle, and generate fault information if the number of missing pixel points is greater than a set number.

[0141] The electric vehicle charging port identification apparatus can execute the electric vehicle charging port identification method provided by the embodiments of the present application, and the implementation principles are similar. The actions performed by each module and unit in the electric vehicle charging port identification apparatus in the embodiments of the present application correspond to the steps in the electric vehicle charging port identification method in the embodiments of the present application. The detailed functions of each module of the electric vehicle charging port identification apparatus can be found in the description of the corresponding electric vehicle charging port identification method in the foregoing description, and will not be described here.

[0142] The identification device of the electric vehicle charging port can be a computer program (including program code) running in a computer device, for example, the identification device of the electric vehicle charging port is an application software; the device can be used to execute the corresponding steps in the method provided by the embodiments of the present application.

[0143] In some embodiments, the identification device of the electric vehicle charging port provided by the embodiments of the present application can be implemented in a combination of software and hardware, for example, the identification device of the electric vehicle charging port provided by the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the identification method of the electric vehicle charging port provided by the embodiments of the present application, for example, the processor in the form of a hardware decoding processor can use one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs) or other electronic components.

[0144] In some other embodiments, the identification device of the electric vehicle charging port provided by the embodiments of the present application can be implemented in a software manner, Figure 5 The identification device of the electric vehicle charging port stored in the memory is shown, which can be software in the form of programs and plug-ins, and includes a series of modules, including an image acquisition module 210, a circle conversion module 220, a target circle determination module 230, a coordinate origin determination module 240, a target straight line determination module 250 and a target position determination module 260, for implementing the identification method of the electric vehicle charging port provided by the embodiments of the present application.

[0145] The modules described in the embodiments of the present application can be implemented in a software manner or in a hardware manner. Among them, the name of the module does not constitute a limitation of the module itself in some cases.

[0146] Based on the same principles as the method shown in the embodiments of the present application, the embodiments of the present application also provide an electronic device, which can include but is not limited to: a processor and a memory; the memory is used to store a computer program; the processor is used to execute the method shown in any embodiment of the present application by calling the computer program.

[0147] In an optional embodiment, an electronic device is provided, as shown in Figure 6 , Figure 6The electronic device 4000 shown includes a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, for example, via a bus 4002. Optionally, the electronic device 4000 can also include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception, etc. It should be noted that the transceiver 4004 is not limited to one in actual application, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present application.

[0148] The processor 4001 can be a CPU (Central Processing Unit, central processor), a general-purpose processor, a DSP (Digital Signal Processor, data signal processor), an ASIC (Application Specific Integrated Circuit, application specific integrated circuit), an FPGA (Field Programmable Gate Array, field programmable gate array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It can implement or execute various exemplary logical blocks, modules and circuits described in combination with the present disclosure. The processor 4001 can also be a combination of computing functions, such as one or more microprocessor combinations, combinations of DSP and microprocessor, etc.

[0149] The bus 4002 can include a channel for transmitting information between the above-mentioned components. The bus 4002 can be a PCI (Peripheral Component Interconnect, peripheral component interconnect) bus or an EISA (Extended Industry Standard Architecture, extended industry standard architecture) bus, etc. The bus 4002 can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience, Figure 6 Only one thick line is used in the figure, but it does not mean that there is only one bus or only one type of bus.

[0150] The memory 4003 can be a ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, a RAM (Random Access Memory) or other type of dynamic storage device that can store information and instructions, an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, a magnetic disk storage or other magnetic storage devices, or any other medium capable of storing desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto.

[0151] The memory 4003 is configured to store application code (computer program) for implementing the scheme of the present application, and the processor 4001 is configured to control the execution. The processor 4001 is configured to execute the application code stored in the memory 4003 to implement the content shown in the foregoing method embodiments.

[0152] The electronic device can also be a terminal device, Figure 6 The electronic device shown is only an example, and should not limit the functions and use range of the embodiments of the present application.

[0153] The embodiments of the present application provide a computer readable storage medium, and the computer readable storage medium stores a computer program. When the computer program runs on a computer, the computer can execute the corresponding content in the foregoing method embodiments.

[0154] According to another aspect of the present application, a computer program product or computer program is also provided, which includes computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to enable the computer device to perform the identification method of the electric vehicle charging port provided in the various implementation manners of the above embodiments.

[0155] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0156] It should be understood that the flowchart and block diagrams in the drawings illustrate the architecture, functionality, and operation of possible implementations of various embodiments of the present application. In this regard, each block in the flowchart and block diagrams can represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the block can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks can sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and / or flowchart illustrations, and combinations thereof, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or combinations of hardware and software.

[0157] The computer readable storage medium of the present application can be, for example but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, the computer readable storage medium can be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.

[0158] The computer readable storage medium described above bears one or more programs, when the one or more programs are executed by the electronic device, cause the electronic device to execute the method shown in the above embodiment.

[0159] The above description is merely the preferred embodiments of the present application and the explanation of the applied technical principles. It should be understood by those skilled in the art that the disclosed range of the present application is not limited to the technical solutions formed by the specific combinations of the above technical features, and should also cover other technical solutions formed by any combinations of the above technical features or their equivalent features without departing from the disclosed concept. For example, the technical solutions formed by the mutual replacement of the above features and the technical features disclosed in the present application (but not limited to) with similar functions.

Claims

1. A method for identifying the charging port of an electric vehicle, characterized in that, Includes the following steps: S1, for the electric vehicle charging port, acquire images to be identified from different shooting angles at the initial shooting position, and sort the images to be identified in ascending order of shooting angle, wherein the initial shooting position is the limit zero position; S2, convert the non-zero pixels in each of the images to be identified into polar coordinates to obtain the circle corresponding to each image to be identified; S3. Based on the center position of each circle and the sorting of each circle, determine the center position error of each circle. If the center position error is less than a first threshold, then take the circle corresponding to the last sorting of the center position error as the target circle. If the center position error is not less than the first threshold, then adjust the initial shooting position and obtain the image to be identified from different shooting angles at the adjusted shooting position. Repeat steps S2 to S3 until the center position error is less than the first threshold. S4. For each circle, determine the origin of each pixel's coordinates based on the position coordinates of each pixel corresponding to the circle and the shooting angle corresponding to the circle. S5. Determine the target coordinate origin based on each of the aforementioned coordinate origins, and determine the target straight line based on the target coordinate origin and the shooting angle corresponding to the target coordinate origin; S6, determine the target position of the electric vehicle charging port based on the target straight line and the target circle; The step of determining the target coordinate origin based on each of the aforementioned coordinate origins, and determining the target straight line based on the target coordinate origin and the shooting angle corresponding to the target coordinate origin, includes: By applying a normal distribution to each of the coordinate origins, the corresponding normal distribution curves are obtained; The coordinates of the median value corresponding to the normal distribution curve are determined as the origin of the target coordinate system. The target straight line is determined based on the target coordinate origin and the shooting angle corresponding to the target coordinate origin; Determining the target location of the electric vehicle charging port based on the target straight line and the target circle includes: The target shooting angle is determined based on the target circle and the target straight line. The target shooting angle is the shooting angle corresponding to the electric vehicle charging port in the image coordinate system. Based on the target shooting angle, the center position of the target circle, and a preset first correspondence, the target position of the electric vehicle charging port in the world coordinate system is determined. The first correspondence is the conversion relationship between the shooting angle and the center position in the image coordinate system and the shooting angle and the center position in the world coordinate system.

2. The method according to claim 1, characterized in that, The step of converting the non-zero pixels in each of the images to be identified into polar coordinates to obtain the circle corresponding to each image to be identified includes: For each image to be identified, the non-zero pixels in the image are converted to polar coordinates using a first formula to obtain the circle corresponding to the image. The first formula is: Where (x,y) represents the coordinates of a non-zero pixel in the image to be identified, θ represents the shooting angle of the image to be identified, r represents the radius of (x,y) in polar coordinates, and (a,b) represents the coordinates of the center of the circle corresponding to (x,y) in polar coordinates.

3. The method according to claim 1 or 2, characterized in that, For each circle, determining the origin of the coordinates for each pixel based on the position coordinates of each pixel and the shooting angle corresponding to the circle includes: For each pixel within each circle, the origin of the coordinates corresponding to the pixel is determined using a second formula based on the pixel's position coordinates and the corresponding shooting angle of the circle. The second formula is: Where (x,y) represents the position coordinates of a pixel in a circle, θ represents the shooting angle corresponding to the circle, and ρ represents the origin of the coordinate system corresponding to (x,y).

4. The method according to claim 1 or 2, characterized in that, The method further includes: The executability is determined based on the center position error and the number of times the image to be identified is acquired. The executability characterizes the error between the target center position and the true center position. The first threshold is the second threshold. If the center position error is less than the first threshold, the circle corresponding to the last sorted position of the center position error is taken as the target circle. If the center position error is not less than the first threshold, the initial shooting position is adjusted, and images to be identified are captured at different shooting angles at the adjusted shooting position. Steps S2 to S3 are repeated until the center position error is less than the first threshold, including: If the executability is less than the second threshold, the circle corresponding to the last sorted circle with the center position error is taken as the target circle. If the executability is not less than the second threshold, the initial shooting position is adjusted, and images to be identified are captured at different shooting angles at the adjusted shooting position. Steps S2 to S3 are repeated until the executability is less than the second threshold.

5. The method according to claim 1 or 2, characterized in that, If the target circle is an incomplete circle, the method further includes: Determine the number of missing pixels in the target circle; If the number of missing pixels exceeds the set number, a fault message will be generated.

6. A device for identifying the charging port of an electric vehicle, characterized in that, The device employing the electric vehicle charging port identification method according to claim 1 includes: The image acquisition module is used to acquire images to be identified from different shooting angles at the initial shooting position for the charging port of an electric vehicle. The images to be identified are sorted in ascending order of shooting angle, and the initial shooting position is the limit zero position. The circle conversion module is used to convert the non-zero pixels in each of the images to be identified into polar coordinates to obtain the circle corresponding to each image to be identified. The target circle determination module is used to determine the center position error of each circle according to the center position of each circle and the sorting of each circle. If the center position error is less than a first threshold, the circle corresponding to the last sorting of the center position error is taken as the target circle. If the center position error is not less than the first threshold, the initial shooting position is adjusted, and the process of the circle conversion module to the target circle determination module is repeated at the adjusted shooting position by acquiring images to be identified from different shooting angles until the center position error is less than the first threshold. The coordinate origin determination module is used to determine the coordinate origin of each pixel for each circle based on the position coordinates of each pixel corresponding to the circle and the shooting angle corresponding to the circle. The target line determination module is used to determine the target coordinate origin based on each of the aforementioned coordinate origins, and to determine the target line based on the target coordinate origin and the shooting angle corresponding to the target coordinate origin. The target location determination module is used to determine the target location of the electric vehicle charging port based on the target straight line and the target circle.

7. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method of any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 1-5.

Citation Information

Patent Citations

  • Light supplementing method and terminal equipment

    CN109561258A

  • Robot recharging localization method and robot using the same

    US20210055739A1