CN111818277B - Character superposition method and device for video image, computer equipment and storage medium - Google Patents

Character superposition method and device for video image, computer equipment and storage medium Download PDF

Info

Publication number
CN111818277B
CN111818277B CN202010584953.2A CN202010584953A CN111818277B CN 111818277 B CN111818277 B CN 111818277B CN 202010584953 A CN202010584953 A CN 202010584953A CN 111818277 B CN111818277 B CN 111818277B
Authority
CN
China
Prior art keywords
character
superposition
instruction
fpga
information
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202010584953.2A
Other languages
Chinese (zh)
Other versions
CN111818277A (en
Inventor
何来
翟佳
迟宇
杨小龙
刘记文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Shansong Information Technology Co ltd
Original Assignee
Chongqing Shansong Information Technology Co ltd
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 Chongqing Shansong Information Technology Co ltd filed Critical Chongqing Shansong Information Technology Co ltd
Priority to CN202010584953.2A priority Critical patent/CN111818277B/en
Publication of CN111818277A publication Critical patent/CN111818277A/en
Application granted granted Critical
Publication of CN111818277B publication Critical patent/CN111818277B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/265Mixing

Abstract

The invention provides a method and a device for overlaying dynamic characters of a video image, computer equipment and a storage medium, which are applied to embedded video processing, wherein the method comprises the following steps: the single chip microcomputer obtains a first superposition instruction; the single chip microcomputer acquires a character file corresponding to the character information from a character memory according to the character information in the first superposition instruction; the single chip microcomputer writes the character file into a position corresponding to a preset image layer according to the superposition position information; and the FPGA superposes the preset layer on the source video stream to be superposed to obtain a target video stream. The invention can be widely applied to the field of embedded video processing and also increases the character superposition function of embedded video processing; the problem that a character superimposer with high cost and large volume is not suitable for high-integration embedded video processing in the prior art is solved, and the requirements of embedded video processing on compatibility and high cost performance are met.

Description

Character superposition method and device for video image, computer equipment and storage medium
Technical Field
The invention relates to the field of embedded video processing, in particular to a method and a device for character superposition of video images, computer equipment and a storage medium.
Background
Character superimposition of video images is a technique of mixing a character or a time signal into a video signal so as to display the video signal at a specific position on a screen simultaneously with the image signal. The technology is an important field in application video processing, and plays an important role in application video processing. The video character superposition is divided into static superposition and dynamic superposition, the static superposition only needs to be displayed constantly at a fixed position, and the dynamic superposition needs to switch the display position and the display content in real time according to a scene and a received instruction. The main technology in the same field is a character superimposer, which is an instrument specially used for character superimposition, is provided with a special character chip in the instrument, can store various Chinese characters or western characters and pictures, and is provided with a video input interface, a video output interface, a serial port or a network port communicated with an upper computer, a video source is connected with the input interface of the character superimposer, the serial port is connected with a computer, information such as the position, the size, the color, the font and the like of the character to be displayed is set through upper computer software, and the video after character superimposition is connected with a display through an output port of the superimposer to output the video.
The character superimposer in the prior art is a special electronic instrument, has the defects of high cost and large volume, and is not suitable for the requirements of high-integration embedded video processing on compatibility and high cost performance.
Disclosure of Invention
Aiming at the defects in the prior art, the character superposition method, the character superposition device, the computer equipment and the storage medium for the video image solve the problem that a character adder with high cost and large volume is not suitable for high-integration embedded video processing in the prior art, and meet the requirements of the embedded video processing on compatibility and high cost performance.
In a first aspect, the present invention provides a method for superimposing dynamic characters on a video image, which is applied to embedded video processing, and the method includes: the method comprises the steps that a single chip microcomputer obtains a first superposition instruction, wherein the first superposition instruction comprises character information and superposition position information; the single chip microcomputer acquires a character file corresponding to the character information from a character memory according to the character information in the first superposition instruction; the single chip microcomputer writes the character file into a position corresponding to a preset image layer according to the superposition position information; and the FPGA superposes the preset layer on the source video stream to be superposed to obtain a target video stream.
Optionally, before the single chip microcomputer obtains the first superposition instruction, the method further includes: the character processing module receives a character picture to be superposed, which is sent by a client, wherein the character picture to be superposed is generated through Axiure RP8 software; the character processing module generates the character picture into a corresponding character file and stores the character file in the character memory; the character file comprises coordinate information of each pixel point and a color channel value of each pixel point.
Optionally, the superimposing, by the FPGA, the preset map layer on a source video stream to be superimposed to obtain a target video stream includes: the FPGA acquires coordinate information of a preset pixel point in the character file; the FPGA judges whether the coordinate information of the preset pixel points is superposed with the superposition position information or not; and when the coordinate information of the preset pixel points is superposed with the superposition position information, the FPGA replaces the color channel value of each pixel point in the character file with the color channel value of the corresponding pixel point in each frame of image of the source video stream.
Optionally, after the FPGA superimposes the preset layer on the source video stream to be superimposed to obtain the target video stream, the method further includes: the single chip microcomputer obtains a second superposition instruction; the FPGA judges whether the superposition position information in the second superposition instruction is the same as the superposition position information in the first superposition instruction; and when the superposition position information in the second superposition instruction is the same as the superposition position information in the first superposition instruction, the FPGA clears the character information of the corresponding position in the preset layer.
Optionally, before the single chip microcomputer writes the character file into a position corresponding to a preset layer according to the superposition position information, the method further includes: the FPGA receives original video data output by the video acquisition equipment; and the FPGA generates the original video data into the preset layer and the source video stream to be superposed.
Optionally, the single chip microcomputer obtains a first stacking instruction, where the first stacking instruction includes character information and stacking position information, and includes: an instruction generating module receives the character picture to be superimposed sent by the client and the superimposed position information sent by the client; the instruction generating module generates a corresponding first superposition instruction by the character picture to be superposed and the superposition position information and sends the corresponding first superposition instruction to the single chip microcomputer, and the character information is matched with the character picture to be superposed.
Optionally, the receiving, by the FPGA, the raw video data output by the video capture device includes: the FPGA receives the original video data in ITU656 format output by the PAL video source; or/and the FPGA receives the original video data output by a DVI video source.
In a second aspect, the present invention provides a character superimposing apparatus for video images, which is applied to embedded video processing, and the apparatus includes: the system comprises a singlechip, an FPGA and a character memory; the single chip microcomputer is used for acquiring a first superposition instruction, and the first superposition instruction comprises character information and superposition position information; the single chip microcomputer is further used for acquiring a character file corresponding to the character information from a character memory according to the character information in the first superposition instruction; the single chip microcomputer is also used for writing the character file into a position corresponding to a preset image layer according to the superposition position information; the FPGA is used for superposing the preset layer on a source video stream to be superposed to obtain a target video stream.
In a third aspect, the present invention provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program: the method comprises the steps that a single chip microcomputer obtains a first superposition instruction, wherein the first superposition instruction comprises character information and superposition position information; the single chip microcomputer acquires a character file corresponding to the character information from a character memory according to the character information in the first superposition instruction; the single chip microcomputer writes the character file into a position corresponding to a preset image layer according to the superposition position information; and the FPGA superposes the preset layer on the source video stream to be superposed to obtain a target video stream.
In a fourth aspect, the present invention provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of: the method comprises the steps that a single chip microcomputer obtains a first superposition instruction, wherein the first superposition instruction comprises character information and superposition position information; the single chip microcomputer acquires a character file corresponding to the character information from a character memory according to the character information in the first superposition instruction; the single chip microcomputer writes the character file into a position corresponding to a preset image layer according to the superposition position information; and the FPGA superposes the preset layer on the source video stream to be superposed to obtain a target video stream.
Compared with the prior art, the invention has the following beneficial effects:
1. the invention uses the singlechip to receive the character superposition instruction and call the character file corresponding to the superposition instruction, the FPGA superposes the character file called by the singlechip to the corresponding source video position and then outputs the superposed character file, and the singlechip and the FPGA have very small volumes, so the invention can be widely applied to the embedded video processing field; in addition, in most embedded video processing, the FPGA or the singlechip is required to be used for compressing, storing and the like of video images, so that the character superposition function of the embedded video processing is increased, and the compatibility and the universality are improved.
2. The invention integrates the singlechip and the FPGA on a very small PCB board without the connection of a communication bus, thereby refreshing a frame of video image superposed with characters in a very short time, completing the switching of the display content and the position of the characters in an instruction period according to the instruction and meeting the requirement of embedded video processing on the real-time property.
Drawings
Fig. 1 is an application environment diagram of a method for superimposing characters on a video image according to an embodiment of the present invention;
fig. 2 is a schematic flow chart illustrating a method for superimposing characters on a video image according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a character superimposing apparatus for video images according to an embodiment of the present invention;
fig. 4 is a diagram illustrating an internal structure of a computer device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 1 is an application environment diagram of a character superimposing method for video images according to an embodiment of the present invention. Referring to fig. 1, the character superimposition method of a video image is applied to a character superimposition system of a video image. The character superimposition system for video images includes a terminal 110 and a server 120. The terminal 110 and the server 120 are connected through a network. A single chip microcomputer in a terminal or a server acquires a first superposition instruction, wherein the first superposition instruction comprises character information and superposition position information; the single chip microcomputer acquires a character file corresponding to the character information from a character memory according to the character information in the first superposition instruction; the single chip microcomputer writes the character file into a position corresponding to a preset image layer according to the superposition position information; and the FPGA in the terminal or the server superposes the preset layer on the source video stream to be superposed to obtain a target video stream. The terminal 110 may specifically be a desktop terminal or a mobile terminal, and the mobile terminal may specifically be at least one of a mobile phone, a tablet computer, a notebook computer, and the like. The server 120 may be implemented as a stand-alone server or a server cluster composed of a plurality of servers.
Fig. 2 is a schematic flowchart of a method for superimposing characters on a video image according to an embodiment of the present invention. The embodiment is mainly illustrated by applying the method to the terminal 110 (or the server 120) in fig. 1. Referring to fig. 2, the method for superimposing characters on a video image specifically includes the following steps:
step S201, the single chip microcomputer obtains a first superposition instruction, and the first superposition instruction comprises character information and superposition position information.
Further, before the single chip microcomputer obtains the first superposition instruction, the method further comprises: the character processing module receives a character picture to be superposed, which is sent by the client, wherein the character picture to be superposed is generated through Axiure RP8 software; the character processing module generates the character picture into a corresponding character file and stores the character file in the character memory; the character file comprises coordinate information of each pixel point and a color channel value of each pixel point.
Specifically, the character superimposition in this embodiment includes, but is not limited to, character superimposition, and superimposition of an OSD menu interface, where the OSD menu interface includes geometric figures, images, and the like, so that in this embodiment, a character picture needs to be drawn at a client through the Axure RP8 software, if only characters need to be displayed, the characters need to be added to the picture, if an OSD menu needs to be displayed, menu figures and characters need to be added to the picture, and the character picture is led out in a JPG format after being drawn; the character processing module receives the character picture in the JPG format, the character picture is generated into a character file which is recorded with character pixel information and in a C language format through Python, the single chip microcomputer can write the character file into FLASH through an SPI bus for storage, the process is carried out during program programming, the character information is not lost after power failure, and the FLASH is a character memory of the embodiment.
Further, the single chip microcomputer obtains a first superposition instruction, the first superposition instruction comprises character information and superposition position information, and the method comprises the following steps: an instruction generating module receives the character picture to be superimposed sent by the client and the superimposed position information sent by the client; the instruction generating module generates a corresponding first superposition instruction by the character picture to be superposed and the superposition position information and sends the corresponding first superposition instruction to the single chip microcomputer, and the character information is matched with the character picture to be superposed.
It should be noted that the first superimposing instruction acquired by the single chip microcomputer may be a character superimposing instruction sent by the client, and according to a preset protocol rule, the single chip microcomputer automatically analyzes character information and superimposing position information included in the grounding instruction; the first superposition instruction acquired by the single chip microcomputer can also come from an instruction generation module, and is specifically represented by that the client sends the character picture to be superposed and the superposed position information to the instruction generation module, the instruction generation module generates a corresponding superposition instruction according to a preset protocol rule, and then the corresponding superposition instruction is sent to the single chip microcomputer to analyze the corresponding character information and the superposed position information.
And step S202, the single chip microcomputer acquires a character file corresponding to the character information from a character memory according to the character information in the first superposition instruction.
Specifically, a plurality of preset character files are stored in the character memory, each character file represents a different character picture, and the file name of each character file is named according to a rule matched with the character picture and the character information, for example, the file name of a character file is flag-01, the corresponding character information is flag-01, and the corresponding character picture is a smiling face, so that when the character information in the first superposition instruction is analyzed by the single chip microcomputer to be flag-01, the character file with the file name of flag-01 is obtained from the character memory.
And S203, the single chip microcomputer writes the character file into a position corresponding to a preset image layer according to the superposition position information.
Specifically, the single chip microcomputer writes the acquired character file into a corresponding position of a preset layer through an SPI bus according to the superposition position information in the superposition instruction, and the corresponding position is positioned according to the superposition position information.
In an embodiment of the present invention, before the single chip microcomputer writes the character file into a position corresponding to a preset layer according to the superimposition position information, the method further includes: the FPGA receives original video data output by video acquisition equipment; and the FPGA generates the original video data into the preset layer and the source video stream to be superposed. The FPGA receives original video data output by the video acquisition equipment, and the method comprises the following steps: the FPGA receives the original video data in ITU656 format output by the PAL video source; or/and the FPGA receives the original video data output by a DVI video source; it should be noted that the FPGA generates the original data output by the video acquisition device into two layers, a bottom layer is a source video stream layer to be superimposed, a top layer is a character information layer, that is, a preset layer, and the single chip writes a character file into the top layer.
And step S204, the FPGA superposes the preset layer on the source video stream to be superposed to obtain a target video stream.
Further, the step of superimposing the preset layer on the source video stream to be superimposed by the FPGA to obtain the target video stream includes: the FPGA acquires coordinate information of a preset pixel point in the character file; the FPGA judges whether the coordinate information of the preset pixel points is superposed with the superposition position information or not; and when the coordinate information of the preset pixel points is superposed with the superposition position information, the FPGA replaces the color channel value of each pixel point in the character file with the color channel value of the corresponding pixel point in each frame of image of the source video stream.
It should be noted that, in this embodiment, the superposition of the preset layer and the source video stream is replacement of a pixel point, and each pixel point in the character file in the preset layer and a corresponding pixel point in each frame of image in the source video stream are replaced; firstly, the coordinates of preset pixel points are determined according to the superposition position information in a superposition instruction, then the coordinates of all other pixel points in the character file in the source video stream are calculated according to the coordinates of preset display points, then the color channel value of each pixel point in the character file replaces the color channel value of the corresponding pixel point in each frame of image in the source video stream, and finally the target video stream obtained after replacement is sent to display equipment.
The character superposition method of the video image provided by the invention receives the character superposition instruction through the singlechip and calls the character file corresponding to the superposition instruction, and the FPGA superposes the character file called by the singlechip to the corresponding source video position and then outputs the superposed character file; in addition, in most embedded video processing, the FPGA or the singlechip is required to be used for compressing, storing and the like of video images, so that the character superposition function of the embedded video processing is increased, and the compatibility and the universality are improved; and the singlechip and the FPGA are integrated on a very small PCB without the connection of a communication bus, so that a frame of video image superposed with characters can be refreshed in a very short time, the display content and the position of the characters are switched in an instruction period according to instructions, and the requirement of embedded video processing on real-time performance is met.
In another embodiment of the present invention, after the FPGA superimposes the preset layer on a source video stream to be superimposed to obtain a target video stream, the method further includes: the single chip microcomputer obtains a second superposition instruction; the FPGA judges whether the stacking position information in the second stacking instruction is the same as the stacking position information in the first stacking instruction; and when the superposition position information in the second superposition instruction is the same as the superposition position information in the first superposition instruction, the FPGA clears the character information of the corresponding position in the preset layer.
It should be noted that when the same source video to be superimposed is subjected to character superimposition of different instructions, it is necessary to determine whether superimposition position information included in two superimposition instructions is the same, and when the two superimposition position information is the same, the FPGA needs to clear the character information at the same position in the preset layer first, and then write the character information included in another superimposition instruction in the same superimposition position; when the information of the two superposition positions is different, the character information contained in the other superposition instruction is directly written into the other superposition position, so that the same or different character information can be superposed at different positions in the same source video stream, but only one character information can be superposed at the same position, so that the superposed character information can be clearly displayed at the top layer of the video stream, and the confusion condition is avoided.
In an embodiment of the present invention, the present invention provides a character superimposing apparatus for a video image, which specifically includes: the system comprises a singlechip, an FPGA and a character memory;
the single chip microcomputer is used for acquiring a first superposition instruction, and the first superposition instruction comprises character information and superposition position information; the single chip microcomputer is further used for acquiring a character file corresponding to the character information from a character memory according to the character information in the first superposition instruction; the single chip microcomputer is also used for writing the character file into a position corresponding to a preset image layer according to the superposition position information; and the FPGA is used for superposing the preset layer on a source video stream to be superposed to obtain a target video stream.
Fig. 3 is a schematic structural diagram of a character superimposing apparatus for a video image according to an embodiment of the present invention, as shown in fig. 3, the character superimposing apparatus for a video image is composed of an FPGA, two DDR3 memory blocks, a FLASH memory chip, and a single chip microcomputer, where the FPGA is responsible for processing a video data stream and superimposing characters, the DDR3 memory block provides an operating memory and a video memory for the FPGA, the FLASH memory chip is responsible for storing character information, and the single chip microcomputer is responsible for calling a character picture according to a serial port instruction. All the characters and menu information generate header files in the form of pictures, and the picture header files are written into a FLASH storage chip by a singlechip; after receiving the serial port instruction, the single chip microcomputer reads a corresponding picture header file from the FLASH storage chip according to an instruction protocol; the singlechip writes the picture header file into a memory address corresponding to the FPGA; and the FPGA outputs the video and the picture information after superposition. The specific working process is as follows: the FPGA receives and processes an external video source, the single chip microcomputer receives a serial port instruction, the single chip microcomputer calls a character picture with a specified address in the FLASH storage chip according to the serial port instruction, the single chip microcomputer writes the character picture into a corresponding memory address of the FPGA, the FPGA writes character information into the corresponding memory address according to character display coordinates for superposition, and the FPGA outputs the superposed video through the VGA.
The invention adopts a method that a singlechip calls a picture header file and then writes the picture header file into an FPGA memory and displays the superposed video, is particularly suitable for medium and small character superposition units, and has the advantages of simple method, good universality, strong transportability, easy maintenance and modification, low cost, small volume and light weight; the invention calls the picture to display, not only can display characters, but also can display graphs and menus, does not need to download special character libraries or graphs, programs are written in C language, and the transplanting between different systems is very convenient.
The key technology of the invention is to call the picture to achieve the effect of character superposition display, the video character superposition not only displays the characters, but also sometimes needs to display the OSD menu interface including geometric figures and images, and if the superposition is performed in the picture mode, the problem of simultaneously displaying the characters and the figures can be solved. In the invention, both characters and graphs are pictures, and the pictures are firstly drawn by using the Apure RP8, if the characters only need to be displayed, the characters are added in the pictures, and if an OSD menu needs to be displayed, menu graphs and characters need to be added in the pictures; exporting the pictures into a JPG format after the pictures are drawn; then starting Python to generate pictures into a C language header file, wherein each picture pair corresponds to one header file, and the header file contains pixel array information of the picture; and then, the picture header file is put into the engineering code of character superposition, and after the singlechip receives the character superposition instruction, the corresponding picture is called and written into the address corresponding to the FPGA to be superposed with the video for output.
Therefore, the character superimposing apparatus of video images of the present invention has the following advantageous effects:
(1) The volume is small: the special character superimposer is a special instrument, the minimum volume is more than 100mm multiplied by 100mm, and the volume of one composition module is intolerable for an embedded system; the product integrates the FPGA and the singlechip, can perform video processing and character superposition, has the product size of 41.995mm multiplied by 44.021mm, also comprises a video processing function, and is obviously superior in comparison.
(2) The real-time performance is strong: the special character superimposer needs a communication bus to be connected with the video processing device and the display equipment, a video source is output after passing through the character generator, the real-time performance is poor, when the character display content and the display position need to be changed, the character display content and the character display position need to be set through the configuration software of the upper computer, and the requirement of the embedded system on the real-time performance of video superimposition is not met. The product integrates video processing and character superposition devices on a very small PCB, a frame of video image with superposed characters can be refreshed within 16.6ms, the display content and the position of the characters are switched within an instruction period according to instructions, and the requirements of an embedded system on real-time performance are met.
(3) The practicability is as follows: the product adopts a modularized society, the whole product adopts a pin form to be matched with other bottom plate modules for use, system transplantation can be facilitated, and the plug and play can be realized as long as other module interfaces are correct.
In one embodiment of the invention, there is provided a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program: the method comprises the steps that a single chip microcomputer obtains a first superposition instruction, wherein the first superposition instruction comprises character information and superposition position information; the single chip microcomputer acquires a character file corresponding to the character information from a character memory according to the character information in the first superposition instruction; the single chip microcomputer writes the character file into a position corresponding to a preset image layer according to the superposition position information; and the FPGA superposes the preset layer on the source video stream to be superposed to obtain a target video stream.
In one embodiment of the invention, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, performs the steps of: the method comprises the steps that a single chip microcomputer obtains a first superposition instruction, wherein the first superposition instruction comprises character information and superposition position information; the single chip microcomputer acquires a character file corresponding to the character information from a character memory according to the character information in the first superposition instruction; the single chip microcomputer writes the character file into a position corresponding to a preset image layer according to the superposition position information; and the FPGA superposes the preset layer on the source video stream to be superposed to obtain a target video stream.
FIG. 4 is a diagram illustrating an internal structure of a computer device in one embodiment. The computer device may specifically be the terminal 110 (or the server 120) in fig. 1. As shown in fig. 4, the computer apparatus includes a processor, a memory, a network interface, an input device, and a display screen connected via a system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program that, when executed by the processor, causes the processor to implement the model generation method. The internal memory may also have a computer program stored thereon that, when executed by the processor, causes the processor to perform the model generation method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 4 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.

Claims (8)

1. A character superposition method of video images is applied to embedded video processing, and the method comprises the following steps:
the character processing module receives a character picture to be superposed, which is sent by a client; the character processing module generates the character picture into a corresponding character file and stores the character file in the character memory; the character file comprises coordinate information of each pixel point and a color channel value of each pixel point;
the method comprises the steps that a single chip microcomputer obtains a first superposition instruction, wherein the first superposition instruction comprises character information and superposition position information;
the single chip microcomputer acquires a character file corresponding to the character information from a character memory according to the character information in the first superposition instruction;
the single chip microcomputer writes the character file into a position corresponding to a preset image layer according to the superposition position information;
the FPGA acquires coordinate information of a preset pixel point in the character file; the FPGA judges whether the coordinate information of the preset pixel points is superposed with the superposition position information or not; and when the coordinate information of the preset pixel points is superposed with the superposition position information, the FPGA replaces the color channel value of each pixel point in the character file with the color channel value of the corresponding pixel point in each frame of image of the source video stream.
2. The method for superimposing characters on a video image according to claim 1, wherein the FPGA superimposes the preset image layer on a source video stream to be superimposed to obtain a target video stream, and the method further comprises:
the single chip microcomputer obtains a second superposition instruction;
the FPGA judges whether the superposition position information in the second superposition instruction is the same as the superposition position information in the first superposition instruction;
and when the superposition position information in the second superposition instruction is the same as the superposition position information in the first superposition instruction, the FPGA clears the character information of the corresponding position in the preset layer.
3. The method for superimposing characters on a video image according to claim 1, wherein the method further comprises, before the single chip microcomputer writes the character file into a position corresponding to a preset image layer according to the superimposition position information:
the FPGA receives original video data output by video acquisition equipment;
and the FPGA generates the original video data into the preset layer and the source video stream to be superposed.
4. The method for superimposing characters on a video image according to claim 1, wherein the single chip microcomputer obtains a first superimposing instruction, and the first superimposing instruction includes character information and superimposing position information, and includes:
the instruction generation module receives the character picture to be superposed sent by the client and superposition position information sent by the client;
the instruction generating module generates a corresponding first superposition instruction by the character picture to be superposed and the superposition position information and sends the corresponding first superposition instruction to the single chip microcomputer, and the character information is matched with the character picture to be superposed.
5. The method for character superimposition of video images according to claim 3, wherein said receiving, by said FPGA, raw video data output by a video capture device comprises:
the FPGA receives the original video data in ITU656 format output by the PAL video source; and/or the first and/or second light sources,
and the FPGA receives the original video data output by the DVI video source.
6. A character superimposition apparatus based on the character superimposition method for video images according to claim 1, applied to embedded video processing, the apparatus comprising: the system comprises a singlechip, an FPGA and a character memory;
the single chip microcomputer is used for acquiring a first superposition instruction, and the first superposition instruction comprises character information and superposition position information;
the single chip microcomputer is further used for acquiring a character file corresponding to the character information from a character memory according to the character information in the first superposition instruction;
the single chip microcomputer is also used for writing the character file into a position corresponding to a preset image layer according to the superposition position information;
and the FPGA is used for superposing the preset layer on a source video stream to be superposed to obtain a target video stream.
7. A computer arrangement comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 5.
CN202010584953.2A 2020-06-24 2020-06-24 Character superposition method and device for video image, computer equipment and storage medium Active CN111818277B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010584953.2A CN111818277B (en) 2020-06-24 2020-06-24 Character superposition method and device for video image, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010584953.2A CN111818277B (en) 2020-06-24 2020-06-24 Character superposition method and device for video image, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111818277A CN111818277A (en) 2020-10-23
CN111818277B true CN111818277B (en) 2023-03-31

Family

ID=72844861

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010584953.2A Active CN111818277B (en) 2020-06-24 2020-06-24 Character superposition method and device for video image, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111818277B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113205573B (en) * 2021-04-23 2023-03-07 杭州海康威视数字技术股份有限公司 Image display method and device, image processing equipment and storage medium
CN113784067B (en) * 2021-09-07 2023-07-28 浙江大华技术股份有限公司 Character superposition method and device, storage medium and electronic device
CN113905269A (en) * 2021-10-08 2022-01-07 南京启数智能系统有限公司 Method and device for realizing video monitoring OSD subtitle and clock detection by using OCR technology
CN114501140A (en) * 2021-12-28 2022-05-13 安徽清新物联科技有限公司 Video character superposition processing method, system and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007243841A (en) * 2006-03-10 2007-09-20 Victor Co Of Japan Ltd Video output device
JP2012253470A (en) * 2011-05-31 2012-12-20 Toshiba Corp Electronic apparatus, electronic apparatus control method, and electronic apparatus control program
CN105450942A (en) * 2014-06-05 2016-03-30 杭州海康威视数字技术股份有限公司 Method and device for character superimposition of video image

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04337986A (en) * 1991-05-15 1992-11-25 Pioneer Electron Corp Recorded information reproducing device
CN102857703A (en) * 2012-09-07 2013-01-02 天津市亚安科技股份有限公司 High-definition video character superimposing system and control method
CN108259797B (en) * 2018-01-09 2023-05-16 武汉精测电子集团股份有限公司 Method and device for carrying out character superposition on image
CN111010541A (en) * 2019-12-11 2020-04-14 重庆山淞信息技术有限公司 Video processing module based on FPGA and compression processor

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007243841A (en) * 2006-03-10 2007-09-20 Victor Co Of Japan Ltd Video output device
JP2012253470A (en) * 2011-05-31 2012-12-20 Toshiba Corp Electronic apparatus, electronic apparatus control method, and electronic apparatus control program
CN105450942A (en) * 2014-06-05 2016-03-30 杭州海康威视数字技术股份有限公司 Method and device for character superimposition of video image

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王丽博.视频监视系统中字符叠加技术的应用.视频监视系统中字符叠加技术的应用.2014,全文. *

Also Published As

Publication number Publication date
CN111818277A (en) 2020-10-23

Similar Documents

Publication Publication Date Title
CN111818277B (en) Character superposition method and device for video image, computer equipment and storage medium
CN109831662B (en) Real-time picture projection method and device of AR (augmented reality) glasses screen, controller and medium
CN113126937A (en) Display terminal adjusting method and display terminal
CN113238823A (en) Information display method and device, electronic equipment and storage medium
CN112825020A (en) Picture generation method and device, computer equipment and storage medium
CN112558854B (en) Multi-picture split-screen mode customization method and device and computer equipment
CN111223155A (en) Image data processing method, image data processing device, computer equipment and storage medium
CN112188087B (en) Panoramic video screenshot method and device, storage medium and computer equipment
CN113784067B (en) Character superposition method and device, storage medium and electronic device
CN114428573B (en) Special effect image processing method and device, electronic equipment and storage medium
CN114816214A (en) Electronic text signing method and device, storage medium and electronic equipment
CN114339126A (en) Subtitle display method, device and storage medium in video conference
CN114339072A (en) Image processing circuit, method and electronic device
CN111917998A (en) GPUImgae-based smart television special-effect camera generation method and device and smart television
CN109675312B (en) Game item list display method and device
CN114004953A (en) Method and system for realizing reality enhancement picture and cloud server
CN111652787A (en) Processing method and device for adding watermark characters into picture and computer equipment
CN113271502B (en) Video barrage-based data display method and device and computer equipment
CN112446823B (en) Monitoring image display method and device
WO2024045787A1 (en) Pick operand detection method and apparatus, computer device, readable storage medium, and computer program product
WO2024088132A1 (en) Target-image display method and display apparatus, and electronic device and storage medium
CN110489252B (en) Picture processing method and device, computer readable storage medium and computer equipment
WO2021164756A1 (en) Input method and apparatus for smart television, computer device, and storage medium
CN117939236A (en) Special effect interaction method and device, electronic equipment and storage medium
CN117472368A (en) View debugging method, device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant