WO2021115422A1 - 视频叠加水印方法、装置、计算机设备和计算机存储介质 - Google Patents

视频叠加水印方法、装置、计算机设备和计算机存储介质 Download PDF

Info

Publication number
WO2021115422A1
WO2021115422A1 PCT/CN2020/135639 CN2020135639W WO2021115422A1 WO 2021115422 A1 WO2021115422 A1 WO 2021115422A1 CN 2020135639 W CN2020135639 W CN 2020135639W WO 2021115422 A1 WO2021115422 A1 WO 2021115422A1
Authority
WO
WIPO (PCT)
Prior art keywords
preset
frame data
data
watermark
channel
Prior art date
Application number
PCT/CN2020/135639
Other languages
English (en)
French (fr)
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 WO2021115422A1 publication Critical patent/WO2021115422A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing

Definitions

  • the present invention relates to the field of image processing, and in particular, to a video watermarking method, device, computer equipment and computer storage medium.
  • the copyright owner of the video generally adds a semi-transparent watermark on the designated location of the video. Adding a watermark is an effective way to protect information security, realize anti-counterfeiting traceability and copyright protection without affecting the original effect of the video.
  • opencv Open Source Computer Vision Library
  • the speed of using opencv is very slow, and the efficiency of adding watermarks is relatively low.
  • the present invention provides a video watermarking method, device, computer equipment, and computer storage medium to improve the efficiency of video watermarking.
  • a video watermarking method including:
  • the video watermarking method further includes:
  • the watermarked frame data is used to replace the corresponding frame data in the video playback buffer.
  • the data format arrangement of the watermark data and the converted frame data are consistent.
  • the "using the converted frame data and the preset watermark data to perform image synthesis to obtain the synthesized frame data" includes:
  • the preset encoding format is an RGBA encoding format; the calculation formula of the preset algorithm includes:
  • v256 is a preset vector, each element value is 256;
  • vA is the vector of channel A of the preset watermark data;
  • vR, vG, and vB are the synthesized channel R value, channel G value, and channel respectively B value;
  • vR1, vG1, and vB1 are the channel R vector, channel G vector, and channel B vector obtained from the converted frame data according to the coordinates and watermark size;
  • vR2, vG2, and vB2 respectively preset the channel R of the watermark data Vector, channel G vector, and channel B vector.
  • the preset algorithm is executed on the CDSP processor using HVX instructions.
  • the "using the converted frame data and the preset watermark data to perform image synthesis to obtain the synthesized frame data" further includes:
  • the preset watermark on the synthesized frame data is deduplicated and supplemented.
  • the present invention also provides a video superimposing watermarking device, including:
  • the frame data conversion module is used for extracting frame data of the video, and performing preset encoding format conversion processing on the frame data, and performing preset data format arrangement processing to obtain converted frame data;
  • An image synthesis module configured to use the converted frame data and the watermark data in the preset data format to perform image synthesis to obtain the synthesized frame data
  • the inverse conversion module is configured to perform the inverse processing of the preset encoding format conversion on the synthesized frame data, and perform the inverse processing of the preset data format arrangement to generate watermarked frame data.
  • it also includes:
  • the watermark frame replacement module is used to replace the corresponding frame data in the video playback buffer with the watermarked frame data when the video is played.
  • the image synthesis module includes:
  • the composite coordinate calculation unit is configured to calculate the preset watermark to be performed on the converted frame data according to the image size of the converted frame data and the preset watermark data, and the boundary parameters of the preset watermark data Synthesized coordinates;
  • the watermark data synthesizing unit is configured to synthesize the preset watermark data to the coordinates of the converted frame data by using a preset algorithm to generate the synthesized frame data.
  • the present invention also provides a computer device, including a memory and a processor, the memory is used to store a computer program, and the processor runs the computer program to make the computer device execute a video watermarking method, the method including:
  • the method further includes:
  • the watermarked frame data is used to replace the corresponding frame data in the video playback buffer.
  • the data format arrangement of the watermark data and the converted frame data are consistent.
  • the "using the converted frame data and the preset watermark data to perform image synthesis to obtain the synthesized frame data" includes:
  • the preset encoding format is an RGBA encoding format; the calculation formula of the preset algorithm includes:
  • v256 is a preset vector, each element value is 256;
  • vA is the vector of channel A of the preset watermark data;
  • vR, vG, and vB are the synthesized channel R value, channel G value, and channel respectively B value;
  • vR1, vG1, and vB1 are the channel R vector, channel G vector, and channel B vector obtained from the converted frame data according to the coordinates and watermark size;
  • vR2, vG2, and vB2 respectively preset the channel R of the watermark data Vector, channel G vector, and channel B vector.
  • the preset algorithm is executed on the CDSP processor using HVX instructions.
  • the "using the converted frame data and the preset watermark data to perform image synthesis to obtain the synthesized frame data" further includes:
  • the preset watermark on the synthesized frame data is deduplicated and supplemented.
  • the present invention also provides a computer storage medium, which stores a computer program that, when executed by a processor, implements a video watermarking method, and the method includes:
  • the method further includes:
  • the watermarked frame data is used to replace the corresponding frame data in the video playback buffer.
  • the data format arrangement of the watermark data and the converted frame data are consistent.
  • the "using the converted frame data and the preset watermark data to perform image synthesis to obtain the synthesized frame data" includes:
  • the preset encoding format is an RGBA encoding format; the calculation formula of the preset algorithm includes:
  • v256 is a preset vector, each element value is 256;
  • vA is the vector of channel A of the preset watermark data;
  • vR, vG, and vB are the synthesized channel R value, channel G value, and channel respectively B value;
  • vR1, vG1, and vB1 are the channel R vector, channel G vector, and channel B vector obtained from the converted frame data according to the coordinates and watermark size;
  • vR2, vG2, and vB2 respectively preset the channel R of the watermark data Vector, channel G vector, and channel B vector.
  • the preset algorithm is executed on the CDSP processor using HVX instructions.
  • the "using the converted frame data and the preset watermark data to perform image synthesis to obtain the synthesized frame data" further includes:
  • the preset watermark on the synthesized frame data is deduplicated and supplemented.
  • the present invention provides a video superimposing watermarking method.
  • the video superimposing watermarking method includes: extracting frame data of a video, and performing preset encoding format conversion processing on the frame data, and performing preset data format arrangement processing to obtain converted frames Data; use the converted frame data and the watermark data of the preset data format to perform image synthesis to obtain synthesized frame data; subject the synthesized frame data to the reverse processing of the preset encoding format conversion, and perform The inverse processing of the preset data format arrangement generates watermarked frame data.
  • the video superimposing watermark method of the present invention performs preset encoding format conversion processing and data format arrangement processing on the frame data, and then performs the watermark superimposition processing, which can improve the video The efficiency of superimposing watermarks.
  • Fig. 1 is a flowchart of a method for superimposing a video watermark according to Embodiment 1 of the present invention
  • FIG. 2 is a flowchart of another video watermarking method provided by Embodiment 1 of the present invention.
  • Figure 3 is a flow chart of image synthesis using preset watermark data provided by Embodiment 2 of the present invention.
  • Fig. 4 is another flow chart of image synthesis using preset watermark data provided in Embodiment 2 of the present invention.
  • FIG. 5 is a flowchart of a video watermarking device provided by Embodiment 3 of the present invention.
  • Fig. 6 is a flowchart of an image synthesis module of a video watermarking device provided in Embodiment 3 of the present invention.
  • Fig. 1 is a flowchart of a method for superimposing a video watermark according to Embodiment 1 of the present invention. The method includes the following steps:
  • Step S11 Extracting frame data of the video, and performing preset encoding format conversion processing on the frame data, and performing preset data format arrangement processing to obtain converted frame data.
  • the purpose of superimposing the watermark in the video is to indicate the source of the video and prevent others from using the video for other activities or commercial use at will, thereby causing legal troubles or economic losses to the video author.
  • a video watermarking operation needs to be performed on a computer device, first extract the frame data that needs to be watermarked. For example, when the watermark needs to be superimposed in a certain time period of the video, the frame data in the time period can be extracted. Watermark superimposition processing is performed on each frame of the video picture, or when the entire video needs to be superimposed with a watermark, the watermark superposition processing is performed on each frame of the entire video.
  • the frame data of the extracted video when the frame data of the extracted video is in the YUV encoding format or other encoding formats, the frame data needs to be subjected to a preset encoding format conversion process, and the encoding format is converted to an encoding format consistent with the watermark data, for example, Convert to RGBA encoding format.
  • the preset data format arrangement processing for example, arrange the data format as RRRR....GGGG....BBBB....AAAA, so that the subsequent superposition of watermark data uses HVX (Hexagon vector Extended) instructions for calculation.
  • the foregoing process of performing preset encoding format conversion processing and preset data format arranging processing can be implemented by using an algorithm or an application program.
  • a computer device may be provided with an application program for conversion and arranging.
  • the frame data in the video can be converted into a preset encoding format, and the preset data format arrangement processing can be performed to finally generate the converted frame data.
  • the foregoing process of performing preset encoding format conversion processing and preset data format arrangement processing can also be implemented through HVX instructions.
  • Step S12 Perform image synthesis using the converted frame data and the watermark data in the preset data format to obtain synthesized frame data.
  • the converted frame data and the preset watermark data are used for image synthesis, and the watermark is superimposed on the preset position on the video screen.
  • the encoding format and data format arrangement of the preset watermark data and the converted frame data are consistent, so that the HVX command is used for the image synthesis process.
  • the data format arrangement of the watermark data is inconsistent with the converted frame data, you can After the watermark data is arranged in the data format, the image synthesis is performed. Among them, in the process of superimposing the watermark data on the frame data, it is necessary to calculate the coordinates of the watermark data superimposition first.
  • the preset watermark data is superimposed on the converted frame through a preset synthesis algorithm.
  • Data the image synthesis process is carried out, and finally the synthesized frame data is obtained.
  • CDSP Computer Hexagon Digital Signal Processor
  • the above-mentioned image synthesis process can be implemented using an algorithm or an application program.
  • a computer device may be provided with an application program for watermarking image synthesis.
  • the preset watermark can be set.
  • the data is superimposed on the preset position of the converted frame data, so that the corresponding watermark is displayed on the video screen corresponding to the converted frame data.
  • Step S13 Perform the reverse processing of the preset encoding format conversion on the synthesized frame data, and perform the reverse processing of the preset data format arrangement to generate watermarked frame data.
  • the synthesized data obtained after superimposing the watermark data is in a preset encoding format. Therefore, it is necessary to convert the synthesized frame data back to the original encoding format of the video, so that the video can be played correctly and prevent others from being removed from the video. Remove the watermark. Therefore, after obtaining the watermarked synthesized frame data, it is necessary to perform inverse processing of preset encoding format conversion. For example, when the conversion processing is YUV conversion to RGBA, the inverse processing is RGBA conversion to YUV, and finally watermarked frame data is generated.
  • the above-mentioned inverse processing process can be implemented using an algorithm or an application program.
  • a computer device can be provided with an inverse processing application program.
  • Fig. 2 is a flowchart of another video watermarking method provided by Embodiment 1 of the present invention, and the method further includes the following steps:
  • Step S14 When playing the video, use the watermarked frame data to replace the corresponding frame data in the video playback buffer.
  • the corresponding frame data when the above-mentioned video that needs to be superimposed with a watermark is played, the corresponding frame data can be replaced with watermarked frame data in the video playback buffer, so that the watermark is displayed in the played video screen.
  • Fig. 3 is a flowchart of image synthesis using preset watermark data according to Embodiment 2 of the present invention. The method includes the following steps:
  • Step S31 According to the image size of the converted frame data and the preset watermark data, and the boundary parameters of the preset watermark data, calculate the value when the preset watermark is synthesized in the converted frame data coordinate.
  • the boundary parameters of the preset watermark data include the distance between the edge of the watermark and the video boundary, for example, the distance between the left edge of the watermark and the left boundary of the video is 10 pixels, and other pixels between the edge and the boundary Distance in order to specify the position of the watermark in the video frame.
  • the boundary parameters of the aforementioned preset watermark data can be specified by the user who superimposes the watermark in the video, or can be generated by the computer device through pre-stored rules, which are not limited here.
  • the above-mentioned coordinates include the starting coordinates of the watermark data synthesis process.
  • Step S32 Synthesize the preset watermark data onto the converted frame data by using a preset algorithm according to the coordinates to generate the synthesized frame data.
  • the preset watermark data after calculating the coordinates where the preset watermark data is synthesized in the converted frame data, the preset watermark data can be synthesized into the converted frame data by using calculation and a preset algorithm in the device. Coordinates.
  • the calculation formula of the preset algorithm includes:
  • v256 is a preset vector, each element value is 256;
  • vA is the vector of channel A of the preset watermark data;
  • vR, vG, and vB are the synthesized channel R value, channel G value, and channel respectively B value;
  • vR1, vG1, and vB1 are the channel R vector, channel G vector, and channel B vector obtained from the converted frame data according to the coordinates and watermark size;
  • vR2, vG2, and vB2 respectively preset the channel R of the watermark data Vector, channel G vector, and channel B vector.
  • the above-mentioned preset algorithm uses HVX instructions to execute on the CDSP processor to improve the efficiency of watermark synthesis.
  • Fig. 4 is another flow chart of image synthesis using preset watermark data provided in Embodiment 2 of the present invention. The method further includes the following steps:
  • Step S33 When it is determined that the step size of the preset watermark data is not aligned with the preset bits, the preset watermark on the synthesized frame data is deduplicated and complemented.
  • the preset watermark needs to be deduplicated and supplemented.
  • each calculation process will use the vector to select 128 elements in each channel for calculation. Therefore, the process of deduplication and complement only needs to select the last vector, that is, the R channel.
  • the 128 elements of the last vector of the G channel and the B channel are used for deduplication and complement processing, and the A channel does not need to be deduplicated and complemented. Specifically, it includes the following steps:
  • HVX_VectorPred Q1 Q6_Q_vcmp_eq_VbVb(vP,v0); that is, the element bit equal to 0 in vP corresponds to Q1 The element bit is 1, otherwise it is 0;
  • vP2 Perform a replacement operation on vP to obtain vP2, so that all the digits of the vP element value of 0 are moved from the tail to the head; for example, when vP is -1-1-1-100, vP2 is 00-1-1-1-1,
  • HVX_VectorPred Q2 Q6_Q_vcmp_eq_VbVb(vP2,v0);
  • vR2 is the last vector in the R channel of the preset watermark data
  • vr Q6_V_vmux_QVV(Q, vR1, vR) to get the synthesized value of the R channel.
  • This instruction means that Q is the element bit of 1, and the element of vr The bit value takes the element bit value of vR1, otherwise it takes vR, so that the added pixels that have been superimposed and the pixels that do not need to be superimposed are excluded.
  • Fig. 5 is a flowchart of a video watermarking device provided by Embodiment 3 of the present invention.
  • the video watermarking device 500 includes:
  • the frame data conversion module 510 is configured to extract frame data of the video, and perform preset encoding format conversion processing on the frame data, and perform preset data format arrangement processing to obtain converted frame data;
  • the image synthesis module 520 is configured to use the converted frame data and the preset watermark data to perform image synthesis to obtain the synthesized frame data;
  • the inverse conversion module 530 is configured to perform the inverse processing of the preset encoding format conversion on the synthesized frame data, and perform the inverse processing of the preset data format arrangement to generate watermarked frame data;
  • the watermark frame replacement module 540 is configured to replace the corresponding frame data in the video with the watermarked frame data.
  • the image synthesis module 520 includes:
  • the composite coordinate calculation unit 521 is configured to calculate the preset watermark in the converted frame data according to the image size of the converted frame data and the preset watermark data, and the boundary parameters of the preset watermark data The coordinates to be synthesized;
  • the watermark data synthesizing unit 522 is configured to synthesize the preset watermark data to the coordinates of the converted frame data by using a preset algorithm to generate the synthesized frame data.
  • the present invention also provides a computer device, which may include a smart phone, a tablet computer, a vehicle-mounted computer, a smart wearable device, and the like.
  • the computer device includes a memory and a processor, and the memory can be used to store a computer program.
  • the processor runs the computer program to enable the computer device to execute the above method or the functions of each module in the above video watermarking device.
  • the memory may include a storage program area and a storage data area.
  • the storage program area may store an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.), etc.; Use the created data (such as audio data, phone book, etc.) and so on.
  • the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
  • This embodiment also provides a computer storage medium for storing the computer program used in the above-mentioned computer device.
  • each block in the flowchart or block diagram may represent a module, program segment, or part of the code, and the module, program segment, or part of the code contains one or more functions for realizing the specified logic function.
  • Executable instructions may also occur in a different order from the order marked in the drawings.
  • each block in the structure diagram and/or flowchart, and the combination of the blocks in the structure diagram and/or flowchart can be used as a dedicated hardware-based system that performs specified functions or actions. It can be implemented, or it can be implemented by a combination of dedicated hardware and computer instructions.
  • the functional modules or units in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist alone, or two or more modules may be integrated to form an independent part.
  • the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of the present invention essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a smart phone, a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present invention.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disks or optical disks and other media that can store program codes. .

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Image Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

