Keyword acquisition method based on image and OCR recognition

文档序号:1521506 发布日期:2020-02-11 浏览:8次 中文

阅读说明:本技术 一种基于图像及ocr识别的关键词获取方法 (Keyword acquisition method based on image and OCR recognition ) 是由 唐明宏 于 2019-10-25 设计创作,主要内容包括:本发明涉及图像识别技术领域,特别为一种基于图像及OCR识别的关键词获取方法。本发明包括如下步骤:步骤一:连续获取视频中帧画面,并依照帧画面的获取顺序对各帧画面依次进行兴趣点识别处理;步骤二:根据兴趣图像的位置信息获得目标识别区域,采用OCR识别算法获得目标识别区域内的关键词,提取该关键词。本发明能够自动识别并获取用于指定的关键词。(The invention relates to the technical field of image recognition, in particular to a keyword acquisition method based on image and OCR recognition. The invention comprises the following steps: the method comprises the following steps: continuously acquiring frame pictures in a video, and sequentially identifying interest points of each frame picture according to the acquisition sequence of the frame pictures; step two: and obtaining a target recognition area according to the position information of the interest image, obtaining a keyword in the target recognition area by adopting an OCR recognition algorithm, and extracting the keyword. The invention can automatically identify and acquire the specified keywords.)

1. A keyword acquisition method based on image and OCR recognition is characterized by comprising the following steps:

the method comprises the following steps: continuously acquiring frame pictures in a video, and sequentially identifying interest points of each frame picture according to the acquisition sequence of the frame pictures;

the interest point identification processing comprises the steps of adopting an image identification technology to identify whether a preset interest image exists in a frame picture, if no interest image exists, continuing to identify the next frame picture, if the interest image exists, initializing coordinate information of the frame picture with the interest image, and acquiring position information of the interest image;

respectively and continuously recording position information data groups of the interest images of all continuous frame images from an initial frame image of the interest image to a last frame image of the interest image which is not obtained any more, and calculating the motion of the interest image in the process of the frame images according to the position information data groups; if it is

If the action of the interest image is inconsistent with the preset action, continuing to sequentially perform interest point identification processing on the rest frame pictures, and if the action of the interest image is consistent with the preset action, entering the next step;

step two: and obtaining a target recognition area according to the position information of the interest image, obtaining a keyword in the target recognition area by adopting an OCR recognition algorithm, and extracting the keyword.

2. A keyword acquisition method based on image and OCR recognition according to claim 1, characterized in that: the interest image is a finger image or a marker pen image.

3. A keyword acquisition method based on image and OCR recognition according to claim 1, characterized in that: the preset action is used as stopping, marking or circling.

4. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the steps of a method for obtaining keywords based on image and OCR recognition according to any one of claims 1 to 3.

5. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor when executing the computer program implements the steps of the image and OCR recognition based keyword acquisition method according to any one of claims 1 to 3.

Technical Field

The invention relates to the technical field of image recognition, in particular to a keyword acquisition method based on image and OCR recognition.

Background

With the rapid development of modern science and technology, the image recognition technology is widely applied to various scenes in life as one of the key basic technologies of the modern society, and the algorithm of image recognition is changing day by day.

However, in some special scenes, the application of image recognition is still not humanized enough and needs to be further improved. For example, in the field of modern intelligent reading, people utilize a camera in combination with an OCR recognition technology to synchronously and quickly recognize the current reading content of a user in the reading process of people, and quickly extract high-frequency keywords through an algorithm, and utilize the keywords to perform associated retrieval so as to provide intelligent reading services such as associative reading, keyword paraphrasing and the like for the user. However, since the interest points of the readers are different, there is a reading requirement in the above scenario that the interest points of the readers are not high-frequency keywords but certain low-frequency words specified by the high-frequency keywords, and obviously, no relevant algorithm has been developed in the prior art to meet the requirement of the user in the reading scenario.

Disclosure of Invention

The invention aims to: provided is a keyword acquisition method based on image and OCR recognition, which can automatically recognize and acquire a keyword for specification.

The invention is realized by the following technical scheme: a keyword acquisition method based on image and OCR recognition is characterized by comprising the following steps:

the method comprises the following steps: continuously acquiring frame pictures in a video, and sequentially identifying interest points of each frame picture according to the acquisition sequence of the frame pictures;

