WO2021037086A1 - 定位方法及装置 - Google Patents

定位方法及装置 Download PDF

Info

Publication number
WO2021037086A1
WO2021037086A1 PCT/CN2020/111505 CN2020111505W WO2021037086A1 WO 2021037086 A1 WO2021037086 A1 WO 2021037086A1 CN 2020111505 W CN2020111505 W CN 2020111505W WO 2021037086 A1 WO2021037086 A1 WO 2021037086A1
Authority
WO
WIPO (PCT)
Prior art keywords
camera
target
coordinates
image
parameters
Prior art date
Application number
PCT/CN2020/111505
Other languages
English (en)
French (fr)
Inventor
滕艺丹
周凯
张竞
李青之
宁伟康
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP20858497.9A priority Critical patent/EP4016457A4/en
Publication of WO2021037086A1 publication Critical patent/WO2021037086A1/zh
Priority to US17/680,923 priority patent/US20220277478A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • G06T7/74Determining position or orientation of objects or cameras using feature-based methods involving reference images or patches
    • G06T3/10
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/24Aligning, centring, orientation detection or correction of the image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30244Camera pose
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30248Vehicle exterior or interior
    • G06T2207/30252Vehicle exterior; Vicinity of vehicle
    • G06T2207/30264Parking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/07Target detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/08Detecting or categorising vehicles

