# US 2023/0068025 A1 · Method and apparatus for generating road annotation, device and storage medium

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2023/0068025 A1
- Document ID: US20230068025A1
- Status: Published application
- Kind: A1
- Application number: 17/981,965
- Filed: 2022-11-07
- Published: 2023-03-02
- Earliest claimed: 2021-06-02
- Assignees: Beijing Baidu Netcom Science Technology Co., Ltd.
- Applicants: Beijing Baidu Netcom Science Technology Co., Ltd.
- Inventors: Yan PENG; Xiang LONG; Honghui ZHENG; Zhuang JIA; Bin ZHANG; Xiaodi WANG; Ying XIN; Yi GU; Yunhao WANG; Chao LI; Yuan FENG; Shumin HAN
- Web page: https://patentgrep.com/patent/US20230068025A1

## CPC

- G06V 20/182: {Network patterns, e.g. roads or rivers}
- G06V 10/46: Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features (colour feature extraction G06V10/56)
- G06V 20/13: Satellite images
- Y02A 30/60: Planning or developing urban green infrastructure
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- Y02A: TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE

## Abstract

A method for generating a road annotation, a device, and a storage medium are provided. The method may include: generating a road quantity and a road width in a tag picture; generating, for each road in the tag picture, a start point and an end point of the road; generating at least one point between the start point and the end point; drawing, for two adjacent points, a line segment from a previous point to a next point, where a width of the line segment is equal to the road width; and generating slanted box annotation information based on a coordinate of the previous point and a coordinate of the next point, where the slanted box annotation information includes an intersection point of diagonal lines, a width, a height and a slant angle of a slanted box.

## Claims

### Claim 1

A method for generating a road annotation, comprising:
generating a road quantity and a road width in a tag picture;
generating, for each road in the tag picture, a start point and an end point of the road;
generating at least one point between the start point and the end point;
drawing, for two adjacent points, a line segment from a previous point to a next point, wherein a width of the line segment is equal to the road width; and
generating slanted box annotation information based on a coordinate of the previous point and a coordinate of the next point, wherein the slanted box annotation information comprises an intersection point of diagonal lines, a width, a height and a slant angle of a slanted box.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the generating at least one point between the start point and the end point comprises:
performing following point generation steps (1)-(3):
step (1) including generating a next point of the start point and determining whether a coordinate of the next point satisfies a preset condition;
step (2) including determining that a point generation is completed in response to the coordinate satisfying the preset condition; and
step (3) including using the next point as the start point and continuing to perform the point generation steps (1)-(3), in response to the coordinate not satisfying the preset condition.

### Claim 3 (depends on 2)

The method according to claim 2, wherein a random number between an abscissa of the start point and an abscissa of the end point is taken as an abscissa of the next point, a random number between an ordinate of the start point and an ordinate of the end point is taken as an ordinate of the next point, and the preset condition comprises the abscissa of the next point being identical to an abscissa of the end point and/or the ordinate of the next point being identical to an ordinate of the end point.

### Claim 4 (depends on 1)

The method according to claim 1, wherein the coordinate of the previous point is (x1, y1), the coordinate of the next point is (x2, y2), the road width is width, an abscissa cx of the intersection point of the diagonal lines of the slanted box satisfies cx=(x1+x2)/2, an ordinate cy of the intersection point of the diagonal lines of the slanted box satisfies cy=(y1+y2)/2, the width w of the slanted box satisfies w=√{square root over ((x2−x1)2+(y2−y1)2)}, the height h of the slanted box satisfies h=width, and the slant angle theta of the slanted box satisfies theta=arctan 2[(y2−y1),(x2−x1)], wherein when
theta
>
3
4
⁢
π
,
the slant angle theta of the slanted box satisfies theta=theta−π, and when
theta
<
-
1
4
⁢
π
,
the slant angle theta of the slanted box satisfies theta=theta+π.

### Claim 5 (depends on 1)

The method according to claim 1, wherein generating the start point and the end point of the road comprises:
generating randomly a coordinate of the start point of the road;
generating randomly an indicator of a boundary where the end point of the road is, wherein the end point is on a boundary of the tag picture;
determining a value of the end point on one coordinate axis based on the indicator of the boundary where the end point is;
generating randomly a value of the end point on another coordinate axis; and
generating a coordinate of the end point based on the value of the end point on the one coordinate axis and the value of the end point on the another coordinate axis.

### Claim 6 (depends on 1)

The method according to claim 1, wherein the generating a road quantity and a road width in a tag picture comprises:
generating the road quantity and the road width by generating a random number.

### Claim 7

An electronic device, comprising:
at least one processor; and
a storage device, in communication with the at least one processor,
wherein the storage device stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, to enable the at least one processor to perform operations comprising:
generating a road quantity and a road width in a tag picture;
generating, for each road in the tag picture, a start point and an end point of the road;
generating at least one point between the start point and the end point;
drawing, for two adjacent points, a line segment from a previous point to a next point, wherein a width of the line segment is equal to the road width; and
generating slanted box annotation information based on a coordinate of the previous point and a coordinate of the next point, wherein the slanted box annotation information comprises an intersection point of diagonal lines, a width, a height and a slant angle of a slanted box.

### Claim 8 (depends on 7)

