# US 2024/0203134 A1 · Lane line detection method, vehicle-mounted 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 2024/0203134 A1
- Document ID: US20240203134A1
- Status: Published application
- Kind: A1
- Application number: 18/125,680
- Filed: 2023-03-23
- Published: 2024-06-20
- Earliest claimed: 2022-12-20
- Assignees: Hon Hai Precision Industry Co., Ltd.
- Applicants: Hon Hai Precision Industry Co., Ltd.
- Inventors: CHIEH LEE; CHIN-PIN KUO
- Web page: https://patentgrep.com/patent/US20240203134A1

## CPC

- G06V 20/588: {Recognition of the road, e.g. of lane markings; Recognition of the vehicle driving pattern in relation to the road}
- G06T 7/70: Determining position or orientation of objects or cameras (camera calibration G06T7/80)
- G06V 10/28: Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
- G06T 2207/20084: Artificial neural networks [ANN]
- G06T 2207/30256: Lane; Road marking
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

A lane line detection method applied to a vehicle-mounted device is provided. In the method, the vehicle-mounted device converts a foreground image into a bird's-eye view (BEV) image, sets a peak of a horizontal histogram of the BEV image as a starting point for moving the sliding window, and generate a main lane line by fitting multiple non-zero pixels of the horizontal sliding window. The vehicle-mounted device calculates a confidence coefficient of each horizontal sliding window; and sets a previous one before the preset number of continuous horizontal sliding windows as a previous horizontal sliding window and determines an end point of the main lane line according to the previous horizontal sliding window when the confidence coefficients of preset number of continuous horizontal sliding windows are less than a predetermined threshold. The method improves accuracy of identifying lane lines.

## Claims

### Claim 1

A lane line detection method using a vehicle-mounted device, the method comprising:
obtaining a foreground image of a vehicle;
converting the foreground image into a bird's eye view (BEV) image;
establishing a horizontal histogram image corresponding to the BEV image;
setting a peak of the horizontal histogram as a starting point while moving a horizontal sliding window, and generating a main lane line by fitting a plurality of non-zero pixels of the horizontal sliding window;
calculating a confidence coefficient of each horizontal sliding window;
in response that a plurality of confidence coefficients of a preset number of continuous horizontal sliding windows are less than a predetermined threshold, setting a sliding window that is previous before the preset number of continuous horizontal sliding windows as a previous horizontal sliding window, and determining an end of the main lane line according to the previous horizontal sliding window; and
establishing a vertical histogram according to the BEV image, and setting a peak of the vertical histogram as a starting point while moving a vertical sliding window;
generating a target curve by fitting the non-zero pixels of the vertical sliding window; and
determining that the target curve is a stop line in response that the end point of the lane line being on the target curve.

### Claim 2 (depends on 1)

The lane line detection method according to claim 1, wherein converting the foreground image into the BEV image comprises:
obtaining a corrected image by performing a distortion correction on the foreground image, and
setting each non-zero pixel of the corrected image as a target point;
obtaining an inverse perspective transformation matrix by performing a coordinate transformation on each target point of the corrected image; and
converting the corrected image to the BEV image according to the inverse perspective transformation matrix.

### Claim 3 (depends on 1)

The lane line detection method according to claim 1, wherein setting the peak of the horizontal histogram as the starting point while moving the horizontal sliding window, and generating the main lane line by fitting the plurality of non-zero pixels of the horizontal sliding window comprises:
setting the peak of the horizontal histogram as the starting point for moving the horizontal sliding window;
calculating a first average value of the horizontal coordinates of all non-zero pixels in the previous horizontal sliding window of a current horizontal sliding window;
setting the first average value as a first horizontal coordinate average value;
determining a horizontal center of the current horizontal sliding window according to the first horizontal coordinate average value;
determining a position of the current horizontal sliding window according to the determined horizontal center; and
generating the main lane line by fitting all the non-zero pixels of the current horizontal sliding window and all horizontal sliding windows before the current horizontal sliding window.

### Claim 4 (depends on 1)

The lane line detection method according to claim 1, wherein calculating the confidence coefficient of each horizontal sliding window comprises:
inputting the BEV image comprising the horizontal sliding window into a predetermined deep learning neural network model;
calculating a similarity between a pixel feature of each pixel of each horizontal sliding window and a sample feature; and
determining the confidence coefficient of each horizontal sliding window based on the similarity, the similarity being proportional to the confidence coefficient.

### Claim 5 (depends on 1)