Definitions

  • This application relates to the field of positioning technology, in particular to positioning methods and devices.
  • the AVP scenario is to initiate a parking request through the mobile terminal, establish a link between the vehicle positioning device and the vehicle, and complete operations such as driving from the location of the vehicle to the parking space when the vehicle initiates the parking request from the mobile terminal.
  • the positioning of targets such as vehicles and people is a key technology.
  • the methods for locating targets such as vehicles and people are as follows: Install a global navigation satellite system (GNSS) or global positioning system (GPS) on the end of the vehicle or terminal equipment carried by people. , Use GNSS or GPS to locate targets such as vehicles and people on the terminal equipment carried by the car or people.
  • GNSS global navigation satellite system
  • GPS global positioning system
  • the positioning accuracy of GNSS or GPS is not high in itself and is easily affected by obstructions. Therefore, the positioning effect in indoor or underground environments will be significantly reduced.
  • the embodiments of the present application provide a positioning method and device, which are not easily affected by obstructions during the positioning process, and the positioning accuracy is high.
  • an embodiment of the present application provides a positioning method.
  • the method includes: obtaining estimated external parameters of a camera and internal parameters of the camera, wherein the estimated external parameters of the camera are based on a plurality of estimated points in the shooting area of the camera. Obtained from the world coordinates, the image coordinates of the multiple estimated points, and the internal parameters of the camera; Obtain the image coordinates of the target in the image taken by the camera; Obtain the image coordinates of the target according to the estimated external parameters of the camera, the internal parameters of the camera, and the target The world coordinate of the target.
  • the technical solution provided by the above first aspect can obtain the estimated external parameters of the camera, the internal parameters of the camera, and the image coordinates of the target in the image taken by the camera, and obtain the target's image coordinates according to the estimated external parameters of the camera, the internal parameters of the camera, and the image coordinates of the target.
  • World coordinates so as to realize the positioning of the target, and it is not easy to be affected by obstructions during the positioning process, and the positioning accuracy is high.
  • the method further includes: acquiring image information of the target; querying the characteristic parameters of the vehicle according to the image information of the target; Obtaining the world coordinates of the target from the estimated external parameters of the camera, the internal parameters of the camera, and the image coordinates of the target includes: obtaining the physical transformation matrix corresponding to the estimated external parameters of the camera according to the estimated external parameters of the camera; obtaining the physical transformation matrix corresponding to the estimated external parameters of the camera according to the internal parameters of the camera The internal parameter matrix of the camera; the image coordinates of the target, the physical transformation matrix corresponding to the estimated external parameters of the camera, and the internal parameter matrix of the camera to perform coordinate transformation to obtain the first world coordinates; according to the characteristic parameters of the vehicle, the height of the camera, and the camera The position of and the first world coordinates to get the world coordinates of the target.
  • the characteristic parameters of the vehicle can be queried according to the image information of the target, and the image coordinates of the target can be compared with the physical transformation matrix corresponding to the estimated external parameters of the camera and the camera Carry out coordinate transformation on the internal parameter matrix to obtain the first world coordinates. Then, according to the characteristic parameters of the vehicle, the height of the camera, the position of the camera, and the first world coordinates, the world coordinates of the target are obtained, so as to locate the vehicle.
  • the image coordinates of the target are obtained through the image processing method, and then the world coordinates of the target are calculated by mathematical formulas, which are not easily affected by obstructions, so the positioning accuracy is high.
  • the image coordinates of the target are the characteristic pixels of the target in the image taken by the camera The coordinates of the point.
  • the world coordinates of the target can be obtained according to the estimated external parameters of the camera, the internal parameters of the camera, and the coordinates of the characteristic pixel points of the target in the image taken by the camera, thereby Realize the positioning of the target, and it is not easy to be affected by obstructions during the positioning process, and the positioning accuracy is high.
  • obtaining the world coordinates of the target according to the estimated external parameters of the camera, the internal parameters of the camera, and the image coordinates of the target includes: The estimated external parameters of the camera obtain the physical transformation matrix corresponding to the estimated external parameters of the camera; the internal parameter matrix of the camera is obtained according to the internal parameters of the camera; the image coordinates of the target, the physical transformation matrix corresponding to the estimated external parameters of the camera, and the camera Coordinate transformation is performed on the internal parameter matrix of, and the world coordinates of the target are obtained.
  • the image coordinates of the target can be coordinate transformed to obtain the world coordinates of the target , So as to locate the target.
  • the image coordinates of the target are first obtained through the image processing method, and then the world coordinates of the target are calculated by mathematical formulas, which are not easily affected by obstructions, so the positioning accuracy is high.
  • the image coordinates of the target are the distance between the target and the ground in the image captured by the camera.
  • the coordinates of the contact point are the distance between the target and the ground in the image captured by the camera.
  • the world coordinates of the target can be obtained according to the estimated external parameters of the camera, the internal parameters of the camera, and the coordinates of the contact point between the target and the ground in the image captured by the camera. In this way, the positioning of the target is realized, and it is not easily affected by obstructions during the positioning process, and the positioning accuracy is high.
  • the distance between the world coordinates of the two deviations to obtain the positioning accuracy of the target Based on the fifth possible implementation of the first aspect, the world coordinates of the first deviation can be obtained according to the estimated external parameters of the camera, the internal parameters of the camera, and the image coordinates of the first deviation, and the world coordinates of the first deviation can be obtained according to the estimated external parameters of the camera and the internal parameters of the camera. And the image coordinates of the second deviation to obtain the world coordinates of the second deviation, and then calculate the distance between the world coordinates of the first deviation and the world coordinates of the second deviation to obtain the positioning accuracy of the target, so that the vehicle or person can be more accurate Positioning.
  • the method further includes: obtaining the world coordinates of the special visual mark in the camera shooting area, wherein the special visual mark Located between the first coordinate and the second coordinate of the shooting area of the camera, the first coordinate is the coordinate of the position of the maximum value of the near point distance of the field of view of the camera, and the second coordinate is the far point of the field of view of the camera
  • the coordinates of the location of the minimum distance obtain the world coordinates of multiple estimated points in the shooting area according to the world coordinates of the special visual mark; obtain the image coordinates of the special visual mark in the camera shooting area; according to the special visual mark
  • the image coordinates of the multiple estimated points in the shooting area are obtained; the estimated external parameters of the camera are obtained according to the world coordinates of the multiple estimated points, the image coordinates of the multiple estimated points, and the internal parameters of the camera.
  • the world coordinates of the special visual mark in the camera shooting area can be obtained, and the world coordinates of multiple estimated points in the shooting area can be obtained according to the world coordinates of the special visual mark, and the camera can be obtained According to the image coordinates of the special visual signs in the shooting area, the image coordinates of multiple estimated points in the shooting area are obtained according to the image coordinates of the special visual signs, and then according to the world coordinates of the multiple estimated points, the image coordinates of the multiple estimated points, and the camera's
  • the internal parameters obtain the estimated external parameters of the camera, so as to subsequently locate the target according to the estimated external parameters of the camera, the internal parameters of the camera, and the image coordinates of the target.
  • an embodiment of the present application provides a positioning method.
  • the method includes: acquiring the initial external parameters of the camera and the internal parameters of the camera; and determining the special visual identifier in the parking lot according to the initial external parameters of the camera and the internal parameters of the camera Where the special visual mark is used to locate the target in the shooting area of the camera.
  • the technical solution provided by the second aspect mentioned above can obtain the initial external parameters of the camera and the internal parameters of the camera, and determine the position of the special visual sign in the parking lot according to the initial external parameters of the camera and the internal parameters of the camera, so that the number of special visual signs can be determined subsequently according to the special visual sign.
  • the world coordinates of the estimated points and the image coordinates of the multiple estimated points so as to obtain the estimated external parameters of the camera according to the world coordinates of the multiple estimated points, the image coordinates of the multiple estimated points, and the internal parameters of the camera.
  • Estimate the external parameters, the internal parameters of the camera and the image coordinates of the target to locate the target.
  • the initial external parameters of the camera include: the position of the camera, the height of the camera, and the pitch angle of the camera.
  • the position of the camera, the height of the camera, the elevation angle of the camera, and the internal parameters of the camera can be obtained, and determined according to the position of the camera, the height of the camera, the elevation angle of the camera, and the internal parameters of the camera.
  • the coordinates and the internal parameters of the camera obtain the estimated external parameters of the camera, and the target can be located according to the estimated external parameters of the camera, the internal parameters of the camera, and the image coordinates of the target.
  • an embodiment of the present application provides a positioning device that has the method and function described in the second aspect.
  • This function can be realized by hardware, or by hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the above-mentioned functions.
  • an embodiment of the present application provides a positioning device, including: at least one processor and at least one memory, the at least one memory is coupled with the at least one processor; the at least one memory is used to store a computer program so that the When the computer program is executed by the at least one processor, the positioning method as described in the first aspect and various possible implementation manners thereof is implemented.
  • the positioning device further includes a communication interface coupled with the at least one processor; the positioning device communicates with other devices through the communication interface.
  • the present application provides a system chip that can be used in a positioning device.
  • the system chip includes: at least one processor, and related program instructions are executed in the at least one processor to achieve the following On the one hand and its various possible implementations described in the positioning method.
  • the system chip may further include at least one memory, and the memory stores related program instructions.
  • embodiments of the present application provide a computer-readable storage medium, such as a computer-readable storage medium that is non-transitory.
  • a computer program is stored thereon, and when the computer program runs on the computer, the computer is caused to execute any one of the possible methods of the first aspect described above.
  • the computer may be at least one storage node.
  • an embodiment of the present application provides a computer-readable storage medium, such as a non-transitory computer-readable storage medium.
  • a computer program is stored thereon, and when the computer program runs on the computer, the computer is caused to execute any one of the possible methods of the second aspect described above.
  • the computer may be at least one storage node.
  • an embodiment of the present application provides a computer program product, which when it runs on a computer, enables any method provided in the first aspect to be executed.
  • the computer may be at least one storage node.
  • the embodiments of the present application provide a computer program product, which when running on a computer, enables any method provided in the second aspect to be executed.
  • the computer may be at least one storage node.
  • any of the positioning devices, system chips, computer storage media, or computer program products provided above are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the corresponding The beneficial effects of the method will not be repeated here.
  • FIG. 1 is a schematic diagram of a positioning method provided by an embodiment of the application
  • Figure 2 is a schematic diagram of a parking lot provided by an embodiment of the application.
  • FIG. 3 is a schematic diagram of a visual mark provided by an embodiment of the application.
  • FIG. 4 is a schematic diagram of a camera shooting area provided by an embodiment of the application.
  • FIG. 5 is a schematic diagram of the deployment of a special visual sign provided by an embodiment of the application.
  • FIG. 6 is a schematic diagram of the architecture of a positioning system provided by an embodiment of the application.
  • FIG. 13 is a first structural diagram of a positioning device provided by an embodiment of this application.
  • the image coordinate system (image coordinate) is a coordinate system established on the image captured by the camera with the center of the image captured by the camera as the origin, and the image coordinate system is a two-dimensional coordinate system.
  • the image coordinate system information includes the image coordinates of a point in the image coordinate system.
  • Cameras can include traditional cameras and smart cameras.
  • Traditional cameras are cameras with only camera capabilities.
  • smart cameras also have image processing and artificial intelligence algorithm functions.
  • the camera can store internal parameters of the camera, for example, the field of vision (FOV) and focal length of the camera.
  • FOV field of vision
  • the smart camera can use image processing methods to extract the image coordinates of multiple estimated points in the image taken by the smart camera.
  • the smart camera can also use artificial intelligence algorithms to detect whether there is a target in the image taken by the smart camera (for example: vehicles, people or animals, etc.) ).
  • the map layer stores the world coordinates of the visual mark in the shooting area 302 of the camera 1 in Figure 3, and the initial external parameters of the camera 1 recorded when the camera 1 is installed (for example: the position of the camera 1, the optical center height of the camera 1 G , And the elevation angle ⁇ of camera 1), the world coordinates of the visual mark in the shooting area 309 of camera 2, the initial external parameters of camera 2 recorded when camera 2 is installed (for example: the position of camera 2, the optical center height of camera 2 G , And the pitch angle ⁇ of camera 2).
  • Visual signs can be signs such as lanes, parking spaces, and pillars.
  • Figure 4 is a schematic diagram of a visual sign.
  • there are three visual signs on the road 410 which are a general visual sign 411, a special visual sign 412, and a general visual sign 413, among which, the general visual sign 411, the special visual sign 412, and the general visual sign 413
  • the colors of are all white, and the width of the special visual mark 412 is larger than that of the general visual mark 411 and the general visual mark 413.
  • the position of the camera is the position where the camera is installed in the parking lot (for example, the world coordinate after the camera is installed).
  • the height of the camera may be the height of the optical center of the camera, and the height of the optical center of the camera is the height of the optical center of the camera from the ground.
  • the pitch angle of the camera is the angle between the center beam of the camera and the ground.
  • Step 2 Determine the location of the special visual sign in the parking lot according to the initial external parameters of the camera and the internal parameters of the camera.
  • mode 2 may include step A-step B.
  • the positioning system shown in (a) of FIG. 6 includes an edge device 610, a vehicle 620, and a smart camera 630.
  • the edge device 610 may be an edge device deployed during the parking lot initialization process
  • the smart camera 630 may be a smart camera deployed during the parking lot initialization process.
  • the smart camera 630 communicates with the vehicle 620 to provide services for the vehicle 620.
  • the smart camera 630 may send the world coordinates of the vehicle 620 to the vehicle 620 after locating the vehicle 620, so that the vehicle 620 knows its position on the electronic map.
  • the positioning system shown in (a) in FIG. 6 is only used as an example, and is not used to limit the technical solution of the present application. Those skilled in the art should understand that in a specific implementation process, the positioning system may also include other devices, and the number of edge devices, smart cameras, and vehicles may also be determined according to specific needs.
  • the positioning system shown in (b) of FIG. 6 includes an edge device 640, a vehicle 650, an edge computing device 660, a traditional camera 670, and a traditional camera 680.
  • the edge computing device 660 may be an edge computing device deployed during the parking lot initialization process, and the traditional camera 670 and the traditional camera 680 may be traditional cameras deployed during the parking lot initialization process.
  • the edge computing device 660 is a processor chip in an intelligent transportation edge computing box (intelligent transportation edge server, ITE server).
  • the edge device 640 stores the electronic map of the parking lot.
  • the map layer of the electronic map stores the world coordinates of the visual mark in the shooting area of the traditional camera 670 and the world coordinates of the visual mark in the shooting area of the traditional camera 680.
  • the map layer of the electronic map stores the world coordinates of the visual mark in the shooting area of the traditional camera 670, the world coordinates of the visual mark in the shooting area of the traditional camera 680, the initial external parameters of the traditional camera 670, and the initial external parameters of the traditional camera 680. External reference.
  • first special visual mark and the second special visual mark may be the same or different.
  • the traditional camera 680 can send the image of the shooting area of the traditional camera 680 to the edge device 640, so that the edge device 640 sends the image of the shooting area of the traditional camera 680 to the edge computing device 660, or the traditional camera 680 can send the image of the traditional camera 680 to the edge computing device 660.
  • the image of the shooting area is directly sent to the edge computing device 660, and the edge computing device 660 can locate the target in the shooting area of the traditional camera 680 according to the image of the shooting area of the traditional camera 680.
  • the edge device 640 can communicate with the vehicle 650 and the edge computing device 660 to provide services for the vehicle 640 and the edge computing device 660.
  • the edge device 640 may send to the edge computing device 660 the world coordinates of the visual mark in the shooting area of the traditional camera 670, so that the edge computing device 660 estimates the estimation of the traditional camera 670 based on the world coordinates of the visual mark in the shooting area of the traditional camera 670 External reference.
  • the edge computing device 660 may send the world coordinates of the vehicle 650 to the edge device 640 after positioning the vehicle 650, and the edge device 640 may send the world coordinates of the vehicle 650 to the vehicle 650 after receiving the world coordinates of the vehicle 650. .
  • the edge computing device 660 communicates with the vehicle 650 to provide services for the vehicle 650.
  • the edge computing device 660 may send the world coordinates of the vehicle 650 to the vehicle 650 after positioning the vehicle 650.
  • the positioning system shown in (b) in FIG. 6 is only used as an example, and is not used to limit the technical solution of the present application. Those skilled in the art should understand that in a specific implementation process, the positioning system may also include other devices, and the number of edge devices, edge computing devices, traditional cameras, and vehicles may also be determined according to specific needs.
  • the smart camera 630 or the edge computing device 660 in FIG. 6 in the embodiment of the present application may be a functional module in a device.
  • the above functions can be network elements in hardware devices, such as communication chips in mobile phones, software functions running on dedicated hardware, or virtual virtual machines instantiated on platforms (for example, cloud platforms). ⁇ function.
  • FIG. 7 shows a schematic diagram of the hardware structure of a hardware device applicable to the embodiments of the present application.
  • the hardware device 700 includes at least one processor 701, a communication line 702, and a memory 703.
  • the processor 701 may be a graphics processing unit (GPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of the program of this application. Circuit.
  • GPU graphics processing unit
  • ASIC application-specific integrated circuit
  • the communication line 702 may include a path for transferring information between the above-mentioned components, such as a bus.
  • the memory 703 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (RAM), or other types that can store information and instructions
  • the dynamic storage device can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disk storage, optical disc storage (Including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program codes in the form of instructions or data structures and can be used by a computer Any other media accessed, but not limited to this.
  • the memory may exist independently, and is connected to the processor through the communication line 702.
  • the memory can also be integrated with the processor.
  • the memory provided by the embodiments of the present application may generally be non-volatile.
  • the memory 703 is used to store and execute the computer-executed instructions involved in the solution of the present application, and the processor 701 controls the execution.
  • the processor 701 is configured to execute computer-executable instructions stored in the memory 703, so as to implement the method provided in the embodiment of the present application.
  • the image coordinates of the target may be the coordinates of the characteristic pixel points of the target in the image captured by the camera; if the target is not a vehicle, the image coordinates of the target may be the contact point between the target and the ground in the image captured by the camera coordinate of.
  • the characteristic pixel of the target is the pixel corresponding to the characteristic parameter of the target.
  • the acquired feature parameter of the target can be the height of the car head from the ground; if the target feature pixel is a car rear feature pixel, the acquired feature parameter of the target can be It is the height from the rear of the vehicle to the ground; if the characteristic pixel of the target is a characteristic pixel of the license plate, then the characteristic parameter of the target obtained is the height of the edge of the license plate from the ground.
  • Fig. 9 is a schematic diagram of an image taken by a camera.
  • point A is the characteristic pixel point of the front of the vehicle 901 in the image taken by the camera. If the characteristic parameter of the target is the height of the front of the vehicle from the ground, the image coordinates of point A can be used as the image of the vehicle 901 Coordinates;
  • C point is any point in the contact area between the person 902 and the ground 903 in the image taken by the camera in the image taken by the camera, and the image coordinates of the point C can be taken as the image coordinates of the person 902.
  • the extracted image area may include a target to be located.
  • step 803 the world coordinates of the target are updated to the electronic map, or the world map of the target is sent to a moving vehicle.
  • the edge device After receiving the world coordinates of the target, the edge device can store the world coordinates of the target in the MAP layer.
  • Another possible implementation manner is to send the world map of the target to the moving vehicle, including: sending the world map of the target to the edge device, so that the edge device sends the target to the moving vehicle after receiving the world map of the target World map.
  • the image coordinates of the vehicle or person are transformed into the world coordinates of the vehicle or person, thereby positioning the vehicle or person with high positioning accuracy.
  • the method shown in FIG. 8 further includes: acquiring image information of the target; querying the characteristic parameters of the vehicle according to the image information of the target; Obtaining the world coordinates of the target by the estimated external parameters of the camera, the internal parameters of the camera, and the image coordinates of the target includes: obtaining the physical transformation matrix corresponding to the estimated external parameters of the camera according to the estimated external parameters of the camera; obtaining the internal parameter matrix of the camera according to the internal parameters of the camera; The image coordinates of the target are transformed with the physical transformation matrix corresponding to the estimated external parameters of the camera and the internal parameter matrix of the camera to obtain the first world coordinates; the target is obtained according to the characteristic parameters of the vehicle, the height of the camera, the position of the camera and the first world coordinates World coordinates.
  • the height of the camera may be the height of the optical center of the camera, the position of the camera may be the world coordinates of the camera, and the position of the camera on the electronic map.
  • the height of the camera and the position of the camera can be stored in the edge device, so the height of the camera and the position of the camera can be obtained from the edge device.
  • the ID of the camera is sent to the edge device, and the edge device sends the height of the camera corresponding to the camera ID and the position of the camera according to the ID of the camera.
  • the image information of the target may include the image area of the target, and the image information of the target may include the pixel points of the target and the color information of the pixel points of the target.
  • querying the characteristic parameters of the vehicle based on the image information of the target includes: querying the target model, and/or car model, and/or license plate category based on the target image information, and/or according to the target model, and/or, Car model, and/or license plate category query the characteristic parameters of the vehicle.
  • the characteristic parameters of the model B car of brand A can be queried (for example, the height of the front of the car from the ground).
  • the physical transformation matrix corresponding to the estimated external parameter of the camera may be sW, that is, the physical transformation matrix corresponding to the estimated external parameter of the camera is the product of the scale factor and the physical transformation matrix of the external parameter of the camera.
  • updating the positioning accuracy of the target to the electronic map includes: sending the positioning accuracy of the target to the edge device.
  • sending the positioning accuracy of the target to the moving vehicle includes: sending the positioning accuracy of the target to the edge device, so that after receiving the positioning accuracy of the target, the edge device sends the positioning accuracy of the target to the moving vehicle. positioning accuracy.
  • the method shown in FIG. 8 further includes: obtaining the world coordinates of the special visual mark in the shooting area of the camera; and obtaining the shooting according to the world coordinates of the special visual mark
  • the image coordinates of multiple estimated points and the internal parameters of the camera obtain the estimated external parameters of the camera.
  • the first coordinate is the coordinate of the position of the maximum value of the near point distance of the camera's field of view
  • the second coordinate is the coordinate of the position of the minimum value of the far point distance of the camera's field of view.
  • the special visual mark is a lane-dividing line, which is different from the lane-dividing line around the lane-dividing line.
  • obtaining the world coordinates of the special visual mark in the camera shooting area includes: sending the ID of the camera to the edge device; receiving the world coordinates of the visual mark in the camera shooting area from the edge device; according to the special visual mark in the camera shooting area ID obtains the world coordinates of the special visual identifier in the camera's shooting area.
  • the specific process of obtaining the world coordinates of the special visual identifier in the shooting area 302 of the camera 1 is introduced.
  • the shooting area of the camera 1 is the area 302
  • the area 302 includes 4 visual signs, which are a general visual sign 303, a special visual sign 304, a general visual sign 305, and a general visual sign 306, respectively.
  • the ID of the camera (for example, camera 1) can be sent to the edge device, and the edge device can send the ID of the visual identifier in the area 302 of the camera 1 and the world coordinates of the visual identifier corresponding to the ID of the visual identifier (for example, the general visual identifier 303).
  • the world coordinates of the general visual identity 303, the ID of the special visual identity 304, the world coordinates of the special visual identity 304, the ID of the general visual identity 305, the world coordinates of the general visual identity 305, the ID of the general visual identity 306, and the general visual identity 306) After receiving the ID of the visual identifier in the area 302 and the world coordinate of the visual identifier corresponding to the ID of the visual identifier sent by the edge device, the world coordinate of the special visual identifier can be obtained according to the ID of the special visual identifier.
  • the general visual sign near the special visual sign 304 includes The general visual sign 303 and the general visual sign 305, assuming that the world coordinates of the general visual sign 303 are finally determined, the world coordinates of the four corners of the special visual sign 304 and the world coordinates of the four corners of the general visual sign 303 are taken as multiple Estimate the world coordinates of the point.
  • the world coordinates of multiple general visual marks can be obtained according to the world coordinates of the special visual mark, and according to The world coordinates of a plurality of general visual signs acquire the world coordinates of a plurality of estimated points, where the plurality of estimated points may include points at the four corners of each general visual sign.
  • the general visual sign near the special visual sign 304 includes The general visual sign 303 and the general visual sign 305, assuming that the image coordinates of the general visual sign 303 are finally determined, the image coordinates of the four corners of the special visual sign 304 and the image coordinates of the four corners of the general visual sign 303 are taken as multiple Estimate the image coordinates of the point.
  • the image coordinates of the general visual sign near the special visual sign can be obtained, and the distance special visual sign can also be obtained
  • the distance of is the image coordinates of the general visual sign at the preset distance, and is not limited.
  • the number of multiple estimated points is greater than or equal to 8.
  • obtaining the estimated external parameters of the camera according to the world coordinates of the multiple estimated points, the image coordinates of the multiple estimated points, and the internal parameters of the camera may include: obtaining the internal parameter matrix of the camera according to the internal parameters of the camera; according to the world coordinates of the multiple estimated points , The image coordinates of multiple estimated points and the internal parameter matrix of the camera are obtained, and the physical transformation matrix corresponding to the estimated external parameters of the camera is obtained as an unknown number, and the physical transformation matrix corresponding to the estimated external parameters of the camera is obtained by solving the equation set; according to the camera The physical transformation matrix corresponding to the estimated external parameters of, obtains the estimated external parameters of the camera.
  • the specific process of obtaining the estimated external parameters of the camera according to the world coordinates of the multiple estimated points, the image coordinates of the multiple estimated points, and the internal parameters of the camera can refer to the description in the fifth implementation scenario of the method shown in FIG. 8 below.
  • the estimated external parameters of the camera are sent to the edge device, so as to subsequently locate the target according to the estimated external parameters of the camera, the internal parameters of the camera, and the image coordinates of the target.
  • the world coordinates of the special visual mark in the camera shooting area obtain the world coordinates of multiple estimated points in the shooting area according to the world coordinates of the special visual mark; obtain the camera The image coordinates of the special visual sign in the shooting area; according to the image coordinates of the special visual sign, the image coordinates of multiple estimated points in the shooting area are obtained; according to the world coordinates of multiple estimated points, the image coordinates of multiple estimated points, and the internal parameters of the camera Get the estimated external parameters of the camera.
  • the estimated external parameters of the camera are obtained according to the world coordinates of the multiple estimated points, the image coordinates of the multiple estimated points, and the internal parameters of the camera, including: according to the camera The internal parameters of the camera are obtained by the camera's internal parameter matrix; according to the world coordinates of multiple estimated points, the image coordinates of multiple estimated points, and the camera's internal parameter matrix, a system of equations with the unknown physical transformation matrix corresponding to the estimated external parameters of the camera is obtained.
  • the system of equations obtains the physical transformation matrix corresponding to the estimated external parameters of the camera; the estimated external parameters of the camera are obtained according to the physical transformation matrix corresponding to the estimated external parameters of the camera.
  • the camera's internal parameter matrix can be obtained according to the camera's internal parameters, and the camera's internal parameter matrix can be obtained based on the world coordinates of multiple estimated points, the image coordinates of multiple estimated points, and the camera's internal parameter matrix.
  • the physical transformation matrix corresponding to the estimated external parameter is an equation set of unknown numbers, and the physical transformation matrix corresponding to the estimated external parameter of the camera is obtained by solving the equation set.
  • the estimated external parameter of the camera is obtained according to the physical transformation matrix corresponding to the estimated external parameter of the camera. In order to subsequently locate the target according to the estimated external parameters of the camera, the internal parameters of the camera, and the image coordinates of the target.
  • the positioning method shown in FIG. 8 can be applied to the smart camera 630 or the edge computing device 660 shown in FIG. 6.
  • the application of the positioning method shown in FIG. 8 to the smart camera 630 or the edge computing device 660 shown in FIG. 6 will be introduced.
  • Step 1104 The smart camera 630 receives the ID of the visual identifier in the shooting area of the smart camera 630 of the edge device 610 and the world coordinate of the visual identifier corresponding to the visual identifier ID.
  • Step 1105 The smart camera 630 obtains the world coordinates of the special visual identifier according to the ID of the special visual identifier.
  • Step 1106 The smart camera 630 obtains the world coordinates of multiple estimated points in the shooting area according to the world coordinates of the special visual mark.
  • step 1101 to step 1106 For the specific process of the above step 1101 to step 1106, reference may be made to the description in the fourth implementation scenario of the method shown in FIG. 8, which will not be repeated here.
  • Step 1107 The smart camera 630 obtains the image coordinates of the special visual mark in the shooting area of the smart camera 630.
  • the smart camera 630 captures an image and stores the image, and then uses a feature extraction algorithm to extract the visual identifier from the image captured by the smart camera 630; uses SIFT or SURF to extract the image coordinates of the four corners of the visual identifier; uses color Methods such as detection recognize the special visual signs in the visual signs, and obtain the image coordinates of the four corners of the special visual signs.
  • Step 1108 The smart camera 630 obtains the image coordinates of multiple estimated points in the shooting area according to the image coordinates of the special visual mark.
  • step 1108 For the specific process of the foregoing step 1108, reference may be made to the description in the fourth implementation scenario of the method shown in FIG. 8, and details are not described herein again.
  • Step 1110 The smart camera 630 sends the estimated external parameters of the smart camera 630 to the edge device 610.
  • the smart camera 630 stores the estimated external parameters of the smart camera 630 in the smart camera 630.
  • Step 1111 The edge device 610 receives the estimated external parameters of the smart camera 630 from the smart camera 630, and stores it in the MAP layer of the electronic map.
  • Step 1112 The smart camera 630 sends the ID of the smart camera 630 to the edge device 610.
  • Step 1113 The edge device 610 receives the ID of the smart camera 630 from the smart camera 630.
  • Step 1114 The edge device 610 sends the estimated external parameters of the smart camera 630 and the internal parameters of the smart camera 630 to the smart camera 630 according to the ID of the smart camera 630.
  • the estimated external parameters of the smart camera 630 and the internal parameters of the smart camera are stored in the smart camera 630, the estimated external parameters of the smart camera 630 and the internal parameters of the smart camera can be directly obtained from the memory of the smart camera 630.
  • Step 1115 The smart camera 630 receives the estimated external parameters of the smart camera 630 of the edge device 610 and the internal parameters of the smart camera 630.
  • Step 1116 The smart camera 630 obtains the image coordinates of the target in the image captured by the smart camera 630.
  • Step 1117 The smart camera 630 obtains the world coordinates of the target according to the estimated external parameters of the smart camera 630, the internal parameters of the smart camera 630, and the image coordinates of the target.
  • Step 1118 The smart camera 630 obtains the world coordinates of the first deviation according to the estimated external parameters of the smart camera 630, the internal parameters of the smart camera 630, and the image coordinates of the first deviation.
  • Step 1119 The smart camera 630 obtains the world coordinates of the second deviation according to the estimated external parameters of the smart camera 630, the internal parameters of the smart camera 630, and the image coordinates of the second deviation.
  • Step 1120 The smart camera 630 calculates the distance between the world coordinates of the first deviation and the world coordinates of the second deviation to obtain the positioning accuracy of the target.
  • step 1118 to step 1120 For the specific process from step 1118 to step 1120, reference may be made to the description in the third implementation scenario of the method shown in FIG. 8, which will not be repeated here.
  • Step 1121 The smart camera 630 updates the world coordinates of the target and the positioning accuracy of the target to the electronic map, or the smart camera 630 sends the world coordinates of the target and the positioning accuracy of the target to a moving vehicle.
  • the smart camera 630 can obtain the image coordinates of the vehicle or the person in the image captured by the smart camera 630, and then according to the world coordinates of multiple estimated points in the captured area of the smart camera 630 and the images of the multiple estimated points.
  • the estimated external parameters obtained from the coordinates transform the image coordinates of the vehicle or person into the world coordinates of the vehicle or person, thereby positioning the vehicle or person with high positioning accuracy.
  • the positioning method includes step 1201 to step 1221.
  • Step 1201 The traditional camera 670 sends the image taken by the traditional camera 670 to the edge device 640.
  • Step 1202 The edge device 640 receives the image taken by the traditional camera 670 from the traditional camera 670.
  • Step 1203 The edge device 640 sends the image taken by the traditional camera 670, the ID of the visual identifier in the shooting area of the traditional camera 670, and the world coordinates of the visual identifier corresponding to the visual identifier ID to the edge computing device 660.
  • Step 1204 The edge computing device 660 receives the image taken by the traditional camera 670 of the edge device 640, the ID of the visual identifier in the shooting area of the traditional camera 670, and the world coordinates of the visual identifier corresponding to the visual identifier ID.
  • Step 1205 The edge computing device 660 obtains the world coordinates of the special visual identifier according to the ID of the special visual identifier.
  • Step 1206 The edge computing device 660 obtains the world coordinates of multiple estimated points in the shooting area according to the world coordinates of the special visual mark.
  • step 1205 to step 1206 reference may be made to the description in the fourth implementation scenario of the method shown in FIG. 8, which will not be repeated here.
  • Step 1207 The edge computing device 660 obtains the image coordinates of the special visual identifier in the shooting area of the traditional camera 670.
  • the edge computing device 660 uses the feature extraction algorithm to extract the visual identifier from the image captured by the traditional camera 670 according to the received image taken by the traditional camera 670 of the edge device 640; and uses the SIFT or SURF method to extract the visual identifier.
  • Step 1208 The edge computing device 660 obtains the image coordinates of multiple estimated points in the shooting area according to the image coordinates of the special visual mark.
  • Step 1209 The edge computing device 660 obtains the estimated external parameters of the traditional camera 670 according to the world coordinates of the multiple estimated points, the image coordinates of the multiple estimated points, and the internal parameters of the traditional camera 670.
  • step 1209 For the specific process of step 1209, reference may be made to the description in the fifth implementation scenario of the method shown in FIG. 8, and details are not described herein again.
  • Step 1210 The edge computing device 660 sends the estimated external parameters of the traditional camera 670 to the edge device 640.
  • the edge computing device 660 stores the estimated external parameters of the traditional camera 670 in the edge computing device 660.
  • Step 1211 The edge device 640 receives the estimated external parameters from the traditional camera 670 of the edge computing device 660, and stores it with the MAP layer of the electronic map.
  • Step 1212 The traditional camera 670 sends the image taken by the traditional camera 670 to the edge device 640.
  • Step 1213 The edge device 640 receives the image taken by the traditional camera 670 from the traditional camera 670.
  • Step 1214 The edge device 640 sends the image taken by the traditional camera 670, the estimated external parameters of the traditional camera 670, and the internal parameters of the traditional camera 670 to the edge computing device 660.
  • the estimated external parameters of the traditional camera 670 are stored in the edge computing device 660, the estimated external parameters of the traditional camera 670 can be directly obtained from the memory of the edge computing device 660.
  • Step 1215 The edge computing device 660 receives the image taken by the traditional camera 670 of the edge device 640, the estimated external parameters of the traditional camera 670, and the internal parameters of the traditional camera 670.
  • Step 1216 The edge computing device 660 obtains the image coordinates of the target in the image captured by the traditional camera 670.
  • Step 1217 The edge computing device 660 obtains the world coordinates of the target according to the estimated external parameters of the traditional camera 670, the internal parameters of the traditional camera 670, and the image coordinates of the target.
  • step 1217 For the specific process of the foregoing step 1217, reference may be made to the description in the first implementation scenario of the method shown in FIG. 8, and details are not described herein again.
  • Step 1218 The edge computing device 660 obtains the world coordinates of the first deviation according to the estimated external parameters of the traditional camera 670, the internal parameters of the traditional camera 670, and the image coordinates of the first deviation.
  • Step 1219 The edge computing device 660 obtains the world coordinates of the second deviation according to the estimated external parameters of the traditional camera 670, the internal parameters of the traditional camera 670, and the image coordinates of the second deviation.
  • Step 1220 The edge calculation device 660 calculates the distance between the world coordinates of the first deviation and the world coordinates of the second deviation to obtain the positioning accuracy of the target.
  • step 1218 to step 1220 For the specific process of the foregoing step 1218 to step 1220, reference may be made to the description in the third implementation scenario of the method shown in FIG. 8, which will not be repeated here.
  • Step 1221 The edge computing device 660 updates the world coordinates of the target and the positioning accuracy of the target to the electronic map, or the edge computing device 660 sends the world coordinates of the target and the positioning accuracy of the target to a moving vehicle.
  • the edge computing device 660 can obtain the image coordinates of the vehicle or the person in the image taken by the traditional camera 670, and then according to the world coordinates of multiple estimated points in the shooting area of the traditional camera 670 and the multiple estimated points.
  • the estimated external parameters obtained from the image coordinates transform the image coordinates of the vehicle or person into the world coordinates of the vehicle or person, thereby positioning the vehicle or person with high positioning accuracy.
  • the aforementioned positioning device for example, the smart camera 630 or the edge computing device 660
  • the aforementioned positioning device includes hardware structures and/or software modules corresponding to the respective functions.
  • the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software-driven hardware depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
  • the embodiment of the present application may divide the positioning device into functional modules according to the foregoing method examples.
  • each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or software function modules. It should be noted that the division of modules in the embodiments of the present application is illustrative, and is only a logical function division, and there may be other division methods in actual implementation.
  • FIG. 13 shows a schematic structural diagram of a positioning device 130.
  • the positioning device 130 includes: an acquisition module 1301 and a processing module 1302.
  • the obtaining module 1301 is used to obtain the estimated external parameters of the camera and the internal parameters of the camera, where the estimated external parameters of the camera are based on the world coordinates of multiple estimated points in the shooting area of the camera, the image coordinates of the multiple estimated points, and Obtained from the internal reference of the camera.
  • the acquiring module 1301 is also used to acquire the image coordinates of the target in the image shot by the camera.
  • the processing module 1302 is configured to obtain the world coordinates of the target according to the estimated external parameters of the camera, the internal parameters of the camera, and the image coordinates of the target.
  • the positioning device further includes a query module 1303.
  • the obtaining module 1301 is also used to obtain the image information of the target;
  • the query module 1303 is used to query the characteristic parameters of the vehicle according to the image information of the target;
  • the processing module 1302 is specifically used to obtain the camera according to the estimated external parameters of the camera
  • the processing module 1302 is also specifically configured to obtain the internal parameter matrix of the camera according to the internal parameters of the camera;
  • the processing module 1302 is also specifically configured to obtain the image coordinates of the target and the estimated external parameters of the camera
  • the corresponding physical transformation matrix and the internal parameter matrix of the camera are used to perform coordinate transformation to obtain the first world coordinates;
  • the processing module 1302 is also specifically configured to, according to the characteristic parameters of the vehicle, the height of the camera, the position of the camera, and the first world coordinates, Get the world coordinates of the target.
  • the image coordinates of the target are the coordinates of the characteristic pixel points of the target in the image captured by the camera.
  • the processing module 1302 is specifically configured to obtain the physical transformation matrix corresponding to the estimated external parameters of the camera according to the estimated external parameters of the camera; the processing module 1302 is also specifically configured to obtain the physical transformation matrix corresponding to the estimated external parameters of the camera according to the internal parameters of the camera. Obtain the internal parameter matrix of the camera; the processing module 1302 is further specifically configured to perform coordinate transformation on the image coordinates of the target, the physical transformation matrix corresponding to the estimated external parameters of the camera, and the internal parameter matrix of the camera to obtain the world coordinates of the target.
  • the image coordinates of the target are the coordinates of the contact point between the target and the ground in the image captured by the camera.
  • the processing module is further configured to obtain the world coordinates of the first deviation according to the estimated external parameters of the camera, the internal parameters of the camera, and the image coordinates of the first deviation, wherein the image coordinates of the first deviation are the The image coordinates of the target increase the coordinates of the deviation d to the driving direction of the vehicle; the processing module is also used to obtain the world coordinates of the second deviation according to the estimated external parameters of the camera, the internal parameters of the camera, and the image coordinates of the second deviation, where , The image coordinates of the second deviation are the coordinates obtained by reducing the deviation d from the image coordinates of the target toward the vehicle traveling direction; the processing module is also used to calculate the difference between the world coordinates of the first deviation and the world coordinates of the second deviation The distance between the two to get the positioning accuracy of the target.
  • the acquisition module is also used to acquire the world coordinates of a special visual mark in the camera's shooting area, where the special visual mark is located between the first and second coordinates of the camera's shooting area, and the first The coordinates are the coordinates of the position of the maximum value of the near-point distance of the camera's field of view, and the second coordinates are the coordinates of the position of the minimum value of the far-point distance of the camera's field of view;
  • the world coordinates of the mark are used to obtain the world coordinates of multiple estimated points in the shooting area;
  • the acquisition module is also used to obtain the image coordinates of the special visual mark in the camera shooting area;
  • the processing module is also used to obtain the image coordinates of the special visual mark in the shooting area of the camera.
  • the identified image coordinates are used to obtain the image coordinates of multiple estimated points in the shooting area; the processing module is also used to obtain the image coordinates of the multiple estimated points according to the world coordinates of the multiple estimated points, the image coordinates of the multiple estimated points, and the internal parameters of the camera. Estimated external parameters of the camera.
  • the processing module is specifically configured to obtain the internal parameter matrix of the camera according to the internal parameters of the camera; the processing module is also specifically configured to obtain the world coordinates of the multiple estimated points, the image coordinates of the multiple estimated points, and The internal parameter matrix of the camera obtains an equation set with the physical transformation matrix corresponding to the estimated external parameter of the camera as an unknown number, and the physical transformation matrix corresponding to the estimated external parameter of the camera is obtained by solving the equation set; the processing module also specifically uses To obtain the estimated external parameters of the camera according to the physical transformation matrix corresponding to the estimated external parameters of the camera.
  • the special visual mark is a lane dividing line, and the lane dividing line is different from the lane dividing line around the lane dividing line.
  • the positioning device further includes an update module 1304.
  • the update module is used to update the estimated external parameters of the camera to the electronic map.
  • the positioning device further includes a sending module 1305.
  • the update module is used to update the world coordinates of the target to the electronic map; or, the sending module is used to send the world coordinates of the target to a moving vehicle.
  • the positioning device 130 is presented in the form of dividing various functional modules in an integrated manner.
  • the "module” here may refer to a specific ASIC, a circuit, a processor and memory that executes one or more software or firmware programs, an integrated logic circuit, and/or other devices that can provide the above-mentioned functions.
  • the positioning device 130 may adopt the form shown in FIG. 7.
  • the processor 701 in FIG. 7 may invoke the computer-executable instructions stored in the memory 703 to cause the positioning apparatus 130 to execute the positioning method in the foregoing method embodiment.
  • the function/implementation process of the acquisition module 1301, the processing module 1302, the query module 1303, the update module 1304, and the sending module 1305 in FIG. 16 can call the computer execution instructions stored in the memory 703 through the processor 701 in FIG. to fulfill.
  • the function/implementation process of the acquisition module 1301, the processing module 1302, the query module 1303, and the update module 1304 in FIG. 16 can be implemented by the processor 701 in FIG. 7 calling the computer execution instructions stored in the memory 703, as shown in FIG.
  • the function/implementation process of the sending module 1305 can be implemented through the communication interface 704 in FIG. 7.
  • the positioning device 130 provided in this embodiment can perform the above-mentioned positioning method, the technical effects that can be obtained can refer to the above-mentioned method embodiment, and will not be repeated here.
  • FIG. 17 shows a schematic structural diagram of a positioning device 170.
  • the positioning device 170 includes: an acquiring module 1701 and a determining module 1702.
  • the obtaining module 1701 is used to obtain the initial external parameters of the camera and the internal parameters of the camera.
  • the determining module 1702 is configured to determine the position of the special visual sign in the parking lot according to the initial external parameters of the camera and the internal parameters of the camera, where the special visual sign is used to locate the target in the shooting area of the camera.
  • the determining module 1702 is specifically configured to determine the position of the maximum value of the near-point distance of the camera's field of view and the minimum value of the far-point distance of the camera's field of view according to the initial external parameters of the camera and the internal parameters of the camera
  • the determination module 1702 is also specifically configured to determine that the area between the position of the maximum near-point distance of the camera's field of view and the minimum position of the far-point distance of the camera's field of view is the location of the special visual mark.
  • the initial external parameters of the camera include: the position of the camera, the height of the camera, and the pitch angle of the camera.
  • the positioning device 170 is presented in the form of dividing various functional modules in an integrated manner.
  • the "module” here may refer to a specific ASIC, a circuit, a processor and memory that executes one or more software or firmware programs, an integrated logic circuit, and/or other devices that can provide the above-mentioned functions.
  • the positioning device 170 may adopt the form shown in FIG. 7.
  • the processor 701 in FIG. 7 may invoke the computer-executable instructions stored in the memory 703 to cause the positioning apparatus 170 to execute the positioning method in the foregoing method embodiment.
  • the function/implementation process of the acquisition module 1701 and the determination module 1702 in FIG. 17 may be implemented by the processor 701 in FIG. 7 calling a computer execution instruction stored in the memory 703.
  • the positioning device 170 provided in this embodiment can perform the above-mentioned positioning method, the technical effects that can be obtained can refer to the above-mentioned method embodiment, which will not be repeated here.
  • the computer may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • a software program it can be implemented in the form of a computer program product in whole or in part.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instructions may be transmitted from a website, computer, server, or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer, or may include one or more data storage devices such as servers and data centers that can be integrated with the medium.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, and a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)).

