WO2020052085A1 - Video text detection method and device, and computer readable storage medium - Google Patents

Video text detection method and device, and computer readable storage medium Download PDF

Info

Publication number
WO2020052085A1
WO2020052085A1 PCT/CN2018/117715 CN2018117715W WO2020052085A1 WO 2020052085 A1 WO2020052085 A1 WO 2020052085A1 CN 2018117715 W CN2018117715 W CN 2018117715W WO 2020052085 A1 WO2020052085 A1 WO 2020052085A1
Authority
WO
WIPO (PCT)
Prior art keywords
image block
image
score
text
text information
Prior art date
Application number
PCT/CN2018/117715
Other languages
French (fr)
Chinese (zh)
Inventor
周多友
王长虎
Original Assignee
北京字节跳动网络技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京字节跳动网络技术有限公司 filed Critical 北京字节跳动网络技术有限公司
Publication of WO2020052085A1 publication Critical patent/WO2020052085A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/46Extracting features or characteristics from the video content, e.g. video fingerprints, representative shots or key frames
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/62Text, e.g. of license plates, overlay texts or captions on TV images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition

Definitions

  • the present disclosure relates to the technical field of information processing, and in particular, to a video text detection method, device, and computer-readable storage medium.
  • the technical problem solved by the present disclosure is to provide a video text detection method to at least partially solve the technical problem that the OCR has a poor recognition effect and low recognition accuracy when recognizing small characters.
  • a video text detection device, a video text detection hardware device, a computer-readable storage medium, and a video text detection terminal are also provided.
  • a video text detection method includes:
  • the step of determining whether text information is included in the video to be detected according to a text detection result on the image block includes:
  • the method further includes:
  • a deep learning classification algorithm is used to perform training and learning on the labeled training samples to obtain an image classifier.
  • the step of segmenting the to-be-detected picture extracted from the to-be-detected video to obtain at least one image block includes:
  • the method further includes:
  • Text detection is performed on the image block by the image classifier, and a text detection result of the image block is determined according to a classification result of the image classifier.
  • the steps of performing text detection on the image block by the image classifier, and determining the text detection result of the image block based on the classification result of the image classifier include:
  • a text detection result of the image block is determined according to the score.
  • the step of determining a text detection result of the image block according to the score includes:
  • the score exceeds a preset score, determine that the image block contains text information; or, select a maximum score from the score, and if the maximum score exceeds the preset score, determine the maximum score.
  • the image block contains text information; or, if the score is smaller than a preset score, it is determined that the image block contains text information; or, a minimum score is selected from the scores, and if the minimum score is If the value is less than the preset score, it is determined that the image block contains text information.
  • the step of performing text detection on the image block by the image classifier, and determining a text detection result of the image block according to a classification result of the image classifier includes:
  • the output result is used as a text detection result of the image block.
  • a video text detection device includes:
  • a picture block module configured to block the pictures to be detected extracted from the videos to be detected to obtain at least one image block
  • a text determining module is configured to determine whether text information is included in the video to be detected according to a text detection result of the image block.
  • the text determination module is specifically configured to: perform text detection on each image block; if it is detected that any image block contains text information, determine that the video to be detected includes text information.
  • the device further includes:
  • a classifier training module configured to block pictures that have known text information and / or pictures that do not contain text information to obtain at least one image block as a training sample; and perform training on the training sample according to whether text information is included Labeling; using deep learning classification algorithms to train and learn the labeled training samples to obtain an image classifier.
  • the picture segmentation module is specifically configured to: input the picture to be detected into the image classifier, and divide the picture to be detected by the image classifier to obtain at least one image block;
  • the device further includes:
  • a text detection module is configured to perform text detection on the image block through the image classifier, and determine a text detection result of the image block according to a classification result of the image classifier.
  • the character detection module includes:
  • a scoring unit configured to score each image block through the image classifier to obtain a score value of each image block
  • a character detection unit configured to determine a character detection result of the image block according to the score.
  • the character detection unit is specifically configured to:
  • the score exceeds a preset score, determine that the image block contains text information; or, select a maximum score from the score, and if the maximum score exceeds a preset score, determine the image block. Contains text information; or, if the score is less than a preset score, determine that the image block contains text information; or select a minimum score from the scores, and if the minimum score is less than a preset score , It is determined that the image block contains text information.
  • the text detection module is specifically configured to perform text detection on each image block through the image classifier, and directly output any one of the following results through the image classifier: including text information and not including text information; The output result is used as a text detection result of the image block.
  • a video text detection hardware device includes:
  • Memory for storing non-transitory computer-readable instructions
  • a processor configured to run the computer-readable instructions, so that the processor, when executed, implements the steps described in any of the foregoing technical solutions of a video text detection method.
  • a computer-readable storage medium is used for storing non-transitory computer-readable instructions.
  • the computer is caused to execute any of the technical solutions of the video text detection method described above. The steps described.
  • a video text detection terminal includes any of the video text detection devices described above.
  • Embodiments of the present disclosure provide a video text detection method, a video text detection device, a video text detection hardware device, a computer-readable storage medium, and a video text detection terminal.
  • the video text detection method includes segmenting a to-be-detected picture extracted from the to-be-detected video to obtain at least one image block; and determining whether the to-be-detected video contains text information based on a text detection result of the image block.
  • the embodiment of the present disclosure first divides the to-be-detected picture extracted from the to-be-detected video into at least one image block, and then determines whether the to-be-detected video contains text information according to a text detection result on the image block. Improve text detection accuracy.
  • FIG. 1a is a schematic flowchart of a video text detection method according to an embodiment of the present disclosure
  • FIG. 1b is a schematic flowchart of a video text detection method according to another embodiment of the present disclosure.
  • 1c is a schematic flowchart of a video text detection method according to another embodiment of the present disclosure.
  • FIG. 2a is a schematic structural diagram of a video text detection device according to an embodiment of the present disclosure
  • FIG. 2b is a schematic structural diagram of a video text detection device according to another embodiment of the present disclosure.
  • FIG. 3 is a schematic structural diagram of a video text detection hardware device according to an embodiment of the present disclosure.
  • FIG. 4 is a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present disclosure.
  • FIG. 5 is a schematic structural diagram of a video text detection terminal according to an embodiment of the present disclosure.
  • the video text detection method mainly includes the following steps S1 to S2. among them:
  • Step S1 Divide the detected pictures extracted from the videos to be detected to obtain at least one image block.
  • the picture to be detected may be one frame or multiple frames. When the picture to be detected is multiple frames, the pictures to be detected are divided into blocks.
  • the number of image blocks or the size of the image blocks may be specifically determined according to the size of the picture to be detected. Specifically, in order to improve the accuracy of text detection, a plurality of pictures of different sizes can be divided into blocks in advance, and text detection can be performed, and the optimal number or size of blocks can be determined according to the accuracy of text detection.
  • Step S2 Determine whether text information is included in the video to be detected according to the text detection result of the image block.
  • the text information includes, but is not limited to, any one or combination of numbers, Chinese characters, and foreign languages.
  • the text information can be enlarged by segmentation, thereby improving the accuracy of text detection.
  • At least one image block is obtained by dividing the to-be-detected picture extracted from the to-be-detected video, and then determining whether the to-be-detected video contains text information based on the text detection result of the image block, which can improve the accuracy of text detection.
  • step S2 includes:
  • the text detection method in the prior art can be used to perform text detection on the image block. Because the image to be detected is divided, the text contained in the image block may be incomplete. For example, the detected image block may be incomplete. Containing only a part of a text or a part of a text, it is determined that the image block contains text information.
  • At least one image block is obtained by dividing the to-be-detected picture extracted from the to-be-detected video, and each image block is subjected to text detection. If any image block is detected to contain text information, the video to be detected is determined. The text information is included in the block, and the text information contained in the picture to be detected can be enlarged by the block, thereby improving the accuracy of the text detection.
  • the method in this embodiment further includes:
  • S3 Block pictures that are known to contain text information and / or pictures that do not contain text information to obtain at least one image block as a training sample.
  • S4 Annotate training samples according to whether text information is included.
  • each image block needs to be labeled. For example, an image block containing text information is marked with 1 and an image block without text information is marked with 0.
  • S5 The deep learning classification algorithm is used to train and learn the labeled training samples to obtain an image classifier.
  • the deep learning classification algorithms include, but are not limited to, any of the following: Naive Bayes algorithm, artificial neural network algorithm, genetic algorithm, K-Nearest Neighbor (KNN) classification algorithm, clustering algorithm, and the like.
  • KNN K-Nearest Neighbor
  • the image classifier obtained through this embodiment not only has an automatic block function, but also can directly determine whether each image block contains text information.
  • step S1 specifically includes:
  • the picture to be detected is input to an image classifier, and the picture to be detected is divided into blocks by the image classifier to obtain at least one image block.
  • S6 Perform text detection on the image block through the image classifier, and determine the text detection result of the image block according to the classification result of the image classifier.
  • step S6 specifically includes:
  • S61 Score each image block by an image classifier to obtain a score value of each image block.
  • the score may be a normalized score, for example, any value from 0 to 100 or 0-1.
  • S62 Determine the text detection result of the image block according to the score.
  • step S62 specifically includes:
  • the score exceeds the preset score, determine that the image block contains text information; or, select the maximum score from the score, and if the maximum score exceeds the preset score, determine that the image block contains text information; or, If the score is smaller than the preset score, it is determined that the image block contains text information; or, the minimum score is selected from the scores; if the minimum score is smaller than the preset score, the image block is determined to contain text information.
  • a scoring rule can be set in advance. For example, the larger the score, the higher the probability that the character information is included, or the smaller the score, the higher the possibility that the character information is included. Based on the scoring rules set above, it is determined whether the image block contains text information.
  • step S6 specifically includes:
  • S63 Perform text detection on each image block through the image classifier, and directly output any one of the following results through the image classifier: including text information and not including text information.
  • the following is a device embodiment of the present disclosure.
  • the device embodiment of the present disclosure can be used to perform the steps implemented by the method embodiments of the present disclosure.
  • Only parts related to the embodiments of the present disclosure are shown. Specific technical details are not disclosed. Reference is made to the method embodiments of the present disclosure.
  • an embodiment of the present disclosure provides a video text detection device.
  • the device can perform the steps in the foregoing embodiment of the video text detection method.
  • the device mainly includes: a picture block module 21 and a text determination module 22; wherein the picture block module 21 is configured to block a picture to be detected extracted from a video to be detected to obtain at least one image Block; the text determining module 22 is configured to determine whether text information is included in a video to be detected according to a text detection result on an image block.
  • the picture to be detected may be one frame or multiple frames. When the picture to be detected is multiple frames, the pictures to be detected are divided into blocks.
  • the number of image blocks or the size of the image blocks may be specifically determined according to the size of the picture to be detected. Specifically, in order to improve the accuracy of text detection, a plurality of pictures of different sizes can be divided into blocks in advance, and text detection can be performed, and the optimal number or size of blocks can be determined according to the accuracy of text detection.
  • the text information includes, but is not limited to, any one or combination of numbers, Chinese characters, and foreign languages.
  • the text information can be enlarged by segmentation, thereby improving the accuracy of text detection.
  • the picture segmentation module 21 is used to divide the picture to be detected extracted from the video to be detected to obtain at least one image block, and then the text determination module 22 determines whether the video to be detected is based on the text detection result of the image block. Contains text information to improve text detection accuracy.
  • the text determination module 22 is specifically configured to: perform text detection on each image block; if it is detected that any image block contains text information, determine that the video to be detected contains text information.
  • the text determination module 22 may use the text detection methods in the prior art to perform text detection on image blocks. Because the pictures to be detected are divided, the text contained in the image blocks may be incomplete, for example, the detected image blocks It may contain only a part of a character or a part of a character. At this time, it is determined that the image block contains character information.
  • the picture segmentation module 21 is used to segment the pictures to be detected extracted from the video to be detected to obtain at least one image block
  • the text determination module 22 is used to perform text detection on each image block. If any image block is detected, If text information is included in the video, it is determined that the text information is included in the video to be detected. Since the text information contained in the image to be detected can be enlarged by segmentation, the accuracy of text detection is improved.
  • the apparatus in this embodiment further includes: a classifier training module 23; wherein the classifier training module 23 is configured to perform a process on pictures and / or pictures that already contain text information.
  • the pictures that do not contain text information are divided into blocks to obtain at least one image block as training samples; the training samples are labeled according to whether they contain text information; the deep learning classification algorithm is used to train and learn the labeled training samples to obtain an image classifier .
  • the classifier training module 23 needs to label each image block in order to distinguish different image blocks, that is, image blocks containing text information and image blocks that do not contain text information. For example, an image block containing text information is marked with 1 and an image block without text information is marked with 0.
  • the deep learning classification algorithms include, but are not limited to, any of the following: Naive Bayes algorithm, artificial neural network algorithm, genetic algorithm, K-Nearest Neighbor (KNN) classification algorithm, clustering algorithm, and the like.
  • KNN K-Nearest Neighbor
  • the image classifier obtained through this embodiment not only has an automatic block function, but also can directly determine whether each image block contains text information.
  • the picture blocking module 21 is specifically configured to: input a picture to be detected into an image classifier, and divide the picture to be detected by the image classifier to obtain at least one image block;
  • the device of this embodiment further includes a text detection module 24; wherein the text detection module 24 is configured to perform text detection on the image block through the image classifier, and determine the text detection result of the image block according to the classification result of the image classifier.
  • the text detection module 24 includes: a scoring unit 241 and a text detection unit 242; wherein the scoring unit 241 is configured to score each image block through an image classifier to obtain a score value of each image block; the text detection unit 242 is configured to: Determine the text detection result of the image block according to the score.
  • the score may be a normalized score, for example, any value from 0 to 100 or 0-1.
  • the character detection unit 242 is specifically configured to: if the score exceeds a preset score, determine that the image block contains text information; or select a maximum score from the scores, and if the maximum score exceeds the preset score, Determine that the image block contains text information; or, if the score is less than a preset score, determine that the image block contains text information; or select a minimum score from the scores, and if the minimum score is less than the preset score, It is determined that the image block contains text information.
  • a scoring rule can be set in advance. For example, the larger the score, the higher the probability that the character information is included, or the smaller the score, the higher the probability that the character information is included. Based on the scoring rules set above, it is determined whether the image block contains text information.
  • the text detection module 24 is specifically configured to: perform text detection on each image block through an image classifier, and directly output any of the following results through the image classifier: including text information and not including text information; and using the output result as an image Block text detection results.
  • FIG. 3 is a hardware block diagram illustrating a video text detection hardware device according to an embodiment of the present disclosure.
  • a video text detection hardware device 30 according to an embodiment of the present disclosure includes a memory 31 and a processor 32.
  • the memory 31 is configured to store non-transitory computer-readable instructions.
  • the memory 31 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory.
  • the volatile memory may include, for example, a random access memory (RAM) and / or a cache memory.
  • the non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, and the like.
  • the processor 32 may be a central processing unit (CPU) or other form of processing unit having data processing capabilities and / or instruction execution capabilities, and may control other components in the video text detection hardware device 30 to perform a desired function.
  • the processor 32 is configured to run the computer-readable instructions stored in the memory 31, so that the video text detection hardware device 30 executes the foregoing video text detection method of the embodiments of the present disclosure. All or part of the steps.
  • this embodiment may also include well-known structures such as a communication bus and an interface. These well-known structures should also be included in the protection scope of the present disclosure. within.
  • FIG. 4 is a schematic diagram illustrating a computer-readable storage medium according to an embodiment of the present disclosure.
  • a computer-readable storage medium 40 according to an embodiment of the present disclosure stores non-transitory computer-readable instructions 41 thereon.
  • the non-transitory computer-readable instruction 41 is executed by a processor, all or part of the steps of the method for comparing video features of the foregoing embodiments of the present disclosure are performed.
  • the computer-readable storage medium 40 includes, but is not limited to, optical storage media (for example, CD-ROM and DVD), magneto-optical storage media (for example, MO), magnetic storage media (for example, magnetic tape or mobile hard disk), Non-volatile memory rewritable media (for example: memory card) and media with built-in ROM (for example: ROM box).
  • optical storage media for example, CD-ROM and DVD
  • magneto-optical storage media for example, MO
  • magnetic storage media for example, magnetic tape or mobile hard disk
  • Non-volatile memory rewritable media for example: memory card
  • media with built-in ROM for example: ROM box
  • FIG. 5 is a schematic diagram illustrating a hardware structure of a terminal according to an embodiment of the present disclosure. As shown in FIG. 5, the video text detection terminal 50 includes the foregoing video text detection device embodiment.
  • the terminal may be implemented in various forms, and the terminal in the present disclosure may include, but is not limited to, such as a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP ( Portable multimedia players), navigation devices, on-board terminals, on-board display terminals, on-board electronic rear-view mirrors, and other mobile terminals, and fixed terminals such as digital TVs, desktop computers, and the like.
  • a mobile phone such as a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP ( Portable multimedia players), navigation devices, on-board terminals, on-board display terminals, on-board electronic rear-view mirrors, and other mobile terminals, and fixed terminals such as digital TVs, desktop computers, and the like.
  • PDA personal digital assistant
  • PAD tablet computer
  • PMP Portable multimedia players
  • navigation devices
  • the terminal may further include other components.
  • the video text detection terminal 50 may include a power supply unit 51, a wireless communication unit 52, an A / V (audio / video) input unit 53, a user input unit 54, a sensing unit 55, an interface unit 56, and a control unit.
  • FIG. 5 shows a terminal with various components, but it should be understood that it is not required to implement all the illustrated components, and more or fewer components may be implemented instead.
  • the wireless communication unit 52 allows radio communication between the terminal 50 and a wireless communication system or network.
  • the A / V input unit 53 is used to receive audio or video signals.
  • the user input unit 54 may generate key input data according to a command input by the user to control various operations of the terminal.
  • the sensing unit 55 detects the current state of the terminal 50, the position of the terminal 50, the presence or absence of a user's touch input to the terminal 50, the orientation of the terminal 50, the acceleration or deceleration movement and direction of the terminal 50, and the like, and generates a signal for controlling the terminal 50 commands or signals for operation.
  • the interface unit 56 functions as an interface through which at least one external device can be connected to the terminal 50.
  • the output unit 58 is configured to provide an output signal in a visual, audio, and / or tactile manner.
  • the memory 59 may store software programs and the like for processing and control operations performed by the controller 55, or may temporarily store data that has been output or is to be output.
  • the memory 59 may include at least one type of storage medium.
  • the terminal 50 may cooperate with a network storage device that performs a storage function of the memory 59 through a network connection.
  • the controller 57 generally controls the overall operation of the terminal.
  • the controller 57 may include a multimedia module for reproducing or playing back multimedia data.
  • the controller 57 may perform a pattern recognition process to recognize a handwriting input or a picture drawing input performed on the touch screen as characters or images.
  • the power supply unit 51 receives external power or internal power under the control of the controller 57 and provides appropriate power required to operate each element and component.
  • Various embodiments of the video feature comparison method proposed by the present disclosure may be implemented in a computer-readable medium using, for example, computer software, hardware, or any combination thereof.
  • various embodiments of the video feature comparison method proposed in the present disclosure can be implemented by using an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), and a programmable logic device. (PLD), field programmable gate array (FPGA), processor, controller, microcontroller, microprocessor, electronic unit designed to perform the functions described herein, and in some cases implemented
  • ASIC application-specific integrated circuit
  • DSP digital signal processor
  • DSPD digital signal processing device
  • PLD programmable logic device
  • FPGA field programmable gate array
  • processor controller
  • microcontroller microprocessor
  • electronic unit designed to perform the functions described herein and in some cases implemented
  • Various embodiments of the video feature comparison method proposed in the present disclosure may be implemented in the controller 57.
  • various embodiments of the video feature comparison method proposed by the present disclosure can be implemented with a separate software module that allows at least one function or operation to be performed.
  • the software codes may be implemented by a software application (or program) written in any suitable programming language, and the software codes may be stored in the memory 59 and executed by the controller 57.
  • an "or” used in an enumeration of items beginning with “at least one” indicates a separate enumeration such that, for example, an "at least one of A, B, or C” enumeration means A or B or C, or AB or AC or BC, or ABC (ie A and B and C).
  • the word "exemplary” does not mean that the described example is preferred or better than other examples.
  • each component or each step can be disassembled and / or recombined.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)

