IP Library Granted Patent US 11,688,099
Granted Patent B2
US 11,688,099 · App. 17/117,422 · Granted Jun 27, 2023

Method and apparatus for detecting obstacle

Inventor: Jinrang Jia (Beijing, CN)
Assignee: Apollo Intelligent Connectivity (Beijing) Technology Co., Ltd.
G06T7/74G06F18/214G06T7/37G06T7/80G06V10/24G06V10/431G06V10/751G06V20/56G06V20/58
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,688,099
App. No.
17/117,422
Granted
Jun 27, 2023
Kind
B2
Abstract

The present disclosure discloses a method and apparatus for detecting an obstacle, and relates to the technical field of intelligent transportation. A specific implementation plan is: acquiring a current image acquired by a camera; inputting the current image into a pre-trained detection model to obtain a position of a detection frame of an obstacle and determine a first pixel coordinate of a grounding point in the current image; determining an offset between the current image and a template image; converting the first pixel coordinate into a world coordinate of the grounding point based on the offset; and outputting the world coordinate of the grounding point as a position of the obstacle in a world coordinate system. This embodiment solves the problem of camera jitter from an image perspective, greatly improves the robustness of the roadside perception system, and saves computing resources.

Claims (70)

1. A method for detecting an obstacle, comprising:

acquiring a current image captured by a camera;

inputting the current image into a pre-trained detection model to obtain a position of a detection frame of the obstacle and determine a first pixel coordinate of a grounding point in the current image, the grounding point being a point on the detection frame belonging to the detected obstacle;

calculating a rotation coefficient and a scaling coefficient of the current image to a template image, the template image being an image used when performing external parameter calibration on the camera;

rotating and scaling the current image based on the rotation coefficient and the scaling coefficient;

performing Fourier transform on the rotated and scaled current image, and acquiring a Fourier transform result of the template image;

obtaining a normalized cross power spectrum matrix for a Fourier transform result of the current image and the Fourier transform result of the template image;

performing inverse Fourier transform on the power spectrum matrix to obtain a first matrix;

finding a point having maximum energy in the first matrix, and calculating an offset of the point based on feature information of points, lines, and edges in the current image;

converting the first pixel coordinate into a world coordinate of the grounding point based on the offset; and

outputting the world coordinate of the grounding point as a position of the obstacle in a world coordinate system.

2. The method according to claim 1 , wherein the converting comprises:

determining a second pixel coordinate of the grounding point in the template image based on the first pixel coordinate and the offset;

converting the second pixel coordinate into a camera coordinate of the grounding point by using a preset ground equation; and

converting the camera coordinate of the grounding point into the world coordinate of the grounding point by using external parameters of the camera.

3. The method according to claim 2 , wherein the determining the offset between the current image and the template image comprises:

and

wherein the determining of the second pixel coordinate of the grounding point in the template image based on the first pixel coordinate and the offset, comprises:

multiplying the first pixel coordinate by the rotation coefficient and the scaling coefficient to obtain the second pixel coordinate of the grounding point in the template image.

4. The method according to claim 3 , wherein the calculating of the rotation coefficient and the scaling coefficient of the current image to the template image comprises:

performing a Fourier-Mellin transform on the current image and the template image respectively, to solve the rotation coefficient and the scaling coefficient of the current image to the template image.

5. The method according to claim 1 , wherein the calculating of the rotation coefficient and the scaling coefficient of the current image to the template image comprises:

performing a Fourier-Mellin transform on the current image and the template image respectively, to solve the rotation coefficient and the scaling coefficient of the current image to the template image.

6. An electronic device, comprising:

at least one processor; and

a memory, communicatively connected to the at least one processor and storing instructions executable by the at least one processor to perform an operation for detecting an obstacle, the operation comprising:

acquiring a current image acquired by a camera;

inputting the current image into a pre-trained detection model to obtain a position of a detection frame of the obstacle and determine a first pixel coordinate of a grounding point in the current image, the grounding point being a point on the detection frame belonging to the detected obstacle;

calculating a rotation coefficient and a scaling coefficient of the current image to a template image, the template image being an image used when performing external parameter calibration on the camera;

rotating and scaling the current image based on the rotation coefficient and the scaling coefficient;

performing Fourier transform on the rotated and scaled current image, and acquiring a Fourier transform result of the template image;

obtaining a normalized cross power spectrum matrix for a Fourier transform result of the current image and the Fourier transform result of the template image;

performing inverse Fourier transform on the power spectrum matrix to obtain a first matrix;

finding a point having maximum energy in the first matrix, and calculating an offset of the point based on feature information of points, lines, and edges in the current image;