The lane line detection method according to claim 1, wherein setting the peak of the vertical histogram as the starting point while moving the vertical sliding window and generating the target curve by fitting the plurality of non-zero pixels of the vertical sliding window comprises:
setting a peak of the vertical sliding window as the starting point while moving the vertical sliding window;
calculating a second average value of the vertical coordinates of all non-zero pixels in the previous vertical sliding window of a current vertical sliding window;
setting the second average value as a second vertical coordinate average value;
determining a vertical center of the current vertical sliding window according to the second vertical coordinate average value;
determining a position of the current vertical sliding window according to the determined vertical center; and
generating the target curve by fitting all the non-zero pixels of the current vertical sliding window and all vertical sliding windows before the current vertical sliding window.

### Claim 6 (depends on 1)

The lane line detection method according to claim 1, wherein determining that the target curve is the stop line in response that the end point of the lane line being on the target curve comprises:
calculating at least one matching degree between a plurality of vertical sliding windows corresponding to the target curve and the previous horizontal sliding window;
determining the end of the main lane line is located on the target curve in response that any one of the at least one matching degree exceeds a preset matching degree; and
determining the position of the stop line according to the position of the target curve and the position of the end of the main lane line.

### Claim 7 (depends on 6)

The lane line detection method according to claim 6, wherein after determining the target curve is the stop line, the method further comprises:
filtering out the preset number of continues horizontal sliding windows.

### Claim 8

A vehicle-mounted device comprising:
a storage device;
at least one processor; and
the storage device storing one or more programs, which when executed by the at least one processor, cause the at least one processor to:
obtain a foreground image of a vehicle;
convert the foreground image into a bird's eye view (BEV) image;
establish a horizontal histogram image corresponding to the BEV image;
set a peak of the horizontal histogram as a starting point while moving a horizontal sliding window, and generate a main lane line by fitting a plurality of non-zero pixels of the horizontal sliding window;
calculate a confidence coefficient of each horizontal sliding window;
in response that a plurality of confidence coefficients of a preset number of continuous horizontal sliding windows are less than a predetermined threshold, set a sliding window that is previous before the preset number of continuous horizontal sliding windows as a previous horizontal sliding window, and determine an end of the main lane line according to the previous horizontal sliding window; and
establish a vertical histogram according to the BEV image, and set a peak of the vertical histogram as a starting point while moving a vertical sliding window;
generate a target curve by fitting the non-zero pixels of the vertical sliding window; and
determine that the target curve is a stop line in response that the end point of the lane line being on the target curve.

### Claim 9 (depends on 8)

The vehicle-mounted device according to claim 8, wherein the at least one processor converts the foreground image into the BEV image by:
obtaining a corrected image by performing a distortion correction on the foreground image;
setting each non-zero pixel of the corrected image as a target point;
obtaining an inverse perspective transformation matrix by performing a coordinate transformation on each target point of the corrected image; and
converting the corrected image to the BEV image according to the inverse perspective transformation matrix.

### Claim 10 (depends on 8)

The vehicle-mounted device according to claim 8, wherein the at least one processor sets the peak of the horizontal histogram as the starting point while moving the horizontal sliding window, and generates the main lane line by fitting the plurality of non-zero pixels of the horizontal sliding window by:
setting the peak of the horizontal histogram as the starting point for moving the horizontal sliding window;
calculating a first average value of the horizontal coordinates of all non-zero pixels in the previous horizontal sliding window of a current horizontal sliding window;
setting the first average value as a first horizontal coordinate average value;
determining a horizontal center of the current horizontal sliding window according to the first horizontal coordinate average value;
determining a position of the current horizontal sliding window according to the determined horizontal center; and
generating the main lane line by fitting all the non-zero pixels of the current horizontal sliding window and all horizontal sliding windows before the current horizontal sliding window.

### Claim 11 (depends on 8)

The vehicle-mounted device according to claim 8, wherein the at least one processor calculates the confidence coefficient of each horizontal sliding window by:
inputting the BEV image comprising the horizontal sliding window into a predetermined deep learning neural network model;
calculating a similarity between a pixel feature of each pixel of each horizontal sliding window and a sample feature; and
determining the confidence coefficient of each horizontal sliding window based on the similarity, the similarity being proportional to the confidence coefficient.

### Claim 12 (depends on 8)

The vehicle-mounted device according to claim 8, wherein the at least one processor sets the peak of the vertical histogram as the starting point while moving the vertical sliding window and generates the target curve by fitting the plurality of non-zero pixels of the vertical sliding window by:
setting a peak of the vertical sliding window as a starting point while moving the vertical sliding window;
calculating a second average value of the vertical coordinates of all non-zero pixels in the previous vertical sliding window of a current vertical sliding window;
setting the second average value as a second vertical coordinate average value;
determining a vertical center of the current vertical sliding window according to the second vertical coordinate average value;
determining a position of the current vertical sliding window according to the determined vertical center; and
generating the target curve by fitting all the non-zero pixels of the current vertical sliding window and all vertical sliding windows before the current vertical sliding window.

### Claim 13 (depends on 8)