Abstract

Disclosed are a video text detection method, a video text detection device, a video text detection hardware device, and a computer readable storage medium. The video text detection method comprises: partitioning an image to be detected extracted from a video to be detected, so as to obtain at least one image block; and determining whether said video comprises text information according to text detection results of the image blocks. In embodiments of the present disclosure, first, the image to be detected extracted from the video to be detected is partitioned to obtain at least one image block, and then, it is determined whether said video comprises text information according to the text detection results of the image blocks; therefore, the text detection accuracy can be improved.

Description

视频文字检测方法、装置和计算机可读存储介质Video text detection method, device and computer-readable storage medium
交叉引用cross reference
本公开引用于2018年09月13日递交的名称为“视频文字检测方法、装置和计算机可读存储介质”的、申请号为201811065276.2的中国专利申请,其通过引用被全部并入本申请。The present disclosure refers to a Chinese patent application filed on September 13, 2018, entitled "Video Text Detection Method, Apparatus, and Computer-readable Storage Medium" with application number 201811065276.2, which is incorporated by reference in its entirety.
技术领域Technical field
本公开涉及一种信息处理技术领域,特别是涉及一种视频文字检测方法、装置和计算机可读存储介质。The present disclosure relates to the technical field of information processing, and in particular, to a video text detection method, device, and computer-readable storage medium.
背景技术Background technique
近年来,随着多媒体技术和计算机网络的飞速发展,数字视频的容量正以惊人的速度增长。这样,从数字视频中抓取到的图像中往往包含有重要的文字信息,这在基于文字内容的视频数据库检索中起到重要的作用。即在一定程度上便于视频主要内容进行简练描述和说明,或便于视频分类,或便于非法视频的鉴定等。In recent years, with the rapid development of multimedia technology and computer networks, the capacity of digital video is growing at an alarming rate. In this way, images captured from digital video often contain important text information, which plays an important role in video database retrieval based on text content. That is, to some extent, it is convenient for concise description and description of the main content of the video, or for video classification, or for identification of illegal videos.
视频中经常包含有文字,比如广告、介绍,或者视频中出现的标识牌上文字等,在判断视频中是否有文字时,在现在技术中,常常是通过抽取视频中的每一帧进行光学字符识别(Optical Character Recognition,OCR)识别。但是,当图像中包含的文字较小的时候,OCR识别效果并不理想,准确率也不够高。Videos often contain text, such as advertisements, introductions, or text on signboards. When judging whether there is text in the video, in current technology, optical characters are often extracted by extracting each frame in the video. Recognition (Optical Character Recognition, OCR) recognition. However, when the text contained in the image is small, the OCR recognition effect is not ideal, and the accuracy is not high enough.
发明内容Summary of the Invention
本公开解决的技术问题是提供一种视频文字检测方法,以至少部分地 解决OCR在识别较小文字的时识别效果不理想且识别准确率低的技术问题。此外,还提供一种视频文字检测装置、视频文字检测硬件装置、计算机可读存储介质和视频文字检测终端。The technical problem solved by the present disclosure is to provide a video text detection method to at least partially solve the technical problem that the OCR has a poor recognition effect and low recognition accuracy when recognizing small characters. In addition, a video text detection device, a video text detection hardware device, a computer-readable storage medium, and a video text detection terminal are also provided.
为了实现上述目的,根据本公开的一个方面,提供以下技术方案:To achieve the above objective, according to one aspect of the present disclosure, the following technical solutions are provided:
一种视频文字检测方法,包括:A video text detection method includes:
对从待检测视频中抽取的待检测图片进行分块,得到至少一个图像块;Segmenting the to-be-detected picture extracted from the to-be-detected video to obtain at least one image block;
根据对所述图像块的文字检测结果确定所述待检测视频中是否包含文字信息。It is determined whether text information is included in the video to be detected according to a text detection result on the image block.
进一步的,所述根据对所述图像块的文字检测结果确定所述待检测视频中是否包含文字信息的步骤,包括:Further, the step of determining whether text information is included in the video to be detected according to a text detection result on the image block includes:
对各图像块进行文字检测;Text detection on each image block;
若检测出任一图像块中包含文字信息,则确定所述待检测视频中包含文字信息。If it is detected that any image block contains text information, it is determined that the video to be detected contains text information.
进一步的,所述方法还包括:Further, the method further includes:
对已知包含文字信息的图片和/或已知未包含文字信息的图片进行分块,得到至少一个图像块作为训练样本;Segmenting pictures that are known to contain text information and / or pictures that are not known to contain text information to obtain at least one image block as a training sample;
根据是否包含文字信息对所述训练样本进行标注;Mark the training samples according to whether text information is included;
采用深度学习分类算法对所述标注后的训练样本进行训练学习,得到图像分类器。A deep learning classification algorithm is used to perform training and learning on the labeled training samples to obtain an image classifier.
进一步的,所述对从待检测视频中抽取的待检测图片进行分块,得到至少一个图像块的步骤,包括:Further, the step of segmenting the to-be-detected picture extracted from the to-be-detected video to obtain at least one image block includes:
将所述待检测图片输入所述图像分类器,通过所述图像分类器对所述待检测图片进行分块,得到至少一个图像块;Inputting the picture to be detected into the image classifier, and dividing the picture to be detected by the image classifier to obtain at least one image block;
所述方法还包括:The method further includes:
通过所述图像分类器对所述图像块进行文字检测,并根据所述图像分类器的分类结果确定所述图像块的文字检测结果。Text detection is performed on the image block by the image classifier, and a text detection result of the image block is determined according to a classification result of the image classifier.
进一步的,所述通过所述图像分类器对所述图像块进行文字检测,并根据所述图像分类器的分类结果确定所述图像块的文字检测结果的步骤,包 括:Further, the steps of performing text detection on the image block by the image classifier, and determining the text detection result of the image block based on the classification result of the image classifier, include:
通过所述图像分类器对各图像块进行打分,得到各图像块的分值;Scoring each image block by the image classifier to obtain a score value of each image block;
根据所述分值确定所述图像块的文字检测结果。A text detection result of the image block is determined according to the score.
进一步的,所述根据所述分值确定所述图像块的文字检测结果的步骤,包括:Further, the step of determining a text detection result of the image block according to the score includes:
若所述分值超过预设分值,则确定所述图像块中包含文字信息;或,从所述分值中选取最大分值,若所述最大分值超过预设分值,则确定所述图像块中包含文字信息;或,若所述分值小于预设分值,则确定所述图像块中包含文字信息;或,从所述分值中选取最小分值,若所述最小分值小于预设分值,则确定图像块中包含文字信息。If the score exceeds a preset score, determine that the image block contains text information; or, select a maximum score from the score, and if the maximum score exceeds the preset score, determine the maximum score. The image block contains text information; or, if the score is smaller than a preset score, it is determined that the image block contains text information; or, a minimum score is selected from the scores, and if the minimum score is If the value is less than the preset score, it is determined that the image block contains text information.
进一步的,所述通过所述图像分类器对所述图像块进行文字检测,并根据所述图像分类器的分类结果确定所述图像块的文字检测结果的步骤,包括:Further, the step of performing text detection on the image block by the image classifier, and determining a text detection result of the image block according to a classification result of the image classifier, includes:
通过所述图像分类器对各图像块进行文字检测,并通过所述图像分类器直接输出以下任意一种结果:包含文字信息和不包含文字信息;Perform text detection on each image block through the image classifier, and directly output any one of the following results through the image classifier: including text information and not including text information;
将输出结果作为所述图像块的文字检测结果。The output result is used as a text detection result of the image block.
为了实现上述目的,根据本公开的又一个方面,还提供以下技术方案:To achieve the above object, according to another aspect of the present disclosure, the following technical solutions are also provided:
一种视频文字检测装置,包括:A video text detection device includes:
图片分块模块,用于对从待检测视频中抽取的待检测图片进行分块,得到至少一个图像块;A picture block module, configured to block the pictures to be detected extracted from the videos to be detected to obtain at least one image block;
文字确定模块,用于根据对所述图像块的文字检测结果确定所述待检测视频中是否包含文字信息。A text determining module is configured to determine whether text information is included in the video to be detected according to a text detection result of the image block.
进一步的,所述文字确定模块具体用于:对各图像块进行文字检测;若检测出任一图像块中包含文字信息,则确定所述待检测视频中包含文字信息。Further, the text determination module is specifically configured to: perform text detection on each image block; if it is detected that any image block contains text information, determine that the video to be detected includes text information.
进一步的,所述装置还包括:Further, the device further includes:
分类器训练模块,用于对已知包含文字信息的图片和/或已知未包含文字信息的图片进行分块,得到至少一个图像块作为训练样本;根据是否包含文字信息对所述训练样本进行标注;采用深度学习分类算法对所述标注后 的训练样本进行训练学习,得到图像分类器。A classifier training module, configured to block pictures that have known text information and / or pictures that do not contain text information to obtain at least one image block as a training sample; and perform training on the training sample according to whether text information is included Labeling; using deep learning classification algorithms to train and learn the labeled training samples to obtain an image classifier.
进一步的,所述图片分块模块具体用于:将所述待检测图片输入所述图像分类器,通过所述图像分类器对所述待检测图片进行分块,得到至少一个图像块;Further, the picture segmentation module is specifically configured to: input the picture to be detected into the image classifier, and divide the picture to be detected by the image classifier to obtain at least one image block;
所述装置还包括:The device further includes:
文字检测模块,用于通过所述图像分类器对所述图像块进行文字检测,并根据所述图像分类器的分类结果确定所述图像块的文字检测结果。A text detection module is configured to perform text detection on the image block through the image classifier, and determine a text detection result of the image block according to a classification result of the image classifier.
进一步的,所述文字检测模块包括:Further, the character detection module includes:
打分单元,用于通过所述图像分类器对各图像块进行打分,得到各图像块的分值;A scoring unit, configured to score each image block through the image classifier to obtain a score value of each image block;
文字检测单元,用于根据所述分值确定所述图像块的文字检测结果。A character detection unit, configured to determine a character detection result of the image block according to the score.
进一步的,所述文字检测单元具体用于:Further, the character detection unit is specifically configured to:
若所述分值超过预设分值,则确定图像块中包含文字信息;或,从所述分值中选取最大分值,若所述最大分值超过预设分值,则确定图像块中包含文字信息;或,若所述分值小于预设分值,则确定图像块中包含文字信息;或,从所述分值中选取最小分值,若所述最小分值小于预设分值,则确定图像块中包含文字信息。If the score exceeds a preset score, determine that the image block contains text information; or, select a maximum score from the score, and if the maximum score exceeds a preset score, determine the image block. Contains text information; or, if the score is less than a preset score, determine that the image block contains text information; or select a minimum score from the scores, and if the minimum score is less than a preset score , It is determined that the image block contains text information.
进一步的,所述文字检测模块具体用于:通过所述图像分类器对各图像块进行文字检测,并通过所述图像分类器直接输出以下任意一种结果:包含文字信息和不包含文字信息;将输出结果作为所述图像块的文字检测结果。Further, the text detection module is specifically configured to perform text detection on each image block through the image classifier, and directly output any one of the following results through the image classifier: including text information and not including text information; The output result is used as a text detection result of the image block.
为了实现上述目的,根据本公开的又一个方面,还提供以下技术方案:To achieve the above object, according to another aspect of the present disclosure, the following technical solutions are also provided:
一种视频文字检测硬件装置,包括:A video text detection hardware device includes:
存储器,用于存储非暂时性计算机可读指令;以及Memory for storing non-transitory computer-readable instructions; and
处理器,用于运行所述计算机可读指令,使得所述处理器执行时实现上述任一视频文字检测方法技术方案中所述的步骤。A processor, configured to run the computer-readable instructions, so that the processor, when executed, implements the steps described in any of the foregoing technical solutions of a video text detection method.
为了实现上述目的,根据本公开的又一个方面,还提供以下技术方案:To achieve the above object, according to another aspect of the present disclosure, the following technical solutions are also provided:
一种计算机可读存储介质,用于存储非暂时性计算机可读指令,当所述非暂时性计算机可读指令由计算机执行时,使得所述计算机执行上述任一视频文字检测方法技术方案中所述的步骤。A computer-readable storage medium is used for storing non-transitory computer-readable instructions. When the non-transitory computer-readable instructions are executed by a computer, the computer is caused to execute any of the technical solutions of the video text detection method described above. The steps described.
为了实现上述目的,根据本公开的又一个方面,还提供以下技术方案:To achieve the above object, according to another aspect of the present disclosure, the following technical solutions are also provided:
一种视频文字检测终端,包括上述任一视频文字检测装置。A video text detection terminal includes any of the video text detection devices described above.
本公开实施例提供一种视频文字检测方法、视频文字检测装置、视频文字检测硬件装置、计算机可读存储介质和视频文字检测终端。其中,该视频文字检测方法包括对从待检测视频中抽取的待检测图片进行分块,得到至少一个图像块;根据对所述图像块的文字检测结果确定所述待检测视频中是否包含文字信息。本公开实施例首先对从待检测视频中抽取的待检测图片进行分块,得到至少一个图像块,然后根据对所述图像块的文字检测结果确定所述待检测视频中是否包含文字信息,可以提高文字检测准确率。Embodiments of the present disclosure provide a video text detection method, a video text detection device, a video text detection hardware device, a computer-readable storage medium, and a video text detection terminal. Wherein, the video text detection method includes segmenting a to-be-detected picture extracted from the to-be-detected video to obtain at least one image block; and determining whether the to-be-detected video contains text information based on a text detection result of the image block. . The embodiment of the present disclosure first divides the to-be-detected picture extracted from the to-be-detected video into at least one image block, and then determines whether the to-be-detected video contains text information according to a text detection result on the image block. Improve text detection accuracy.
上述说明仅是本公开技术方案的概述,为了能更清楚了解本公开的技术手段,而可依照说明书的内容予以实施,并且为让本公开的上述和其他目的、特征和优点能够更明显易懂,以下特举较佳实施例,并配合附图,详细说明如下。The above description is only an overview of the technical solutions of the present disclosure. In order to better understand the technical means of the present disclosure, it can be implemented in accordance with the contents of the description, and to make the above and other objects, features, and advantages of the present disclosure more obvious and understandable The preferred embodiments are described below and described in detail with the accompanying drawings.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1a为根据本公开一个实施例的视频文字检测方法的流程示意图;FIG. 1a is a schematic flowchart of a video text detection method according to an embodiment of the present disclosure; FIG.
图1b为根据本公开另一个实施例的视频文字检测方法的流程示意图;1b is a schematic flowchart of a video text detection method according to another embodiment of the present disclosure;
图1c为根据本公开另一个实施例的视频文字检测方法的流程示意图;1c is a schematic flowchart of a video text detection method according to another embodiment of the present disclosure;
图2a为根据本公开一个实施例的视频文字检测的装置的结构示意图;2a is a schematic structural diagram of a video text detection device according to an embodiment of the present disclosure;
图2b为根据本公开另一个实施例的视频文字检测装置的结构示意图;2b is a schematic structural diagram of a video text detection device according to another embodiment of the present disclosure;
图3为根据本公开一个实施例的视频文字检测硬件装置的结构示意图;3 is a schematic structural diagram of a video text detection hardware device according to an embodiment of the present disclosure;
图4为根据本公开一个实施例的计算机可读存储介质的结构示意图;4 is a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present disclosure;
图5为根据本公开一个实施例的视频文字检测终端的结构示意图。FIG. 5 is a schematic structural diagram of a video text detection terminal according to an embodiment of the present disclosure.
具体实施方式detailed description
以下通过特定的具体实例说明本公开的实施方式,本领域技术人员可由本说明书所揭露的内容轻易地了解本公开的其他优点与功效。显然,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。本公开还可 以通过另外不同的具体实施方式加以实施或应用,本说明书中的各项细节也可以基于不同观点与应用,在没有背离本公开的精神下进行各种修饰或改变。需说明的是,在不冲突的情况下,以下实施例及实施例中的特征可以相互组合。基于本公开中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。The embodiments of the present disclosure are described below through specific specific examples. Those skilled in the art can easily understand other advantages and effects of the present disclosure from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, but not all the embodiments. The present disclosure may also be implemented or applied through other different specific implementations, and various details in this specification may also be modified or changed based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that, in the case of no conflict, the following embodiments and features in the embodiments can be combined with each other. Based on the embodiments in the present disclosure, all other embodiments obtained by a person having ordinary skill in the art without making creative efforts fall within the protection scope of the present disclosure.
需要说明的是,下文描述在所附权利要求书的范围内的实施例的各种方面。应显而易见,本文中所描述的方面可体现于广泛多种形式中,且本文中所描述的任何特定结构及/或功能仅为说明性的。基于本公开,所属领域的技术人员应了解,本文中所描述的一个方面可与任何其它方面独立地实施,且可以各种方式组合这些方面中的两者或两者以上。举例来说,可使用本文中所阐述的任何数目个方面来实施设备及/或实践方法。另外,可使用除了本文中所阐述的方面中的一或多者之外的其它结构及/或功能性实施此设备及/或实践此方法。It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that aspects described herein may be embodied in a wide variety of forms and that any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, those skilled in the art should understand that one aspect described herein may be implemented independently of any other aspect, and that two or more of these aspects may be combined in various ways. For example, any number of the aspects set forth herein may be used to implement a device and / or a practice method. In addition, the apparatus and / or the method may be implemented using other structures and / or functionality than one or more of the aspects set forth herein.
还需要说明的是,以下实施例中所提供的图示仅以示意方式说明本公开的基本构想,图式中仅显示与本公开中有关的组件而非按照实际实施时的组件数目、形状及尺寸绘制,其实际实施时各组件的型态、数量及比例可为一种随意的改变,且其组件布局型态也可能更为复杂。It should also be noted that the illustrations provided in the following embodiments only illustrate the basic idea of the present disclosure in a schematic manner, and only the components related to the present disclosure are shown in the drawings instead of the number, shape and For size drawing, the type, quantity, and proportion of each component can be changed at will in actual implementation, and the component layout type may be more complicated.
另外,在以下描述中,提供具体细节是为了便于透彻理解实例。然而,所属领域的技术人员将理解,可在没有这些特定细节的情况下实践所述方面。In addition, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, those skilled in the art will understand that the described aspects may be practiced without these specific details.
为了解决OCR在识别较小文字的时识别效果不理想且识别准确率低的技术问题,本公开实施例提供一种视频文字检测方法。如图1a所示,该视频文字检测方法主要包括如下步骤S1至步骤S2。其中:In order to solve the technical problems that the OCR has a poor recognition effect and low recognition accuracy when recognizing small characters, an embodiment of the present disclosure provides a video character detection method. As shown in FIG. 1a, the video text detection method mainly includes the following steps S1 to S2. among them:
步骤S1:对从待检测视频中抽取的待检测图片进行分块,得到至少一个图像块。Step S1: Divide the detected pictures extracted from the videos to be detected to obtain at least one image block.
其中,待检测图片可以为一帧或多帧,当待检测图片为多帧时,分别对待检测图片进行分块。The picture to be detected may be one frame or multiple frames. When the picture to be detected is multiple frames, the pictures to be detected are divided into blocks.
其中,图像块的个数或图像块的尺寸具体可根据待检测图片的尺寸确定。具体的,为了提高文字检测准确率,可预先对多种不同尺寸的图片进行分块,并进行文字检测,根据文字检测准确率确定最佳的分块个数或尺寸。The number of image blocks or the size of the image blocks may be specifically determined according to the size of the picture to be detected. Specifically, in order to improve the accuracy of text detection, a plurality of pictures of different sizes can be divided into blocks in advance, and text detection can be performed, and the optimal number or size of blocks can be determined according to the accuracy of text detection.
步骤S2:根据对图像块的文字检测结果确定待检测视频中是否包含文字信息。Step S2: Determine whether text information is included in the video to be detected according to the text detection result of the image block.
其中,文字信息包含但不限于数字、汉字和外文中的任意一种或及其组合。The text information includes, but is not limited to, any one or combination of numbers, Chinese characters, and foreign languages.
具体的,对于包含较小文字信息的待检测图片,通过分块可以放大这些文字信息,从而提高文字检测准确率。Specifically, for a picture to be detected that contains small text information, the text information can be enlarged by segmentation, thereby improving the accuracy of text detection.
本实施例通过对从待检测视频中抽取的待检测图片进行分块,得到至少一个图像块,然后根据对图像块的文字检测结果确定待检测视频中是否包含文字信息,可以提高文字检测准确率。In this embodiment, at least one image block is obtained by dividing the to-be-detected picture extracted from the to-be-detected video, and then determining whether the to-be-detected video contains text information based on the text detection result of the image block, which can improve the accuracy of text detection. .
在一个可选的实施例中,如图1b所示,步骤S2包括:In an optional embodiment, as shown in FIG. 1b, step S2 includes:
S21:对各图像块进行文字检测。S21: Perform character detection on each image block.
本步骤可采用现有技术中的文字检测方法对图像块进行文字检测,由于对待检测图片进行了分块,可能会导致图像块中包含的文字不太完整,例如,检测出的图像块中可能只包含一个文字的一部分或者一段文字的一部分,此时判定为该图像块包含文字信息。In this step, the text detection method in the prior art can be used to perform text detection on the image block. Because the image to be detected is divided, the text contained in the image block may be incomplete. For example, the detected image block may be incomplete. Containing only a part of a text or a part of a text, it is determined that the image block contains text information.
S22:若检测出任一图像块中包含文字信息,则确定待检测视频中包含文字信息。S22: If it is detected that any image block contains text information, it is determined that the video to be detected contains text information.
本实施例通过对从待检测视频中抽取的待检测图片进行分块,得到至少一个图像块,并对各图像块进行文字检测,若检测出任一图像块中包含文字信息,则确定待检测视频中包含文字信息,由于分块可以放大待检测图片中包含的文字信息,从而提高文字检测准确率。In this embodiment, at least one image block is obtained by dividing the to-be-detected picture extracted from the to-be-detected video, and each image block is subjected to text detection. If any image block is detected to contain text information, the video to be detected is determined. The text information is included in the block, and the text information contained in the picture to be detected can be enlarged by the block, thereby improving the accuracy of the text detection.
在一个可选的实施例中,如图1c所示,本实施例的方法还包括:In an optional embodiment, as shown in FIG. 1c, the method in this embodiment further includes:
S3:对已知包含文字信息的图片和/或已知未包含文字信息的图片进行分块,得到至少一个图像块作为训练样本。S3: Block pictures that are known to contain text information and / or pictures that do not contain text information to obtain at least one image block as a training sample.
S4:根据是否包含文字信息对训练样本进行标注。S4: Annotate training samples according to whether text information is included.
具体的,在训练之前,为区分不同的图像块即包含文字信息的图像块和未包含文字信息的图像块,需要对每个图像块进行标注。例如,将包含文字信息的图像块标注1,将未包含文字信息的图像块标注0。Specifically, before training, in order to distinguish different image blocks, that is, image blocks containing text information, and image blocks that do not contain text information, each image block needs to be labeled. For example, an image block containing text information is marked with 1 and an image block without text information is marked with 0.
S5:采用深度学习分类算法对标注后的训练样本进行训练学习,得到图 像分类器。S5: The deep learning classification algorithm is used to train and learn the labeled training samples to obtain an image classifier.
其中,可采用的深度学习分类算法包括但不限于以下任意一种:朴素贝叶斯算法、人工神经网络算法、遗传算法、K最近邻(K-NearestNeighbor,KNN)分类算法、聚类算法等。The deep learning classification algorithms that can be used include, but are not limited to, any of the following: Naive Bayes algorithm, artificial neural network algorithm, genetic algorithm, K-Nearest Neighbor (KNN) classification algorithm, clustering algorithm, and the like.
其中,通过该实施例得到图像分类器,不仅具有自动分块功能,而且可以直接判断出各图像块是否包含文字信息。Wherein, the image classifier obtained through this embodiment not only has an automatic block function, but also can directly determine whether each image block contains text information.
进一步的,基于图1c所示,步骤S1具体包括:Further, based on FIG. 1c, step S1 specifically includes:
将待检测图片输入图像分类器,通过图像分类器对待检测图片进行分块,得到至少一个图像块。The picture to be detected is input to an image classifier, and the picture to be detected is divided into blocks by the image classifier to obtain at least one image block.
本实施例的方法还包括:The method in this embodiment further includes:
S6:通过图像分类器对图像块进行文字检测,并根据图像分类器的分类结果确定图像块的文字检测结果。S6: Perform text detection on the image block through the image classifier, and determine the text detection result of the image block according to the classification result of the image classifier.
进一步的,步骤S6具体包括:Further, step S6 specifically includes:
S61:通过图像分类器对各图像块进行打分,得到各图像块的分值。S61: Score each image block by an image classifier to obtain a score value of each image block.
其中,分值可以为归一化后的分值,例如为0-100或0-1中的任意值。The score may be a normalized score, for example, any value from 0 to 100 or 0-1.
S62:根据分值确定图像块的文字检测结果。S62: Determine the text detection result of the image block according to the score.
进一步的,步骤S62具体包括:Further, step S62 specifically includes:
若分值超过预设分值,则确定图像块中包含文字信息;或,从分值中选取最大分值,若最大分值超过预设分值,则确定图像块中包含文字信息;或,若分值小于预设分值,则确定图像块中包含文字信息;或,从分值中选取最小分值,若最小分值小于预设分值,则确定图像块中包含文字信息。If the score exceeds the preset score, determine that the image block contains text information; or, select the maximum score from the score, and if the maximum score exceeds the preset score, determine that the image block contains text information; or, If the score is smaller than the preset score, it is determined that the image block contains text information; or, the minimum score is selected from the scores; if the minimum score is smaller than the preset score, the image block is determined to contain text information.
关于本步骤,可预先设置打分规则,例如分值越大则表征包含文字信息的可能性就越高,或者分值越小则表征包含文字信息的可能性就越高。基于上述设定的打分规则,确定图像块中是否包含文字信息。Regarding this step, a scoring rule can be set in advance. For example, the larger the score, the higher the probability that the character information is included, or the smaller the score, the higher the possibility that the character information is included. Based on the scoring rules set above, it is determined whether the image block contains text information.
进一步的,步骤S6具体包括:Further, step S6 specifically includes:
S63:通过图像分类器对各图像块进行文字检测,并通过图像分类器直接输出以下任意一种结果:包含文字信息和不包含文字信息。S63: Perform text detection on each image block through the image classifier, and directly output any one of the following results through the image classifier: including text information and not including text information.
S64:将输出结果作为图像块的文字检测结果。S64: Use the output result as the text detection result of the image block.
本领域技术人员应能理解,在上述各个实施例的基础上,还可以进行明显变型(例如,对所列举的模式进行组合)或等同替换。Those skilled in the art should understand that, on the basis of the foregoing embodiments, obvious modifications (for example, combining the listed modes) or equivalent replacements can also be performed.
在上文中,虽然按照上述的顺序描述了视频文字检测方法实施例中的各个步骤,本领域技术人员应清楚,本公开实施例中的步骤并不必然按照上述顺序执行,其也可以倒序、并行、交叉等其他顺序执行,而且,在上述步骤的基础上,本领域技术人员也可以再加入其他步骤,这些明显变型或等同替换的方式也应包含在本公开的保护范围之内,在此不再赘述。In the above, although the steps in the embodiment of the video text detection method are described in the above order, those skilled in the art should understand that the steps in the embodiments of the present disclosure are not necessarily performed in the above order, and they may also be performed in reverse order and in parallel. , Cross, and other executions, and based on the above steps, those skilled in the art can also add other steps, these obvious variations or equivalent replacements should also be included in the scope of protection of the present disclosure, not here More details.
下面为本公开装置实施例,本公开装置实施例可用于执行本公开方法实施例实现的步骤,为了便于说明,仅示出了与本公开实施例相关的部分,具体技术细节未揭示的,请参照本公开方法实施例。The following is a device embodiment of the present disclosure. The device embodiment of the present disclosure can be used to perform the steps implemented by the method embodiments of the present disclosure. For convenience of explanation, only parts related to the embodiments of the present disclosure are shown. Specific technical details are not disclosed. Reference is made to the method embodiments of the present disclosure.
为了解决如何提高用户体验效果的技术问题,本公开实施例提供一种视频文字检测装置。该装置可以执行上述视频文字检测方法实施例中的步骤。如图2a所示,该装置主要包括:图片分块模块21和文字确定模块22;其中,图片分块模块21用于对从待检测视频中抽取的待检测图片进行分块,得到至少一个图像块;文字确定模块22用于根据对图像块的文字检测结果确定待检测视频中是否包含文字信息。In order to solve the technical problem of how to improve the user experience effect, an embodiment of the present disclosure provides a video text detection device. The device can perform the steps in the foregoing embodiment of the video text detection method. As shown in FIG. 2a, the device mainly includes: a picture block module 21 and a text determination module 22; wherein the picture block module 21 is configured to block a picture to be detected extracted from a video to be detected to obtain at least one image Block; the text determining module 22 is configured to determine whether text information is included in a video to be detected according to a text detection result on an image block.
其中,待检测图片可以为一帧或多帧,当待检测图片为多帧时,分别对待检测图片进行分块。The picture to be detected may be one frame or multiple frames. When the picture to be detected is multiple frames, the pictures to be detected are divided into blocks.
其中,图像块的个数或图像块的尺寸具体可根据待检测图片的尺寸确定。具体的,为了提高文字检测准确率,可预先对多种不同尺寸的图片进行分块,并进行文字检测,根据文字检测准确率确定最佳的分块个数或尺寸。The number of image blocks or the size of the image blocks may be specifically determined according to the size of the picture to be detected. Specifically, in order to improve the accuracy of text detection, a plurality of pictures of different sizes can be divided into blocks in advance, and text detection can be performed, and the optimal number or size of blocks can be determined according to the accuracy of text detection.
其中,文字信息包含但不限于数字、汉字和外文中的任意一种或及其组合。The text information includes, but is not limited to, any one or combination of numbers, Chinese characters, and foreign languages.
具体的,对于包含较小文字信息的待检测图片,通过分块可以放大这些文字信息,从而提高文字检测准确率。Specifically, for a picture to be detected that contains small text information, the text information can be enlarged by segmentation, thereby improving the accuracy of text detection.
本实施例通过图片分块模块21对从待检测视频中抽取的待检测图片进行分块,得到至少一个图像块,然后通过文字确定模块22根据对图像块的文字检测结果确定待检测视频中是否包含文字信息,可以提高文字检测准确率。In this embodiment, the picture segmentation module 21 is used to divide the picture to be detected extracted from the video to be detected to obtain at least one image block, and then the text determination module 22 determines whether the video to be detected is based on the text detection result of the image block. Contains text information to improve text detection accuracy.
在一个可选的实施例中,基于图2a,文字确定模块22具体用于:对各 图像块进行文字检测;若检测出任一图像块中包含文字信息,则确定待检测视频中包含文字信息。In an optional embodiment, based on FIG. 2a, the text determination module 22 is specifically configured to: perform text detection on each image block; if it is detected that any image block contains text information, determine that the video to be detected contains text information.
文字确定模块22可采用现有技术中的文字检测方法对图像块进行文字检测,由于对待检测图片进行了分块,可能会导致图像块中包含的文字不太完整,例如,检测出的图像块中可能只包含一个文字的一部分或者一段文字的一部分,此时判定为该图像块包含文字信息。The text determination module 22 may use the text detection methods in the prior art to perform text detection on image blocks. Because the pictures to be detected are divided, the text contained in the image blocks may be incomplete, for example, the detected image blocks It may contain only a part of a character or a part of a character. At this time, it is determined that the image block contains character information.
本实施例通过图片分块模块21对从待检测视频中抽取的待检测图片进行分块,得到至少一个图像块,并通过文字确定模块22对各图像块进行文字检测,若检测出任一图像块中包含文字信息,则确定待检测视频中包含文字信息,由于分块可以放大待检测图片中包含的文字信息,从而提高文字检测准确率。In this embodiment, the picture segmentation module 21 is used to segment the pictures to be detected extracted from the video to be detected to obtain at least one image block, and the text determination module 22 is used to perform text detection on each image block. If any image block is detected, If text information is included in the video, it is determined that the text information is included in the video to be detected. Since the text information contained in the image to be detected can be enlarged by segmentation, the accuracy of text detection is improved.
在一个可选的实施例中,如图2b所示,本实施例的装置还包括:分类器训练模块23;其中,分类器训练模块23用于对已知包含文字信息的图片和/或已知未包含文字信息的图片进行分块,得到至少一个图像块作为训练样本;根据是否包含文字信息对训练样本进行标注;采用深度学习分类算法对标注后的训练样本进行训练学习,得到图像分类器。In an optional embodiment, as shown in FIG. 2b, the apparatus in this embodiment further includes: a classifier training module 23; wherein the classifier training module 23 is configured to perform a process on pictures and / or pictures that already contain text information. The pictures that do not contain text information are divided into blocks to obtain at least one image block as training samples; the training samples are labeled according to whether they contain text information; the deep learning classification algorithm is used to train and learn the labeled training samples to obtain an image classifier .
具体的,分类器训练模块23在训练之前,为区分不同的图像块即包含文字信息的图像块和未包含文字信息的图像块,需要对每个图像块进行标注。例如,将包含文字信息的图像块标注1,将未包含文字信息的图像块标注0。Specifically, before training, the classifier training module 23 needs to label each image block in order to distinguish different image blocks, that is, image blocks containing text information and image blocks that do not contain text information. For example, an image block containing text information is marked with 1 and an image block without text information is marked with 0.
其中,可采用的深度学习分类算法包括但不限于以下任意一种:朴素贝叶斯算法、人工神经网络算法、遗传算法、K最近邻(K-NearestNeighbor,KNN)分类算法、聚类算法等。The deep learning classification algorithms that can be used include, but are not limited to, any of the following: Naive Bayes algorithm, artificial neural network algorithm, genetic algorithm, K-Nearest Neighbor (KNN) classification algorithm, clustering algorithm, and the like.
其中,通过该实施例得到图像分类器,不仅具有自动分块功能,而且可以直接判断出各图像块是否包含文字信息。Wherein, the image classifier obtained through this embodiment not only has an automatic block function, but also can directly determine whether each image block contains text information.
进一步的,基于图2b所示,图片分块模块21具体用于:将待检测图片输入图像分类器,通过图像分类器对待检测图片进行分块,得到至少一个图像块;Further, based on FIG. 2b, the picture blocking module 21 is specifically configured to: input a picture to be detected into an image classifier, and divide the picture to be detected by the image classifier to obtain at least one image block;
本实施例的装置还包括:文字检测模块24;其中,文字检测模块24用于通过图像分类器对图像块进行文字检测,并根据图像分类器的分类结果 确定图像块的文字检测结果。The device of this embodiment further includes a text detection module 24; wherein the text detection module 24 is configured to perform text detection on the image block through the image classifier, and determine the text detection result of the image block according to the classification result of the image classifier.
进一步的,文字检测模块24包括:打分单元241和文字检测单元242;其中,打分单元241用于通过图像分类器对各图像块进行打分,得到各图像块的分值;文字检测单元242用于根据分值确定图像块的文字检测结果。Further, the text detection module 24 includes: a scoring unit 241 and a text detection unit 242; wherein the scoring unit 241 is configured to score each image block through an image classifier to obtain a score value of each image block; the text detection unit 242 is configured to: Determine the text detection result of the image block according to the score.
其中,分值可以为归一化后的分值,例如为0-100或0-1中的任意值。The score may be a normalized score, for example, any value from 0 to 100 or 0-1.
进一步的,文字检测单元242具体用于:若分值超过预设分值,则确定图像块中包含文字信息;或,从分值中选取最大分值,若最大分值超过预设分值,则确定图像块中包含文字信息;或,若分值小于预设分值,则确定图像块中包含文字信息;或,从分值中选取最小分值,若最小分值小于预设分值,则确定图像块中包含文字信息。Further, the character detection unit 242 is specifically configured to: if the score exceeds a preset score, determine that the image block contains text information; or select a maximum score from the scores, and if the maximum score exceeds the preset score, Determine that the image block contains text information; or, if the score is less than a preset score, determine that the image block contains text information; or select a minimum score from the scores, and if the minimum score is less than the preset score, It is determined that the image block contains text information.
关于文字检测单元242,可预先设置打分规则,例如分值越大则表征包含文字信息的可能性就越高,或者分值越小则表征包含文字信息的可能性就越高。基于上述设定的打分规则,确定图像块中是否包含文字信息。Regarding the character detection unit 242, a scoring rule can be set in advance. For example, the larger the score, the higher the probability that the character information is included, or the smaller the score, the higher the probability that the character information is included. Based on the scoring rules set above, it is determined whether the image block contains text information.
进一步的,文字检测模块24具体用于:通过图像分类器对各图像块进行文字检测,并通过图像分类器直接输出以下任意一种结果:包含文字信息和不包含文字信息;将输出结果作为图像块的文字检测结果。Further, the text detection module 24 is specifically configured to: perform text detection on each image block through an image classifier, and directly output any of the following results through the image classifier: including text information and not including text information; and using the output result as an image Block text detection results.
有关视频文字检测装置实施例的工作原理、实现的技术效果等详细说明可以参考前述视频文字检测方法实施例中的相关说明,在此不再赘述。For a detailed description of the working principle and technical effects of the embodiment of the video text detection device embodiment, refer to the related description in the foregoing embodiment of the video text detection method, and details are not described herein again.
图3是图示根据本公开的实施例的视频文字检测硬件装置的硬件框图。如图3所示,根据本公开实施例的视频文字检测硬件装置30包括存储器31和处理器32。FIG. 3 is a hardware block diagram illustrating a video text detection hardware device according to an embodiment of the present disclosure. As shown in FIG. 3, a video text detection hardware device 30 according to an embodiment of the present disclosure includes a memory 31 and a processor 32.
该存储器31用于存储非暂时性计算机可读指令。具体地,存储器31可以包括一个或多个计算机程序产品,该计算机程序产品可以包括各种形式的计算机可读存储介质,例如易失性存储器和/或非易失性存储器。该易失性存储器例如可以包括随机存取存储器(RAM)和/或高速缓冲存储器(cache)等。该非易失性存储器例如可以包括只读存储器(ROM)、硬盘、闪存等。The memory 31 is configured to store non-transitory computer-readable instructions. Specifically, the memory 31 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, a random access memory (RAM) and / or a cache memory. The non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, and the like.
该处理器32可以是中央处理单元(CPU)或者具有数据处理能力和/或指令执行能力的其它形式的处理单元,并且可以控制视频文字检测硬件装置30中的其它组件以执行期望的功能。在本公开的一个实施例中,该处理 器32用于运行该存储器31中存储的该计算机可读指令,使得该视频文字检测硬件装置30执行前述的本公开各实施例的视频文字检测方法的全部或部分步骤。The processor 32 may be a central processing unit (CPU) or other form of processing unit having data processing capabilities and / or instruction execution capabilities, and may control other components in the video text detection hardware device 30 to perform a desired function. In an embodiment of the present disclosure, the processor 32 is configured to run the computer-readable instructions stored in the memory 31, so that the video text detection hardware device 30 executes the foregoing video text detection method of the embodiments of the present disclosure. All or part of the steps.
本领域技术人员应能理解,为了解决如何获得良好用户体验效果的技术问题,本实施例中也可以包括诸如通信总线、接口等公知的结构,这些公知的结构也应包含在本公开的保护范围之内。Those skilled in the art should understand that in order to solve the technical problem of how to obtain a good user experience effect, this embodiment may also include well-known structures such as a communication bus and an interface. These well-known structures should also be included in the protection scope of the present disclosure. within.
有关本实施例的详细说明可以参考前述各实施例中的相应说明,在此不再赘述。For detailed descriptions of this embodiment, reference may be made to corresponding descriptions in the foregoing embodiments, and details are not described herein again.
图4是图示根据本公开的实施例的计算机可读存储介质的示意图。如图4所示,根据本公开实施例的计算机可读存储介质40,其上存储有非暂时性计算机可读指令41。当该非暂时性计算机可读指令41由处理器运行时,执行前述的本公开各实施例的视频特征的比对方法的全部或部分步骤。FIG. 4 is a schematic diagram illustrating a computer-readable storage medium according to an embodiment of the present disclosure. As shown in FIG. 4, a computer-readable storage medium 40 according to an embodiment of the present disclosure stores non-transitory computer-readable instructions 41 thereon. When the non-transitory computer-readable instruction 41 is executed by a processor, all or part of the steps of the method for comparing video features of the foregoing embodiments of the present disclosure are performed.
上述计算机可读存储介质40包括但不限于:光存储介质(例如:CD-ROM和DVD)、磁光存储介质(例如:MO)、磁存储介质(例如:磁带或移动硬盘)、具有内置的可重写非易失性存储器的媒体(例如:存储卡)和具有内置ROM的媒体(例如:ROM盒)。The computer-readable storage medium 40 includes, but is not limited to, optical storage media (for example, CD-ROM and DVD), magneto-optical storage media (for example, MO), magnetic storage media (for example, magnetic tape or mobile hard disk), Non-volatile memory rewritable media (for example: memory card) and media with built-in ROM (for example: ROM box).
有关本实施例的详细说明可以参考前述各实施例中的相应说明,在此不再赘述。For detailed descriptions of this embodiment, reference may be made to corresponding descriptions in the foregoing embodiments, and details are not described herein again.
图5是图示根据本公开实施例的终端的硬件结构示意图。如图5所示,该视频文字检测终端50包括上述视频文字检测装置实施例。FIG. 5 is a schematic diagram illustrating a hardware structure of a terminal according to an embodiment of the present disclosure. As shown in FIG. 5, the video text detection terminal 50 includes the foregoing video text detection device embodiment.
该终端可以以各种形式来实施,本公开中的终端可以包括但不限于诸如移动电话、智能电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、导航装置、车载终端、车载显示终端、车载电子后视镜等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。The terminal may be implemented in various forms, and the terminal in the present disclosure may include, but is not limited to, such as a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP ( Portable multimedia players), navigation devices, on-board terminals, on-board display terminals, on-board electronic rear-view mirrors, and other mobile terminals, and fixed terminals such as digital TVs, desktop computers, and the like.
作为等同替换的实施方式,该终端还可以包括其他组件。如图5所示,该视频文字检测终端50可以包括电源单元51、无线通信单元52、A/V(音频/视频)输入单元53、用户输入单元54、感测单元55、接口单元56、控制器57、输出单元58和存储器59等等。图5示出了具有各种组件的终端,但是应理解的是,并不要求实施所有示出的组件,也可以替代地实施更多或 更少的组件。As an equivalent alternative, the terminal may further include other components. As shown in FIG. 5, the video text detection terminal 50 may include a power supply unit 51, a wireless communication unit 52, an A / V (audio / video) input unit 53, a user input unit 54, a sensing unit 55, an interface unit 56, and a control unit. Device 57, output unit 58, memory 59, and so on. FIG. 5 shows a terminal with various components, but it should be understood that it is not required to implement all the illustrated components, and more or fewer components may be implemented instead.
其中,无线通信单元52允许终端50与无线通信系统或网络之间的无线电通信。A/V输入单元53用于接收音频或视频信号。用户输入单元54可以根据用户输入的命令生成键输入数据以控制终端的各种操作。感测单元55检测终端50的当前状态、终端50的位置、用户对于终端50的触摸输入的有无、终端50的取向、终端50的加速或减速移动和方向等等,并且生成用于控制终端50的操作的命令或信号。接口单元56用作至少一个外部装置与终端50连接可以通过的接口。输出单元58被构造为以视觉、音频和/或触觉方式提供输出信号。存储器59可以存储由控制器55执行的处理和控制操作的软件程序等等,或者可以暂时地存储己经输出或将要输出的数据。存储器59可以包括至少一种类型的存储介质。而且,终端50可以与通过网络连接执行存储器59的存储功能的网络存储装置协作。控制器57通常控制终端的总体操作。另外,控制器57可以包括用于再现或回放多媒体数据的多媒体模块。控制器57可以执行模式识别处理,以将在触摸屏上执行的手写输入或者图片绘制输入识别为字符或图像。电源单元51在控制器57的控制下接收外部电力或内部电力并且提供操作各元件和组件所需的适当的电力。Among them, the wireless communication unit 52 allows radio communication between the terminal 50 and a wireless communication system or network. The A / V input unit 53 is used to receive audio or video signals. The user input unit 54 may generate key input data according to a command input by the user to control various operations of the terminal. The sensing unit 55 detects the current state of the terminal 50, the position of the terminal 50, the presence or absence of a user's touch input to the terminal 50, the orientation of the terminal 50, the acceleration or deceleration movement and direction of the terminal 50, and the like, and generates a signal for controlling the terminal 50 commands or signals for operation. The interface unit 56 functions as an interface through which at least one external device can be connected to the terminal 50. The output unit 58 is configured to provide an output signal in a visual, audio, and / or tactile manner. The memory 59 may store software programs and the like for processing and control operations performed by the controller 55, or may temporarily store data that has been output or is to be output. The memory 59 may include at least one type of storage medium. Moreover, the terminal 50 may cooperate with a network storage device that performs a storage function of the memory 59 through a network connection. The controller 57 generally controls the overall operation of the terminal. In addition, the controller 57 may include a multimedia module for reproducing or playing back multimedia data. The controller 57 may perform a pattern recognition process to recognize a handwriting input or a picture drawing input performed on the touch screen as characters or images. The power supply unit 51 receives external power or internal power under the control of the controller 57 and provides appropriate power required to operate each element and component.
本公开提出的视频特征的比对方法的各种实施方式可以以使用例如计算机软件、硬件或其任何组合的计算机可读介质来实施。对于硬件实施,本公开提出的视频特征的比对方法的各种实施方式可以通过使用特定用途集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理装置(DSPD)、可编程逻辑装置(PLD)、现场可编程门阵列(FPGA)、处理器、控制器、微控制器、微处理器、被设计为执行这里描述的功能的电子单元中的至少一种来实施,在一些情况下,本公开提出的视频特征的比对方法的各种实施方式可以在控制器57中实施。对于软件实施,本公开提出的视频特征的比对方法的各种实施方式可以与允许执行至少一种功能或操作的单独的软件模块来实施。软件代码可以由以任何适当的编程语言编写的软件应用程序(或程序)来实施,软件代码可以存储在存储器59中并且由控制器57执行。Various embodiments of the video feature comparison method proposed by the present disclosure may be implemented in a computer-readable medium using, for example, computer software, hardware, or any combination thereof. For hardware implementation, various embodiments of the video feature comparison method proposed in the present disclosure can be implemented by using an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), and a programmable logic device. (PLD), field programmable gate array (FPGA), processor, controller, microcontroller, microprocessor, electronic unit designed to perform the functions described herein, and in some cases implemented Various embodiments of the video feature comparison method proposed in the present disclosure may be implemented in the controller 57. For software implementation, various embodiments of the video feature comparison method proposed by the present disclosure can be implemented with a separate software module that allows at least one function or operation to be performed. The software codes may be implemented by a software application (or program) written in any suitable programming language, and the software codes may be stored in the memory 59 and executed by the controller 57.
有关本实施例的详细说明可以参考前述各实施例中的相应说明,在此不再赘述。For detailed descriptions of this embodiment, reference may be made to corresponding descriptions in the foregoing embodiments, and details are not described herein again.
以上结合具体实施例描述了本公开的基本原理,但是,需要指出的是,在本公开中提及的优点、优势、效果等仅是示例而非限制,不能认为这些优 点、优势、效果等是本公开的各个实施例必须具备的。另外,上述公开的具体细节仅是为了示例的作用和便于理解的作用,而非限制,上述细节并不限制本公开为必须采用上述具体的细节来实现。The basic principles of the present disclosure have been described above in conjunction with specific embodiments, but it should be noted that the advantages, advantages, effects, etc. mentioned in this disclosure are merely examples and not limitations, and these advantages, advantages, effects, etc. cannot be considered as Required for various embodiments of the present disclosure. In addition, the specific details of the above disclosure are only for the purpose of example and easy to understand, and are not limiting, and the above details do not limit the present disclosure to the implementation of the above specific details.
本公开中涉及的器件、装置、设备、系统的方框图仅作为例示性的例子并且不意图要求或暗示必须按照方框图示出的方式进行连接、布置、配置。如本领域技术人员将认识到的,可以按任意方式连接、布置、配置这些器件、装置、设备、系统。诸如“包括”、“包含”、“具有”等等的词语是开放性词汇,指“包括但不限于”,且可与其互换使用。这里所使用的词汇“或”和“和”指词汇“和/或”,且可与其互换使用,除非上下文明确指示不是如此。这里所使用的词汇“诸如”指词组“诸如但不限于”,且可与其互换使用。The block diagrams of the devices, devices, equipment, and systems involved in this disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As will be recognized by those skilled in the art, these devices, devices, equipment, systems can be connected, arranged, and configured in any manner. Words such as "including," "including," "having," and the like are open words that refer to "including, but not limited to," and can be used interchangeably with them. As used herein, the terms "or" and "and" refer to the terms "and / or" and are used interchangeably therewith unless the context clearly indicates otherwise. The term "such as" as used herein refers to the phrase "such as, but not limited to," and is used interchangeably with it.
另外,如在此使用的,在以“至少一个”开始的项的列举中使用的“或”指示分离的列举,以便例如“A、B或C的至少一个”的列举意味着A或B或C,或AB或AC或BC,或ABC(即A和B和C)。此外,措辞“示例的”不意味着描述的例子是优选的或者比其他例子更好。In addition, as used herein, an "or" used in an enumeration of items beginning with "at least one" indicates a separate enumeration such that, for example, an "at least one of A, B, or C" enumeration means A or B or C, or AB or AC or BC, or ABC (ie A and B and C). Furthermore, the word "exemplary" does not mean that the described example is preferred or better than other examples.
还需要指出的是,在本公开的系统和方法中,各部件或各步骤是可以分解和/或重新组合的。这些分解和/或重新组合应视为本公开的等效方案。It should also be noted that in the system and method of the present disclosure, each component or each step can be disassembled and / or recombined. These decompositions and / or recombinations should be regarded as equivalent solutions of the present disclosure.
可以不脱离由所附权利要求定义的教导的技术而进行对在此所述的技术的各种改变、替换和更改。此外,本公开的权利要求的范围不限于以上所述的处理、机器、制造、事件的组成、手段、方法和动作的具体方面。可以利用与在此所述的相应方面进行基本相同的功能或者实现基本相同的结果的当前存在的或者稍后要开发的处理、机器、制造、事件的组成、手段、方法或动作。因而,所附权利要求包括在其范围内的这样的处理、机器、制造、事件的组成、手段、方法或动作。Various changes, substitutions, and alterations to the techniques described herein can be made without departing from the techniques taught by the appended claims. Further, the scope of the claims of the present disclosure is not limited to the specific aspects of the processes, machines, manufacturing, composition of events, means, methods, and actions described above. The composition, means, methods, or actions of processes, machines, manufacturing, and events that currently exist or are to be developed later may be utilized that perform substantially the same functions or achieve substantially the same results as the corresponding aspects described herein. Accordingly, the appended claims include within their scope such processes, machines, manufacture, compositions of matter, means, methods, or actions.
提供所公开的方面的以上描述以使本领域的任何技术人员能够做出或者使用本公开。对这些方面的各种修改对于本领域技术人员而言是非常显而易见的,并且在此定义的一般原理可以应用于其他方面而不脱离本公开的范围。因此,本公开不意图被限制到在此示出的方面,而是按照与在此公开的原理和新颖的特征一致的最宽范围。The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Accordingly, the disclosure is not intended to be limited to the aspects shown herein, but to the broadest scope consistent with the principles and novel features disclosed herein.
为了例示和描述的目的已经给出了以上描述。此外,此描述不意图将本公开的实施例限制到在此公开的形式。尽管以上已经讨论了多个示例方面 和实施例,但是本领域技术人员将认识到其某些变型、修改、改变、添加和子组合。The foregoing description has been given for the purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although a number of example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