The device according to claim 7, wherein the generating at least one point between the start point and the end point comprises:
performing following point generation steps (1)-(3):
step (1) including generating a next point of the start point and determining whether a coordinate of the next point satisfies a preset condition;
step (2) including determining that a point generation is completed in response to the coordinate satisfying the preset condition; and
step (3) including using the next point as the start point and continuing to perform the point generation steps (1)-(3), in response to the coordinate not satisfying the preset condition.

### Claim 9 (depends on 8)

The device according to claim 8, wherein a random number between an abscissa of the start point and an abscissa of the end point is taken as an abscissa of the next point, a random number between an ordinate of the start point and an ordinate of the end point is taken as an ordinate of the next point, and the preset condition comprises the abscissa of the next point being identical to an abscissa of the end point and/or the ordinate of the next point being identical to an ordinate of the end point.

### Claim 10 (depends on 7)

The device according to claim 7, wherein the coordinate of the previous point is (x1, y1), the coordinate of the next point is (x2, y2), the road width is width, an abscissa cx of the intersection point of the diagonal lines of the slanted box satisfies cx=(x1+x2)/2, an ordinate cy of the intersection point of the diagonal lines of the slanted box satisfies cy=(y1+y2)/2, the width w of the slanted box satisfies w=√{square root over ((x2−x1)2+(y2−y1)2)}, the height h of the slanted box satisfies h=width, and the slant angle theta of the slanted box satisfies theta=arctan 2[(y2−y1),(x2−x1)], wherein when
theta
>
3
4
⁢
π
,
the slant angle theta of the slanted box satisfies theta=theta−π, and when
theta
<
-
1
4
⁢
π
,
the slant angle theta of the slanted box satisfies theta=theta+π.

### Claim 11 (depends on 7)

The device according to claim 7, wherein generating the start point and the end point of the road comprises:
generating randomly a coordinate of the start point of the road;
generating randomly an indicator of a boundary where the end point of the road is, wherein the end point is on a boundary of the tag picture;
determining a value of the end point on one coordinate axis based on the indicator of the boundary where the end point is;
generating randomly a value of the end point on another coordinate axis; and
generating a coordinate of the end point based on the value of the end point on the one coordinate axis and the value of the end point on the another coordinate axis.

### Claim 12 (depends on 7)

The device according to claim 7, wherein the generating a road quantity and a road width in a tag picture comprises:
generating the road quantity and the road width by generating a random number.

### Claim 13

A non-transitory computer readable storage medium, storing a computer instruction, wherein the computer instruction is used to cause a computer to perform operations comprising:
generating a road quantity and a road width in a tag picture;
generating, for each road in the tag picture, a start point and an end point of the road;
generating at least one point between the start point and the end point;
drawing, for two adjacent points, a line segment from a previous point to a next point, wherein a width of the line segment is equal to the road width; and
generating slanted box annotation information based on a coordinate of the previous point and a coordinate of the next point, wherein the slanted box annotation information comprises an intersection point of diagonal lines, a width, a height and a slant angle of a slanted box.

### Claim 14 (depends on 13)

The storage medium according to claim 13, wherein the generating at least one point between the start point and the end point comprises:
performing following point generation steps (1)-(3):
step (1) including generating a next point of the start point and determining whether a coordinate of the next point satisfies a preset condition;
step (2) including determining that a point generation is completed in response to the coordinate satisfying the preset condition; and
step (3) including using the next point as the start point and continuing to perform the point generation steps (1)-(3), in response to the coordinate not satisfying the preset condition.

### Claim 15 (depends on 14)

The storage medium according to claim 14, wherein a random number between an abscissa of the start point and an abscissa of the end point is taken as an abscissa of the next point, a random number between an ordinate of the start point and an ordinate of the end point is taken as an ordinate of the next point, and the preset condition comprises the abscissa of the next point being identical to an abscissa of the end point and/or the ordinate of the next point being identical to an ordinate of the end point.

### Claim 16 (depends on 13)

The storage medium according to claim 13, wherein the coordinate of the previous point is (x1, y1), the coordinate of the next point is (x2, y2), the road width is width, an abscissa cx of the intersection point of the diagonal lines of the slanted box satisfies cx=(x1+x2)/2, an ordinate cy of the intersection point of the diagonal lines of the slanted box satisfies cy=(y1+y2)/2, the width w of the slanted box satisfies w=√{square root over ((x2−x1)2+(y2−y1)2)}, the height h of the slanted box satisfies h=width, and the slant angle theta of the slanted box satisfies theta=arctan 2[(y2−y1),(x2−x1)], wherein when
theta
>
3
4
⁢
π
,
the slant angle theta of the slanted box satisfies theta=theta−π, and when
theta
<
-
1
4
⁢
π
,
the slant angle theta of the slanted box satisfies theta=theta+π.

### Claim 17 (depends on 13)

The storage medium according to claim 13, wherein generating the start point and the end point of the road comprises:
generating randomly a coordinate of the start point of the road;
generating randomly an indicator of a boundary where the end point of the road is, wherein the end point is on a boundary of the tag picture;
determining a value of the end point on one coordinate axis based on the indicator of the boundary where the end point is;
generating randomly a value of the end point on another coordinate axis; and
generating a coordinate of the end point based on the value of the end point on the one coordinate axis and the value of the end point on the another coordinate axis.

### Claim 18 (depends on 13)

The storage medium according to claim 13, wherein the generating a road quantity and a road width in a tag picture comprises:
generating the road quantity and the road width by generating a random number.
