Video text tracking method and electronic device
AssigneeHuawei Technologies Co., Ltd.
InventorsQisen TANG, Hengzhi YAO
Life of this patent
Estimating the term…
Abstract
A video text tracking method and an electronic device are disclosed. In the method, a text line region is split into sub-regions, the sub-regions are tracked and then processed, and processed sub-regions are combined into a new text line. The technical solutions provided in this application are not only applicable to a straight-line text scenario or a curved text scenario, but also present a good tracking effect for a deformable text line.
Claims20
A video text tracking method, comprising:
- performing, by an electronic device, optical character recognition (OCR) detection on a first video frame to obtain frame points comprising at least a first initial frame point set, wherein the first initial frame point set comprises frame points that are recognized through the OCR detection and that are used to anchor a location of a first text line, the first text line is any text line in the first video frame, and a quantity of frame points in the first initial frame point set is not less than 4;
- determining, by the electronic device, a first extended frame point set based on the first initial frame point set, wherein the first extended frame point set frames the first text line in N contiguous and equal-width sub-regions, and N is a positive integer not less than 2;
- determining, by the electronic device in a second video frame, locations of frame points in the first extended frame point set based on locations of tracing points in a second tracing point set relative to locations of tracing points in a first tracing point set, to obtain a second calculated frame point set, wherein the first tracing point set comprises tracing points in the sub-regions determined based on the first extended frame point set in the first video frame, the second tracing point set comprises tracing points that are predicted in the second video frame and that are at locations corresponding to the locations of the tracing points in the first tracing point set, and the second video frame is a video frame obtained after the first video frame;
- and
- determining, by the electronic device, a second region based on the second calculated frame point set, wherein the second region is a location that is determined by the electronic device and at which the first text line is located in the second video frame.
An electronic device, wherein the electronic device comprises one or more processors and a memory, and wherein the memory is coupled to the one or more processors, the memory is configured to store computer program code, the computer program code comprises computer instructions, and the one or more processors invoke the computer instructions, so that the electronic device performs the following operations:
- performing optical character recognition (OCR) detection on a first video frame to obtain frame points comprising at least a first initial frame point set, wherein the first initial frame point set comprises frame points that are recognized through the OCR detection and that are used to anchor a location of a first text line, the first text line is any text line in the first video frame, and a quantity of frame points in the first initial frame point set is not less than 4;
- determining a first extended frame point set based on the first initial frame point set, wherein the first extended frame point set frames the first text line in N contiguous and equal-width sub-regions, and N is a positive integer not less than 2;
- determining, in a second video frame, locations of frame points in the first extended frame point set based on locations of tracing points in a second tracing point set relative to locations of tracing points in a first tracing point set, to obtain a second calculated frame point set, wherein the first tracing point set comprises tracing points in the sub-regions determined based on the first extended frame point set in the first video frame, the second tracing point set comprises tracing points that are predicted in the second video frame and that are at locations corresponding to the locations of the tracing points in the first tracing point set, and the second video frame is a video frame obtained after the first video frame;
- and
- determining a second region based on the second calculated frame point set, wherein the second region is a determined location at which the first text line is located in the second video frame.
19-20. (canceled)
A non-transitory computer-readable storage medium, comprising instructions, wherein when the instructions are run on an electronic device, the electronic device is enabled to perform operations comprising:
- performing optical character recognition (OCR) detection on a first video frame to obtain frame points comprising at least a first initial frame point set, wherein the first initial frame point set comprises frame points that are recognized through the OCR detection and that are used to anchor a location of a first text line, the first text line is any text line in the first video frame, and a quantity of frame points in the first initial frame point set is not less than 4;
- determining a first extended frame point set based on the first initial frame point set, wherein the first extended frame point set frames the first text line in N contiguous and equal-width sub-regions, and N is a positive integer not less than 2;
- determining, in a second video frame, locations of frame points in the first extended frame point set based on locations of tracing points in a second tracing point set relative to locations of tracing points in a first tracing point set, to obtain a second calculated frame point set, wherein the first tracing point set comprises tracing points in the sub-regions determined based on the first extended frame point set in the first video frame, the second tracing point set comprises tracing points that are predicted in the second video frame and that are at locations corresponding to the locations of the tracing points in the first tracing point set, and the second video frame is a video frame obtained after the first video frame;
- and
- determining a second region based on the second calculated frame point set, wherein the second region is a determined location at which the first text line is located in the second video frame.
Dependencies are inferred from the claim text.