Claims (16)

  1. 一种视频文字检测方法,其特征在于,包括:A video text detection method, comprising:
    对从待检测视频中抽取的待检测图片进行分块,得到至少一个图像块;Segmenting the to-be-detected picture extracted from the to-be-detected video to obtain at least one image block;
    根据对所述图像块的文字检测结果确定所述待检测视频中是否包含文字信息。It is determined whether text information is included in the video to be detected according to a text detection result on the image block.
  2. 根据权利要求1所述的方法,其特征在于,所述根据对所述图像块的文字检测结果确定所述待检测视频中是否包含文字信息的步骤,包括:The method according to claim 1, wherein the step of determining whether the video to be detected contains text information according to a text detection result on the image block includes:
    对各图像块进行文字检测;Text detection on each image block;
    若检测出任一图像块中包含文字信息,则确定所述待检测视频中包含文字信息。If it is detected that any image block contains text information, it is determined that the video to be detected contains text information.
  3. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, further comprising:
    对已知包含文字信息的图片和/或已知未包含文字信息的图片进行分块,得到至少一个图像块作为训练样本;Segmenting pictures that are known to contain text information and / or pictures that are not known to contain text information to obtain at least one image block as a training sample;
    根据是否包含文字信息对所述训练样本进行标注;Mark the training samples according to whether text information is included;
    采用深度学习分类算法对所述标注后的训练样本进行训练学习,得到图像分类器。A deep learning classification algorithm is used to perform training and learning on the labeled training samples to obtain an image classifier.
  4. 根据权利要求3所述的方法,其特征在于,所述对从待检测视频中抽取的待检测图片进行分块,得到至少一个图像块的步骤,包括:The method according to claim 3, wherein the step of dividing the picture to be detected extracted from the video to be detected to obtain at least one image block comprises:
    将所述待检测图片输入所述图像分类器,通过所述图像分类器对所述待检测图片进行分块,得到至少一个图像块;Inputting the picture to be detected into the image classifier, and dividing the picture to be detected by the image classifier to obtain at least one image block;
    所述方法还包括:The method further includes:
    通过所述图像分类器对所述图像块进行文字检测,并根据所述图像分类器的分类结果确定所述图像块的文字检测结果。Text detection is performed on the image block by the image classifier, and a text detection result of the image block is determined according to a classification result of the image classifier.
  5. 根据权利要求4所述的方法,其特征在于,所述通过所述图像分类器对所述图像块进行文字检测,并根据所述图像分类器的分类结果确定所述图像块的文字检测结果的步骤,包括:The method according to claim 4, characterized in that the image classifier performs text detection on the image block, and determines the text detection result of the image block according to the classification result of the image classifier. Steps, including:
    通过所述图像分类器对各图像块进行打分,得到各图像块的分值;Scoring each image block by the image classifier to obtain a score value of each image block;
    根据所述分值确定所述图像块的文字检测结果。A text detection result of the image block is determined according to the score.
  6. 根据权利要求5所述的方法,其特征在于,所述根据所述分值确定所述图像块的文字检测结果的步骤,包括:The method according to claim 5, wherein the step of determining a text detection result of the image block according to the score comprises:
    若所述分值超过预设分值,则确定所述图像块中包含文字信息;或,从所述分值中选取最大分值,若所述最大分值超过预设分值,则确定所述图像块中包含文字信息;或,若所述分值小于预设分值,则确定所述图像块中包含文字信息;或,从所述分值中选取最小分值,若所述最小分值小于预设分值,则确定图像块中包含文字信息。If the score exceeds a preset score, determine that the image block contains text information; or, select a maximum score from the score, and if the maximum score exceeds the preset score, determine the maximum score. The image block contains text information; or, if the score is smaller than a preset score, it is determined that the image block contains text information; or, a minimum score is selected from the scores, and if the minimum score is If the value is less than the preset score, it is determined that the image block contains text information.
  7. 根据权利要求4所述的方法,其特征在于,所述通过所述图像分类器对所述图像块进行文字检测,并根据所述图像分类器的分类结果确定所述图像块的文字检测结果的步骤,包括:The method according to claim 4, characterized in that the image classifier performs text detection on the image block, and determines the text detection result of the image block according to the classification result of the image classifier. Steps, including:
    通过所述图像分类器对各图像块进行文字检测,并通过所述图像分类器直接输出以下任意一种结果:包含文字信息和不包含文字信息;Perform text detection on each image block through the image classifier, and directly output any one of the following results through the image classifier: including text information and not including text information;
    将输出结果作为所述图像块的文字检测结果。The output result is used as a text detection result of the image block.
  8. 一种视频文字检测装置,其特征在于,包括:A video text detection device, comprising:
    图片分块模块,用于对从待检测视频中抽取的待检测图片进行分块,得到至少一个图像块;A picture block module, configured to block the pictures to be detected extracted from the videos to be detected to obtain at least one image block;
    文字确定模块,用于根据对所述图像块的文字检测结果确定所述待检测视频中是否包含文字信息。A text determining module is configured to determine whether text information is included in the video to be detected according to a text detection result of the image block.
  9. 根据权利要求8所述的装置,其特征在于,所述文字确定模块具体用于:对各图像块进行文字检测;若检测出任一图像块中包含文字信息,则确定所述待检测视频中包含文字信息。The device according to claim 8, wherein the text determination module is specifically configured to: perform text detection on each image block; if it is detected that any image block contains text information, determine that the video to be detected includes text information.
  10. 根据权利要求8所述的装置,其特征在于,所述装置还包括:The apparatus according to claim 8, further comprising:
    分类器训练模块,用于对已知包含文字信息的图片和/或已知未包含文字信息的图片进行分块,得到至少一个图像块作为训练样本;根据是否包含文字信息对所述训练样本进行标注;采用深度学习分类算法对所述标注后的训练样本进行训练学习,得到图像分类器。A classifier training module, configured to block pictures that have known text information and / or pictures that do not contain text information to obtain at least one image block as a training sample; and perform training on the training sample according to whether text information is included Labeling; using deep learning classification algorithms to train and learn the labeled training samples to obtain an image classifier.
  11. 根据权利要求10所述的装置,其特征在于,所述图片分块模块具体用于:将所述待检测图片输入所述图像分类器,通过所述图像分类器对所述待检测图片进行分块,得到至少一个图像块;The device according to claim 10, wherein the picture segmentation module is specifically configured to: input the picture to be detected into the image classifier, and classify the picture to be detected by the image classifier. Block to obtain at least one image block;
    所述装置还包括:The device further includes:
    文字检测模块,用于通过所述图像分类器对所述图像块进行文字检测,并根据所述图像分类器的分类结果确定所述图像块的文字检测结果。A text detection module is configured to perform text detection on the image block through the image classifier, and determine a text detection result of the image block according to a classification result of the image classifier.
  12. 根据权利要求11所述的装置,其特征在于,所述文字检测模块包括:The device according to claim 11, wherein the character detection module comprises:
    打分单元,用于通过所述图像分类器对各图像块进行打分,得到各图像块的分值;A scoring unit, configured to score each image block through the image classifier to obtain a score value of each image block;
    文字检测单元,用于根据所述分值确定所述图像块的文字检测结果。A character detection unit, configured to determine a character detection result of the image block according to the score.
  13. 根据权利要求12所述的装置,其特征在于,所述文字检测单元具体用于:The device according to claim 12, wherein the character detection unit is specifically configured to:
    若所述分值超过预设分值,则确定图像块中包含文字信息;或,从所述分值中选取最大分值,若所述最大分值超过预设分值,则确定图像块中包含文字信息;或,若所述分值小于预设分值,则确定图像块中包含文字信息;或,从所述分值中选取最小分值,若所述最小分值小于预设分值,则确定图像块中包含文字信息。If the score exceeds a preset score, determine that the image block contains text information; or, select a maximum score from the score, and if the maximum score exceeds a preset score, determine the image block. Contains text information; or, if the score is less than a preset score, determine that the image block contains text information; or select a minimum score from the scores, and if the minimum score is less than a preset score , It is determined that the image block contains text information.
  14. 根据权利要求11所述的装置,其特征在于,所述文字检测模块具体用于:通过所述图像分类器对各图像块进行文字检测,并通过所述图像分类器直接输出以下任意一种结果:包含文字信息和不包含文字信息;将输出结果作为所述图像块的文字检测结果。The device according to claim 11, wherein the text detection module is specifically configured to perform text detection on each image block through the image classifier, and directly output any one of the following results through the image classifier : Contains text information and does not contain text information; and uses the output result as the text detection result of the image block.
  15. 一种视频文字检测硬件装置,包括:A video text detection hardware device includes:
    存储器,用于存储非暂时性计算机可读指令;以及Memory for storing non-transitory computer-readable instructions; and
    处理器,用于运行所述计算机可读指令,使得所述处理器执行时实现根据权利要求1-7中任意一项所述的视频文字检测方法。A processor, configured to run the computer-readable instructions, so that the processor, when executed, implements the video text detection method according to any one of claims 1-7.
  16. 一种计算机可读存储介质,用于存储非暂时性计算机可读指令,当所述非暂时性计算机可读指令由计算机执行时,使得所述计算机执行权利要求1-7中任意一项所述的视频文字检测方法。A computer-readable storage medium is configured to store non-transitory computer-readable instructions, and when the non-transitory computer-readable instructions are executed by a computer, cause the computer to execute any one of claims 1-7 Video text detection method.
