## 1 Introduction  
The rapid development of new energy vehicles in the context of carbon peak and neutrality goals provides a new opportunity for the electric vehicle charging facility industry. With the increasing number of electric vehicles, the charging facilities for electric vehicles (EV) are gradually improving [1]. At present, processes of EV charging, such as charging port docking and charging time control of electric vehicles in the charging station, need to be completed manually; a large number of complex damage problems to the charging port caused by improper operation. At the same time, in view of the long-term exposure of the charging pile to the outdoors, it is inevitable that the insulation will be damaged due to aging, and there is a potential electric shock safety hazard of manual operation. With the advent of the era of intelligence, electric vehicle users will inevitably pay more attention to the intelligent and humanized experience of services [2, 3, 4]. Therefore, there is great value in studying the generalized automatic identification scheme of charging parts based on image recognition and to further design the automatic charging control system.  
In recent years, a large number of studies related to automatic charging have been carried out. For example, Tesla has developed a serpentine high-degree-of-freedom charging machinery and equipment, but it is limited to the range of motion of the mechanical structure, which has high requirements related to the parking position of the vehicle, and is only suitable for Tesla models [5]. The E-Smart Connect system developed by Volkswagen in Germany uses sensors to trigger cameras to locate vehicles and interfaces, and the system controls the KUKA robot for charging [6]. [PERSON] designed a robot-based electric vehicle charging system, which used binocular vision sensors to locate the coordinates of the charging port to drive the robotic arm, but did not conduct high-precision target positioning and experimental research under fuzzy light sources [7]. [PERSON] from Hunan University applied machine vision to detect and locate charging ports, but did not obtain the pose in three-dimensional space, and only consider the case of round holes [8]. [PERSON] studied the charging port identification and pose detection methods of electric vehicles under multiple disturbance factors, using monocular visual identification; although it is economical, it is not able to accurately obtain depth information [9].  
High-precision identification and positioning algorithms are the top priority for automatic charging of electric vehicles, and an important prerequisite for ensuring the docking of charging devices. This paper proposes a high-precision charging port identification and positioning method suitable for different light intensities, backgrounds, and charging ports of any shape. First, the SIFT feature extraction algorithm is presented with the Gaussian difference pyramid being generated to construct the scale space. Then, the FLANN matching algorithm is utilized to obtain a high-precision mapping set of matching points. Second, in the process of binocular ranging, the SGBM (semi-global block matching) algorithm is used to calculate the parallax. This algorithm can calculate the parallax of the left and right camera images, so as to calculate the depth of the charging port more accurately. In order to verify the effectiveness of the proposed method, image identification and binocular ranging experiments were carried out, respectively, and high-precision matching and ranging results were obtained.