Method for warning collision of vehicle, system, vehicle, and computer readable storage medium
AssigneeHon Hai Precision Industry Co., Ltd.
InventorsWan-Jhen Lee, Chin-Pin Kuo
Life of this patent
Estimating the term…
Abstract
A method for warning collision of vehicle is provided. The method obtains a pre-detected video. The pre-detected video includes a number of video frames, and the video frames are continuous. The method detects one or more vehicles in each of the video frames and determines a movement state of each of the vehicles via an optical flow method. The method detects one or more lane lines in each of the video frames to determine lane information, and determines whether to provide a collision warning according to the lane information and the movement state of each of the vehicles. A related vehicle and a non-transitory storage medium are provided.
Claims17
A method for warning collision of vehicle comprising:
- obtaining a pre-detected video;
- the pre-detected video comprising a plurality of video frames, and the video frames being continuous;
- detecting one or more vehicles in each of the video frames and determining a movement state of each of the vehicles via an optical flow method;
- detecting one or more lane lines in each of the video frames to determine lane information;
- and
- determining whether to provide a collision warning according to the lane information and the movement state of each of the vehicles;
- wherein the determining a movement state of each of the vehicles via an optical flow method comprises:
- segmenting each of the video frames into a foreground image and a background image;
- the foreground image comprising a pixel region of the one or more vehicles in a corresponding video frame, and the background region comprising a pixel region excluding the pixel region of the one or more vehicles in the corresponding video frame;
- obtaining a plurality of first corners of the one or more vehicles in the foreground image and employing an optical flow method to determine a first optical flow velocity of the first corners of each of the vehicles in the foreground image;
- obtaining a plurality of second corners in the background image and employing an optical flow method to determine a second optical flow velocity of the second corners in the background image;
- determining a movement state of each of the vehicles according to the first optical flow velocity of the first corners of each of the vehicles in the foreground image and the second optical flow velocity of the second corners in the background image.
A vehicle 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 pre-detected video;
- the pre-detected video comprising a plurality of video frames, and the video frames being continuous;
- detect one or more vehicles in each of the video frames and determining a movement state of each of the vehicles via an optical flow method;
- detect one or more lane lines in each of the video frames to determine lane information;
- and
- determine whether to provide a collision warning according to the lane information and the movement state of each of the vehicles;
- wherein further causes the at least one processor to:
- segment each of the video frames into a foreground image and a background image;
- the foreground image comprising a pixel region of the one or more vehicles in a corresponding video frame, and the background region comprising a pixel region excluding the pixel region of the one or more vehicles in the corresponding video frame;
- obtain a plurality of first corners of the one or more vehicles in the foreground image and employ an optical flow method to determine a first optical flow velocity of the first corners of each of the vehicles in the foreground image;
- obtain a plurality of second corners in the background image and employ an optical flow method to determine a second optical flow velocity of the second corners in the background image;
- determine a movement state of each of the vehicles according to the first optical flow velocity of the first corners of each of the vehicles in the foreground image and the second optical flow velocity of the second corners in the background image.
A non-transitory storage medium storing a set of commands, when the commands being executed by at least one processor of a vehicle, causing the at least one processor to:
- obtain a pre-detected video;
- the pre-detected video comprising a plurality of video frames, and the video frames being continuous;
- detect one or more vehicles in each of the video frames and determining a movement state of each of the vehicles via an optical flow method;
- detect one or more lane lines in each of the video frames to determine lane information;
- and
- determine whether to provide a collision warning according to the lane information and the movement state of each of the vehicles;
- wherein further causes the at least one processor to:
- segment each of the video frames into a foreground image and a background image;
- the foreground image comprising a pixel region of the one or more vehicles in a corresponding video frame, and the background region comprising a pixel region excluding the pixel region of the one or more vehicles in the corresponding video frame;
- obtain a plurality of first corners of the one or more vehicles in the foreground image and employ an optical flow method to determine a first optical flow velocity of the first corners of each of the vehicles in the foreground image;
- obtain a plurality of second corners in the background image and employ an optical flow method to determine a second optical flow velocity of the second corners in the background image;
- determine a movement state of each of the vehicles according to the first optical flow velocity of the first corners of each of the vehicles in the foreground image and the second optical flow velocity of the second corners in the background image.
Dependencies are inferred from the claim text.