PCT/CN2018/117715 2018-09-13 2018-11-27 Video text detection method and device, and computer readable storage medium WO2020052085A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811065276.2 2018-09-13
CN201811065276.2A CN109299682A (en) 2018-09-13 2018-09-13 Video text detection method, device and computer readable storage medium

Publications (1)

Publication Number Publication Date
WO2020052085A1 true WO2020052085A1 (en) 2020-03-19

Family

ID=65166772

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/117715 WO2020052085A1 (en) 2018-09-13 2018-11-27 Video text detection method and device, and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN109299682A (en)
WO (1) WO2020052085A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111753133A (en) * 2020-06-11 2020-10-09 北京小米松果电子有限公司 Video classification method, device and storage medium
CN111832082A (en) * 2020-08-20 2020-10-27 支付宝(杭州)信息技术有限公司 Image-text integrity detection method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050281455A1 (en) * 2004-06-17 2005-12-22 Chun-Chia Huang System of using neural network to distinguish text and picture in images and method thereof
CN104281850A (en) * 2013-07-09 2015-01-14 腾讯科技(深圳)有限公司 Character area identification method and device
CN104463103A (en) * 2014-11-10 2015-03-25 小米科技有限责任公司 Image processing method and device
CN104484867A (en) * 2014-12-30 2015-04-01 小米科技有限责任公司 Picture processing method and device
CN106156777A (en) * 2015-04-23 2016-11-23 华中科技大学 Textual image detection method and device
CN106257496A (en) * 2016-07-12 2016-12-28 华中科技大学 Mass network text and non-textual image classification method
CN106385592A (en) * 2016-08-31 2017-02-08 苏睿 Image compression method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101833664A (en) * 2010-04-21 2010-09-15 中国科学院自动化研究所 Video image character detecting method based on sparse expression
CN102915438B (en) * 2012-08-21 2016-11-23 北京捷成世纪科技股份有限公司 The extracting method of a kind of video caption and device
CN103955718A (en) * 2014-05-15 2014-07-30 厦门美图之家科技有限公司 Image subject recognition method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050281455A1 (en) * 2004-06-17 2005-12-22 Chun-Chia Huang System of using neural network to distinguish text and picture in images and method thereof
CN104281850A (en) * 2013-07-09 2015-01-14 腾讯科技(深圳)有限公司 Character area identification method and device
CN104463103A (en) * 2014-11-10 2015-03-25 小米科技有限责任公司 Image processing method and device
CN104484867A (en) * 2014-12-30 2015-04-01 小米科技有限责任公司 Picture processing method and device
CN106156777A (en) * 2015-04-23 2016-11-23 华中科技大学 Textual image detection method and device
CN106257496A (en) * 2016-07-12 2016-12-28 华中科技大学 Mass network text and non-textual image classification method
CN106385592A (en) * 2016-08-31 2017-02-08 苏睿 Image compression method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111753133A (en) * 2020-06-11 2020-10-09 北京小米松果电子有限公司 Video classification method, device and storage medium
CN111832082A (en) * 2020-08-20 2020-10-27 支付宝(杭州)信息技术有限公司 Image-text integrity detection method and device