一种视频叠加水印方法、装置、计算机设备和计算机存储介质,该视频叠加水印方法包括:提取视频的帧数据,并对所述帧数据进行预设编码格式转换处理,以及进行预设数据格式排列处理,获得转换后帧数据(S11);利用所述转换后帧数据与所述预设数据格式的水印数据进行图像合成,获得合成后帧数据(S12);将所述合成后帧数据进行所述预设编码格式转换的逆处理,以及进行所述预设数据格式排列的逆处理,生成带水印帧数据(S13)。上述视频叠加水印方法,将帧数据进行预设编码格式转换处理以及数据格式排列处理,再进行水印的叠加处理,可以提高视频叠加水印的效率。

Description

视频叠加水印方法、装置、计算机设备和计算机存储介质 【技术领域】
本发明涉及图像处理领域,具体而言,涉及一种视频叠加水印方法、装置、计算机设备和计算机存储介质。
【背景技术】
目前,为了防止视频被他人随意盗用,视频的版权人一般会在视频的指定位置上添加半透明的水印。添加水印是一种在不影响视频原有的效果上,保护信息安全、实现防伪溯源以及版权保护的有效办法。
现有的添加水印方法中,一般采用opencv(Open Source Computer Vision Library,开源计算机视觉库)实现视频和水印图像的叠加。但是,使用opencv的速度非常慢,水印的添加效率比较低。
【发明内容】
鉴于上述问题,本发明提供了一种视频叠加水印方法、装置、计算机设备和计算机存储介质,以提高视频叠加水印的效率。
为了实现上述目的,本发明采用如下的技术方案:
一种视频叠加水印方法,包括:
提取视频的帧数据,并对所述帧数据进行预设编码格式转换处理,以及进行预设数据格式排列处理,获得转换后帧数据;
利用所述转换后帧数据与所述预设数据格式的水印数据进行图像合成,获得合成后帧数据;
将所述合成后帧数据进行所述预设编码格式转换的逆处理,以及进行所述预设数据格式排列的逆处理,生成带水印帧数据。
优选地,所述的视频叠加水印方法中,还包括:
在播放所述视频时,利用所述带水印帧数据替换视频播放缓存中相应的帧数据。
优选地,所述的视频叠加水印方法中,所述水印数据与所述转换后帧数据的数据格式排列方式均一致。
优选地,所述的视频叠加水印方法中,所述“利用所述转换后帧数据与预设水印数据进行图像合成,获得合成后帧数据”包括:
根据所述转换后帧数据和所述预设水印数据的图像尺寸,以及所述预设水印数据的边界参数,计算所述预设水印在所述转换后帧数据中进行合成时的坐标;
根据所述坐标通过预设算法将所述预设水印数据合成至所述转换后帧数据上以生成所述合成后帧数据。
优选地,所述的视频叠加水印方法中,所述预设编码格式为RGBA编码格式;所述预设算法的算式包括:
v256-vA=vAb;vR=vR1×vAb+vR2×vA;vG=vG1×vAb+vG2×vA; vB=vB1×vAb+vB2×vA;
式中,v256为预先设定的向量,每个元素值都为256;vA为预设水印数据的通道A的向量;vR、vG以及vB分别为合成后的通道R值、通道G值以及通道B值;vR1、vG1以及vB1分别为根据所述坐标以及水印尺寸从转换后帧数据中获得的通道R向量、通道G向量以及通道B向量;vR2、vG2以及vB2分别预设水印数据的通道R向量、通道G向量以及通道B向量。
优选地,所述的视频叠加水印方法中,所述预设算法利用HVX指令在CDSP处理器上执行。
优选地,所述的视频叠加水印方法中,所述“利用所述转换后帧数据与预设水印数据进行图像合成,获得合成后帧数据”还包括:
确定所述预设水印数据的步长不为预设比特对齐时,对所述合成后帧数据上的预设水印进行去重和补足处理。
本发明还提供一种视频叠加水印装置,包括:
帧数据转换模块,用于提取视频的帧数据,并对所述帧数据进行预设编码格式转换处理,以及进行预设数据格式排列处理,获得转换后帧数据;
图像合成模块,用于利用所述转换后帧数据与所述预设数据格式的水印数据进行图像合成,获得合成后帧数据;
逆转换模块,用于将所述合成后帧数据进行所述预设编码格式转换的逆处理,以及进行所述预设数据格式排列的逆处理,生成带水印帧数据。
优选地,还包括:
水印帧替换模块,用于在播放所述视频时,利用所述带水印帧数据替换视频播放缓存中相应的帧数据。
优选地,所述图像合成模块包括:
合成坐标计算单元,用于根据所述转换后帧数据和所述预设水印数据的图像尺寸,以及所述预设水印数据的边界参数,计算所述预设水印在所述转换后帧数据进行合成的坐标;
水印数据合成单元,用于通过预设算法将所述预设水印数据合成至所述转换后帧数据的所述坐标上,生成所述合成后帧数据。
本发明还提供一种计算机设备,包括存储器以及处理器,所述存储器用于存储计算机程序,所述处理器运行所述计算机程序以使所述计算机设备执行视频叠加水印方法,所述方法包括:
提取视频的帧数据,并对所述帧数据进行预设编码格式转换处理,以及进行预设数据格式排列处理,获得转换后帧数据;
利用所述转换后帧数据与所述预设数据格式的水印数据进行图像合成,获得合成后帧数据;
将所述合成后帧数据进行所述预设编码格式转换的逆处理,以及进行所述预设数据格式排列的逆处理,生成带水印帧数据。
优选地,所述方法还包括:
在播放所述视频时,利用所述带水印帧数据替换视频播放缓存中相应的帧数据。
优选地,所述水印数据与所述转换后帧数据的数据格式排列方式均一致。
优选地,所述“利用所述转换后帧数据与预设水印数据进行图像合成,获得合成后帧数据”包括:
根据所述转换后帧数据和所述预设水印数据的图像尺寸,以及所述预设水印数据的边界参数,计算所述预设水印在所述转换后帧数据中进行合成时的坐标;
根据所述坐标通过预设算法将所述预设水印数据合成至所述转换后帧数据上以生成所述合成后帧数据。
优选地,所述预设编码格式为RGBA编码格式;所述预设算法的算式包括:
v256-vA=vAb;vR=vR1×vAb+vR2×vA;vG=vG1×vAb+vG2×vA;vB=vB1×vAb+vB2×vA;
式中,v256为预先设定的向量,每个元素值都为256;vA为预设水印数据的通道A的向量;vR、vG以及vB分别为合成后的通道R值、通道G值以及通道B值;vR1、vG1以及vB1分别为根据所述坐标以及水印尺寸从转换后帧数据中获得的通道R向量、通道G向量以及通道B向量;vR2、vG2以及vB2分别预设水印数据的通道R向量、通道G向量以及通道B向量。
优选地,所述预设算法利用HVX指令在CDSP处理器上执行。
优选地,所述“利用所述转换后帧数据与预设水印数据进行图像合成,获得合成后帧数据”还包括:
确定所述预设水印数据的步长不为预设比特对齐时,对所述合成后帧数据上的预设水印进行去重和补足处理。
本发明还提供一种计算机存储介质,其存储有计算机程序,所述计算机程序在被处理器执行时实施视频叠加水印方法,所述方法包括:
提取视频的帧数据,并对所述帧数据进行预设编码格式转换处理,以及进行预设数据格式排列处理,获得转换后帧数据;
利用所述转换后帧数据与所述预设数据格式的水印数据进行图像合成,获得合成后帧数据;
将所述合成后帧数据进行所述预设编码格式转换的逆处理,以及进行所述预设数据格式排列的逆处理,生成带水印帧数据。
优选地,述方法还包括:
在播放所述视频时,利用所述带水印帧数据替换视频播放缓存中相应的帧数据。
优选地,所述水印数据与所述转换后帧数据的数据格式排列方式均一致。
优选地,所述“利用所述转换后帧数据与预设水印数据进行图像合成,获得合成后帧数据”包括:
根据所述转换后帧数据和所述预设水印数据的图像尺寸,以及所述预设水印数据的边界参数,计算所述预设水印在所述转换后帧数据中进行合成时的坐标;
根据所述坐标通过预设算法将所述预设水印数据合成至所述转换后帧数据上以生成所述合成后帧数据。
优选地,所述预设编码格式为RGBA编码格式;所述预设算法的算式包括:
v256-vA=vAb;vR=vR1×vAb+vR2×vA;vG=vG1×vAb+vG2×vA;vB=vB1×vAb+vB2×vA;
式中,v256为预先设定的向量,每个元素值都为256;vA为预设水印数据的通道A的向量;vR、vG以及vB分别为合成后的通道R值、通道G值以及通道B值;vR1、vG1以及vB1分别为根据所述坐标以及水印尺寸从转换后帧数据中获得的通道R向量、通道G向量以及通道B向量;vR2、vG2以及vB2分别预设水印数据的通道R向量、通道G向量以及通道B向量。
优选地,所述预设算法利用HVX指令在CDSP处理器上执行。
优选地,所述“利用所述转换后帧数据与预设水印数据进行图像合成,获得合成后帧数据”还包括:
确定所述预设水印数据的步长不为预设比特对齐时,对所述合成后帧数据上的预设水印进行去重和补足处理。
本发明提供一种视频叠加水印方法,该视频叠加水印方法包括:提取视频的帧数据,并对所述帧数据进行预设编码格式转换处理,以及进行预设数据格式排列处理,获得转换后帧数据;利用所述转换后帧数据与所述预设数据格式的水印数据进行图像合成,获得合成后帧数据;将所述合成后帧数据进行所述预设编码格式转换的逆处理,以及进行所述预设数据格式排列的逆处理,生成带水印帧数据本发明的视频叠加水印方法,将帧数据进行预设编码格式转换处理以及数据格式排列处理,再进行水印的叠加处理,可以提高视频叠加水印的效率。
为使本发明的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。
【附图说明】
为了更清楚地说明本发明的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本发明的某些实施例,因此不应被看作是对本发明保护范围的限定。在各个附图中,类似的构成部分采用类似的编号。
图1是本发明实施例1提供的一种视频叠加水印方法的流程图;
图2是本发明实施例1提供的另一种视频叠加水印方法的流程图;
图3是本发明实施例2提供的一种用预设水印数据进行图像合成的流程图;
图4是本发明实施例2提供的另一种用预设水印数据进行图像合成的流程图;
图5是本发明实施例3提供的一种视频叠加水印装置的流程图;
图6是本发明实施例3提供的一种视频叠加水印装置的图像合成模块的流程图。
【具体实施方式】
下面将结合本发明实施例中附图,对本发明实施例中的技术方案进行清楚、 完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。
通常在此处附图中描述和示出的本发明实施例的组件可以以各种不同的配置来布置和设计。因此,以下对在附图中提供的本发明的实施例的详细描述并非旨在限制要求保护的本发明的范围,而是仅仅表示本发明的选定实施例。基于本发明的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本发明保护的范围。
在下文中,可在本发明的各种实施例中使用的术语“包括”、“具有”及其同源词仅意在表示特定特征、数字、步骤、操作、元件、组件或前述项的组合,并且不应被理解为首先排除一个或更多个其它特征、数字、步骤、操作、元件、组件或前述项的组合的存在或增加一个或更多个特征、数字、步骤、操作、元件、组件或前述项的组合的可能性。
此外,术语“第一”、“第二”、“第三”等仅用于区分描述,而不能理解为指示或暗示相对重要性。
除非另有限定,否则在这里使用的所有术语(包括技术术语和科学术语)具有与本发明的各种实施例所属领域普通技术人员通常理解的含义相同的含义。所述术语(诸如在一般使用的词典中限定的术语)将被解释为具有与在相关技术领域中的语境含义相同的含义并且将不被解释为具有理想化的含义或过于正式的含义,除非在本发明的各种实施例中被清楚地限定。
实施例1
图1是本发明实施例1提供的一种视频叠加水印方法的流程图,该方法包括如下步骤:
步骤S11:提取视频的帧数据,并对所述帧数据进行预设编码格式转换处理,以及进行预设数据格式排列处理,获得转换后帧数据。
本发明实施例中,在视频中叠加水印是为了给视频标明出处,防止他人随意使用该视频进行其他的活动或者商业使用,从而给视频作者带来法律困扰或经济损失。在计算机设备中需要进行视频叠加水印操作时,首先提取需要进行叠加水印的帧数据,例如需要在视频的某个时间段内叠加水印时,可以提取该时间段内的帧数据,对该时间段内每帧视频画面都进行水印叠加处理,或者在整个视频都需要叠加水印时,对整个视频的每帧画面都进行水印叠加处理。
本发明实施例中,该提取的视频的帧数据为YUV编码格式或者其它编码格式时,需要对帧数据进行预设编码格式转换处理,经编码格式转换至与水印数据一致的编码格式,例如可以转换至RGBA编码格式。在转换至RGBA编码格式后,还需要进行预设数据格式排列处理,例如将数据格式排列为RRRR….GGGG….BBBB….AAAA,以便于后续进行水印数据的叠加时,使用HVX(Hexagon矢量扩展)指令进行计算。
本发明实施例中,上述进行预设编码格式转换处理以及预设数据格式排列处理的过程可以利用算法或应用程序来实现,例如可以在计算机设备中设置有进行转换以及排列的应用程序,在输入需要进行水印叠加的视频后,可以将视频中的帧数据进行预设编码格式转换,并进行预设数据格式排列处理,最终生 成转换后帧数据。同时,上述进行预设编码格式转换处理以及预设数据格式排列处理的过程也可以通过HVX指令实现。
步骤S12:利用所述转换后帧数据与所述预设数据格式的水印数据进行图像合成,获得合成后帧数据。
本发明实施例中,在获得转换后帧数据后,将利用转换后帧数据与预设水印数据进行图像合成,将水印叠加到视频画面上的预设位置。其中预设水印数据与所述转换后帧数据的编码格式以及数据格式排列方式均一致,以便使用HVX指令进行图像合成的过程,在水印数据的数据格式排列方式与转换后帧数据不一致时,可以先对水印数据进行数据格式排列处理后再进行图像合成。其中,在帧数据上进行水印数据的叠加过程中,需要先计算水印数据叠加的坐标,在计算出水印数据叠加的坐标后,在通过预设的合成算法将预设水印数据叠加至转换后帧数据,进行图像合成过程,最终获得合成后帧数据。其中,上述进行图像合成的整个过程可以利用HVX指令在CDSP(Compute Hexagon Digital Signal Processor)上进行,以高效的合成帧数据,并且消除水印的圆角锯齿。
本发明实施例中,上述进行图像合成的过程可以利用算法或应用程序来实现,例如可以在计算机设备中设置有进行水印图像合成的应用程序,在获得转换后帧数据后,以将预设水印数据叠加至该转换后帧数据的预设位置上,以使该转换后帧数据相应的视频画面上显示相应的水印。
步骤S13:将所述合成后帧数据进行所述预设编码格式转换的逆处理,以及进行所述预设数据格式排列的逆处理,生成带水印帧数据。
本发明实施例中,在叠加水印数据后获得的合成后数据为预设编码格式,因此需要将合成后帧数据转换回视频原本的编码格式,以使视频可以正确播放,并且防止他人从视频中抽离水印。因此,在获得带有水印的合成后帧数据后,需要进行预设编码格式转换的逆处理,例如转换处理为YUV转换RGBA时,逆处理则为RGBA转换为YUV,最终生成带水印帧数据。其中,上述逆处理过程可以利用算法或应用程序来实现,例如可以在计算机设备中设置有逆处理应用程序,在获得带水印帧数据后,将该带水印帧数据进行预设编码格式的逆处理,转换为视频原有的编码格式,从而获得带水印的视频。同时,上述进行预设编码格式转逆处理过程的过程也可以通过HVX指令实现。
图2是本发明实施例1提供的另一种视频叠加水印方法的流程图,该方法还包括如下步骤:
步骤S14:在播放所述视频时,利用所述带水印帧数据替换视频播放缓存中相应的帧数据。
本发明实施例中,在播放上述需要叠加水印的视频时,可以在视频播放缓存中将相应的帧数据替换成带水印的帧数据,从而使播放的视频画面中显示水印。同时,在提取帧数据进行水印叠加处理时,可以仅提取视频部分时间段的帧数据进行水印叠加,从而使视频在播放过程中相应部分时间段的画面中出现水印,以达到调整水印出现的时间,使用户可以获得良好的视频观看体验。
实施例2
图3是本发明实施例2提供的一种用预设水印数据进行图像合成的流程图, 该方法包括如下步骤:
步骤S31:根据所述转换后帧数据和所述预设水印数据的图像尺寸,以及所述预设水印数据的边界参数,计算所述预设水印在所述转换后帧数据中进行合成时的坐标。
本发明实施例中,在将预设水印数据合成至转换后帧数据前,需要先加算出水印在转换后帧数据上进行合成的坐标。其中,预设水印数据的边界参数包括水印的边缘与视频边界之间的距离,例如包括水印的左边缘与视频的左边界之间的距离为10个像素,以及其他边缘与边界之间的像素距离,以便规定水印在视频画面中的位置。上述预设水印数据的边界参数可以由在视频中叠加水印的用户来规定,也可以由计算机设备通过预先存储的规则来生成,这里不做限定。其中,上述坐标包括水印数据合成处理的起始坐标。
步骤S32:根据所述坐标通过预设算法将所述预设水印数据合成至所述转换后帧数据上以生成所述合成后帧数据。
本发明实施例中,在计算出预设水印数据在所述转换后帧数据进行合成的坐标后,可以利用计算及设备中的预设算法将预设水印数据合成至转换后帧数据的所述坐标上。其中,在所述预设编码格式为RGBA编码格式时,所述预设算法的算式包括:
v256-vA=vAb;vR=vR1×vAb+vR2×vA;vG=vG1×vAb+vG2×vA;vB=vB1×vAb+vB2×vA;
式中,v256为预先设定的向量,每个元素值都为256;vA为预设水印数据的通道A的向量;vR、vG以及vB分别为合成后的通道R值、通道G值以及通道B值;vR1、vG1以及vB1分别为根据所述坐标以及水印尺寸从转换后帧数据中获得的通道R向量、通道G向量以及通道B向量;vR2、vG2以及vB2分别预设水印数据的通道R向量、通道G向量以及通道B向量。
上述预设算法利用HVX指令在CDSP处理器上执行,以提高水印合成的效率。
图4是本发明实施例2提供的另一种用预设水印数据进行图像合成的流程图,该方法还包括如下步骤:
步骤S33:确定所述预设水印数据的步长不为预设比特对齐时,对所述合成后帧数据上的预设水印进行去重和补足处理。
本发明实施例中,例如在预设水印数据的补偿不是1024bit对齐时,需要对预设水印进行去重和补足处理。具体的,在上述预设算法过程中,每次计算过程都会利用向量选取各个通道中的128个元素来计算,因此进行去重和补足的处理只需选取最后一个向量的进行,也即R通道、G通道以及B通道的最后一个向量的128个元素来进行去重和补足处理,其中A通道无需进行去重和补足处理。具体地,包括如下步骤:
获取最后一个向量;
申请一个128byte的数组,将数组从0到stride%128(stride为步长)个元素赋值为-1,从stride%128到数组末尾赋值为0,得到一个向量vP;
利用向量vP与一个元素全为0的向量v0进行相等判定得到Q1,具体的HVX 指令为:HVX_VectorPred Q1=Q6_Q_vcmp_eq_VbVb(vP,v0);也即在vP中等于0的元素位,在Q1中对应的元素位为1,否则为0;
将vP进行置换操作得到vP2,使vP元素值为0的位数全部冲尾部移动到头部;例如vP为-1-1-1-100时,vP2为00-1-1-1-1,具体的HVX指令为:vP2=Q6_V_vror_VR(vP1,width2);
利用向量vP2与向量v0进行相等判定得到Q2,具体的HVX指令为:HVX_VectorPred Q2=Q6_Q_vcmp_eq_VbVb(vP2,v0);
若vR2是预设水印数据R通道中最后一次向量,利用指令vr=Q6_V_vmux_QVV(Q,vR1,vR)取R通道的合成后的值,该指令的意思是Q为1的元素位,vr的元素位值取vR1的元素位值,否则取vR的,从而将已经叠过的加像素点以及无需叠加的像素点排除。
实施例3
图5是本发明实施例3提供的一种视频叠加水印装置的流程图。
该视频叠加水印装置500包括:
帧数据转换模块510,用于提取视频的帧数据,并对所述帧数据进行预设编码格式转换处理,以及进行预设数据格式排列处理,获得转换后帧数据;
图像合成模块520,用于利用所述转换后帧数据与预设水印数据进行图像合成,获得合成后帧数据;
逆转换模块530,用于将所述合成后帧数据进行所述预设编码格式转换的逆处理,以及进行所述预设数据格式排列的逆处理,生成带水印帧数据;
水印帧替换模块540,用于利用所述带水印帧数据替换所述视频中相应的帧数据。
如图6所示,图像合成模块520包括:
合成坐标计算单元521,用于根据所述转换后帧数据和所述预设水印数据的图像尺寸,以及所述预设水印数据的边界参数,计算所述预设水印在所述转换后帧数据进行合成的坐标;
水印数据合成单元522,用于通过预设算法将所述预设水印数据合成至所述转换后帧数据的所述坐标上,生成所述合成后帧数据。
本发明实施例中,上述各个模块以及各个单元更加详细的功能描述可以参考前述实施例中相应部分的内容,在此不再赘述。
此外,本发明还提供了一种计算机设备,该计算机设备可以包括智能电话、平板电脑、车载电脑、智能穿戴设备等。该计算机设备包括存储器和处理器,存储器可用于存储计算机程序,处理器通过运行所述计算机程序,从而使计算机设备执行上述方法或者上述视频叠加水印装置中的各个模块的功能。
存储器可包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据计算机设备的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
本实施例还提供了一种计算机存储介质,用于储存上述计算机设备中使用的计算机程序。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,也可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,附图中的流程图和结构图显示了根据本发明的多个实施例的装置、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在作为替换的实现方式中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,结构图和/或流程图中的每个方框、以及结构图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
另外,在本发明各个实施例中的各功能模块或单元可以集成在一起形成一个独立的部分,也可以是各个模块单独存在,也可以两个或更多个模块集成形成一个独立的部分。
所述功能如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是智能手机、个人计算机、服务器、或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应所述以权利要求的保护范围为准。