The vehicle-mounted device according to claim 8, wherein the at least one processor determines that the target curve is the stop line in response that the end point of the lane line being on the target curve by:
calculating at least one matching degree between a plurality of vertical sliding windows corresponding to the target curve and the previous horizontal sliding window;
determining the end of the main lane line is located on the target curve in response that any one of the at least one matching degree exceeds a preset matching degree; and
determining the position of the stop line according to the position of the target curve and the position of the end of the main lane line.

### Claim 14 (depends on 13)

The vehicle-mounted device according to claim 13, wherein after determining the target curve is the stop line, the at least one processor is further caused to:
filtering out the preset number of continues horizontal sliding windows.

### Claim 15

A non-transitory storage medium having instructions stored thereon, when the instructions are executed by a processor of a vehicle-mounted device, the processor is caused to perform a lane line detection method, wherein the method comprises:
obtaining a foreground image of a vehicle;
converting the foreground image into a bird's eye view (BEV) image;
establishing a horizontal histogram image corresponding to the BEV image;
setting a peak of the horizontal histogram as a starting point while moving a horizontal sliding window, and generating a main lane line by fitting a plurality of non-zero pixels of the horizontal sliding window;
calculating a confidence coefficient of each horizontal sliding window;
in response that a plurality of confidence coefficients of a preset number of continuous horizontal sliding windows are less than a predetermined threshold, setting a sliding window that is previous before the preset number of continuous horizontal sliding windows as a previous horizontal sliding window, and determining an end of the main lane line according to the previous horizontal sliding window; and
establishing a vertical histogram according to the BEV image, and setting a peak of the vertical histogram as a starting point while moving a vertical sliding window;
generating a target curve by fitting the non-zero pixels of the vertical sliding window; and
determining that the target curve is a stop line in response that the end point of the lane line being on the target curve.

### Claim 16 (depends on 15)

The non-transitory storage medium according to claim 15, wherein the converting the foreground image into the BEV image comprises:
obtaining a corrected image by performing a distortion correction on the foreground image, and
setting each non-zero pixel of the corrected image as a target point;
obtaining an inverse perspective transformation matrix by performing a coordinate transformation on each target point of the corrected image; and
converting the corrected image to the BEV image according to the inverse perspective transformation matrix.

### Claim 17 (depends on 15)

The non-transitory storage medium according to claim 15, wherein setting the peak of the horizontal histogram as the starting point while moving the horizontal sliding window, and generating the main lane line by fitting the plurality of non-zero pixels of the horizontal sliding window comprises:
setting the peak of the horizontal histogram as the starting point for moving the horizontal sliding window;
calculating a first average value of the horizontal coordinates of all non-zero pixels in the previous horizontal sliding window of a current horizontal sliding window;
setting the first average value as a first horizontal coordinate average value;
determining a horizontal center of the current horizontal sliding window according to the first horizontal coordinate average value;
determining a position of the current horizontal sliding window according to the determined horizontal center; and
generating the main lane line by fitting all the non-zero pixels of the current horizontal sliding window and all horizontal sliding windows before the current horizontal sliding window.

### Claim 18 (depends on 15)

The non-transitory storage medium according to claim 15, wherein calculating the confidence coefficient of each horizontal sliding window comprises:
inputting the BEV image comprising the horizontal sliding window into a predetermined deep learning neural network model;
calculating a similarity between a pixel feature of each pixel of each horizontal sliding window and a sample feature; and
determining the confidence coefficient of each horizontal sliding window based on the similarity, the similarity being proportional to the confidence coefficient.

### Claim 19 (depends on 15)

The non-transitory storage medium according to claim 15, wherein setting the peak of the vertical histogram as the starting point while moving the vertical sliding window and generating the target curve by fitting the plurality of non-zero pixels of the vertical sliding window comprises:
setting a peak of the vertical sliding window as a starting point while moving the vertical sliding window;
calculating a second average value of the vertical coordinates of all non-zero pixels in the previous vertical sliding window of a current vertical sliding window;
setting the second average value as a second vertical coordinate average value;
determining a vertical center of the current vertical sliding window according to the second vertical coordinate average value;
determining a position of the current vertical sliding window according to the determined vertical center; and
generating the target curve by fitting all the non-zero pixels of the current vertical sliding window and all vertical sliding windows before the current vertical sliding window.

### Claim 20 (depends on 15)

The non-transitory storage medium according to claim 15, wherein determining that the target curve is the stop line in response that the end point of the lane line being on the target curve comprises:
calculating at least one matching degree between a plurality of vertical sliding windows corresponding to the target curve and the previous horizontal sliding window;
determining the end of the main lane line is located on the target curve in response that any one of the at least one matching degree exceeds a preset matching degree; and
determining the position of the stop line according to the position of the target curve and the position of the end of the main lane line.