Also Published As

Publication number Publication date
CN109299682A (en) 2019-02-01

Similar Documents

Publication Publication Date Title
WO2020052084A1 (en) Video cover selection method, device and computer-readable storage medium
WO2020052083A1 (en) Infringing picture recognition method and device, and computer readable storage medium
US11749020B2 (en) Method and apparatus for multi-face tracking of a face effect, and electronic device
KR101428715B1 (en) System and method for saving digital contents classified with person-based clustering
US10963504B2 (en) Zero-shot event detection using semantic embedding
US8965115B1 (en) Adaptive multi-modal detection and fusion in videos via classification-based-learning
EP3118772A1 (en) Image content providing apparatus and image content providing method
CN105144239A (en) Image processing device, program, and image processing method
WO2021143624A1 (en) Video tag determination method, device, terminal, and storage medium
Escalante et al. A naive bayes baseline for early gesture recognition
TW201546636A (en) Annotation display assistance device and method of assisting annotation display
CN107861948B (en) Label extraction method, device, equipment and medium
CN107924398B (en) System and method for providing a review-centric news reader
CN111930809A (en) Data processing method, device and equipment
US20210089334A1 (en) Electronic device and screen capturing method thereof
WO2020052085A1 (en) Video text detection method and device, and computer readable storage medium
WO2022227218A1 (en) Drug name recognition method and apparatus, and computer device and storage medium
WO2019137259A1 (en) Image processing method and apparatus, storage medium, and electronic device
US20200236421A1 (en) Extracting Session Information From Video Content To Facilitate Seeking
CN110619656A (en) Face detection tracking method and device based on binocular camera and electronic equipment
US11184670B2 (en) Display apparatus and control method thereof
CN111104572A (en) Feature selection method and device for model training and electronic equipment
US8498978B2 (en) Slideshow video file detection
WO2018166499A1 (en) Text classification method and device, and storage medium
WO2020052082A1 (en) Video floating paperdetection method and device, and computer readable storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18933590

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 23/06/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18933590

Country of ref document: EP

Kind code of ref document: A1