Abstract

本申请实施例提供定位方法及装置,涉及定位技术领域,在定位过程中不容易受到遮挡物的影响,定位精度较高。该方法包括:获取摄像机的估计外参以及摄像机的内参,其中,摄像机的估计外参是根据摄像机拍摄区域中多个估计点的世界坐标、多个估计点的图像坐标以及摄像机的内参得到的;获取摄像机拍摄的图像中目标的图像坐标;根据摄像机的估计外参、摄像机的内参以及目标的图像坐标得到目标的世界坐标。

Description

定位方法及装置
“本申请要求于2019年8月26日提交国家知识产权局、申请号为201910791953.7、发明名称为“定位方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中”。
技术领域
本申请涉及定位技术领域,尤其涉及定位方法及装置。
背景技术
伴随智能交通的发展以及具备自动驾驶能力车辆的普及,自动代客泊车(automated valet parting,AVP)场景的需求不断增加。AVP场景简单来说就是通过移动终端发起泊车请求,建立车辆定位装置与车辆的链接,完成车辆从移动终端发起泊车请求时车辆所在位置到停车位之间的行驶等操作。
在AVP场景中,对车辆和人等目标的定位是关键技术。现有技术中,对车辆和人等目标的定位方法如下:在车端或人携带的终端设备上安装全球导航卫星系统(global navigation satellite system,GNSS)或全球定位系统(global position system,GPS),利用车端或人携带的终端设备上安装GNSS或GPS定位车辆和人等目标。GNSS或GPS的定位精度本身不高,而且容易受到遮挡物的影响,因此,在室内或地下环境的定位效果会明显下降。
发明内容
本申请实施例提供定位方法及装置,在定位过程中不容易受到遮挡物的影响,定位精度较高。
为达到上述目的,本申请的实施例采用如下技术方案:
第一方面,本申请实施例提供一种定位方法,该方法包括:获取摄像机的估计外参以及该摄像机的内参,其中,该摄像机的估计外参是根据该摄像机拍摄区域中多个估计点的世界坐标、该多个估计点的图像坐标以及该摄像机的内参得到的;获取该摄像机拍摄的图像中目标的图像坐标;根据该摄像机的估计外参、该摄像机的内参以及该目标的图像坐标得到该目标的世界坐标。
上述第一方面提供的技术方案,可以获取摄像机的估计外参、摄像机的内参、摄像机拍摄的图像中目标的图像坐标,并根据摄像机的估计外参、摄像机的内参以及目标的图像坐标得到目标的世界坐标,从而实现对目标的定位,而且在定位过程中不容易受到遮挡物的影响,定位精度较高。
结合第一方面,在第一种可能的实现方式中,若该目标为车辆,该方法还包括:获取该目标的图像信息;根据该目标的图像信息查询该车辆的特征参数;该根据该摄像机的估计外参、该摄像机的内参以及该目标的图像坐标得到该目标的世界坐标,包括:根据该摄像机的估计外参得到该摄像机的估计外参对应的物理变换矩阵;根据该摄像机的内参得到该摄像机的内参矩阵;该目标的图像坐标、该摄像机的估计外参对应的物理变换矩阵以及该摄像机的内参矩阵进行坐标变换,得到第一世界坐标;根据该车辆的特征参数、摄像机高度、摄像机的位置以及该第一世界坐标,得到该目标的 世界坐标。基于上述第一方面的第一种可能的实现方式,若目标为车辆,可以根据目标的图像信息查询车辆的特征参数,并将目标的图像坐标与摄像机的估计外参对应的物理变换矩阵以及摄像机的内参矩阵进行坐标变换,得到第一世界坐标,再根据车辆的特征参数、摄像机高度、摄像机的位置以及第一世界坐标,得到目标的世界坐标,从而对车辆进行定位,在定位的过程中,先通过图像处理方法获取目标的图像坐标,再利用数学公式计算目标的世界坐标,不容易受到遮挡物的影响,因此定位精度较高。
结合第一方面以及第一方面的第一种可能的实现方式,在第二种可能的实现方式中,若该目标为车辆,该目标的图像坐标为该摄像机拍摄的图像中该目标的特征像素点的坐标。基于上述第一方面的第二种可能的实现方式,若目标为车辆,可以根据摄像机的估计外参、摄像机的内参以及摄像机拍摄的图像中目标的特征像素点的坐标得到目标的世界坐标,从而实现对目标的定位,而且在定位过程中不容易受到遮挡物的影响,定位精度较高。
结合第一方面,在三种可能的实现方式中,若该目标不是车辆,该根据该摄像机的估计外参、该摄像机的内参以及该目标的图像坐标得到该目标的世界坐标,包括:根据该摄像机的估计外参得到该摄像机的估计外参对应的物理变换矩阵;根据该摄像机的内参得到该摄像机的内参矩阵;该目标的图像坐标、该摄像机的估计外参对应的物理变换矩阵以及该摄像机的内参矩阵进行坐标变换,得到该目标的世界坐标。基于上述第一方面的第三种可能的实现方式,若目标不是车辆,可以将目标的图像坐标、摄像机的估计外参对应的物理变换矩阵以及摄像机的内参矩阵进行坐标变换,得到目标的世界坐标,从而对目标进行定位,在定位的过程中,先通过图像处理方法获取目标的图像坐标,再利用数学公式计算目标的世界坐标,不容易受到遮挡物的影响,因此定位精度较高。
结合第一方面以及第一方面的第三种可能的实现方式,在第四种可能的实现方式中,若该目标不是车辆,该目标的图像坐标为该摄像机拍摄的图像中该目标与地面的接触点的坐标。基于上述第一方面的第四种可能的实现方式,若目标不是车辆,可以根据摄像机的估计外参、摄像机的内参以及摄像机拍摄的图像中目标与地面的接触点的坐标得到目标的世界坐标,从而实现对目标的定位,而且在定位过程中不容易受到遮挡物的影响,定位精度较高。
结合第一方面以及第一方面的各种可能的实现方式,在第五种可能的实现方式中,该方法还包括:根据该摄像机的估计外参、该摄像机的内参以及第一偏差的图像坐标得到第一偏差的世界坐标,其中,该第一偏差的图像坐标为将该目标的图像坐标向车辆行驶方向增加偏差d后的坐标;根据该摄像机的估计外参、该摄像机的内参以及第二偏差的图像坐标得到第二偏差的世界坐标,其中,该第二偏差的图像坐标为将该目标的图像坐标向车辆行驶方向减少偏差d后的坐标;计算该第一偏差的世界坐标与该第二偏差的世界坐标之间的距离,得到该目标的定位精度。基于上述第一方面的第五种可能的实现方式,可以根据摄像机的估计外参、摄像机的内参以及第一偏差的图像坐标得到第一偏差的世界坐标,根据摄像机的估计外参、摄像机的内参以及第二偏差的图像坐标得到第二偏差的世界坐标,再计算第一偏差的世界坐标与第二偏差的世界坐标之间的距离,得到目标的定位精度,从而可以对车辆或人进行更准确的定位。
结合第一方面以及第一方面的各种可能的实现方式,在第六种可能的实现方式中,该方法还包括:获取该摄像机拍摄区域中特殊视觉标识的世界坐标,其中,该特殊视觉标识位于该摄像机的拍摄区域的第一坐标与第二坐标之间,该第一坐标为该摄像机的视场近点距离的最大值的位置的坐标,该第二坐标为该摄像机的视场远点距离的最小值的位置的坐标;根据该特殊视觉标识的世界坐标,得到该拍摄区域中多个估计点的世界坐标;获取该摄像机拍摄区域中该特殊视觉标识的图像坐标;根据该特殊视觉标识的图像坐标,得到该拍摄区域中多个估计点的图像坐标;根据该多个估计点的世界坐标、该多个估计点的图像坐标以及该摄像机的内参得到该摄像机的估计外参。基于上述第一方面的第六种可能的实现方式,可以获取摄像机拍摄区域中特殊视觉标识的世界坐标,根据特殊视觉标识的世界坐标,得到拍摄区域中多个估计点的世界坐标,并获取摄像机拍摄区域中特殊视觉标识的图像坐标,根据特殊视觉标识的图像坐标,得到拍摄区域中多个估计点的图像坐标,再根据多个估计点的世界坐标、多个估计点的图像坐标以及摄像机的内参得到摄像机的估计外参,以便后续根据摄像机的估计外参、摄像机的内参以及目标的图像坐标对目标进行定位。
结合第一方面的第六种可能的实现方式,在第七种可能的实现方式中,该根据该多个估计点的世界坐标、该多个估计点的图像坐标以及该摄像机的内参得到该摄像机的估计外参,包括:根据该摄像机的内参得到该摄像的内参矩阵;根据该多个估计点的世界坐标、该多个估计点的图像坐标以及该摄像机的内参矩阵,得到以该摄像机的估计外参对应的物理变换矩阵为未知数的方程组,通过求解该方程组得到该摄像机的估计外参对应的物理变换矩阵;根据该摄像机的估计外参对应的物理变换矩阵得到该摄像机的估计外参。基于上述第一方面的第七种可能的实现方式,可以根据摄像机的内参得到摄像的内参矩阵,根据多个估计点的世界坐标、多个估计点的图像坐标以及摄像机的内参矩阵,得到以摄像机的估计外参对应的物理变换矩阵为未知数的方程组,并通过求解方程组得到摄像机的估计外参对应的物理变换矩阵,最后根据摄像机的估计外参对应的物理变换矩阵得到摄像机的估计外参,以便后续根据摄像机的估计外参、摄像机的内参以及目标的图像坐标对目标进行定位。
结合第一方面的第六种可能的实现方式以及第七种可能的实现方式,在第八种可能的实现方式中,该特殊视觉标识为分道线,该分道线与该分道线周围的分道线不同。基于上述第一方面的第八种可能的实现方式,可以将与周围的分道线不同的分道线作为特殊视觉标识,以便根据该特殊视觉标识确定多个估计点的世界坐标以及该多个估计点的图像坐标,从而根据该多个估计点的世界坐标、多个估计点的图像坐标以及摄像机的内参得到摄像机的估计外参,进而可以根据摄像机的估计外参、摄像机的内参以及目标的图像坐标对目标进行定位。
结合第一方面以及第一方面的各种可能的实现方式,在第九种可能的实现方式中,该方法还包括:将该摄像机的估计外参更新到该电子地图中。基于上述第一方面的第九种可能的实现方式,可以将摄像机的估计外参更新到电子地图中,以便后续根据摄像机的估计外参、摄像机的内参以及目标的图像坐标对目标进行定位。
结合第一方面以及第一方面的各种可能的实现方式,在第十种可能的实现方式中,该方法还包括:将该目标的世界坐标更新到该电子地图中;或者,向行驶中的车辆发 送该目标的世界坐标。基于上述第一方面的第十种可能的实现方式,可以将目标的世界坐标更新到电子地图中,或者,向行驶中的车辆发送该目标的世界坐标,以便车辆根据该目标的世界坐标进行定位。
第二方面,本申请实施例提供一种定位方法,该方法包括:获取摄像机的初始外参以及该摄像机的内参;根据该摄像机的初始外参以及该摄像机的内参,确定停车场中特殊视觉标识的位置,其中,该特殊视觉标识用于对该摄像机拍摄区域中的目标进行定位。
上述第二方面提供的技术方案,可以获取摄像机的初始外参以及摄像机的内参,并根据摄像机的初始外参以及摄像机的内参确定停车场中特殊视觉标识的位置,以便后续根据特殊视觉标识确定多个估计点的世界坐标以及该多个估计点的图像坐标,从而根据该多个估计点的世界坐标、多个估计点的图像坐标以及摄像机的内参得到摄像机的估计外参,进而可以根据摄像机的估计外参、摄像机的内参以及目标的图像坐标对目标进行定位。
结合第二方面,在第二方面的第一种可能的实现方式中,该根据该摄像机的初始外参以及该摄像机的内参,确定停车场中特殊视觉标识的位置,包括:根据该摄像机的初始外参以及该摄像机的内参,确定该摄像机的视场近点距离的最大值的位置以及该摄像机的视场远点距离的最小值的位置;确定该摄像机的视场近点距离的最大值的位置与该摄像机的视场远点距离的最小值的位置之间的区域为特殊视觉标识的位置。基于上述第二方面的第一种可能的实现方式,可以先根据摄像机的初始外参以及摄像机的内参确定摄像机的视场近点距离的最大值的位置以及摄像机的视场远点距离的最小值的位置,再确定摄像机的视场近点距离的最大值的位置与摄像机的视场远点距离的最小值的位置之间的区域为特殊视觉标识的位置,以便后续根据特殊视觉标识确定多个估计点的世界坐标以及该多个估计点的图像坐标,从而根据该多个估计点的世界坐标、多个估计点的图像坐标以及摄像机的内参得到摄像机的估计外参,进而可以根据摄像机的估计外参、摄像机的内参以及目标的图像坐标对目标进行定位。
结合第二方面以及第二方面的第一种可能的实现方式,在第二种可能的实现方式中,该摄像机的初始外参包括:该摄像机的位置、摄像机高度以及该摄像机的俯仰角。基于上述第二方面的第二种可能的实现方式,可以获取摄像机的位置、摄像机高度、摄像机的俯仰角以及摄像机的内参,并根据摄像机的位置、摄像机高度、摄像机的俯仰角以及摄像机的内参确定停车场中特殊视觉标识的位置,以便后续根据特殊视觉标识确定多个估计点的世界坐标以及该多个估计点的图像坐标,从而根据该多个估计点的世界坐标、多个估计点的图像坐标以及摄像机的内参得到摄像机的估计外参,进而可以根据摄像机的估计外参、摄像机的内参以及目标的图像坐标对目标进行定位。
第三方面,本申请实施例提供了一种定位装置,该定位装置具有实现上述第一方面所述的方法和功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。
第四方面,本申请实施例提供了一种定位装置,该定位装置具有实现上述第二方面所述的方法和功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。
第五方面,本申请实施例提供了一种定位装置,包括:至少一个处理器以及至少一个存储器,该至少一个存储器与该至少一个处理器耦合;该至少一个存储器用于存储计算机程序,使得该计算机程序被该至少一个处理器执行时实现如第一方面及其各种可能的实现方式所述的定位方法。可选的,该定位装置还包括通信接口,该通信接口与该至少一个处理器耦合;该定位装置通过该通信接口与其他设备通信。
第六方面,本申请实施例提供了一种定位装置,包括:至少一个处理器以及至少一个存储器,该至少一个存储器与该至少一个处理器耦合;该至少一个存储器用于存储计算机程序,使得该计算机程序被该至少一个处理器执行时实现如第二方面及其各种可能的实现方式所述的定位方法。可选的,该定位装置还包括通信接口,该通信接口与该至少一个处理器耦合;该定位装置通过该通信接口与其他设备通信。
第七方面,本申请提供了一种系统芯片,该系统芯片可以应用在定位装置中,该系统芯片包括:至少一个处理器,涉及的程序指令在该至少一个处理器中执行,以实现如第一方面及其各种可能的实现方式所述的定位方法。可选的,该系统芯片还可以包括至少一个存储器,该存储器存储有涉及的程序指令。
第八方面,本申请提供了一种系统芯片,该系统芯片可以应用在定位装置中,该系统芯片包括:至少一个处理器,涉及的程序指令在该至少一个处理器中执行,以实现如第二方面及其各种可能的实现方式中所述的定位方法。可选的,该系统芯片还可以包括至少一个存储器,该存储器存储有涉及的程序指令。
第九方面,本申请实施例提供了一种计算机可读存储介质,如计算机非瞬态的可读存储介质。其上储存有计算机程序,当该计算机程序在计算机上运行时,使得计算机执行上述第一方面的任一种可能的方法。例如,该计算机可以是至少一个存储节点。
第十方面,本申请实施例提供了一种计算机可读存储介质,如计算机非瞬态的可读存储介质。其上储存有计算机程序,当该计算机程序在计算机上运行时,使得计算机执行上述第二方面的任一种可能的方法。例如,该计算机可以是至少一个存储节点。
第十一方面,本申请实施例提供了一种计算机程序产品,当其在计算机上运行时,使得第一方面提供的任一方法被执行。例如,该计算机可以是至少一个存储节点。
第十二方面,本申请实施例提供了一种计算机程序产品,当其在计算机上运行时,使得第二方面提供的任一方法被执行。例如,该计算机可以是至少一个存储节点。
可以理解的,上述提供的任一种定位装置、系统芯片、计算机存储介质或计算机程序产品等均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考对应的方法中的有益效果,此处不再赘述。
附图说明
图1为本申请实施例提供的定位方法的原理图;
图2为本申请实施例提供的停车场示意图;
图3为本申请实施例提供的视觉标识的示意图;
图4为本申请实施例提供的摄像机拍摄区域示意图;
图5为本申请实施例提供的特殊视觉标识的部署示意图;
图6为本申请实施例提供的定位系统架构示意图;
图7为本申请实施例提供的硬件设备的硬件结构示意图;
图8为本申请实施例提供的定位方法的流程示意图一;
图9为本申请实施例提供的摄像机拍摄的图像的示意图;
图10为本申请实施例提供的根据第一世界坐标得到目标的世界坐标的原理图;
图11为本申请实施例提供的定位方法的流程示意图二;
图12为本申请实施例提供的定位方法的流程示意图三;
图13为本申请实施例提供的定位装置的结构示意图一;
图14为本申请实施例提供的定位装置的结构示意图二;
图15为本申请实施例提供的定位装置的结构示意图三;
图16为本申请实施例提供的定位装置的结构示意图四;
图17为本申请实施例提供的定位装置的结构示意图五。
具体实施方式
本申请实施例的基本原理为:利用场端/路侧部署的视觉感知设备(例如:摄像机)采集到的图像信息以及车道线等视觉标识,获取AVP场景中某个目标(例如:车辆或者人)的图像坐标系信息,基于图像坐标系信息与世界坐标系信息间的变换关系,将获取到的图像坐标系信息变换为世界坐标系信息,根据目标的世界坐标系信息完成目标定位,并通过网络将目标的定位实时传输给车辆。如此,可以利用AVP场景中部署的视觉感知设备实现目标定位,因视觉感知设备采集图像信息时不容易受到遮挡物的影响,因此,与现有定位方法相比,利用视觉感知设备实现目标定位可以提高定位精度,尤其是,提高室内或地下环境的定位精度。
其中,图像坐标系(image coordinate)是以摄像机拍摄的图像的中心为原点,在该摄像机拍摄的图像上建立的坐标系,图像坐标系是二维坐标系。图像坐标系信息包括图像坐标系中点的图像坐标。
其中,世界坐标系(world coordinate)是电子地图使用的坐标系,世界坐标系是三维坐标系。世界坐标系信息包括世界坐标系中点的世界坐标。
本申请实施例中,以视觉感知设备为摄像机为例进行描述。
其中,图像坐标系信息与世界坐标系信息间的变换关系可以如图1所示:
图1中,二维坐标系o-xy为摄像机拍摄的图像q的图像坐标系,其中,x轴和y轴的交点为o,即o为图像坐标系的原点,图像平面q上任一点的坐标可以用图像坐标(x,y)表示。三维坐标系O-XYZ为电子地图使用的坐标系,即世界坐标系,世界坐标系中的任一平面可以称为世界平面。其中,世界平面Q为电子地图中的任一平面(即世界平面Q为O-XYZ中的任一平面),世界平面Q上任一点的坐标可以用世界坐标(X,Y,Z)表示。其中,图像平面q与世界平面Q有如下变换关系:q=sHQ。
其中,q表示图像平面中点的图像坐标,Q表示世界平面中点的世界坐标,s为尺度比例因子,单应矩阵H=MW。
其中,
Figure PCTCN2020111505-appb-000001
M是摄像机的内参矩阵,f x表示摄像机中透镜物理焦距长度与成像的每个单元尺寸在x方向的乘积。f y表示摄像机中透镜物理焦距长度与成像的每个单元尺寸在y方向的乘积。c x表示投影坐标中心相对光轴在x方向的偏移, cy表示投影坐标中心相对光轴在y方向的偏移。成像的每个单元尺寸可以是摄像机拍摄的图像中的一个像素。
其中,W=[R,t],W是摄像机的外参的物理变换矩阵。R为3*3的正交单位矩阵,也称为旋转矩阵,t为三维的平移向量。
上述变换关系主要应用在以下两种情况:
情况1:若图像平面q与世界平面Q有上述变换关系,并且已知q上某一点的图像坐标,尺度比例因子以及单应矩阵H,可以根据上述图像平面与世界平面的变换关系计算该点在Q上的世界坐标。
例如,图1中,平面q上某一点的图像坐标为(x 1,y 1),若摄像机的内参矩阵为M,摄像机的外参的物理变换矩阵为W,尺度比例因子为s,则根据图像平面与世界平面的变换关系,可以得到以X 1,Y 1,Z 1为未知数的方程:
Figure PCTCN2020111505-appb-000002
其中,H=MW,对该方程求解,可以得到该点在世界平面Q上的坐标(X 1,Y 1,Z 1)。
情况2:若图像平面q与世界平面Q有上述变换关系,并且已知q中多个点的图像坐标、该多个点在世界平面Q中的世界坐标以及摄像机的内参矩阵,可以根据上述图像平面与世界平面的变换关系计算出尺度比例因子与摄像机的外参的物理变换矩阵的乘积。
例如,图1中,Q 1为世界平面Q上的一个矩形,矩形q 1为矩形Q 1根据上述图像平面与世界平面的变换关系,在图像平面q上映射的矩形,若矩形q 1的4个角的图像坐标分别为(x 1,y 1),(x 2,y 2),(x 3,y 3)以及(x 4,y 4),矩形Q 1的4个角的世界坐标分别为(X 1,Y 1,Z 1),(X 2,Y 2,Z 2),(X 3,Y 3,Z 3)以及(X 4,Y 4,Z 4),摄像机的内参矩阵为M,则根据图像平面与世界平面的变换关系可以得到以sH为未知数的超定方程:
Figure PCTCN2020111505-appb-000003
并利用约束最小二乘法或随机抽样一致性等方法对该超定方程求解,可以得到sH,再将sH与摄像机的内参矩阵M做除法,得到尺度比例因子与摄像机的外参的物理变换矩阵的乘积。
下面基于上述原理,结合附图对本申请实施例的实施方式进行详细描述。
本申请实施例提供的方法可以应用于任一停车场,用于定位该停车场中的车辆或者人。图2为本申请实施例提供的一种停车场示意图,在执行本申请实施例提供的定位方法之前,可以根据需要对该停车场进行如图2所示的初始化部署,部署完成后,如图2所示,该停车场可以包括:摄像机,边缘设备,分道线和停车位线等多个视觉标识。多台摄像机的拍摄区域可以覆盖整个停车场。
摄像机,可以包括传统摄像机和智能摄像机。传统摄像机是仅具备摄像能力的摄像机,智能摄像机除了具备摄像能力,还具备图像处理和人工智能算法功能。摄像机中可以存储该摄像机的内参,例如,摄像机的视场角(field of vision,FOV)和焦距。
智能摄像机可以利用图像处理方法提取智能摄像机拍摄的图像中多个估计点的图像坐标,智能摄像机还可以利用人工智能算法检测该智能摄像机拍摄的图像中是否有 目标(例如:车辆、人或动物等)。
可选的,若摄像机为传统摄像机时,在停车场部署边缘计算装置(在图2中未示出)。
其中,该边缘计算装置具备图像处理和人工智能算法功能。该边缘计算装置可以与一台或多台传统摄像机通信。例如,该边缘计算装置可以从传统摄像机获取图像,并利用图像处理方法提取该传统摄像机的图像中多个估计点的图像坐标。又例如,该边缘计算装置可以从传统摄像机获取图像,并利用人工智能算法检测该传统摄像机的图像中是否有目标(例如:车辆、人或动物等)。
摄像机可以与边缘设备通过有线或者无线通信。
边缘设备,可以是停车场的服务器,也可以是具有图形处理器(graphics processing unit,GPU)的计算处理能力的处理器,例如:智能交通边缘服务器(Intelligent Transportation Edge Server,ITE server)或者智能交通边缘计算盒子。可选的,边缘设备存储有停车场的电子地图,包括:利用车载激光雷达扫描等方法生成停车场的电子地图;将停车场的电子地图上传到边缘设备。
其中,该电子地图可以包括地图(Map)层。该地图层可以用于存储执行本申请实施例提供的定位方法所需要的参数。
一种可能的实现方式,该地图层中存储有每个摄像机的拍摄区域中视觉标识的世界坐标。例如,地图层中存储有图3中摄像机1的拍摄区域302中一般视觉标识303的世界坐标(例如,一般视觉标识303的四个角的世界坐标),特殊视觉标识304的世界坐标(例如,特殊视觉标识304的四个角的世界坐标)、一般视觉标识305的世界坐标(例如,一般视觉标识305的四个角的世界坐标)以及一般视觉标识306的世界坐标(例如,一般视觉标识306的四个角的世界坐标)。地图层中还存储有图3中摄像机2的拍摄区域309中一般视觉标识310的世界坐标(例如,一般视觉标识310的四个角的世界坐标),特殊视觉标识311的世界坐标(例如,特殊视觉标识311的四个角的世界坐标)、一般视觉标识312-一般视觉标识314的世界坐标(例如,一般视觉标识312-一般视觉标识314的四个角的世界坐标)以及特殊视觉标识315的世界坐标(例如,特殊视觉标识315的是个角的世界坐标)。
另一种可能的实现方式,该地图层中存储有每个摄像机的拍摄区域中视觉标识的世界坐标以及每个摄像机的初始外参。
例如,地图层中存储有图3中摄像机1的拍摄区域302中视觉标识的世界坐标、在安装摄像机1时记录的摄像机1的初始外参(例如:摄像机1的位置,摄像机1光心高度G、以及摄像机1的俯仰角θ)、摄像机2的拍摄区域309中视觉标识的世界坐标、在安装摄像机2时记录的摄像机2的初始外参(例如:摄像机2的位置,摄像机2光心高度G、以及摄像机2的俯仰角θ)。
视觉标识,可以是分道线、停车位线以及立柱等标识。
可选的,视觉标识包括特殊视觉标识和一般视觉标识。特殊视觉标识和一般视觉标识为相对概念,特殊视觉标识可以是停车场中分布相对稀疏,且易于被检测、识别或者定位的视觉标识,特殊视觉标识可以用于辅助定位。除特殊视觉标识之外的视觉标识可以称为一般视觉标识。特殊视觉标识可以具备以下特征的至少一种:(1)与一 般视觉标识不同的标识;(2)与车端感知系统兼容,不产生歧义,也不对车端自动驾驶系统的道路检测等功能带来干扰;(3)应符合自动驾驶领域标准(例如:P2020)对标志物的颜色可分性等特性的要求,而且应尽量不增加实体,不影响原有道路标识的完整性。
应注意,图2所示的停车场仅用于举例,并非用于限制本申请的技术方案。本领域的技术人员应当明白,在具体实现过程中,图2所示的停车场还可以包括其他设备,同时也可根据具体需要来确定边缘设备、摄像机和视觉标识的数量。
以视觉标识为分道线为例,特殊视觉标识可以为宽度异于一般视觉标识的宽度的分道线、或者,颜色较醒目的分道线。
例如,图4为视觉标识的示意图。图4中的(a)中,道路410上有三个视觉标识,分别为一般视觉标识411、特殊视觉标识412以及一般视觉标识413,其中,一般视觉标识411、特殊视觉标识412以及一般视觉标识413的颜色都是白色,特殊视觉标识412的宽度大于一般视觉标识411和一般视觉标识413。
又例如,图4中的(b)中,道路420上有三个视觉标识,分别为一般视觉标识421、特殊视觉标识422以及一般视觉标识423,其中,一般视觉标识421、特殊视觉标识422以及一般视觉标识423的颜色都是白色,特殊视觉标识422的宽度小于一般视觉标识421和一般视觉标识423。
再例如,图4中的(c)中,道路430上有三个视觉标识,分别为一般视觉标识431、特殊视觉标识432以及一般视觉标识433,其中,一般视觉标识431以及一般视觉标识433的颜色都是白色,特殊视觉标识432的颜色是红色。
需要说明的是,图4所示的特殊视觉标识412、特殊视觉标识422以及特殊视觉标识432仅是特殊视觉标识的举例,实际应用中,特殊视觉标识还可以是其他形式的标识,不予限制。
其中,可以采用有下述方式1或者方式2部署摄像机以及视觉标识:
其中,方式1可以包括步骤1-步骤2。
步骤1:获取摄像机的初始外参以及摄像机的内参。
其中,摄像机的初始外参可以描述为安装摄像机后,人工测量得到的摄像机的外参。摄像机的外参可以包括但不限于摄像机的位置,摄像机高度G、以及摄像机的俯仰角θ等。
其中,摄像机的位置是摄像机安装在停车场的位置(例如,摄像机安装后的世界坐标)。摄像机的高度可以是摄像机光心高度,摄像机光心高度是摄像机光心距地面的高度。摄像机的俯仰角是摄像机的中心光束与地面的夹角。
首先,相关人员可以根据停车场的面积以及摄像机的覆盖区域的大小,规划摄像机的位置,并可以根据规划的摄像机的位置在停车场中安装摄像机,并在安装摄像机后记录摄像机的初始外参。在停车场部署视觉标识时,可以获取该初始外参,并从该摄像机中获取摄像机的内参。
步骤2:根据摄像机的初始外参以及摄像机的内参,确定停车场中特殊视觉标识的位置。
按照现有技术中部署视觉标识的标准,在停车场中部署一般视觉标识,并在停车 场中视觉标识的位置处部署特殊视觉标识。
可选的,根据摄像机的初始外参以及摄像机的内参,确定停车场中特殊视觉标识的位置,包括:根据摄像机的初始外参以及摄像机的内参,确定摄像机的视场近点距离的最大值的位置以及所述摄像机的视场远点距离的最小值的位置;确定所述摄像机的视场近点距离的最大值的位置与所述摄像机的视场远点距离的最小值的位置之间的区域为特殊视觉标识的位置。
其中,根据摄像机的初始外参以及摄像机的内参,确定摄像机的视场近点距离的最大值的位置以及所述摄像机的视场远点距离的最小值的位置,包括:根据公式1:
Figure PCTCN2020111505-appb-000004
计算摄像机的视场近点距离的最大值,根据公式2:
Figure PCTCN2020111505-appb-000005
计算摄像机的视场远点距离的最小值;根据摄像机的位置以及摄像机的视场近点距离的最大值计算摄像机的视场近点距离的最大值的位置,根据摄像机的位置以及摄像机的视场远点距离的最小值计算摄像机的视场远点距离的最小值的位置。
其中,N max是摄像机的视场近点距离的最大值,G min是摄像机光心高度的最小值,FOV是摄像机的视场角,θ是摄像机的俯仰角,Δ是摄像机俯仰角的估计范围,G max是摄像机光心高度的最大值,F min是摄像机的视场远点距离的最小值。
其中,摄像机的视场近点距离的最大值是指摄像机光心高度最高、摄像机的俯仰角最小时,摄像机投影到地面的位置(图5中的(a)中的A点)与摄像机下光束与地面的交点的位置(图5中的(a)中的B点)之间的距离。摄像机的视场近点距离的最大值的位置是摄像机的光心高度最高且俯仰角最小时,摄像机下光束与地面的交点的位置。
其中,摄像机的视场远点距离的最小值是指摄像机光心高度最低、摄像机的俯仰角最大时,摄像机投影到地面的位置(图5中的(b)中的C点)与摄像机上光束与地面的交点的位置(图5中的(b)中的D点)之间的距离。摄像机的视场远点距离的最小值的位置是摄像机光心高度最低且俯仰角最大时,摄像机上光束与地面的交点的位置。
图3中的(a)中,道路301上有一般视觉标识303、特殊视觉标识304、一般视觉标识305以及一般视觉标识306。其中,一般视觉标识的颜色是白色的,特殊视觉标识的颜色是黄色的,一般视觉标识303、特殊视觉标识304、一般视觉标识305以及一般视觉标识306在摄像机1的拍摄区域302中。特殊视觉标识304和一般视觉标识305在区域307中,区域307为摄像机1的视场近点距离的最大值的位置与摄像机1的视场远点距离的最小值的位置之间的区域。
图3中的(b)中,道路308上有一般视觉标识310、特殊视觉标识311、一般视觉标识312、一般视觉标识313、一般视觉标识314以及特殊视觉标识315。其中,一般视觉标识的颜色是白色的,特殊视觉标识的颜色是黄色的,一般视觉标识310、特殊视觉标识311、一般视觉标识312、一般视觉标识313、一般视觉标识314以及特殊视觉标识315在摄像机2的拍摄区域309中。特殊视觉标识311、一般视觉标识312、 一般视觉标识313一般视觉标识314以及特殊视觉标识315在区域316中,区域316为摄像机2的视场近点距离的最大值的位置与摄像机2的视场远点距离的最小值的位置之间的区域。
需要说明的是,在摄像机拍摄区域中,摄像机的视场近点距离的最大值的位置与摄像机的视场远点距离的最小值的位置之间的区域部署特殊视觉标识,是为了后续在计算摄像机的估计外参时,便于找到摄像机拍摄的图像中多个估计点的图像坐标与电子地图中该多个估计点的世界坐标,因此,在摄像机拍摄区域中,摄像机的视场近点距离的最大值的位置与摄像机的视场远点距离的最小值的位置之间的区域仅部署少量的特殊视觉标识(例如:1-3个特殊视觉标识)即可达到上述目的。
其中,摄像机的估计外参是根据摄像机拍摄区域中多个估计点的世界坐标、该多个估计点的图像坐标以及摄像机的内参得到的。
其中,方式2可以包括步骤A-步骤B。
步骤A:在停车场中部署视觉标识。
可选的,若是在现有停车场(即:已经按照现有技术中部署视觉标识的标准,部署了一般视觉标识的停车场)中部署视觉标识,可以按照一定规则(例如,每间隔一段距离)将少数一般视觉标识改造成特殊视觉标识。
可选的,若是在新建的停车场(即:未部署视觉标识的停车场)中部署视觉标识,可以按照现有技术中部署视觉标识的标准,在停车场中部署一般视觉标识,并按照一定规则(例如,每间隔一段距离)在应该部署一般视觉标识的位置上部署特殊视觉标识。
步骤B:根据特殊视觉标识的位置部署摄像机。
一种可能的实现方式,根据特殊视觉标识的位置估计摄像机光心高度最高、摄像机的俯仰角最小时,摄像机下光束与地面的交点的位置以及摄像机光心高度最低、摄像机的俯仰角最大时,摄像机上光束与地面的交点的位置;根据摄像机光心高度最高、摄像机的俯仰角最小时,摄像机下光束与地面的交点的位置、摄像机的FOV以及上述公式1估计G max和θ,根据摄像机光心高度最低、摄像机的俯仰角最大时,摄像机上光束与地面的交点的位置、摄像机的FOV以及上述公式2估计G min和θ;根据摄像机光心高度最高且摄像机的俯仰角最小时摄像机下光束与地面的交点的位置、摄像机光心高度最低且摄像机的俯仰角最大时摄像机上光束与地面的交点的位置、G min、G max和θ部署摄像机,使得特殊视觉标识在摄像机光心高度最高且摄像机的俯仰角最小时摄像机下光束与地面的交点的位置,与摄像机光心高度最低且摄像机的俯仰角最大时摄像机上光束与地面的交点的位置之间。
如图6所示,为本申请实施例提供的定位系统的架构示意图。
图6中的(a)所示的定位系统包括边缘设备610、车辆620以及智能摄像机630。
其中,边缘设备610可以是在停车场初始化过程中部署的边缘设备,智能摄像机630可以是在停车场初始化过程中部署的智能摄像机。
其中,车辆620可以是停车场中行驶的或者停止的智能网联车。该车辆620中可以包括车载盒子(telematics bOX,T-Box),域控制器(domian controller,DC),多域控制器(multi-domian controller,MDC),车载单元(on board unit,OBU),车联 网芯片等。
停车场初始化完成后,边缘设备610存储有停车场的电子地图,电子地图的地图层中存储有智能摄像机630的拍摄区域中视觉标识的世界坐标,或者,电子地图的地图层中存储有智能摄像机630的拍摄区域中视觉标识的世界坐标以及智能摄像机630的初始外参。智能摄像机630的视场近点距离的最大值的位置与智能摄像机630的视场远点距离的最小值的位置之间存在特殊视觉标识。
边缘设备610可以与车辆620以及智能摄像机630通信,为车辆620以及智能摄像机630提供服务。例如,边缘设备610可以向智能摄像机630发送智能摄像机630的拍摄区域中视觉标识的世界坐标,以便智能摄像机630根据智能摄像机630的拍摄区域中视觉标识的世界坐标,计算智能摄像机630的估计外参。又例如,智能摄像机630可以在对车辆620定位后,将车辆620的世界坐标发送给边缘设备610,边缘设备610在接收到车辆620的世界坐标后,将车辆620的世界坐标发送给车辆620,以便车辆620知道自己在电子地图中的位置。
可选的,智能摄像机630与车辆620通信,为车辆620提供服务。例如,智能摄像机630可以在对车辆620定位后,将车辆620的世界坐标发送给车辆620,以便车辆620知道自己在电子地图中的位置。
应注意,图6中的(a)所示的定位系统仅用于举例,并非用于限制本申请的技术方案。本领域的技术人员应当明白,在具体实现过程中,该定位系统还可以包括其他设备,同时也可根据具体需要来确定边缘设备、智能摄像机和车辆的数量。
图6中的(b)所示的定位系统包括边缘设备640、车辆650、边缘计算装置660、传统摄像机670以及传统摄像机680。
边缘设备640以及车辆650的介绍可以参考上述对边缘设备610以及车辆620的描述,不予赘述。
边缘计算装置660可以是在停车场初始化过程中部署的边缘计算装置,传统摄像机670和传统摄像机680可以是在停车场初始化过程中部署的传统摄像机。
可选的,边缘计算装置660是智能交通边缘计算盒子(intelligent transportation edge server,ITE server)中的处理器芯片。
停车场初始化完成后,边缘设备640存储有停车场的电子地图,电子地图的地图层中存储有传统摄像机670的拍摄区域中视觉标识的世界坐标以及传统摄像机680的拍摄区域中视觉标识的世界坐标,或者,电子地图的地图层中存储有传统摄像机670的拍摄区域中视觉标识的世界坐标、传统摄像机680的拍摄区域中视觉标识的世界坐标、传统摄像机670的初始外参以及传统摄像机680的初始外参。传统摄像机670的视场近点距离的最大值的位置与传统摄像机670的视场远点距离的最小值的位置之间存在第一特殊视觉标识,传统摄像机680的视场近点距离的最大值的位置与传统摄像机680的视场远点距离的最小值的位置之间存在第二特殊视觉标识。
其中,第一特殊视觉标识和第二特殊视觉标识可以相同也可以不同。
图6中的(b)中,传统摄像机670可以将传统摄像机670的拍摄区域的图像发送给边缘设备640,以便边缘设备640将传统摄像机670的拍摄区域的图像发送给边缘计算装置660,或者,传统摄像机670可以将传统摄像机670的拍摄区域的图像直接 发送给边缘计算装置660,边缘计算装置660可以根据传统摄像机670的拍摄区域的图像对传统摄像机670的拍摄区域中的目标进行定位。传统摄像机680可以将传统摄像机680的拍摄区域的图像发送给边缘设备640,以便边缘设备640将传统摄像机680的拍摄区域的图像发送给边缘计算装置660,或者,传统摄像机680可以将传统摄像机680的拍摄区域的图像直接发送给边缘计算装置660,边缘计算装置660可以根据传统摄像机680的拍摄区域的图像对传统摄像机680的拍摄区域中的目标进行定位。
图6中的(b)中,边缘设备640可以与车辆650以及边缘计算装置660通信,为车辆640以及边缘计算装置660提供服务。例如,边缘设备640可以向边缘计算装置660发送传统摄像机670的拍摄区域中视觉标识的世界坐标,以便边缘计算装置660根据传统摄像机670的拍摄区域中视觉标识的世界坐标,估计传统摄像机670的估计外参。又例如,边缘计算装置660可以在对车辆650定位后,将车辆650的世界坐标发送给边缘设备640,边缘设备640在接收到车辆650的世界坐标后,将车辆650的世界坐标发送给车辆650。
可选的,边缘计算装置660与车辆650通信,为车辆650提供服务。例如,边缘计算装置660可以在对车辆650定位后,将车辆650的世界坐标发送给车辆650。
应注意,图6中的(b)所示的定位系统仅用于举例,并非用于限制本申请的技术方案。本领域的技术人员应当明白,在具体实现过程中,该定位系统还可以包括其他设备,同时也可根据具体需要来确定边缘设备、边缘计算装置、传统摄像机和车辆的数量。
可选的,本申请实施例图6中的智能摄像机630或边缘计算装置660,可以是一个设备内的一个功能模块。可以理解的是,上述功能既可以是硬件设备中的网络元件,例如手机中的通信芯片,也可以是在专用硬件上运行的软件功能,或者是平台(例如,云平台)上实例化的虚拟化功能。
例如,图6中的智能摄像机630或边缘计算装置660均可以通过图7中的硬件设备700来实现。图7所示为可适用于本申请实施例的硬件设备的硬件结构示意图。该硬件设备700包括至少一个处理器701,通信线路702以及存储器703。
处理器701可以是一个图形处理器(graphics processing unit,GPU),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制本申请方案程序执行的集成电路。
通信线路702可包括一通路,在上述组件之间传送信息,例如总线。
存储器703可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过通信线路702与处理器相连接。存储器也可以和处理器集成在一起。本申请实施例提供的存储器通常可以具 有非易失性。其中,存储器703用于存储执行本申请方案所涉及的计算机执行指令,并由处理器701来控制执行。处理器701用于执行存储器703中存储的计算机执行指令,从而实现本申请实施例提供的方法。
可选的,本申请实施例中的计算机执行指令也可以称之为应用程序代码,本申请实施例对此不作具体限定。
在具体实现中,作为一种实施例,处理器701可以包括一个或多个GPU,例如图7中的GPU0和GPU1。
在具体实现中,作为一种实施例,硬件设备700可以包括多个处理器,例如图7中的处理器701和处理器707。这些处理器中的每一个可以是一个单核(single-GPU)处理器,也可以是一个多核(multi-GPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。
在具体实现中,作为一种实施例,硬件设备700还可以包括通信接口704。通信接口704,使用任何收发器一类的装置,用于与其他设备或通信网络通信,如以太网接口,无线接入网接口(radio access network,RAN),无线局域网接口(wireless local area networks,WLAN)等。
在具体实现中,作为一种实施例,硬件设备700还可以包括输出设备705和输入设备706。输出设备705和处理器701通信,可以以多种方式来显示信息。例如,输出设备705可以是液晶显示器(liquid crystal display,LCD),发光二级管(light emitting diode,LED)显示设备,阴极射线管(cathode ray tube,CRT)显示设备,或投影仪(projector)等。输入设备706和处理器701通信,可以以多种方式接收用户的输入。例如,输入设备706可以是鼠标、键盘、触摸屏设备或传感设备等。
可选的,若图6中的智能摄像机630通过图7中的硬件设备700来实现时,硬件设备700还包括摄像头,该摄像头可以用于采集图像信息。
上述的硬件设备700可以是一个通用设备或者是一个专用设备。本申请实施例不限定硬件设备700的类型。
下面将结合图1-图7对本申请实施例提供的定位方法进行具体阐述。
可以理解的,本申请实施例中,智能摄像机和/或边缘计算装置可以执行本申请实施例中的部分或全部步骤,这些步骤仅是示例,本申请实施例还可以执行其它步骤或者各种步骤的变形。此外,各个步骤可以按照本申请实施例呈现的不同的顺序来执行,并且有可能并非要执行本申请实施例中的全部步骤。
如图8所示,为本申请实施例提供的一种定位方法,该定位方法包括步骤801-步骤803。
步骤801:获取摄像机的估计外参以及摄像机的内参。
其中,摄像机的估计外参是根据摄像机拍摄区域中多个估计点的世界坐标、该多个估计点的图像坐标以及摄像机的内参得到的。
其中,摄像机的内参可以包括摄像机的FOV与焦距。
可选的,获取摄像机的估计外参以及摄像机的内参,包括:向边缘设备发送摄像机的ID;接收来自边缘设备的摄像机的估计外参以及摄像机的内参。
其中,边缘设备可以是图6中的(a)中的边缘设备610或图6中的(b)中的边 缘设备640。
在具体实现中,作为一种实施例,边缘设备中存储有摄像机ID,摄像机ID对应的估计外参以及摄像机ID对应的内参。
步骤802:获取摄像机拍摄的图像中目标的图像坐标。
其中,目标可以是要定位的人或物,例如,停车场中的车辆、人或动物等等。
可选的,若目标为车辆,目标的图像坐标可以是摄像机拍摄的图像中目标的特征像素点的坐标;若目标不是车辆,目标的图像坐标可以是摄像机拍摄的图像中目标与地面的接触点的坐标。
其中,目标的特征像素点是目标的特征参数对应的像素点。
其中,目标的特征参数可以包括以下参数的至少一种:车头距地面的高度、车尾距地面的高度、以及车牌边缘距地面的高度。
例如,若目标的特征像素点是车头特征像素点,则获取的目标的特征参数可以是车头距地面的高度;若目标的特征像素点是车尾特征像素点,则获取的目标的特征参数可以是车尾距地面的高度;若目标的特征像素点是车牌特征像素点,则获取的目标的特征参数是车牌边缘距地面的高度。
图9为摄像机拍摄的图像的示意图。图9中的(a)中,A点为摄像机拍摄的图像中车辆901的车头的特征像素点,若目标的特征参数是车头距地面的高度,可以将A点的图像坐标作为车辆901的图像坐标;C点为摄像机拍摄的图像中人902与摄像机拍摄的图像中地面903的接触区域中的任一点,可以将C点的图像坐标作为人902的图像坐标。
一种可能的实现方式,每隔预设时间,获取摄像机拍摄的图像;通过图像识别算法从摄像机拍摄的图像中提取图像区域,检测提取的图像区域是否包括待定位的目标;若包括,则获取摄像机拍摄的图像中目标的图像坐标。
其中,提取的图像区域可以包括一个待定位的目标。
例如,图9中的(b)中,区域904和区域905为通过图像处理方法从摄像机拍摄的图像中提取的图像区域,以便检测区域904以及区域905是否包括有目标,其中,区域904包括一个待定位的目标(车辆901),区域905包括一个待定位的目标(人902)。
其中,预设时间可以根据实际需求进行设置,例如,停车或取车高峰期时,预设时间可以设置为50毫秒(ms),停车或取车低峰期时,预设时间可以设置为100ms。
在具体实现中,作为一种实施例,检测每个可能包括目标的图像区域是否包括有目标,包括:根据目标识别算法(例如,YOLOv3(you only look once version 3.0)等)或深度学习算法(例如,掩膜区域卷积神经网络(mask region-based convolutional neural network,mask RCNN)等)检测可能包括目标的图像区域中是否有目标,并对目标进行分类和识别。
步骤803:根据摄像机的估计外参、摄像机的内参以及目标的图像坐标得到目标的世界坐标。
一种可能的实现方式,若目标为车辆,根据摄像机的估计外参、摄像机的内参以及目标的图像坐标得到目标的世界坐标,包括:根据摄像机的估计外参得到摄像机的 估计外参对应的物理变换矩阵;根据摄像机的内参得到摄像机的内参矩阵;目标的图像坐标与摄像机的估计外参对应的物理变换矩阵以及摄像机的内参矩阵进行坐标变换,得到第一世界坐标;根据车辆的特征参数、摄像机高度、摄像机的位置以及第一世界坐标,得到目标的世界坐标。若目标为车辆时,步骤803的具体过程可以参考下述图8所示方法的第一种实现场景中的描述。
另一种可能的实现方式,若目标不是车辆,根据摄像机的估计外参、摄像机的内参以及目标的图像坐标得到目标的世界坐标,包括:根据摄像机的估计外参得到摄像机的估计外参对应的物理变换矩阵;根据摄像机的内参得到摄像机的内参矩阵;目标的图像坐标与摄像机的估计外参对应的物理变换矩阵以及摄像机的内参矩阵进行坐标变换,得到目标的世界坐标。若目标不是车辆,步骤803的具体过程可以参考下述图8所示方法的第二种实现场景中的描述。
可选的,步骤803后,将目标的世界坐标更新到电子地图中,或者,向行驶中的车辆发送目标的世界地图。
可选的,将目标的世界坐标更新到电子地图中,包括:向边缘设备发送目标的世界坐标。
边缘设备接收到目标的世界坐标后,可以将目标的世界坐标存储在MAP层中。
一种可能的实现方式,向行驶中的车辆发送目标的世界地图,包括:直接向行驶中的车辆发送目标的世界地图。
另一种可能的实现方式,向行驶中的车辆发送目标的世界地图,包括:向边缘设备发送目标的世界地图,以便边缘设备在接收到该目标的世界地图后,向行驶中的车辆发送目标的世界地图。
基于图8所示的方法,通过获取摄像机拍摄的图像中车辆或人的图像坐标,再根据摄像机拍摄区域中多个估计点的世界坐标与多个估计点的图像坐标得到的估计外参,将车辆或人的图像坐标变换为车辆或人的世界坐标,从而对车辆或人进行定位,定位精度高。
进一步可选的,在图8所示方法的第一种实现场景中,若目标为车辆,图8所示方法还包括:获取目标的图像信息;根据目标的图像信息查询车辆的特征参数;根据摄像机的估计外参、摄像机的内参以及目标的图像坐标得到目标的世界坐标,包括:根据摄像机的估计外参得到摄像机的估计外参对应的物理变换矩阵;根据摄像机的内参得到摄像机的内参矩阵;目标的图像坐标与摄像机的估计外参对应的物理变换矩阵以及摄像机的内参矩阵进行坐标变换,得到第一世界坐标;根据车辆的特征参数、摄像机高度、摄像机的位置以及第一世界坐标,得到目标的世界坐标。
其中,摄像机高度可以是摄像机光心高度,摄像机的位置可以是摄像机的世界坐标,摄像机在电子地图中的位置。摄像机高度以及摄像机的位置可以存储在边缘设备中,因此可以从边缘设备中获取摄像机的高度以及摄像机的位置。例如,向边缘设备发送摄像机的ID,边缘设备根据摄像机的ID发送摄像机ID对应的摄像机高度以及摄像机的位置。
其中,目标的图像信息可以是可能包括目标的图像区域,目标的图像信息可以包括目标的像素点以及目标的像素点的颜色信息。
其中,第一世界坐标可以是目标的图像坐标进行坐标变换后,在电子地图的地面上的坐标。
其中,摄像机的估计外参对应的物理变换矩阵可以为sW,即摄像机的估计外参对应的物理变换矩阵为尺度比例因子与摄像机的外参的物理变换矩阵的乘积。
可选的,获取目标的图像信息,包括:根据摄像机拍摄的图像获取目标的图像信息。
可选的,根据目标的图像信息查询车辆的特征参数,包括:根据目标的图像信息查询目标的车型、和/或,车款、和/或,车牌类别,根据目标的车型、和/或,车款、和/或,车牌类别查询车辆的特征参数。
例如,若根据目标的图像信息查询到目标是A牌子的B款车,进而可以查询A牌子的B款车的特征参数(例如,车头距地面的高度)。
可选的,目标的图像坐标与摄像机的估计外参对应的物理变换矩阵以及摄像机的内参矩阵进行坐标变换,得到第一世界坐标,包括:根据公式
Figure PCTCN2020111505-appb-000006
得到第一世界坐标(X 1,Y 1,Z 1),其中,(x 1,y 1)为目标的图像坐标。
可选的,根据车辆的特征参数、摄像机高度、摄像机的位置以及第一世界坐标,得到目标的世界坐标,包括:根据公式d 1=G 1*d 2/G计算第一世界坐标与目标的世界坐标之间的距离,根据第一世界坐标与目标的世界坐标之间的距离以及第一世界坐标得到目标的世界坐标。
其中,d 1是第一世界坐标与目标的世界坐标之间的距离,G 1是特征参数,G是摄像机光心高度,d 2是摄像机光心在地面的投影坐标与第一世界坐标之间的距离。
图10为根据第一世界坐标得到目标的世界坐标的原理图。其中,图10中的(a)使用的坐标系是图像坐标系,图10中的(b)使用的坐标系是世界坐标系,图10中的(a)所示的图像平面q与图10中的(b)中的地面Q的变换关系为q=sHQ。下面以车辆1001的特征参数是车头距地面的高度G 1,摄像机光心高度为G为例,介绍根据车辆的特征参数、摄像机高度、摄像机的位置以及第一世界坐标,得到目标的世界坐标的具体过程。
图10中的(a)中,A点为车辆1001的车头的特征像素点,A点的图像坐标可以作为目标的图像坐标。图10中的(b)中,D点为目标的图像坐标(即A点的图像坐标)根据变换关系q=sHQ进行坐标变换后,在电子地图的地面Q上的点,即D点的世界坐标为第一世界坐标,E点的坐标为摄像机光心的世界坐标,C点的坐标为摄像机光心在电子地图中地面Q的投影坐标。首先,根据D点、C点以及E点构建三角形DCE;其次,在三角形DCE的DE边上找到F点,使得F点与F点在电子地图中地面Q的投影的点(即B点)之间的距离为G1,其中,F点的坐标可以描述为车辆1001的车头的特征像素点的世界坐标;再次,计算C点与D点之间的距离d2,最后根据公式d1=G1*d2/G可以计算第一世界坐标与目标的世界坐标之间的距离d1(即B点与D点的距离),最后可以根据D点的坐标以及d1计算目标的世界坐标(即B点的坐标)。
基于图8所示方法的第一种实现场景,若目标为车辆,可以根据目标的图像信息查询车辆的特征参数,并将目标的图像坐标、摄像机的估计外参对应的物理变换矩阵以及摄像机的内参矩阵进行坐标变换,得到第一世界坐标,再根据车辆的特征参数、摄像机高度、摄像机的位置以及第一世界坐标,得到目标的世界坐标,从而对车辆进行定位,在定位的过程中,先通过图像处理方法获取目标的图像坐标,再利用数学公式计算目标的世界坐标,因此定位精度较高。
进一步可选的,在图8所示方法的第二种实现场景中,若目标不是车辆,根据摄像机的估计外参、摄像机的内参以及目标的图像坐标得到目标的世界坐标,包括:根据摄像机的估计外参得到摄像机的估计外参对应的物理变换矩阵;根据摄像机的内参得到摄像机的内参矩阵;目标的图像坐标、摄像机的估计外参对应的物理变换矩阵以及摄像机的内参矩阵进行坐标变换,得到目标的世界坐标。
其中,摄像机的估计外参对应的物理变换矩阵可以为sW,即摄像机的估计外参对应的物理变换矩阵为尺度比例因子与摄像机的外参的物理变换矩阵的乘积。
可选的,目标的图像坐标与摄像机的估计外参对应的物理变换矩阵以及摄像机的内参矩阵进行坐标变换,得到目标的世界坐标,包括:根据公式
Figure PCTCN2020111505-appb-000007
得到目标的世界坐标(X 2,Y 2,Z 2),其中,(x 2,y 2)为目标的图像坐标。
基于图8所示方法的第二种实现场景,若目标不是车辆,可以将目标的图像坐标、摄像机的估计外参对应的物理变换矩阵以及摄像机的内参矩阵进行坐标变换,得到目标的世界坐标,从而对目标进行定位,在定位的过程中,先通过图像处理方法获取目标的图像坐标,再利用数学公式计算目标的世界坐标,因此定位精度较高。
进一步可选的,在图8所示方法的第三种实现场景中,图8所示的方法还包括:根据摄像机的估计外参、摄像机的内参以及第一偏差的图像坐标得到第一偏差的世界坐标;根据摄像机的估计外参、摄像机的内参以及第二偏差的图像坐标得到第二偏差的世界坐标;计算第一偏差的世界坐标与第二偏差的世界坐标之间的距离,得到目标的定位精度。
其中,第一偏差的图像坐标为将目标的图像坐标向车辆行驶方向增加偏差d后的坐标,第二偏差的图像坐标为将目标的图像坐标向车辆行驶方向减少偏差d后的坐标。
其中,目标的定位精度可以是定位该目标时引入的误差。
示例性的,以目标的图像坐标为(x,y),车辆沿图像坐标系的y方向行驶,d=0.5为例,第一偏差的图像坐标为(x,y+0.5),第二偏差的图像坐标为(x,y-0.5)。
可选的,根据摄像机的估计外参、摄像机的内参以及第一偏差的图像坐标得到第一偏差的世界坐标,包括:根据公式
Figure PCTCN2020111505-appb-000008
得到第一偏差的世界坐标(X d1,Y d1,Z d1),其中,(x d1,y d1)为第一偏差的图像坐标。
可选的,根据摄像机的估计外参、摄像机的内参以及第二偏差的图像坐标得到第二偏差的世界坐标,包括:根据公式
Figure PCTCN2020111505-appb-000009
得到第二偏差的世界坐标(X d2,Y d2,Z d2),其中,(x d2,y d2)为第二偏差的图像坐标。
可选的,计算第一偏差的世界坐标与第二偏差的世界坐标之间的距离,得到目标的定位精度,包括:根据公式
Figure PCTCN2020111505-appb-000010
计算目标的定位精度。
其中,D为定位精度,(X d1,Y d1,Z d1)为第一偏差的世界坐标,(X d2,Y d2,Z d2)为第二偏差的世界坐标。
可选的,得到目标的定位精度后,将目标的定位精度更新到电子地图中,或者,向行驶中的车辆发送目标的定位精度。
可选的,将目标的定位精度更新到电子地图中,包括:向边缘设备发送目标的定位精度。
边缘设备接收到目标的定位精度后,可以将目标的定位精度存储在MAP层中。
一种可能的实现方式,向行驶中的车辆发送目标的定位精度,包括:直接向行驶中的车辆发送目标的定位精度。
另一种可能的实现方式,向行驶中的车辆发送目标的定位精度,包括:向边缘设备发送目标的定位精度,以便边缘设备在接收到目标的定位精度后,向行驶中的车辆发送目标的定位精度。
基于图8所示方法的第三种实现场景,可以根据摄像机的估计外参、摄像机的内参以及第一偏差的图像坐标得到第一偏差的世界坐标,根据摄像机的估计外参、摄像机的内参以及第二偏差的图像坐标得到第二偏差的世界坐标,再计算第一偏差的世界坐标与第二偏差的世界坐标之间的距离,得到目标的定位精度,从而可以对车辆或人进行更准确的定位。
进一步可选的,在图8所示方法的第四种实现场景中,图8所示的方法还包括:获取摄像机拍摄区域中特殊视觉标识的世界坐标;根据特殊视觉标识的世界坐标,得到拍摄区域中多个估计点的世界坐标;获取摄像机拍摄区域中特殊视觉标识的图像坐标;根据特殊视觉标识的图像坐标,得到拍摄区域中多个估计点的图像坐标;根据多个估计点的世界坐标、多个估计点的图像坐标以及摄像机的内参得到摄像机的估计外参。
其中,特殊视觉标识位于摄像机的拍摄区域的第一坐标与第二坐标之间。
其中,第一坐标为摄像机的视场近点距离的最大值的位置的坐标,第二坐标为摄像机的视场远点距离的最小值的位置的坐标。
可选的,特殊视觉标识为分道线,该分道线与该分道线周围的分道线不同。
可选的,获取摄像机拍摄区域中特殊视觉标识的世界坐标,包括:向边缘设备发送摄像机的ID;接收来自边缘设备的摄像机拍摄区域中视觉标识的世界坐标;根据摄像机拍摄区域中特殊视觉标识的ID获取摄像机拍摄区域中特殊视觉标识的世界坐标。
示例性的,以图3所示的特殊视觉标识的部署示意图为例,介绍获取摄像机1拍摄区域302中特殊视觉标识的世界坐标的具体过程。若摄像机1的拍摄区域是区域302,区域302包括4个视觉标识,分别是一般视觉标识303、特殊视觉标识304、一般视觉标识305以及一般视觉标识306。可以向边缘设备发送摄像机的ID(例如:摄像机1),边缘设备可以根据摄像机1发送区域302中的视觉标识的ID以及视觉标识的ID对应的视觉标识的世界坐标(例如,一般视觉标识303的ID、一般视觉标识303的世界坐标、特殊视觉标识304的ID、特殊视觉标识304的世界坐标,一般视觉标识305的ID、一般视觉标识305的世界坐标、一般视觉标识306的ID以及一般视觉标识306的世界坐标),接收到边缘设备发送的区域302中的视觉标识的ID以及视觉标识的ID对应的视觉标识的世界坐标后,可以根据特殊视觉标识的ID获取特殊视觉标识的世界坐标。
其中,特殊视觉标识的世界坐标用于确定特殊视觉标识在电子地图中的位置,一般视觉标识的世界坐标用于确定一般视觉标识在电子地图中的位置。
在具体实现中,作为一种实施例,特殊视觉标识的世界坐标可以是特殊视觉标识的四个角的世界坐标,一般视觉标识的世界坐标可以是一般视觉标识的四个角的世界坐标。
可选的,接收来自边缘设备的摄像机拍摄区域中视觉标识的世界坐标后,根据视觉标识的世界坐标、摄像机的内参以及摄像机的估计外参生成模拟道路,其中,模拟道路为摄像机拍摄区域中的道路对应的虚拟道路。
可选的,根据特殊视觉标识的世界坐标,得到拍摄区域中多个估计点的世界坐标,包括:根据特殊视觉标识的世界坐标;获取特殊视觉标识附近的一般视觉标识的世界坐标;根据特殊视觉标识的世界坐标以及一般视觉标识的世界坐标,获取拍摄区域中多个估计点的世界坐标。
示例性的,以图3所示的特殊视觉标识的部署示意图为例,介绍根据特殊视觉标识304的世界坐标,得到拍摄区域中多个估计点的世界坐标的具体过程。若摄像机1的拍摄区域是区域302,区域302包括4个视觉标识,分别是一般视觉标识303、特殊视觉标识304、一般视觉标识305以及一般视觉标识306,特殊视觉标识304附近的一般视觉标识有一般视觉标识303和一般视觉标识305,假设最终确定获取一般视觉标识303的世界坐标,将特殊视觉标识304的四个角的世界坐标以及一般视觉标识303的四个角的世界坐标,作为多个估计点的世界坐标。
需要说明的是,在根据特殊视觉标识的世界坐标,得到拍摄区域中多个估计点的世界坐标的过程中,可以获取特殊视觉标识附近的一般视觉标识的世界坐标,也可以获取距离特殊视觉标识的距离为预设距离的一般视觉标识的世界坐标,不予限制。
需要说明的是,在根据特殊视觉标识的世界坐标,得到拍摄区域中多个估计点的世界坐标的过程中,可以根据特殊视觉标识的世界坐标,获取多个一般视觉标识的世界坐标,并根据多个一般视觉标识的世界坐标获取多个估计点的世界坐标,其中,多个估计点可以包括每个一般视觉标识的四个角的点。
一种可能的实现方式,获取摄像机拍摄区域中特殊视觉标识的图像坐标,包括:获取摄像机拍摄的图像;利用特征提取算法从摄像机拍摄的图像中提取视觉标识;利用尺度不变特征变换(scale-invariant feature transform,SIFT)或加速鲁棒特征(speeded  up robust features,SURF)等方法提取视觉标识的四个角的图像坐标;利用颜色检测等方法识别视觉标识中的特殊视觉标识,并获取特殊视觉标识的四个角的图像坐标。
可选的,根据特殊视觉标识的图像坐标,得到拍摄区域中多个估计点的图像坐标,包括:根据特殊视觉标识的图像坐标;获取特殊视觉标识附近的一般视觉标识的图像坐标;根据特殊视觉标识的图像坐标以及一般视觉标识的图像坐标,获取拍摄区域中多个估计点的图像坐标。
示例性的,以图3所示的特殊视觉标识的部署示意图为例,介绍根据特殊视觉标识304的图像坐标,得到拍摄区域中多个估计点的图像坐标的具体过程。若摄像机1的拍摄区域是区域302,区域302包括4个视觉标识,分别是一般视觉标识303、特殊视觉标识304、一般视觉标识305以及一般视觉标识306,特殊视觉标识304附近的一般视觉标识有一般视觉标识303和一般视觉标识305,假设最终确定获取一般视觉标识303的图像坐标,将特殊视觉标识304的四个角的图像坐标以及一般视觉标识303的四个角的图像坐标,作为多个估计点的图像坐标。
需要说明的是,在根据特殊视觉标识的图像坐标,得到拍摄区域中多个估计点的图像坐标的过程中,可以获取特殊视觉标识附近的一般视觉标识的图像坐标,也可以获取距离特殊视觉标识的距离为预设距离的一般视觉标识的图像坐标,不予限制。
需要说明的是,在根据特殊视觉标识的图像坐标,得到拍摄区域中多个估计点的图像坐标的过程中,可以根据特殊视觉标识的图像坐标,获取多个一般视觉标识的图像坐标,并根据多个一般视觉标识的图像坐标获取多个估计点的图像坐标,其中,多个估计点可以包括每个一般视觉标识的四个角的点。
可选的,多个估计点的个数大于等于8。
其中,根据多个估计点的世界坐标、多个估计点的图像坐标以及摄像机的内参得到摄像机的估计外参,可以包括:根据摄像机的内参得到摄像的内参矩阵;根据多个估计点的世界坐标、多个估计点的图像坐标以及摄像机的内参矩阵,得到以摄像机的估计外参对应的物理变换矩阵为未知数的方程组,通过求解方程组得到摄像机的估计外参对应的物理变换矩阵;根据摄像机的估计外参对应的物理变换矩阵得到摄像机的估计外参。根据多个估计点的世界坐标、多个估计点的图像坐标以及摄像机的内参得到摄像机的估计外参的具体过程可以参考下述图8所示方法的第五种实现场景中的描述。
可选的,得到摄像机的估计外参后,向边缘设备发送该摄像机的估计外参,以便后续根据摄像机的估计外参、摄像机的内参以及目标的图像坐标对目标进行定位。
需要说明的是,可以在停车场中无车辆或其他目标干扰的情况下,执行图8所示方法的第四种实现场景中的方法。
例如,在停车场中无车辆或其他目标干扰的情况下,获取摄像机拍摄区域中特殊视觉标识的世界坐标;根据特殊视觉标识的世界坐标,得到拍摄区域中多个估计点的世界坐标;获取摄像机拍摄区域中特殊视觉标识的图像坐标;根据特殊视觉标识的图像坐标,得到拍摄区域中多个估计点的图像坐标;根据多个估计点的世界坐标、多个估计点的图像坐标以及摄像机的内参得到摄像机的估计外参。
基于图8所示方法的第四种实现场景,可以获取摄像机拍摄区域中特殊视觉标识 的世界坐标,根据特殊视觉标识的世界坐标,得到拍摄区域中多个估计点的世界坐标,并获取摄像机拍摄区域中特殊视觉标识的图像坐标,根据特殊视觉标识的图像坐标,得到拍摄区域中多个估计点的图像坐标,再根据多个估计点的世界坐标、多个估计点的图像坐标以及摄像机的内参得到摄像机的估计外参,以便后续根据摄像机的估计外参、摄像机的内参以及目标的图像坐标对目标进行定位。
进一步可选的,在图8所示方法的第五种实现场景中,根据多个估计点的世界坐标、多个估计点的图像坐标以及摄像机的内参得到摄像机的估计外参,包括:根据摄像机的内参得到摄像的内参矩阵;根据多个估计点的世界坐标、多个估计点的图像坐标以及摄像机的内参矩阵,得到以摄像机的估计外参对应的物理变换矩阵为未知数的方程组,通过求解方程组得到摄像机的估计外参对应的物理变换矩阵;根据摄像机的估计外参对应的物理变换矩阵得到摄像机的估计外参。
示例性的,以多个估计点的个数为8,该8个估计点的世界坐标分别为(X 1,Y 1,Z 1)、(X 2,Y 2,Z 2)、(X 3,Y 3,Z 3)、(X 4,Y 4,Z 4)、(X 5,Y 5,Z 5)、(X 6,Y 6,Z 6)、(X 7,Y 7,Z 7)以及(X 8,Y 8,Z 8),该8个估计点的图像坐标分别为(x 1,y 1)、(x 2,y 2)、(x 3,y 3)、(x 4,y 4)、(x 5,y 5)、(x 6,y 6)、(x 7,y 7)以及(x 8,y 8)为例,则根据多个估计点的世界坐标、多个估计点的图像坐标以及摄像机的内参矩阵,可以得到如下以摄像机的估计外参对应的物理变换矩阵为未知数的方程组:
Figure PCTCN2020111505-appb-000011
利用约束最小二乘法或随机抽样一致性等方法可以对上述方程进行求解,得到sW,再根据sW得到摄像机的估计外参。
基于图8所示方法的第五种实现场景,可以根据摄像机的内参得到摄像的内参矩阵,根据多个估计点的世界坐标、多个估计点的图像坐标以及摄像机的内参矩阵,得到以摄像机的估计外参对应的物理变换矩阵为未知数的方程组,并通过求解方程组得到摄像机的估计外参对应的物理变换矩阵,最后根据摄像机的估计外参对应的物理变换矩阵得到摄像机的估计外参,以便后续根据摄像机的估计外参、摄像机的内参以及目标的图像坐标对目标进行定位。
需要说明的是,图8所示的定位方法可以应用于图6所示的智能摄像机630或边缘计算装置660。下面结合图6,对图8所示的定位方法应用于图6所示的智能摄像机630或边缘计算装置660进行介绍。
如图11所示,为本申请实施例提供的又一种定位方法,该定位方法包括步骤1101-步骤1121。
步骤1101:智能摄像机630向边缘设备610发送智能摄像机630的ID。
步骤1102:边缘设备610接收来自智能摄像机630的智能摄像机630的ID。
步骤1103:边缘设备610根据向智能摄像机630的ID向智能摄像机630发送智能摄像机630拍摄区域中视觉标识的ID以及视觉标识ID对应的视觉标识的世界坐标。
步骤1104:智能摄像机630接收来自边缘设备610的智能摄像机630拍摄区域中 视觉标识的ID以及视觉标识ID对应的视觉标识的世界坐标。
步骤1105:智能摄像机630根据特殊视觉标识的ID获取特殊视觉标识的世界坐标。
步骤1106:智能摄像机630根据特殊视觉标识的世界坐标,得到拍摄区域中多个估计点的世界坐标。
上述步骤1101-步骤1106的具体过程可以参考上述图8所示方法的第四种实现场景中的描述,此处不再赘述。
步骤1107:智能摄像机630获取智能摄像机630拍摄区域中特殊视觉标识的图像坐标。
可选的,智能摄像机630拍摄图像并存储该图像,再利用特征提取算法从智能摄像机630拍摄的图像中提取视觉标识;利用SIFT或SURF等方法提取视觉标识的四个角的图像坐标;利用颜色检测等方法识别视觉标识中的特殊视觉标识,并获取特殊视觉标识的四个角的图像坐标。
步骤1108:智能摄像机630根据特殊视觉标识的图像坐标,得到拍摄区域中多个估计点的图像坐标。
上述步骤1108的具体过程可以参考上述图8所示方法的第四种实现场景中的描述,此处不再赘述。
步骤1109:智能摄像机630根据多个估计点的世界坐标、多个估计点的图像坐标以及智能摄像机630的内参得到智能摄像机630的估计外参。
上述步骤1109的具体过程可以参考上述图8所示方法的第五种实现场景中的描述,此处不再赘述。
步骤1110:智能摄像机630向边缘设备610发送智能摄像机630的估计外参。
可选的,智能摄像机630将智能摄像机630的估计外参存储在智能摄像机630中。
步骤1111:边缘设备610接收来自智能摄像机630的智能摄像机630的估计外参,并存储于电子地图的MAP层。
步骤1112:智能摄像机630向边缘设备610发送智能摄像机630的ID。
步骤1113:边缘设备610接收来自智能摄像机630的智能摄像机630的ID。
步骤1114:边缘设备610根据智能摄像机630的ID向智能摄像机630发送智能摄像机630的估计外参以及智能摄像机630的内参。
需要说明的是,若智能摄像机630中存储有智能摄像机630的估计外参和智能摄像机的内参,可以直接从智能摄像机630的存储器中获取智能摄像机630的估计外参和智能摄像机的内参。
步骤1115:智能摄像机630接收来自边缘设备610的智能摄像机630的估计外参以及智能摄像机630的内参。
步骤1116:智能摄像机630获取智能摄像机630拍摄的图像中目标的图像坐标。
上述步骤1116的具体过程可以参考上述步骤802以及上述图8所示方法的第二种实现场景中的描述,此处不再赘述。
步骤1117:智能摄像机630根据智能摄像机630的估计外参、智能摄像机630的内参以及目标的图像坐标得到目标的世界坐标。
上述步骤1117的具体过程可以参考上述图8所示方法的第一种实现场景中的描述,此处不再赘述。
步骤1118:智能摄像机630根据智能摄像机630的估计外参、智能摄像机630的内参以及第一偏差的图像坐标得到第一偏差的世界坐标。
步骤1119:智能摄像机630根据智能摄像机630的估计外参、智能摄像机630的内参以及第二偏差的图像坐标得到第二偏差的世界坐标。
步骤1120:智能摄像机630计算第一偏差的世界坐标与第二偏差的世界坐标之间的距离,得到目标的定位精度。
上述步骤1118-步骤1120的具体过程可以参考上述图8所示方法的第三种实现场景中的描述,此处不再赘述。
步骤1121:智能摄像机630将目标的世界坐标和目标的定位精度更新到电子地图中,或者,智能摄像机630向行驶中的车辆发送目标的世界坐标和目标的定位精度。
基于图11所示的方法,智能摄像机630可以通过获取智能摄像机630拍摄的图像中车辆或人的图像坐标,再根据智能摄像机630拍摄区域中多个估计点的世界坐标与多个估计点的图像坐标得到的估计外参,将车辆或人的图像坐标变换为车辆或人的世界坐标,从而对车辆或人进行定位,定位精度高。
如图12所示,为本申请实施例提供的又一种定位方法,该定位方法包括步骤1201-步骤1221。
步骤1201:传统摄像机670向边缘设备640发送传统摄像机670拍摄的图像。
步骤1202:边缘设备640接收来自传统摄像机670的传统摄像机670拍摄的图像。
步骤1203:边缘设备640向边缘计算装置660发送传统摄像机670拍摄的图像、传统摄像机670拍摄区域中视觉标识的ID以及视觉标识ID对应的视觉标识的世界坐标。
步骤1204:边缘计算装置660接收来自边缘设备640的传统摄像机670拍摄的图像、传统摄像机670拍摄区域中视觉标识的ID以及视觉标识ID对应的视觉标识的世界坐标。
步骤1205:边缘计算装置660根据特殊视觉标识的ID获取特殊视觉标识的世界坐标。
步骤1206:边缘计算装置660根据特殊视觉标识的世界坐标,得到拍摄区域中多个估计点的世界坐标。
上述步骤1205-步骤1206的具体过程可以参考上述图8所示方法的第四种实现场景中的描述,此处不再赘述。
步骤1207:边缘计算装置660获取传统摄像机670拍摄区域中特殊视觉标识的图像坐标。
可选的,边缘计算装置660根据接收到的来自边缘设备640的传统摄像机670拍摄的图像,再利用特征提取算法从传统摄像机670拍摄的图像中提取视觉标识;利用SIFT或SURF等方法提取视觉标识的四个角的图像坐标;利用颜色检测等方法识别视觉标识中的特殊视觉标识,并获取特殊视觉标识的四个角的图像坐标。
步骤1208:边缘计算装置660根据特殊视觉标识的图像坐标,得到拍摄区域中多 个估计点的图像坐标。
上述步骤1208的具体过程可以参考上述图8所示方法的第四种实现场景中的描述,此处不再赘述。
步骤1209:边缘计算装置660根据多个估计点的世界坐标、多个估计点的图像坐标以及传统摄像机670的内参得到传统摄像机670的估计外参。
上述步骤1209的具体过程可以参考上述图8所示方法的第五种实现场景中的描述,此处不再赘述。
步骤1210:边缘计算装置660向边缘设备640发送传统摄像机670的估计外参。
可选的,边缘计算装置660将传统摄像机670的估计外参存储在边缘计算装置660中。
步骤1211:边缘设备640接收来自边缘计算装置660的传统摄像机670的估计外参,并存储与电子地图的MAP层。
步骤1212:传统摄像机670向边缘设备640发送传统摄像机670拍摄的图像。
步骤1213:边缘设备640接收来自传统摄像机670的传统摄像机670拍摄的图像。
步骤1214:边缘设备640向边缘计算装置660发送传统摄像机670拍摄的图像、传统摄像机670的估计外参以及传统摄像机670的内参。
需要说明的是,若边缘计算装置660中存储有传统摄像机670的估计外参,可以直接从边缘计算装置660的存储器中获取传统摄像机670的估计外参。
步骤1215:边缘计算装置660接收来自边缘设备640的传统摄像机670拍摄的图像、传统摄像机670的估计外参以及传统摄像机670的内参。
步骤1216:边缘计算装置660获取传统摄像机670拍摄的图像中目标的图像坐标。
上述步骤1216的具体过程可以参考上述步骤802以及上述图8所示方法的第二种实现场景中的描述,此处不再赘述。
步骤1217:边缘计算装置660根据传统摄像机670的估计外参、传统摄像机670的内参以及目标的图像坐标得到目标的世界坐标。
上述步骤1217的具体过程可以参考上述图8所示方法的第一种实现场景中的描述,此处不再赘述。
步骤1218:边缘计算装置660根据传统摄像机670的估计外参、传统摄像机670的内参以及第一偏差的图像坐标得到第一偏差的世界坐标。
步骤1219:边缘计算装置660根据传统摄像机670的估计外参、传统摄像机670的内参以及第二偏差的图像坐标得到第二偏差的世界坐标。
步骤1220:边缘计算装置660计算第一偏差的世界坐标与第二偏差的世界坐标之间的距离,得到目标的定位精度。
上述步骤1218-步骤1220的具体过程可以参考上述图8所示方法的第三种实现场景中的描述,此处不再赘述。
步骤1221:边缘计算装置660将目标的世界坐标和目标的定位精度更新到电子地图中,或者,边缘计算装置660向行驶中的车辆发送目标的世界坐标和目标的定位精度。
基于图12所示的方法,边缘计算装置660可以通过获取传统摄像机670拍摄的图 像中车辆或人的图像坐标,再根据传统摄像机670拍摄区域中多个估计点的世界坐标与多个估计点的图像坐标得到的估计外参,将车辆或人的图像坐标变换为车辆或人的世界坐标,从而对车辆或人进行定位,定位精度高。
上述主要从各个装置之间交互的角度对本申请实施例提供的方案进行了介绍。可以理解的是,上述定位装置(例如,智能摄像机630或边缘计算装置660)为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法操作,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本申请实施例可以根据上述方法示例对定位装置进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
比如,以采用集成的方式划分各个功能模块的情况下,图13示出了一种定位装置130的结构示意图。该定位装置130包括:获取模块1301和处理模块1302。
获取模块1301,用于获取摄像机的估计外参以及该摄像机的内参,其中,该摄像机的估计外参是根据该摄像机拍摄区域中多个估计点的世界坐标、该多个估计点的图像坐标以及该摄像机的内参得到的。
获取模块1301,还用于获取该摄像机拍摄的图像中目标的图像坐标。
处理模块1302,用于根据该摄像机的估计外参、该摄像机的内参以及该目标的图像坐标得到该目标的世界坐标。
可选的,如图14所示,定位装置还包括查询模块1303。获取模块1301,还用于获取该目标的图像信息;查询模块1303,用于根据该目标的图像信息查询该车辆的特征参数;处理模块1302,具体用于根据该摄像机的估计外参得到该摄像机的估计外参对应的物理变换矩阵;处理模块1302,还具体用于根据该摄像机的内参得到该摄像机的内参矩阵;处理模块1302,还具体用于将该目标的图像坐标、该摄像机的估计外参对应的物理变换矩阵以及该摄像机的内参矩阵进行坐标变换,得到第一世界坐标;处理模块1302,还具体用于根据该车辆的特征参数、摄像机高度、摄像机的位置以及该第一世界坐标,得到该目标的世界坐标。
可选的,若该目标为车辆,该目标的图像坐标为该摄像机拍摄的图像中该目标的特征像素点的坐标。
可选的,若该目标不是车辆,处理模块1302,具体用于根据该摄像机的估计外参得到该摄像机的估计外参对应的物理变换矩阵;处理模块1302,还具体用于根据该摄像机的内参得到该摄像机的内参矩阵;处理模块1302,还具体用于将该目标的图像坐标、该摄像机的估计外参对应的物理变换矩阵以及该摄像机的内参矩阵进行坐标变换,得到该目标的世界坐标。
可选的,若该目标不是车辆,该目标的图像坐标为该摄像机拍摄的图像中该目标与地面的接触点的坐标。
可选的,该处理模块,还用于根据该摄像机的估计外参、该摄像机的内参以及第一偏差的图像坐标得到第一偏差的世界坐标,其中,该第一偏差的图像坐标为将该目标的图像坐标向车辆行驶方向增加偏差d后的坐标;该处理模块,还用于根据该摄像机的估计外参、该摄像机的内参以及第二偏差的图像坐标得到第二偏差的世界坐标,其中,该第二偏差的图像坐标为将该目标的图像坐标向车辆行驶方向减少偏差d后的坐标;该处理模块,还用于计算该第一偏差的世界坐标与该第二偏差的世界坐标之间的距离,得到该目标的定位精度。
可选的,该获取模块,还用于获取该摄像机拍摄区域中特殊视觉标识的世界坐标,其中,该特殊视觉标识位于该摄像机的拍摄区域的第一坐标与第二坐标之间,该第一坐标为该摄像机的视场近点距离的最大值的位置的坐标,该第二坐标为该摄像机的视场远点距离的最小值的位置的坐标;该处理模块,还用于根据该特殊视觉标识的世界坐标,得到该拍摄区域中多个估计点的世界坐标;该获取模块,还用于获取该摄像机拍摄区域中该特殊视觉标识的图像坐标;该处理模块,还用于根据该特殊视觉标识的图像坐标,得到该拍摄区域中多个估计点的图像坐标;该处理模块,还用于根据该多个估计点的世界坐标、该多个估计点的图像坐标以及该摄像机的内参得到该摄像机的估计外参。
可选的,该处理模块,具体用于根据该摄像机的内参得到该摄像的内参矩阵;该处理模块,还具体用于根据该多个估计点的世界坐标、该多个估计点的图像坐标以及该摄像机的内参矩阵,得到以该摄像机的估计外参对应的物理变换矩阵为未知数的方程组,通过求解该方程组得到该摄像机的估计外参对应的物理变换矩阵;该处理模块,还具体用于根据该摄像机的估计外参对应的物理变换矩阵得到该摄像机的估计外参。
可选的,该特殊视觉标识为分道线,该分道线与该分道线周围的分道线不同。
可选的,如图15所示,该定位装置还包括更新模块1304。该更新模块,用于将该摄像机的估计外参更新到该电子地图中。
可选的,如图16所示,该定位装置还包括发送模块1305。该更新模块,用于将该目标的世界坐标更新到该电子地图中;或者,该发送模块,用于向行驶中的车辆发送该目标的世界坐标。
其中,上述方法实施例涉及的各操作的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。
在本实施例中,该定位装置130以采用集成的方式划分各个功能模块的形式来呈现。这里的“模块”可以指特定ASIC,电路,执行一个或多个软件或固件程序的处理器和存储器,集成逻辑电路,和/或其他可以提供上述功能的器件。在一个简单的实施例中,本领域的技术人员可以想到该定位装置130可以采用图7所示的形式。
比如,图7中的处理器701可以通过调用存储器703中存储的计算机执行指令,使得定位装置130执行上述方法实施例中的定位方法。
示例性的,图16中的获取模块1301、处理模块1302、查询模块1303、更新模块1304和发送模块1305的功能/实现过程可以通过图7中的处理器701调用存储器703 中存储的计算机执行指令来实现。或者,图16中的获取模块1301、处理模块1302、查询模块1303以及更新模块1304的功能/实现过程可以通过图7中的处理器701调用存储器703中存储的计算机执行指令来实现,图16中的发送模块1305的功能/实现过程可以通过图7中的通信接口704来实现。
由于本实施例提供的定位装置130可执行上述的定位方法,因此其所能获得的技术效果可参考上述方法实施例,在此不再赘述。
比如,以采用集成的方式划分各个功能模块的情况下,图17示出了一种定位装置170的结构示意图。该定位装置170包括:获取模块1701和确定模块1702。
获取模块1701,用于获取摄像机的初始外参以及该摄像机的内参。
确定模块1702,用于根据该摄像机的初始外参以及该摄像机的内参,确定停车场中特殊视觉标识的位置,其中,该特殊视觉标识用于对该摄像机拍摄区域中的目标进行定位。
可选的,确定模块1702,具体用于根据该摄像机的初始外参以及该摄像机的内参,确定该摄像机的视场近点距离的最大值的位置以及该摄像机的视场远点距离的最小值的位置;确定模块1702,还具体用于确定该摄像机的视场近点距离的最大值的位置与该摄像机的视场远点距离的最小值的位置之间的区域为特殊视觉标识的位置。
可选的,该摄像机的初始外参包括:该摄像机的位置、摄像机高度以及该摄像机的俯仰角。
其中,上述方法实施例涉及的各操作的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。
在本实施例中,该定位装置170以采用集成的方式划分各个功能模块的形式来呈现。这里的“模块”可以指特定ASIC,电路,执行一个或多个软件或固件程序的处理器和存储器,集成逻辑电路,和/或其他可以提供上述功能的器件。在一个简单的实施例中,本领域的技术人员可以想到该定位装置170可以采用图7所示的形式。
比如,图7中的处理器701可以通过调用存储器703中存储的计算机执行指令,使得定位装置170执行上述方法实施例中的定位方法。
示例性的,图17中的获取模块1701以及确定模块1702的功能/实现过程可以通过图7中的处理器701调用存储器703中存储的计算机执行指令来实现。
由于本实施例提供的定位装置170可执行上述的定位方法,因此其所能获得的技术效果可参考上述方法实施例,在此不再赘述。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件程序实现时,可以全部或部分地以计算机程序产品的形式来实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或者数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中 心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可以用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带),光介质(例如,DVD)、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。
尽管在此结合各实施例对本申请进行了描述,然而,在实施所要求保护的本申请过程中,本领域技术人员通过查看所述附图、公开内容、以及所附权利要求书,可理解并实现所述公开实施例的其他变化。在权利要求中,“包括”(comprising)一词不排除其他组成部分或步骤,“一”或“一个”不排除多个的情况。单个处理器或其他单元可以实现权利要求中列举的若干项功能。相互不同的从属权利要求中记载了某些措施,但这并不表示这些措施不能组合起来产生良好的效果。
尽管结合具体特征及其实施例对本申请进行了描述,显而易见的,在不脱离本申请的精神和范围的情况下,可对其进行各种修改和组合。相应地,本说明书和附图仅仅是所附权利要求所界定的本申请的示例性说明,且视为已覆盖本申请范围内的任意和所有修改、变化、组合或等同物。显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。