Claims (24)

  1. 一种视频叠加水印方法,其特征在于,包括:
    提取视频的帧数据,并对所述帧数据进行预设编码格式转换处理,以及进行预设数据格式排列处理,获得转换后帧数据;
    利用所述转换后帧数据与所述预设数据格式的水印数据进行图像合成,获得合成后帧数据;
    将所述合成后帧数据进行所述预设编码格式转换的逆处理,以及进行所述预设数据格式排列的逆处理,生成带水印帧数据。
  2. 根据权利要求1所述的视频叠加水印方法,其特征在于,还包括:
    在播放所述视频时,利用所述带水印帧数据替换视频播放缓存中相应的帧数据。
  3. 根据权利要求1所述的视频叠加水印方法,其特征在于,所述水印数据与所述转换后帧数据的数据格式排列方式均一致。
  4. 根据权利要求1所述的视频叠加水印方法,其特征在于,所述“利用所述转换后帧数据与预设水印数据进行图像合成,获得合成后帧数据”包括:
    根据所述转换后帧数据和所述预设水印数据的图像尺寸,以及所述预设水印数据的边界参数,计算所述预设水印在所述转换后帧数据中进行合成时的坐标;
    根据所述坐标通过预设算法将所述预设水印数据合成至所述转换后帧数据上以生成所述合成后帧数据。
  5. 根据权利要求4所述的视频叠加水印方法,其特征在于,所述预设编码格式为RGBA编码格式;所述预设算法的算式包括:
    v256-vA=vAb;vR=vR1×vAb+vR2×vA;vG=vG1×vAb+vG2×vA;vB=vB1×vAb+vB2×vA;
    式中,v256为预先设定的向量,每个元素值都为256;vA为预设水印数据的通道A的向量;vR、vG以及vB分别为合成后的通道R值、通道G值以及通道B值;vR1、vG1以及vB1分别为根据所述坐标以及水印尺寸从转换后帧数据中获得的通道R向量、通道G向量以及通道B向量;vR2、vG2以及vB2分别预设水印数据的通道R向量、通道G向量以及通道B向量。
  6. 根据权利要求4所述的视频叠加水印方法,其特征在于,所述预设算法利用HVX指令在CDSP处理器上执行。
  7. 根据权利要求4所述的视频叠加水印方法,其特征在于,所述“利用所述转换后帧数据与预设水印数据进行图像合成,获得合成后帧数据”还包括:
    确定所述预设水印数据的步长不为预设比特对齐时,对所述合成后帧数据上的预设水印进行去重和补足处理。
  8. 一种视频叠加水印装置,其特征在于,包括:
    帧数据转换模块,用于提取视频的帧数据,并对所述帧数据进行预设编码格式转换处理,以及进行预设数据格式排列处理,获得转换后帧数据;
    图像合成模块,用于利用所述转换后帧数据与所述预设数据格式的水印数 据进行图像合成,获得合成后帧数据;
    逆转换模块,用于将所述合成后帧数据进行所述预设编码格式转换的逆处理,以及进行所述预设数据格式排列的逆处理,生成带水印帧数据。
  9. 根据权利要求8所述的视频叠加水印装置,其特征在于,还包括:
    水印帧替换模块,用于在播放所述视频时,利用所述带水印帧数据替换视频播放缓存中相应的帧数据。
  10. 根据权利要求9所述的视频叠加水印装置,其特征在于,所述图像合成模块包括:
    合成坐标计算单元,用于根据所述转换后帧数据和所述预设水印数据的图像尺寸,以及所述预设水印数据的边界参数,计算所述预设水印在所述转换后帧数据进行合成的坐标;
    水印数据合成单元,用于通过预设算法将所述预设水印数据合成至所述转换后帧数据的所述坐标上,生成所述合成后帧数据。
  11. 一种计算机设备,其特征在于,包括存储器以及处理器,所述存储器用于存储计算机程序,所述处理器运行所述计算机程序以使所述计算机设备执行视频叠加水印方法,所述方法包括:
    提取视频的帧数据,并对所述帧数据进行预设编码格式转换处理,以及进行预设数据格式排列处理,获得转换后帧数据;
    利用所述转换后帧数据与所述预设数据格式的水印数据进行图像合成,获得合成后帧数据;
    将所述合成后帧数据进行所述预设编码格式转换的逆处理,以及进行所述预设数据格式排列的逆处理,生成带水印帧数据。
  12. 根据权利要求11所述的计算机设备,其特征在于,所述方法还包括:
    在播放所述视频时,利用所述带水印帧数据替换视频播放缓存中相应的帧数据。
  13. 根据权利要求11所述的计算机设备,其特征在于,所述水印数据与所述转换后帧数据的数据格式排列方式均一致。
  14. 根据权利要求11所述的计算机设备,其特征在于,所述“利用所述转换后帧数据与预设水印数据进行图像合成,获得合成后帧数据”包括:
    根据所述转换后帧数据和所述预设水印数据的图像尺寸,以及所述预设水印数据的边界参数,计算所述预设水印在所述转换后帧数据中进行合成时的坐标;
    根据所述坐标通过预设算法将所述预设水印数据合成至所述转换后帧数据上以生成所述合成后帧数据。
  15. 根据权利要求14所述的计算机设备,其特征在于,所述预设编码格式为RGBA编码格式;所述预设算法的算式包括:
    v256-vA=vAb;vR=vR1×vAb+vR2×vA;vG=vG1×vAb+vG2×vA;vB=vB1×vAb+vB2×vA;
    式中,v256为预先设定的向量,每个元素值都为256;vA为预设水印数据的通道A的向量;vR、vG以及vB分别为合成后的通道R值、通道G值以及通道 B值;vR1、vG1以及vB1分别为根据所述坐标以及水印尺寸从转换后帧数据中获得的通道R向量、通道G向量以及通道B向量;vR2、vG2以及vB2分别预设水印数据的通道R向量、通道G向量以及通道B向量。
  16. 根据权利要求14所述的计算机设备,其特征在于,所述预设算法利用HVX指令在CDSP处理器上执行。
  17. 根据权利要求14所述的计算机设备,其特征在于,所述“利用所述转换后帧数据与预设水印数据进行图像合成,获得合成后帧数据”还包括:
    确定所述预设水印数据的步长不为预设比特对齐时,对所述合成后帧数据上的预设水印进行去重和补足处理。
  18. 一种计算机存储介质,其特征在于,其存储有计算机程序,所述计算机程序在被处理器执行时实施视频叠加水印方法,所述方法包括:
    提取视频的帧数据,并对所述帧数据进行预设编码格式转换处理,以及进行预设数据格式排列处理,获得转换后帧数据;
    利用所述转换后帧数据与所述预设数据格式的水印数据进行图像合成,获得合成后帧数据;
    将所述合成后帧数据进行所述预设编码格式转换的逆处理,以及进行所述预设数据格式排列的逆处理,生成带水印帧数据。
  19. 根据权利要求18所述的计算机存储介质,其特征在于,所述方法还包括:
    在播放所述视频时,利用所述带水印帧数据替换视频播放缓存中相应的帧数据。
  20. 根据权利要求18所述的计算机存储介质,其特征在于,所述水印数据与所述转换后帧数据的数据格式排列方式均一致。
  21. 根据权利要求18所述的计算机存储介质,其特征在于,所述“利用所述转换后帧数据与预设水印数据进行图像合成,获得合成后帧数据”包括:
    根据所述转换后帧数据和所述预设水印数据的图像尺寸,以及所述预设水印数据的边界参数,计算所述预设水印在所述转换后帧数据中进行合成时的坐标;
    根据所述坐标通过预设算法将所述预设水印数据合成至所述转换后帧数据上以生成所述合成后帧数据。
  22. 根据权利要求21所述的计算机存储介质,其特征在于,所述预设编码格式为RGBA编码格式;所述预设算法的算式包括:
    v256-vA=vAb;vR=vR1×vAb+vR2×vA;vG=vG1×vAb+vG2×vA;vB=vB1×vAb+vB2×vA;
    式中,v256为预先设定的向量,每个元素值都为256;vA为预设水印数据的通道A的向量;vR、vG以及vB分别为合成后的通道R值、通道G值以及通道B值;vR1、vG1以及vB1分别为根据所述坐标以及水印尺寸从转换后帧数据中获得的通道R向量、通道G向量以及通道B向量;vR2、vG2以及vB2分别预设水印数据的通道R向量、通道G向量以及通道B向量。
  23. 根据权利要求21所述的计算机存储介质,其特征在于,所述预设算法利用HVX指令在CDSP处理器上执行。
  24. 根据权利要求21所述的计算机存储介质,其特征在于,所述“利用所述转换后帧数据与预设水印数据进行图像合成,获得合成后帧数据”还包括:
    确定所述预设水印数据的步长不为预设比特对齐时,对所述合成后帧数据上的预设水印进行去重和补足处理。
PCT/CN2020/135639 2019-12-13 2020-12-11 视频叠加水印方法、装置、计算机设备和计算机存储介质 WO2021115422A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911289650.1 2019-12-13
CN201911289650.1A CN112991135B (zh) 2019-12-13 2019-12-13 视频叠加水印方法、装置、计算机设备和计算机存储介质

Publications (1)

Publication Number Publication Date
WO2021115422A1 true WO2021115422A1 (zh) 2021-06-17

Family

ID=76329616

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/135639 WO2021115422A1 (zh) 2019-12-13 2020-12-11 视频叠加水印方法、装置、计算机设备和计算机存储介质

Country Status (2)

Country Link
CN (1) CN112991135B (zh)
WO (1) WO2021115422A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113596497A (zh) * 2021-07-28 2021-11-02 新华智云科技有限公司 一种基于隐水印的多路直播视频同步方法和系统
CN115147627A (zh) * 2022-09-01 2022-10-04 深流微智能科技(深圳)有限公司 验证视频可信的视纹处理方法、装置、终端和存储介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114598938A (zh) * 2022-03-30 2022-06-07 合肥高维数据技术有限公司 基于gpu的视频隐形水印嵌入方法及系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5666161A (en) * 1993-04-26 1997-09-09 Hitachi, Ltd. Method and apparatus for creating less amount of compressd image data from compressed still image data and system for transmitting compressed image data through transmission line
CN106507130A (zh) * 2016-11-24 2017-03-15 成都天脉拓道科技有限公司 在yuv帧上叠加水印的方法及水印叠加装置
CN109413508A (zh) * 2018-10-26 2019-03-01 广州虎牙信息科技有限公司 图像混合的方法、装置、设备、推流方法及直播系统
CN109446827A (zh) * 2018-11-01 2019-03-08 东莞华贝电子科技有限公司 数据加解密方法及系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5666161A (en) * 1993-04-26 1997-09-09 Hitachi, Ltd. Method and apparatus for creating less amount of compressd image data from compressed still image data and system for transmitting compressed image data through transmission line
CN106507130A (zh) * 2016-11-24 2017-03-15 成都天脉拓道科技有限公司 在yuv帧上叠加水印的方法及水印叠加装置
CN109413508A (zh) * 2018-10-26 2019-03-01 广州虎牙信息科技有限公司 图像混合的方法、装置、设备、推流方法及直播系统
CN109446827A (zh) * 2018-11-01 2019-03-08 东莞华贝电子科技有限公司 数据加解密方法及系统

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113596497A (zh) * 2021-07-28 2021-11-02 新华智云科技有限公司 一种基于隐水印的多路直播视频同步方法和系统
CN115147627A (zh) * 2022-09-01 2022-10-04 深流微智能科技(深圳)有限公司 验证视频可信的视纹处理方法、装置、终端和存储介质
CN115147627B (zh) * 2022-09-01 2022-11-18 深流微智能科技(深圳)有限公司 验证视频可信的视纹处理方法、装置、终端和存储介质

Also Published As

Publication number Publication date
CN112991135A (zh) 2021-06-18
CN112991135B (zh) 2024-05-07

Similar Documents

Publication Publication Date Title
WO2021115422A1 (zh) 视频叠加水印方法、装置、计算机设备和计算机存储介质
CN104394324B (zh) 特效视频生成方法及装置
US11003898B2 (en) Creating videos with facial expressions
US9165389B2 (en) Image processing apparatus, image processing method, and program
US20200065526A1 (en) Systems and methods for detecting modifications in a video clip
JP2008304805A5 (zh)
JP2004005567A (ja) コンピュータディスプレイ画像を生成する方法ならびに画像データを生成するコンピュータ処理システムおよびグラフィックスプロセッサ
JP2011193511A (ja) 高ダイナミックレンジ画像データを復号化するための装置及び方法、表示用画像を処理可能なビューア、ならびに表示装置
TW200937346A (en) Image distortion correction
JP2005252989A (ja) 立体視化パラメータ記憶媒体、立体視化パラメータ埋込装置、立体視画像再生装置、立体視化パラメータ埋込プログラム、立体視画像再生プログラム、及びビデオコンテンツデータの流通方法
JPWO2010055658A1 (ja) コンテンツ復号処理装置、コンテンツ復号処理方法及び集積回路
TWI692743B (zh) 以調色盤壓縮為基礎的彩色影像驗證方法與電腦程式產品
JP2011529209A (ja) 画像処理のための装置および方法、およびシステム
JP2013218660A (ja) 画像処理方法、プログラム及び装置
WO2023202570A1 (zh) 图像处理方法和处理装置、电子设备和可读存储介质
JP2004234624A (ja) 静止画像生成装置、静止画像生成方法、静止画像生成プログラム、および静止画像生成プログラムを記録した記録媒体
CN115841413A (zh) 图像处理方法及装置
KR20190074189A (ko) 수정된 이미지들에서 원본 이미지들 복원하기 위한 방법 및 장치
US20150139480A1 (en) Cross-correlation based system for watermarking media
JP2008193263A (ja) 画像処理方法、画像処理装置、画像処理プログラム、および、記録媒体
JP2004206447A (ja) 二次元コード化装置及び二次元コード再生装置
US20160057360A1 (en) System for producing user-selective hd synthesis video
TWI482099B (zh) 影像處理紀錄系統及其影像處理紀錄方法
KR101977108B1 (ko) Vr 기반의 프레젠테이션 발표 영상의 디스플레이를 위한 hmd 장치 및 그 동작 방법
JP2017016511A (ja) 歪み補正画像処理装置及びプログラム

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: 20900182

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 20.10.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20900182

Country of ref document: EP

Kind code of ref document: A1