converting the first pixel coordinate into a world coordinate of the grounding point based on the offset; and

outputting the world coordinate of the grounding point as a position of the obstacle in a world coordinate system.

7. The electronic device according to claim 6 , wherein the converting the first pixel coordinate into world coordinate of the grounding point based on the offset, comprises:

determining a second pixel coordinate of the grounding point in the template image based on the first pixel coordinate and the offset;

converting the second pixel coordinate into a camera coordinate of the grounding point using a preset ground equation; and

converting the camera coordinate of the grounding point into the world coordinate of the grounding point using external parameters of the camera.

8. The electronic device according to claim 7 , wherein the determining the offset between the current image and the template image comprises:

and

wherein the determining of the second pixel coordinate of the grounding point in the template image based on the first pixel coordinate and the offset comprises:

multiplying the first pixel coordinate by the rotation coefficient and the scaling coefficient to obtain the second pixel coordinate of the grounding point in the template image.

9. The electronic device according to claim 8 , wherein the calculating of the rotation coefficient and the scaling coefficient of the current image to the template image comprises:

performing a Fourier-Mellin transform on the current image and the template image respectively, to solve the rotation coefficient and the scaling coefficient of the current image to the template image.

10. The electronic device according to claim 6 , wherein the calculating of the rotation coefficient and the scaling coefficient of the current image to the template image, comprises:

performing a Fourier-Mellin transform on the current image and the template image respectively, to solve the rotation coefficient and the scaling coefficient of the current image to the template image.

11. A non-transitory computer readable storage medium, storing computer instructions executable by a computer to perform an operation for detecting an obstacle, the operation comprising:

acquiring a current image acquired by a camera;

inputting the current image into a pre-trained detection model to obtain a position of a detection frame of the obstacle and determine a first pixel coordinate of a grounding point in the current image, the grounding point being a point on the detection frame belonging to the detected obstacle;

calculating a rotation coefficient and a scaling coefficient of the current image to a template image, the template image being an image used when performing external parameter calibration on the camera;

rotating and scaling the current image based on the rotation coefficient and the scaling coefficient;

performing Fourier transform on the rotated and scaled current image, and acquiring a Fourier transform result of the template image;

obtaining a normalized cross power spectrum matrix for a Fourier transform result of the current image and the Fourier transform result of the template image;

performing inverse Fourier transform on the power spectrum matrix to obtain a first matrix;

finding a point having maximum energy in the first matrix, and calculating an offset of the point based on feature information of points, lines, and edges in the current image;

converting the first pixel coordinate into a world coordinate of the grounding point based on the offset; and

outputting the world coordinate of the grounding point as a position of the obstacle in a world coordinate system.

12. The non-transitory computer readable storage medium according to claim 11 , wherein the converting the first pixel coordinate into world coordinate of the grounding point based on the offset comprises:

determining a second pixel coordinate of the grounding point in the template image based on the first pixel coordinate and the offset;

converting the second pixel coordinate into a camera coordinate of the grounding point using a preset ground equation; and

converting the camera coordinate of the grounding point into the world coordinate of the grounding point using external parameters of the camera.

13. The non-transitory computer readable storage medium according to claim 12 ,

wherein the determining of the second pixel coordinate of the grounding point in the template image based on the first pixel coordinate and the offset comprises:

multiplying the first pixel coordinate by the rotation coefficient and the scaling coefficient to obtain the second pixel coordinate of the grounding point in the template image.

14. The non-transitory computer readable storage medium. according to claim 13 , wherein the calculating of the rotation coefficient and the scaling coefficient of the current image to the template image comprises:

performing a Fourier-Mellin transform on the current image and the template image respectively, to solve the rotation coefficient and the scaling coefficient of the current image to the template image.

15. The non-transitory computer readable storage medium according to claim 11 , wherein the calculating of the rotation coefficient and the scaling coefficient of the current image to the template image comprises:

performing a Fourier-Mellin transform on the current image and the template image respectively, to solve the rotation coefficient and the scaling coefficient of the current image to the template image.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 13, 2021
From: BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY CO., LTD.
To: APOLLO INTELLIGENT CONNECTIVITY (BEIJING) TECHNOLOGY CO., LTD.
Reel/Frame 057789/0357 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 10, 2020
From: JIA, JINRANG
To: BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY CO., LTD.
Reel/Frame 054603/0990 →
Priority Claims (1)
CN 202010429060.0 · May 20, 2020 · national
Continuity (1)
Related Publication 20210366155A1 · Nov 25, 2021