the interest point identification processing comprises the steps of adopting an image identification technology to identify whether a preset interest image exists in a frame picture, if no interest image exists, continuing to identify the next frame picture, if the interest image exists, initializing coordinate information of the frame picture with the interest image, and acquiring position information of the interest image;

respectively and continuously recording position information data groups of the interest images of all continuous frame images from an initial frame image of the interest image to a last frame image of the interest image which is not obtained any more, and calculating the motion of the interest image in the process of the frame images according to the position information data groups; if it is

If the action of the interest image is inconsistent with the preset action, continuing to sequentially perform interest point identification processing on the rest frame pictures, and if the action of the interest image is consistent with the preset action, entering the next step;

step two: and obtaining a target recognition area according to the position information of the interest image, obtaining a keyword in the target recognition area by adopting an OCR recognition algorithm, and extracting the keyword.

For better implementation of the scheme, the following optimization scheme is also provided:

further, the interest image is a finger image or a marker pen image.

Further, the preset action is used as stopping, marking or circling.

Compared with the prior art, the invention has the beneficial effects that: the method solves the problem that the existing image recognition field can not obtain the user-specified keywords by adopting the technology of combining image recognition and an OCR recognition algorithm, and the algorithm operation is simple and efficient.

Detailed Description

This embodiment specifically introduces one of the applications of the method in a reading scene, in which a fixed camera is adopted to face a book being read by a reader, and the step of extracting keywords is as follows:

the method comprises the following steps: continuously acquiring frame pictures in a video acquired by a camera, and sequentially identifying interest points of each frame picture according to the acquisition sequence of the frame pictures; here we preset the interest image as the image when the reader's right index finger is extended.

The interest point identification processing comprises the steps of adopting an image identification technology to identify whether a preset interest image exists in a frame picture, if no interest image exists, continuing to identify the next frame picture, if the interest image exists, initializing coordinate information of the frame picture with the interest image, and acquiring position information of the interest image;

respectively and continuously recording position information data groups of the interest images of all continuous frame images from an initial frame image of the interest image to a last frame image of the interest image which is not obtained any more, and calculating the motion of the interest image in the process of the frame images according to the position information data groups; if it is

If the action of the interest image is inconsistent with the preset action, continuing to sequentially perform interest point identification processing on the rest frame pictures, and if the action of the interest image is consistent with the preset action, entering the next step; here the action is preset as dwell.

Step two: and obtaining a target recognition area according to the position information of the interest image, obtaining a keyword in the target recognition area by adopting an OCR recognition algorithm, and extracting the keyword. The target recognition area here is a square area located above the straight line change trajectory. The length of the square area and the length of the straight line change track, and the width of the square area is set as the length of one font.

For better understanding, the functions implemented by the method are further described below with reference to specific scene behaviors: in the first step, when the fact that the index finger of the right hand of the reader extends is detected, the step two is entered; the preset track is a straight line, namely when the fact that the reader stretches out the index finger of the right hand to draw the cross is detected, the judgment is consistent with the preset, and the step three is entered; and in the third step, the characters in the target area in the area above the stroke track made by the index finger of the right hand are recognized, and the keyword is extracted.

Through the process of the method, a scene can be realized, namely, when a reader finds that keywords such as 'Song Dynasty' which are interested in the book exist in the reading process, the reader only needs to stretch out the right finger to make a stopping action at the bottom of the word of the Song Dynasty on the book, and then the reader can grab the keyword of 'Song Dynasty' to perform next step of extension service.

In addition, in other embodiments, the circling may be used as a preset action, and an area in the direction of the circling action is set as a target area, for example, when a reader finds that a keyword such as "song dynasty" which is interested in the book exists in the reading process, the right hand finger is only required to be stretched out to perform the circling action around the word of the song dynasty in the book to scribe the word of the "song dynasty", and OCR recognition performed according to the target area determined in the circling can capture the keyword of the "song dynasty" which is interested by the user, so as to perform next extended service.

While the invention has been illustrated and described with respect to specific embodiments and alternatives thereof, it will be understood that various changes and modifications can be made without departing from the spirit and scope of the invention. It is understood, therefore, that the invention is not to be in any way limited except by the appended claims and their equivalents.

4页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:车牌螺丝检测方法、装置和计算机设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!