Eureka AIR delivers breakthrough ideas for toughest innovation challenges, trusted by R&D personnel around the world.

Method for superposing watermark on yuv frame, and watermark superposing device

A technology of watermarking and frame data, applied in image communication, selective content distribution, electrical components, etc., can solve the problems of high cost of multiple conversion operations, affecting performance, and low efficiency of glReadPixels function, so as to reduce the amount of calculation and improve data The effect of conversion efficiency

Inactive Publication Date: 2017-03-15
成都天脉拓道科技有限公司
View PDF3 Cites 10 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Some traditional solutions are to convert the frame data of these video streams (YUV420 format, hereinafter referred to as yuv) into argb image format, and then use opengl related functions to perform image filter effects to achieve superimposed watermarks. This solution brings Disadvantages: 1. There are many steps to convert yuv to argb image format and then back to yuv, and the cost of multiple conversion operations is high; 2. After yuv is converted to argb image, the filter is processed by opengl to realize superimposing the station logo, and this operation step will also be serious Affects performance, the glReadPixels function of opengl is very inefficient, and in the actual test of low-end android mobile phones, obvious lag can be seen

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for superposing watermark on yuv frame, and watermark superposing device
  • Method for superposing watermark on yuv frame, and watermark superposing device
  • Method for superposing watermark on yuv frame, and watermark superposing device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 2

[0071] Embodiment 2, in such as figure 2 Among them, a video image transparent watermark overlay method includes original image data and image data to be overlaid, including the following steps:

[0072] Step 1. Start;

[0073] Step 2. Input the argb image data to be superimposed;

[0074] Step 3, converting the Argb image data to be superimposed into yuv data;

[0075] Step 4, adding index bytes to each line of the yuv frame data that needs to be superimposed, and adding index bytes to save as a separate file;

[0076] Step 5, input original image data;

[0077] Step 6, the original image data is converted into yuv frame data;

[0078] Step 7. Determine the designated position of the original data where the data to be superimposed is located;

[0079] Step 8, read the index byte file of the yuv frame data that needs to be superimposed;

[0080] Step 9, determine the transparent area and the opaque area of ​​each line of the yuv frame data that needs to be superimposed,...

Embodiment 3

[0117] Logo size: (width 256 pixels, height 256 pixels);

[0118] Each frame of video stream: 1024*720 (720p format, width 1024 pixels, height 720 pixels);

[0119] Overlay position: second row, second column;

[0120] Y component: 1024*line number + current superimposed line offset, 1024*1+1 is 1025;

[0121] U component: 1024*720+1;

[0122] V component: 1024*720+(1024 / 2)*(720 / 2)+1.

[0123] When generating YUV frame data, the transparent block and opaque block information of each row of pixels are synchronously generated (the information refers to the width of each block). The transparent block width and opaque width appear in pairs, and the transparent block width can indicate the jump distance of the YUV component pointer. , the opaque block can indicate the number of bytes of the YUV component that needs to be copied, achieving fast pointer advancement and copying by block.

Embodiment 4

[0124] Embodiment 4 is a further improvement on the basis of Embodiment 1.

[0125] Logo size: (width 256 pixels, height 256 pixels);

[0126] Each frame of video stream: xxxx*yyyy (video can be in any format, width: xxxx is any pixel, yyyy is any pixel)

[0127] Superposition position: any row v, any column u;

[0128] Y component: xxxx*line number + current superimposed line offset bit v;

[0129] U component: xxxx*yyyy+u;

[0130] V component: xxxx*yyyy+(xxxx / 2)*(yyyy / 2)+v.

[0131] After the station logo Argb image data is converted to YUV frame data, when adding index bytes to each line of the yuv frame data that needs to be superimposed, the added index bytes can be saved at the front end of each line of the yuv frame data, namely: the added The index byte is embedded in the yuv frame data that needs to be superimposed, and forms an inseparable complete data with the yuv frame data that needs to be superimposed; at the same time, the added index byte can be saved separ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to a method for superposing a watermark on a yuv frame, and a watermark superposing device. The method comprises the following steps of: converting Argb image data needing to be superposed into yuv data; adding an index byte at the front end of each row of yuv frame data needing to be superposed; determining an appointed position of original data, where data needing to be superposed is; reading the index byte at the front end of each row of the yuv frame data needing to be superposed; and, determining a transparent area and a non-transparent area in each row of the yuv frame data needing to be superposed, and superposing the non-transparent area of the yuv frame data needing to be superposed with yuv frame data of the original image data according to an address pointer. By means of a video image transparent watermark superposing method disclosed by the invention, the yuv frame of an original video flow is not converted; data is directly processed on the existing yuv frame; the superposition action is carried out only in the size of a station caption, so that the calculation amount is reduced; superposition is carried out in block, so that the calculation amount is greatly reduced; superposition of each block does not have dependence around; parallel processing by utilization of multiple cores can be carried out; and thus, the data conversion efficiency is increased.

Description

technical field [0001] The invention relates to a video image processing method, in particular to a method for superimposing a watermark on a yuv frame and a watermark superimposing device. Background technique [0002] In the actual live broadcast business environment, it is necessary to add watermarks to the existing video stream (the frame data returned after the camera takes pictures), such as the station logo of the news TV station, the program name of the program itself, and the subtitle bar. Some traditional solutions are to convert the frame data of these video streams (YUV420 format, hereinafter referred to as yuv) into argb image format, and then use opengl related functions to perform image filter effects to achieve superimposed watermarks. This solution brings Disadvantages: 1. There are many steps to convert yuv to argb image format and then back to yuv, and the cost of multiple conversion operations is high; 2. After yuv is converted to argb image, the filter i...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): H04N21/234H04N21/8358
CPCH04N21/23418H04N21/8358
Inventor 陈晓勇
Owner 成都天脉拓道科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Eureka Blog
Learn More
PatSnap group products