Claims (32)

  1. 一种定位方法,其特征在于,所述方法包括:
    获取摄像机的估计外参以及所述摄像机的内参,其中,所述摄像机的估计外参是根据所述摄像机拍摄区域中多个估计点的世界坐标、所述多个估计点的图像坐标以及所述摄像机的内参得到的;
    获取所述摄像机拍摄的图像中目标的图像坐标;
    根据所述摄像机的估计外参、所述摄像机的内参以及所述目标的图像坐标得到所述目标的世界坐标。
  2. 根据权利要求1所述的方法,其特征在于,若所述目标为车辆,所述方法还包括:
    获取所述目标的图像信息;
    根据所述目标的图像信息查询所述车辆的特征参数;
    所述根据所述摄像机的估计外参、所述摄像机的内参以及所述目标的图像坐标得到所述目标的世界坐标,包括:
    根据所述摄像机的估计外参得到所述摄像机的估计外参对应的物理变换矩阵;
    根据所述摄像机的内参得到所述摄像机的内参矩阵;
    所述目标的图像坐标、所述摄像机的估计外参对应的物理变换矩阵以及所述摄像机的内参矩阵进行坐标变换,得到第一世界坐标;
    根据所述车辆的特征参数、摄像机高度、摄像机的位置以及所述第一世界坐标,得到所述目标的世界坐标。
  3. 根据权利要求1或2所述的方法,其特征在于,
    若所述目标为车辆,所述目标的图像坐标为所述摄像机拍摄的图像中所述目标的特征像素点的坐标。
  4. 根据权利要求1所述的方法,其特征在于,若所述目标不是车辆,所述根据所述摄像机的估计外参、所述摄像机的内参以及所述目标的图像坐标得到所述目标的世界坐标,包括:
    根据所述摄像机的估计外参得到所述摄像机的估计外参对应的物理变换矩阵;
    根据所述摄像机的内参得到所述摄像机的内参矩阵;
    所述目标的图像坐标、所述摄像机的估计外参对应的物理变换矩阵以及所述摄像机的内参矩阵进行坐标变换,得到所述目标的世界坐标。
  5. 根据权利要求1或4所述的方法,其特征在于,
    若所述目标不是车辆,所述目标的图像坐标为所述摄像机拍摄的图像中所述目标与地面的接触点的坐标。
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述方法还包括:
    根据所述摄像机的估计外参、所述摄像机的内参以及第一偏差的图像坐标得到第一偏差的世界坐标,其中,所述第一偏差的图像坐标为将所述目标的图像坐标向车辆行驶方向增加偏差d后的坐标;
    根据所述摄像机的估计外参、所述摄像机的内参以及第二偏差的图像坐标得到第二偏差的世界坐标,其中,所述第二偏差的图像坐标为将所述目标的图像坐标向车辆 行驶方向减少偏差d后的坐标;
    计算所述第一偏差的世界坐标与所述第二偏差的世界坐标之间的距离,得到所述目标的定位精度。
  7. 根据权利要求1-6任一项所述的方法,其特征在于,所述方法还包括:
    获取所述摄像机拍摄区域中特殊视觉标识的世界坐标,其中,所述特殊视觉标识位于所述摄像机的拍摄区域的第一坐标与第二坐标之间,所述第一坐标为所述摄像机的视场近点距离的最大值的位置的坐标,所述第二坐标为所述摄像机的视场远点距离的最小值的位置的坐标;
    根据所述特殊视觉标识的世界坐标,得到所述拍摄区域中多个估计点的世界坐标;
    获取所述摄像机拍摄区域中所述特殊视觉标识的图像坐标;
    根据所述特殊视觉标识的图像坐标,得到所述拍摄区域中多个估计点的图像坐标;
    根据所述多个估计点的世界坐标、所述多个估计点的图像坐标以及所述摄像机的内参得到所述摄像机的估计外参。
  8. 根据权利要求7所述的方法,其特征在于,所述根据所述多个估计点的世界坐标、所述多个估计点的图像坐标以及所述摄像机的内参得到所述摄像机的估计外参,包括:
    根据所述摄像机的内参得到所述摄像的内参矩阵;
    根据所述多个估计点的世界坐标、所述多个估计点的图像坐标以及所述摄像机的内参矩阵,得到以所述摄像机的估计外参对应的物理变换矩阵为未知数的方程组,通过求解所述方程组得到所述摄像机的估计外参对应的物理变换矩阵;
    根据所述摄像机的估计外参对应的物理变换矩阵得到所述摄像机的估计外参。
  9. 根据权利要求7或8所述的方法,其特征在于,所述特殊视觉标识为分道线,所述分道线与所述分道线周围的分道线不同。
  10. 根据权利要求1-9任一项所述的方法,其特征在于,所述方法还包括:
    将所述摄像机的估计外参更新到电子地图中。
  11. 根据权利要求1-10任一项所述的方法,其特征在于,所述方法还包括:
    将所述目标的世界坐标更新到电子地图中;或者,
    向行驶中的车辆发送所述目标的世界坐标。
  12. 一种定位方法,其特征在于,所述方法包括:
    获取摄像机的初始外参以及所述摄像机的内参;
    根据所述摄像机的初始外参以及所述摄像机的内参,确定停车场中特殊视觉标识的位置,其中,所述特殊视觉标识用于对所述摄像机拍摄区域中的目标进行定位。
  13. 根据权利要求12所述的方法,其特征在于,所述根据所述摄像机的初始外参以及所述摄像机的内参,确定停车场中特殊视觉标识的位置,包括:
    根据所述摄像机的初始外参以及所述摄像机的内参,确定所述摄像机的视场近点距离的最大值的位置以及所述摄像机的视场远点距离的最小值的位置;
    确定所述摄像机的视场近点距离的最大值的位置与所述摄像机的视场远点距离的最小值的位置之间的区域为特殊视觉标识的位置。
  14. 根据权利要求12或13所述的方法,其特征在于,所述摄像机的初始外参包 括:所述摄像机的位置、摄像机高度以及所述摄像机的俯仰角。
  15. 一种定位装置,其特征在于,所述定位装置包括:获取模块和处理模块;
    所述获取模块,用于获取摄像机的估计外参以及所述摄像机的内参,其中,所述摄像机的估计外参是根据所述摄像机拍摄区域中多个估计点的世界坐标、所述多个估计点的图像坐标以及所述摄像机的内参得到的;
    所述获取模块,还用于获取所述摄像机拍摄的图像中目标的图像坐标;
    所述处理模块,用于根据所述摄像机的估计外参、所述摄像机的内参以及所述目标的图像坐标得到所述目标的世界坐标。
  16. 根据权利要求15所述的定位装置,其特征在于,若所述目标为车辆,所述定位装置还包括:查询模块;
    所述获取模块,还用于获取所述目标的图像信息;
    所述查询模块,用于根据所述目标的图像信息查询所述车辆的特征参数;
    所述处理模块,具体用于根据所述摄像机的估计外参得到所述摄像机的估计外参对应的物理变换矩阵;
    所述处理模块,还具体用于根据所述摄像机的内参得到所述摄像机的内参矩阵;
    所述处理模块,还具体用于将所述目标的图像坐标、所述摄像机的估计外参对应的物理变换矩阵以及所述摄像机的内参矩阵进行坐标变换,得到第一世界坐标;
    所述处理模块,还具体用于根据所述车辆的特征参数、摄像机高度、摄像机的位置以及所述第一世界坐标,得到所述目标的世界坐标。
  17. 根据权利要求15或16所述的定位装置,其特征在于,
    若所述目标为车辆,所述目标的图像坐标为所述摄像机拍摄的图像中所述目标的特征像素点的坐标。
  18. 根据权利要求15所述的定位装置,其特征在于,若所述目标不是车辆,
    所述处理模块,具体用于根据所述摄像机的估计外参得到所述摄像机的估计外参对应的物理变换矩阵;
    所述处理模块,还具体用于根据所述摄像机的内参得到所述摄像机的内参矩阵;
    所述处理模块,还具体用于将所述目标的图像坐标、所述摄像机的估计外参对应的物理变换矩阵以及所述摄像机的内参矩阵进行坐标变换,得到所述目标的世界坐标。
  19. 根据权利要求15或18所述的定位装置,其特征在于,
    若所述目标不是车辆,所述目标的图像坐标为所述摄像机拍摄的图像中所述目标与地面的接触点的坐标。
  20. 根据权利要求15-19任一项所述的定位装置,其特征在于,
    所述处理模块,还用于根据所述摄像机的估计外参、所述摄像机的内参以及第一偏差的图像坐标得到第一偏差的世界坐标,其中,所述第一偏差的图像坐标为将所述目标的图像坐标向车辆行驶方向增加偏差d后的坐标;
    所述处理模块,还用于根据所述摄像机的估计外参、所述摄像机的内参以及第二偏差的图像坐标得到第二偏差的世界坐标,其中,所述第二偏差的图像坐标为将所述目标的图像坐标向车辆行驶方向减少偏差d后的坐标;
    所述处理模块,还用于计算所述第一偏差的世界坐标与所述第二偏差的世界坐标 之间的距离,得到所述目标的定位精度。
  21. 根据权利要求15-20任一项所述的定位装置,其特征在于,
    所述获取模块,还用于获取所述摄像机拍摄区域中特殊视觉标识的世界坐标,其中,所述特殊视觉标识位于所述摄像机的拍摄区域的第一坐标与第二坐标之间,所述第一坐标为所述摄像机的视场近点距离的最大值的位置的坐标,所述第二坐标为所述摄像机的视场远点距离的最小值的位置的坐标;
    所述处理模块,还用于根据所述特殊视觉标识的世界坐标,得到所述拍摄区域中多个估计点的世界坐标;
    所述获取模块,还用于获取所述摄像机拍摄区域中所述特殊视觉标识的图像坐标;
    所述处理模块,还用于根据所述特殊视觉标识的图像坐标,得到所述拍摄区域中多个估计点的图像坐标;
    所述处理模块,还用于根据所述多个估计点的世界坐标、所述多个估计点的图像坐标以及所述摄像机的内参得到所述摄像机的估计外参。
  22. 根据权利要求21所述的定位装置,其特征在于,
    所述处理模块,具体用于根据所述摄像机的内参得到所述摄像的内参矩阵;
    所述处理模块,还具体用于根据所述多个估计点的世界坐标、所述多个估计点的图像坐标以及所述摄像机的内参矩阵,得到以所述摄像机的估计外参对应的物理变换矩阵为未知数的方程组,通过求解所述方程组得到所述摄像机的估计外参对应的物理变换矩阵;
    所述处理模块,还具体用于根据所述摄像机的估计外参对应的物理变换矩阵得到所述摄像机的估计外参。
  23. 根据权利要求21或22所述的定位装置,其特征在于,所述特殊视觉标识为分道线,所述分道线与所述分道线周围的分道线不同。
  24. 根据权利要求15-23任一项所述的定位装置,其特征在于,所述定位装置还包括:更新模块;
    所述更新模块,用于将所述摄像机的估计外参更新到电子地图中。
  25. 根据权利要求15-24任一项所述的定位装置,其特征在于,所述定位装置还包括:更新模块和发送模块;
    所述更新模块,用于将所述目标的世界坐标更新到电子地图中;或者,
    所述发送模块,用于向行驶中的车辆发送所述目标的世界坐标。
  26. 一种定位装置,其特征在于,所述定位装置包括:获取模块和确定模块;
    所述获取模块,用于获取摄像机的初始外参以及所述摄像机的内参;
    所述确定模块,用于根据所述摄像机的初始外参以及所述摄像机的内参,确定停车场中特殊视觉标识的位置,其中,所述特殊视觉标识用于对所述摄像机拍摄区域中的目标进行定位。
  27. 根据权利要求26所述的定位装置,其特征在于,
    所述确定模块,具体用于根据所述摄像机的初始外参以及所述摄像机的内参,确定所述摄像机的视场近点距离的最大值的位置以及所述摄像机的视场远点距离的最小值的位置;
    所述确定模块,还具体用于确定所述摄像机的视场近点距离的最大值的位置与所述摄像机的视场远点距离的最小值的位置之间的区域为特殊视觉标识的位置。
  28. 根据权利要求26或27所述的定位装置,其特征在于,所述摄像机的初始外参包括:所述摄像机的位置、摄像机高度以及所述摄像机的俯仰角。
  29. 一种定位装置,其特征在于,所述定位装置包括:至少一个处理器,存储器;
    所述存储器存储有程序指令,所述程序指令在所述至少一个处理器中执行,以实现权利要求1-11中任一所述的定位方法。
  30. 一种定位装置,其特征在于,所述定位装置包括:至少一个处理器,存储器;
    所述存储器存储有程序指令,所述程序指令在所述至少一个处理器中执行,以实现权利要求12-14中任一所述的定位方法。
  31. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有程序指令,所述程序指令运行时,以实现权利要求1-11中任一所述的定位方法。
  32. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有程序指令,所述程序指令运行时,以实现权利要求12-14中任一所述的定位方法。
PCT/CN2020/111505 2019-08-26 2020-08-26 定位方法及装置 WO2021037086A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP20858497.9A EP4016457A4 (en) 2019-08-26 2020-08-26 POSITIONING METHOD AND DEVICE
US17/680,923 US20220277478A1 (en) 2019-08-26 2022-02-25 Positioning Method and Apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910791953.7A CN112435300A (zh) 2019-08-26 2019-08-26 定位方法及装置
CN201910791953.7 2019-08-26

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/680,923 Continuation US20220277478A1 (en) 2019-08-26 2022-02-25 Positioning Method and Apparatus

Publications (1)

Publication Number Publication Date
WO2021037086A1 true WO2021037086A1 (zh) 2021-03-04

Family

ID=74683478

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/111505 WO2021037086A1 (zh) 2019-08-26 2020-08-26 定位方法及装置

Country Status (4)

Country Link
US (1) US20220277478A1 (zh)
EP (1) EP4016457A4 (zh)
CN (1) CN112435300A (zh)
WO (1) WO2021037086A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113240752A (zh) * 2021-05-21 2021-08-10 中科创达软件股份有限公司 一种内参和外参协同标定方法和装置
CN113409405A (zh) * 2021-07-19 2021-09-17 北京百度网讯科技有限公司 评估相机标定位置的方法、装置、设备和存储介质
CN113506210A (zh) * 2021-08-10 2021-10-15 深圳市前海动竞体育科技有限公司 一种篮球比赛自动生成运动员点位图的方法和视频拍摄装置
CN114663458A (zh) * 2022-05-24 2022-06-24 魔门塔(苏州)科技有限公司 动态标定方法、装置、驾驶状态检测方法、介质及设备

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113221253B (zh) * 2021-06-01 2023-02-07 山东贝特建筑项目管理咨询有限公司 一种用于锚栓图像检测的无人机控制方法和系统
CN113436257B (zh) * 2021-06-09 2023-02-10 同济大学 一种基于道路几何信息的车辆位置实时检测方法
CN115187658B (zh) * 2022-08-29 2023-03-24 合肥埃科光电科技股份有限公司 多相机视觉的大目标定位方法、系统及设备
CN115797445A (zh) * 2023-02-06 2023-03-14 成都智元汇信息技术股份有限公司 一种基于图像识别的室内人员定位方法及装置及介质
CN117557660B (zh) * 2024-01-09 2024-04-12 北京集度科技有限公司 数据处理方法、装置、电子设备以及车辆

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101261738A (zh) * 2008-03-28 2008-09-10 北京航空航天大学 一种基于双一维靶标的摄像机标定方法
US20110025845A1 (en) * 2009-07-31 2011-02-03 Samsung Electro-Mechanics Co., Ltd. Apparatus and method for measuring location and distance of object by using camera
CN107784672A (zh) * 2016-08-26 2018-03-09 百度在线网络技术(北京)有限公司 用于获取车载相机的外部参数的方法和装置
US20180295347A1 (en) * 2017-04-05 2018-10-11 Denso Corporation Apparatus for measuring three-dimensional position of object
CN109272551A (zh) * 2018-08-03 2019-01-25 北京航空航天大学 一种基于圆形标志点布局的视觉定位方法
CN109472829A (zh) * 2018-09-04 2019-03-15 顺丰科技有限公司 一种物体定位方法、装置、设备和存储介质

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103559791B (zh) * 2013-10-31 2015-11-18 北京联合大学 一种融合雷达和ccd摄像机信号的车辆检测方法
CN108198216A (zh) * 2017-12-12 2018-06-22 深圳市神州云海智能科技有限公司 一种机器人及其基于标识物的位姿估计方法和装置
CN109276296A (zh) * 2018-12-02 2019-01-29 沈阳聚声医疗系统有限公司 一种基于二维超声影像的穿刺针可视化方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101261738A (zh) * 2008-03-28 2008-09-10 北京航空航天大学 一种基于双一维靶标的摄像机标定方法
US20110025845A1 (en) * 2009-07-31 2011-02-03 Samsung Electro-Mechanics Co., Ltd. Apparatus and method for measuring location and distance of object by using camera
CN107784672A (zh) * 2016-08-26 2018-03-09 百度在线网络技术(北京)有限公司 用于获取车载相机的外部参数的方法和装置
US20180295347A1 (en) * 2017-04-05 2018-10-11 Denso Corporation Apparatus for measuring three-dimensional position of object
CN109272551A (zh) * 2018-08-03 2019-01-25 北京航空航天大学 一种基于圆形标志点布局的视觉定位方法
CN109472829A (zh) * 2018-09-04 2019-03-15 顺丰科技有限公司 一种物体定位方法、装置、设备和存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4016457A4

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113240752A (zh) * 2021-05-21 2021-08-10 中科创达软件股份有限公司 一种内参和外参协同标定方法和装置
CN113240752B (zh) * 2021-05-21 2024-03-22 中科创达软件股份有限公司 一种内参和外参协同标定方法和装置
CN113409405A (zh) * 2021-07-19 2021-09-17 北京百度网讯科技有限公司 评估相机标定位置的方法、装置、设备和存储介质
CN113506210A (zh) * 2021-08-10 2021-10-15 深圳市前海动竞体育科技有限公司 一种篮球比赛自动生成运动员点位图的方法和视频拍摄装置
CN114663458A (zh) * 2022-05-24 2022-06-24 魔门塔(苏州)科技有限公司 动态标定方法、装置、驾驶状态检测方法、介质及设备
CN114663458B (zh) * 2022-05-24 2022-10-11 魔门塔(苏州)科技有限公司 动态标定方法、装置、驾驶状态检测方法、介质及设备

Also Published As

Publication number Publication date
EP4016457A4 (en) 2022-11-30
US20220277478A1 (en) 2022-09-01
EP4016457A1 (en) 2022-06-22
CN112435300A (zh) 2021-03-02

Similar Documents

Publication Publication Date Title
WO2021037086A1 (zh) 定位方法及装置
EP3407294B1 (en) Information processing method, device, and terminal
US11094112B2 (en) Intelligent capturing of a dynamic physical environment
WO2020000137A1 (en) Integrated sensor calibration in natural scenes
WO2018128667A1 (en) Systems and methods for lane-marker detection
CN112270713A (zh) 标定方法以及装置、存储介质、电子装置
WO2010018009A1 (en) 3d time-of-flight camera system and position/orientation calibration method therefor
CN111383279A (zh) 外参标定方法、装置及电子设备
WO2022078513A1 (zh) 定位方法、装置、自移动设备和存储介质
CN112967344B (zh) 相机外参标定的方法、设备、存储介质及程序产品
WO2019139243A1 (ko) 자율주행을 위한 고정밀 지도의 업데이트 장치 및 방법
JP6278791B2 (ja) 車両位置検出装置、車両位置検出方法及び車両位置検出用コンピュータプログラムならびに車両位置検出システム
CN111983603A (zh) 运动轨迹接力方法、系统、装置和中心端处理设备
JP2018077162A (ja) 車両位置検出装置、車両位置検出方法及び車両位置検出用コンピュータプログラム
KR20200038140A (ko) 정밀 지도 업데이트 장치 및 방법
JP2017181476A (ja) 車両位置検出装置、車両位置検出方法及び車両位置検出用コンピュータプログラム
JP2015194373A (ja) 車両位置検出装置、車両位置検出方法及び車両位置検出用コンピュータプログラムならびに車両位置検出システム
Ke et al. Roadway surveillance video camera calibration using standard shipping container
JP2007265292A (ja) 道路標識データベース構築装置
CN114782496A (zh) 一种对象的跟踪方法、装置、存储介质及电子装置
CN110852278B (zh) 地面标识线识别方法、设备及计算机可读存储介质
CN114782548A (zh) 基于全局图像的雷视数据标定方法、装置、设备及介质
CN111860084B (zh) 图像特征的匹配、定位方法及装置、定位系统
CN117291980B (zh) 一种基于深度学习的单张无人机图像像素定位方法
KR102616437B1 (ko) 라이다 및 관성측정장치의 캘리브레이션 방법 및 이를 실행하기 위하여 기록매체에 기록된 컴퓨터 프로그램

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20858497

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2020858497

Country of ref document: EP

Effective date: 20220314