WO2021103643A1 - 视频水印去除方法和装置、视频数据发布方法和装置、设备及存储介质 - Google Patents
视频水印去除方法和装置、视频数据发布方法和装置、设备及存储介质 Download PDFInfo
- Publication number
- WO2021103643A1 WO2021103643A1 PCT/CN2020/107461 CN2020107461W WO2021103643A1 WO 2021103643 A1 WO2021103643 A1 WO 2021103643A1 CN 2020107461 W CN2020107461 W CN 2020107461W WO 2021103643 A1 WO2021103643 A1 WO 2021103643A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- watermark
- image data
- watermarks
- target
- video data
- 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.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/83—Generation or processing of protective or descriptive data associated with content; Content structuring
- H04N21/835—Generation of protective data, e.g. certificates
- H04N21/8358—Generation of protective data, e.g. certificates involving watermark
Definitions
- the present disclosure relates to the field of image processing technology, such as video watermark removal methods, video data distribution methods, video watermark removal devices, video data distribution devices, equipment, and storage media.
- a watermark is added to a fixed position in the video data, so that the watermark is displayed at a fixed position on the video playback interface.
- the watermark in the video data needs to be removed before the video data is released.
- the location of the watermark is first detected, and then the area where the watermark is located is dewatered.
- the watermark detection algorithm is affected by factors such as background noise in the image or insufficient robustness of the watermark detection algorithm.
- the present disclosure provides a video watermark removal method, a video data release method, a video watermark removal device, a video data release device, equipment, and a storage medium to solve the problem of jitter in the detected watermark position, resulting in unclean removal of the watermark in the video data.
- the problem of user viewing experience is not limited to:
- a video watermark removal method including:
- a method for publishing video data including:
- the watermark in the original video data is removed by the video watermark removal method described in the embodiment of the present invention.
- a video watermark removal device including:
- the image data extraction module is set to extract multiple frames of image data from the video data
- a watermark detection module configured to detect watermarks in the multiple frames of image data to obtain multiple initial watermark positions
- the target watermark position determining module is configured to determine the position belonging to the same watermark according to the multiple initial watermark positions, and use the position of the same watermark as the target watermark position;
- the watermark removal module is configured to remove the watermark located in the target watermark position.
- a device for publishing video data including:
- the original video data acquisition module is set to acquire the original video data
- the watermark removal module is set to remove the watermark in the original video data to obtain the target video data
- the publishing module is set to publish the target video data on the short video platform
- the watermark removal module removes the watermark in the original video data through multiple modules in the video watermark removal device according to the embodiment of the present invention.
- a device is also provided, and the device includes:
- One or more processors are One or more processors;
- Storage device set to store one or more programs
- the one or more processors When the one or more programs are executed by the one or more processors, the one or more processors implement the video watermark removal method and/or the video data distribution method according to any embodiment of the present invention.
- a computer-readable storage medium which stores a computer program, which, when executed by a processor, implements the video watermark removal method and/or the video data distribution method according to any embodiment of the present invention.
- FIG. 1 is a flowchart of a method for removing watermark from a video according to Embodiment 1 of the present invention
- FIG. 2A is a flowchart of a method for removing video watermarks according to Embodiment 2 of the present invention
- Figure 2B is a schematic diagram of a watermark in an image in an embodiment of the present invention.
- 2C is a schematic diagram of the cross-to-parallel ratio of watermarks in an embodiment of the present invention.
- Figure 2D is a schematic diagram of the combined watermark position in an embodiment of the present invention.
- FIG. 3 is a flowchart of a method for removing watermark from a video provided by Embodiment 3 of the present invention
- FIG. 4 is a flowchart of a method for publishing video data according to Embodiment 4 of the present invention.
- Fig. 5 is a structural block diagram of a video watermark removal device provided by the fifth embodiment of the present invention.
- FIG. 6 is a structural block diagram of a video data distribution device provided by Embodiment 6 of the present invention.
- FIG. 7 is a structural block diagram of a device according to Embodiment 7 of the present invention.
- Figure 1 is a flow chart of a method for removing watermark from video provided by the first embodiment of the present invention.
- the embodiment of the present invention is applicable to the case of removing watermark in video data.
- the method can be executed by a video watermark removal device, which can It is implemented by means of software and/or hardware, and is integrated in a device that executes the method. As shown in FIG. 1, the method may include the following steps.
- the video data can be short video data, longer video data, or gif animation.
- the format of the video data can be rm, rmvb, mpeg, mov, mtv, avi, flv, etc. format.
- video data can be obtained through short video shooting applications (Application, APP) performing video shooting operations, or video data obtained when a live broadcast APP performs live operations, or video data can be downloaded from the Internet based on user operations. After the video data is obtained, the video data can be decoded to extract multiple frames of image data of the video data.
- Application Application, APP
- video data can be decoded to extract multiple frames of image data of the video data.
- Watermarking is the application of computer algorithms to embed the protection information of the carrier file, for example, adding a watermark to each frame of image data of the video data.
- the watermark can be the logo of the video playback platform (LOGO) and the APP used to shoot the video data. Name and so on.
- the watermark is added to the non-critical area of the video. For example, the watermark is added to one of the four corners of the image, and the position of the watermark in the image is relatively fixed.
- the position of the watermark in each frame of image data can be detected by a watermark detection algorithm.
- the watermark can be detected by a target detection algorithm (SSD, Single Shot MultiBox Detector), and the watermark can be obtained.
- Type, confidence, and location where the type can be a type specified by the user, for example, a watermark that needs to be removed set by the user, or a watermark that belongs to preset semantics after semantic analysis of the watermark, and the confidence is that the watermark belongs to a type
- the position of the confidence of the watermark can be the position of the watermark in the image.
- the position of the rectangular detection frame in the image where the watermark is located can be used as the initial watermark position of the watermark.
- S103 Determine the position belonging to the same watermark according to the multiple initial watermark positions, and use the position of the same watermark as the target watermark position.
- the position of the watermark is relatively fixed.
- the watermark detection algorithm has certain errors, which makes the initial watermark position of each frame of image data detected.
- the target watermark position is determined according to multiple initial watermark positions, so that the target watermark position can cover the watermark in multiple frames of image data.
- the same watermark may be determined according to the initial watermark position, and the initial watermark positions of the same watermark may be combined to obtain the target watermark position of the watermark.
- the initial watermark position may be a rectangular frame that covers For the watermark in the image, if the position of the rectangular frame where the watermark is located in two adjacent frames of image data is small, the watermark in the adjacent two frames of image data is the same watermark, so that the same watermark in multiple frames of image data can be merged Obtain the target rectangular frame of the same watermark, and the position of the target rectangular frame in the image is the target watermark position.
- the target watermark position expresses the position of the same watermark in the image data.
- a watermark removal algorithm can be used to remove the watermark located at the target watermark position in at least one frame of image data.
- a median filter can be used to remove the watermark.
- the median filter is A nonlinear digital filter technology that can be used to remove noise in image data or other signals. In image data, the median filter can effectively remove the watermark in the image data, protect the edges of the image, and make the processed The image is not distorted. In practical applications, the watermark can also be removed in other ways, and the embodiment of the present invention does not limit the way of removing the watermark.
- the target watermark positions belonging to the same watermark are determined according to the initial watermark positions, so that the target watermark positions can include the initial watermark positions of the watermarks in multiple frames of image data, thereby avoiding detection
- the initial watermark position is jittered, and the detected initial watermark position deviates from the real position, causing the watermark in the video data to be unclean.
- the watermark in the clean video data can be removed , Improve the user's experience of watching video data.
- Fig. 2A is a flowchart of a method for removing watermark from a video provided in the second embodiment of the present invention.
- the embodiment of the present invention is described on the basis of the first embodiment. As shown in Fig. 2A, the method may include the following steps.
- S201 Extract multiple frames of image data from the video data.
- the specified type of watermark is the watermark that needs to be removed from the image data.
- the detection result can be obtained.
- the detection result includes the watermark type, confidence, and position of the watermark.
- the watermark type may be the identity of the copyright owner added with the watermark
- the confidence may be the degree of confidence that a watermark belongs to a copyright owner
- the position may be the position of the watermark in the image.
- watermarks of copyright parties other than the designated copyright party may be used as the designated type of watermark.
- the image data contains the watermarks of the short video APP A and the short video APP B.
- the watermark of the short video APP B is used as the specified type of watermark .
- Watermark types can also include visible watermarks and invisible watermarks, and visible watermarks can be used as designated types of watermarks.
- the initial watermark position may be the position in the image of the detection frame where the watermark is located, where the detection frame may be the detection frame where the watermark is detected when the watermark is detected.
- the position of the detection frame in the image can be represented by the coordinates of the center point of the detection frame and the width and height of the detection frame.
- the position of the watermark 1 can be represented as (x, y, w, h), Among them, x and y are the coordinates of the center of the detection frame in the image, w is the width of the detection frame, and h is the height of the detection frame.
- the detection frame may also be represented by the coordinates of the two diagonal vertices in the image, and the embodiment of the present invention does not limit the way of representing the initial watermark position.
- S204 Determine whether the watermarks in the two adjacent frames of image data are the same watermark according to the initial watermark positions of the two adjacent frames of image data.
- the same watermark may refer to the watermark that needs to be removed and the initial watermark position in the image has little difference.
- all adjacent watermarks can be determined from the image data. Two frames of image data, for every two frames of image data, the initial watermark position of two adjacent frames of image data can be used to calculate the watermarking ratio of two adjacent frames of image data, and the watermarking of two adjacent frames of image data can be combined When the ratio is greater than the threshold, it is determined that the watermarks in two adjacent frames of image data are the same watermark, and S205 is executed. When the intersection ratio of the watermarks in the adjacent two frames of image data is less than the threshold, it is determined that the watermarks in the two adjacent frames of image data are different For the watermark, execute S206.
- the initial watermark position may be the detection frame position of the detection frame where the watermark is located, and the detection frame position may be represented by the coordinates of the center point of the detection frame and the width and height of the detection frame .
- two adjacent frames of image data can be determined from the extracted multi-frame image data, and the intersection and union of the two detection frames can be determined based on the detection frame position of the watermark in the adjacent two frames of image data, and the calculation After the area of the intersection and the area of the union are calculated, the ratio of the area of the intersection and the area of the union is calculated to obtain the intersection ratio of the watermarks in two adjacent frames of image data.
- the detection frames of watermark 2 and watermark 3 have overlapping parts, and the intersection ratio of watermark 2 and watermark 3 can be calculated. If the intersection ratio is greater than the threshold (for example, the threshold is 0.8), then It shows that watermark 2 and watermark 3 have a great probability of belonging to the same watermark. Watermark 2 and watermark 3 have a difference in the position of the watermark in two adjacent frames of image data due to errors in the detection of watermarks; if the intersection ratio is less than the threshold (for example, The threshold is 0.8), which means that the positions of watermark 2 and watermark 3 are quite different, and watermark 2 and watermark 3 may not belong to the watermark at the same position.
- the threshold for example, the threshold is 0.8
- S205 Add the initial watermark positions of the two adjacent frames of image data to the same position set established in advance.
- the initial watermark positions belonging to the same watermark in the two frames of image data are added to the same position set.
- the detection frame positions belonging to the same watermark in the two frames of image data may be added to the same position set. As shown in Fig. 2B, after calculating the intersection ratio through the detection frames of watermark 2 and watermark 3, if the intersection ratio is greater than the threshold, the detection frame positions of watermark 2 and watermark 3 are added to the same position set.
- the initial watermark positions of the watermarks in the two frames of image data are added to different position sets.
- the detection frame positions of the watermarks in the two frames of image data can be added to different position sets. As shown in FIG. 2B, after calculating the intersection ratio by the detection boxes of watermark 1 and watermark 3, the intersection ratio If it is less than the threshold, the detection frame positions of watermark 1 and watermark 3 are added to different position sets.
- S207 Determine the target watermark position belonging to the same watermark according to the initial watermark position in each position set.
- multiple detection frames can be combined according to the position of the detection frame in the position set to obtain the target detection frame of the same watermark, and the position of the target detection frame in the image is obtained as the same The target watermark position of a watermark.
- a position set expresses the position of the detection frame belonging to the same watermark in multiple frames of images, and the detection frames in the position set may be combined to obtain the target watermark position of the watermark.
- Fig. 2D shows a method of combining detection frames in an embodiment of the present invention
- Fig. 2D b shows another method of combining detection frames in an embodiment of the present invention.
- the union of all detection frames is the target detection frame.
- the target detection frame is a rectangular frame, and the rectangular frame covers all the detection frames.
- the multiple vertex corners of the target detection frame all have coordinates, and the position of the target detection frame in the image can be determined according to the coordinates, and the location of the multiple vertex corners of the target detection frame is taken as the position of the watermark in the image.
- the initial watermark position of the watermark in two adjacent frames of image data is used to determine whether the watermark is the same watermark, the initial watermark position of the same watermark is added to the same position set, and the positions in the position set are compared.
- the initial watermark position is merged to determine the target watermark position of the watermark, avoiding the jitter of the detected initial watermark position, and the deviation of the detected initial watermark position from the real position causes the problem of unclean watermark removal in the video data, making the target watermark position Able to cover multiple initial watermark positions.
- the image data with the watermark can be determined by the position set when the target watermark position is determined.
- all the image data have the same Watermark, if the watermark in the video data is in different positions, the image data of the watermark at the same position is determined according to different position sets.
- the position of watermark 1 is at A in the first frame to the 500th frame, and in the 501-1000th frame , The position of watermark 2 is at B, then the 1st to 500th frames can be determined as image data with watermark 1 according to the position set of position A, and the 501st to 1000th frames are determined to have watermark 1 according to the position set of position B Image data.
- the position set of the position A can be used to determine that the first frame to the 500th frame are
- the image data at position A with watermark 1 can be determined from the 501st frame to the 1000th frame as the image data at position B with watermark 1 according to the position set of position B.
- the watermark removal algorithm can be used to remove the watermark at the target watermark position in the multi-frame image data.
- a median filter can be used to remove the watermark.
- the median filter is a non-linear digital filter technology that can be used to remove noise in image data or other signals.
- the median filter can effectively remove the watermark in the image data, protect the edges of the image, and make the processed image undistorted.
- the watermark can also be removed in other ways, and the embodiment of the present invention does not limit the way of removing the watermark.
- the target watermark position can include the initial watermark position of the watermark in the multi-frame image data, avoiding the jitter of the detected initial watermark position, and the deviation of the detected initial watermark position from the real position causes the watermark in the video data to be removed.
- the watermark in the clean video data can be removed, which improves the user's experience of watching the video data.
- FIG. 3 is a flowchart of a video watermark removal method provided in the third embodiment of the present invention.
- the embodiment of the present invention is applicable to the case of removing watermarks in video data.
- the method can be executed by a video watermark removal device, which can It is implemented by means of software and/or hardware, and is integrated in a device that executes the method. As shown in FIG. 3, the method may include the following steps.
- the preset sampling rate can be determined according to the frame rate of the video data. For example, if the video frame rate is 30 frames per second, then one frame of decoded image data can be sampled every 1 second when the video data is decoded.
- the sampled image data is sparse image data. It is also possible to set one frame of image data to be sampled for every 10 frames of image data, or to sample decoded video data in other sampling manners.
- the embodiment of the present invention does not limit the sampling manner of image data.
- the specified type of watermark is the watermark that needs to be removed from the image data.
- the detection result can be obtained.
- the detection result includes the watermark type, confidence, and position of the watermark.
- the watermark type can be the identity of the copyright owner that adds the watermark
- the confidence level can be the degree of confidence that a watermark belongs to a copyright owner
- the position can be the position of the watermark in the image.
- the watermark is used as the specified type of watermark.
- the initial watermark position may be the position in the image of the detection frame where the watermark is located, where the detection frame may be the detection frame where the watermark is detected when the watermark is detected.
- the position of the detection frame in the image can be represented by the coordinates of the center point of the detection frame and the width and height of the detection frame.
- the position of the watermark 1 can be represented as (x, y, w, h), x and y is the coordinates of the center of the detection frame in the image, w is the width of the detection frame, and h is the height of the detection frame.
- the detection frame can also be represented by the coordinates of the two diagonal vertices in the image, and the embodiment of the present invention does not limit the identification method of the initial watermark position.
- S304 Calculate the cross-to-parallel ratio of the watermarks in the sparse image data of the two adjacent frames by using the initial watermark positions of the sparse image data of two adjacent frames.
- the initial watermark position may be the detection frame position of the detection frame where the watermark is located, and the detection frame position may be represented by the coordinates of the center point of the detection frame and the width and height of the detection frame .
- the sparse image data of two adjacent frames can be determined from the extracted multi-frame sparse image data, and the intersection and union of the two detection frames can be determined based on the detection frame position of the watermark in the adjacent two frames of sparse image data. After calculating the area of the intersection and the area of the union, calculate the ratio of the area of the intersection and the area of the union to get the intersection ratio.
- S305 Determine whether the intersection ratio of the watermarks in the two adjacent frames of sparse image data are both greater than a preset threshold.
- the video data can be set with a watermark, and the watermark position of the watermark is relatively fixed.
- multiple intersection ratios can be obtained, and all the intersections can be judged. If the union ratio is greater than the preset threshold, if the intersection ratio of the watermark in the two adjacent frames of sparse image data is greater than the preset threshold, it means that there is no significant change in the watermark position.
- S306 and S310 are executed. In the case where the intersection ratio of the watermark in two adjacent frames of sparse image data is not greater than the preset threshold, it indicates that the watermark position has changed greatly, and S307-S310 are executed.
- S306 Combine the initial watermark positions of all sparse image data to obtain the target watermark position.
- the watermark position of the watermark is relatively stable with little deviation, and the initial watermark positions of all sparse image data can be merged to obtain the target watermark position.
- S307. Determine two frames of sparse image data whose intersection ratio of the watermark in the two adjacent frames of sparse image data is less than a preset threshold.
- the two frames of sparse image data whose intersection ratio is less than the preset threshold for example, sparse image data obtained by sampling For frames 1, 10, 20, 30, 40, 50...100000, if the calculated intersection ratio of the sparse image data of the 10th frame and the 20th frame is less than the preset threshold, the intersection ratio is less than the two of the preset threshold.
- the frame sparse image data is the 10th frame and the 20th frame image data.
- the sparse image data is image data obtained by sampling, and other image data is also included between the two frames of sparse image data, that is, dense image data.
- dense image data For example, two frames of sparse image data whose intersection ratio is less than a preset threshold are For the 10th and 20th frames, the image data between the 10th and 20th frames are dense image data, and the dense image data between the 10th and 20th frames are watermarked to obtain the 10th to the 20th frames. The initial watermark position of the watermark in the dense image data between 20 frames.
- the detection frame of the watermark in all sparse image data and the detection frame of the watermark in multiple dense image data between two frames of sparse image data whose intersection ratio is less than a preset threshold can be combined to obtain Target detection frame, the position of the target detection frame is the target watermark position.
- the decoded video data is sampled to obtain multiple frames of sparse image data, which reduces the amount of image data that needs to be detected for watermarking, reduces the amount of data for calculating the intersection ratio and merging initial watermark positions, and improves watermark detection and Determine the efficiency of the target watermark location.
- the area where the target watermark position is located in each frame of image data can be subjected to watermarking processing to obtain the video data after the watermark is removed.
- the image data set of the decoded video data is G ⁇ I ⁇ , and G ⁇ I ⁇ is sampled at the sampling rate s to obtain the sparse image data set Gsparse ⁇ I ⁇ , and the sparse image data in the sparse image data set Gsparse ⁇ I ⁇
- the data is input into the watermark detector to obtain the thin watermark detection result KGsparse, and the thin watermark detection result KGsparse calculates the IOU (intersection ratio) between two adjacent frames of sparse image data, if the IOU between two adjacent frames of sparse image data Both are greater than a preset threshold k, indicating that there is no significant change in the watermark position in the video data.
- Combine the watermark detection results KGsparse of all sparse image data to obtain the target watermark position, and input the target watermark position into the watermark remover to remove the video data Watermark.
- the target detection result includes the target watermark
- the decoded video data is sampled at a preset sampling rate to obtain multiple frames of sparse image data, and watermarks are detected on the sparse image data to obtain multiple initial watermark positions, so as to adopt the initial watermarks of two adjacent frames of sparse image data
- the position calculates the cross-to-parallel ratio of the watermarks in two adjacent frames of sparse image data.
- the cross-to-parallel ratio is greater than the preset threshold, the initial watermark positions of all sparse image data are merged to obtain the target watermark position.
- the number of sparse image data after sampling It is much smaller than the amount of image data in the video data, which reduces the amount of image data that needs to be detected for watermarking, and the amount of data required to calculate the merge ratio and merge the initial watermark position, which improves the efficiency of watermark detection and determination of the target watermark position.
- the target watermark position of the watermark is obtained by merging the initial watermark position, so that the target watermark position can include the initial watermark position of the watermark in the multi-frame image data, avoiding the jitter of the detected initial watermark position, and the detected initial watermark position and the real position appear
- the deviation causes the problem of unclean watermark removal in the video data. After removing the watermark for each frame of image data based on the target watermark position, the watermark in the clean video data can be removed, which improves the user's experience of watching the video data.
- Fig. 4 is a flowchart of a video data publishing method provided by the fourth embodiment of the present invention.
- the embodiment of the present invention is applicable to the case of publishing video data after removing the watermark in the video data.
- the method can be executed by the video data publishing device.
- the device can be implemented by software and/or hardware, and integrated into the device for executing the method. As shown in FIG. 4, the method may include the following steps.
- the original video data may be video data that needs to be released after removing the watermark, for example, it may be video data obtained by shooting with a short video APP, video data generated during a live broadcast, or video data downloaded from the Internet, etc. , And there is a watermark that needs to be removed in the obtained original video data.
- the watermark in the original video data can be removed before the video data is released, so as to obtain the target video data after the watermark is removed.
- the video watermark removal method described in any one of Embodiment 1 to Embodiment 3 may be used to remove the watermark in the original video data, which will not be described in detail in this embodiment of the present invention.
- the video data publishing may be sending the video data to the server of the short video platform, so as to publish the video data through the server.
- the watermark in the original video data is removed to obtain the target video data, and the target video data is published on the short video platform, which avoids the problem that the watermark in the video data affects the user’s viewing experience and improves The user’s experience of watching video data.
- the watermark in the original video data can be removed by the video watermark removal method described in any one of the first embodiment to the third embodiment, avoiding the jitter of the detected watermark position and the deviation of the detected watermark position from the real position. This causes the problem that the watermark in the video data is not cleanly removed, and the watermark in the original video data can be cleaned, and the user's experience of watching the video data is improved.
- Fig. 5 is a structural block diagram of a video watermark removal device provided by the fifth embodiment of the present invention.
- the video watermark removal device of the embodiment of the present invention may include the following modules.
- the image data extraction module 501 is configured to extract multiple frames of image data from the video data
- the watermark detection module 502 is configured to detect watermarks in the multiple frames of image data to obtain multiple initial watermark positions;
- the target watermark position determining module 503 is configured to determine the position belonging to the same watermark according to the multiple initial watermark positions, and use the position of the same watermark as the target watermark position;
- the watermark removal module 504 is configured to remove the watermark located in the target watermark position.
- the video watermark removal device provided by the embodiment of the present invention can execute the video watermark removal method provided by the embodiment of the present invention, and has the functional modules and effects corresponding to the execution method.
- FIG. 6 is a structural block diagram of a video data distribution device provided by the sixth embodiment of the present invention.
- the video data distribution device of the embodiment of the present invention may include the following modules.
- the original video data obtaining module 601 is set to obtain original video data
- the watermark removal module 602 is configured to remove the watermark in the original video data to obtain target video data;
- the publishing module 603 is configured to publish the target video data on the short video platform
- the watermark removal module 602 removes the watermark in the original video data through multiple modules in the video watermark removal apparatus according to the embodiment of the present invention.
- the video data distribution device provided by the embodiment of the present invention can execute the video data distribution method provided by the embodiment of the present invention, and has corresponding functional modules and effects for the execution method.
- the device may include: a processor 70, a memory 71, a display screen 72 with a touch function, an input device 73, an output device 74, and a communication device 75.
- the number of processors 70 in the device may be one or more.
- One processor 70 is taken as an example in FIG. 7.
- the number of memories 71 in the device may be one or more. In FIG. 7, one memory 71 is taken as an example.
- the processor 70, the memory 71, the display screen 72, the input device 73, the output device 74, and the communication device 75 of the device may be connected by a bus or in other ways. In FIG. 7, the connection by a bus is taken as an example.
- the processor 70 executes various functional applications and data processing of the device by running software programs, instructions, and modules stored in the memory 71, that is, realizes the above-mentioned video watermark removal method and/or video data distribution method.
- the processor 70 when the processor 70 executes one or more programs stored in the memory 71, it implements the video watermark removal method and/or the video data distribution method provided in the embodiment of the present invention.
- the embodiment of the present invention also provides a computer-readable storage medium.
- the instructions in the storage medium are executed by the processor of the device, the device can execute the video watermark removal method and/or video data as described in the above method embodiment. Publishing method.
- the present disclosure can be realized by means of software and necessary general-purpose hardware, and can also be realized by hardware.
- the present disclosure can be embodied in the form of a software product.
- the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, Read-Only Memory (ROM), and Random Access Memory (Random Access Memory). , RAM), flash memory (FLASH), hard disk or optical disk, etc., including at least one instruction to make a computer device (which can be a robot, a personal computer, a server, or a network device, etc.) execute the video described in any embodiment of the present disclosure Watermark removal method and/or video data distribution method.
- the multiple units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, The names of multiple functional units are just for easy distinction.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
本发明实施例公开了一种视频水印去除方法和装置、视频数据发布方法和装置、设备及存储介质,视频水印去除方法包括:从视频数据中提取多帧图像数据;检测多帧图像数据中的水印,得到多个初始水印位置;根据所述多个初始水印位置确定属于同一个水印的位置,将所述同一个水印的位置作为目标水印位置;去除位于所述目标水印位置中的水印。
Description
本申请要求在2019年11月29日提交中国专利局、申请号为201911204725.1的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。
本公开涉及图像处理技术领域,例如涉及视频水印去除方法、视频数据发布方法、视频水印去除装置、视频数据发布装置、设备和存储介质。
在数字产品中添加水印是保护版权的方式之一,随着对版权保护意识的逐步加强,多种水印也越来越多地添加到视频中。
对于多媒体数据,例如视频数据,为了保护版权,在视频数据中的固定位置添加水印,从而在视频播放界面上的固定位置显示水印。然而,为了不影响用户观看视频,需要在视频数据发布前去除视频数据中的水印,在去除水印前,先检测出水印的位置,然后对水印所在位置的区域进行去水印处理。水印检测算法受图像中背景噪音、或者水印检测算法鲁棒性不足等因素影响,即使水印在图像中的位置相对固定,检测到的水印位置也会出现抖动,导致检测到的水印位置与真实位置出现偏差,最终造成视频数据中水印清除不干净,降低了用户观看视频数据的体验。
发明内容
本公开提供一种视频水印去除方法、视频数据发布方法、视频水印去除装置、视频数据发布装置、设备和存储介质,以解决检测到的水印位置出现抖动,造成视频数据中水印清除不干净,降低用户观看体验的问题。
提供了一种视频水印去除方法,包括:
从视频数据中提取多帧图像数据;
检测所述多帧图像数据中的水印,得到多个初始水印位置;
根据所述多个初始水印位置确定属于同一个水印的位置,将所述同一个水印的位置作为目标水印位置;
去除位于所述目标水印位置中的水印。
还提供了一种视频数据发布方法,包括:
获取原始视频数据;
去除原始视频数据中的水印,得到目标视频数据;
在短视频平台发布所述目标视频数据;
其中,原始视频数据中的水印通过本发明实施例所述的视频水印去除方法去除。
还提供了一种视频水印去除装置,包括:
图像数据提取模块,设置为从视频数据中提取多帧图像数据;
水印检测模块,设置为检测所述多帧图像数据中的水印,得到多个初始水印位置;
目标水印位置确定模块,设置为根据所述多个初始水印位置确定属于同一个水印的位置,将所述同一个水印的位置作为目标水印位置;
水印去除模块,设置为去除位于所述目标水印位置中的水印。
还提供了一种视频数据发布装置,包括:
原始视频数据获取模块,设置为获取原始视频数据,
水印去除模块,设置为去除原始视频数据中的水印,得到目标视频数据;
发布模块,设置为在短视频平台发布所述目标视频数据;
其中,水印去除模块通过本发明实施例所述的视频水印去除装置中的多个模块去除所述原始视频数据中的水印。
还提供了一种设备,所述设备包括:
一个或多个处理器;
存储装置,设置为存储一个或多个程序,
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现本发明任一实施例所述的视频水印去除方法和/或视频数据发布方法。
还提供了一种计算机可读存储介质,存储有计算机程序,该计算机程序被处理器执行时实现本发明任一实施例所述的视频水印去除方法和/或视频数据发布方法。
图1是本发明实施例一提供的一种视频水印去除方法的流程图;
图2A是本发明实施例二提供的一种视频水印去除方法的流程图;
图2B是本发明实施例中水印在图像中的示意图;
图2C是本发明实施例中水印的交并比的示意图;
图2D是本发明实施例中合并水印位置的示意图;
图3是本发明实施例三提供的一种视频水印去除方法的流程图;
图4是本发明实施例四提供的一种视频数据发布方法的流程图;
图5是本发明实施例五提供的一种视频水印去除装置的结构框图;
图6是本发明实施例六提供的一种视频数据发布装置的结构框图;
图7是本发明实施例七提供的一种设备的结构框图。
下面结合附图和实施例对本公开进行说明。附图中仅示出了与本公开相关的部分而非全部结构。
实施例一
图1为本发明实施例一提供的一种视频水印去除方法的流程图,本发明实施例可适用于去除视频数据中的水印的情况,该方法可以由视频水印去除装置来执行,该装置可以通过软件和/或硬件的方式来实现,并集成在执行本方法的设备中,如图1所示,该方法可以包括如下步骤。
S101、从视频数据中提取多帧图像数据。
在本发明实施例中,视频数据可以是短视频数据,也可以是较长的视频数据,还可以是gif动画,视频数据的格式可以是rm、rmvb、mpeg、mov、mtv、avi、flv等格式。
在实际应用中,可以通过短视频拍摄应用(Application,APP)执行拍摄视频操作获得视频数据,或者是直播APP执行直播操作时获得视频数据,还可以是基于用户的操作从互联网上下载视频数据。在获得视频数据后,可以对视频数据进行解码,提取视频数据的多帧图像数据。
S102、检测所述多帧图像数据中的水印,得到多个初始水印位置。
水印是应用计算机算法嵌入载体文件的保护信息,例如,在视频数据的每 帧图像数据中添加水印,对于视频数据,该水印可以是视频播放平台的标识(LOGO),拍摄视频数据所用的APP的名称等等。为了不影响视频的观看,水印添加在视频的非关键区域,例如,水印添加在图像的四个角落之一,并且水印在图像中的位置相对固定不变。
在本发明实施例中,可以通过水印检测算法检测每帧图像数据中水印所处的位置,可选地,可以通过目标检测算法(SSD,Single Shot MultiBox Detector)检测出水印,并可以获得水印的类型、置信度和位置,其中,类型可以是用户指定的类型,例如可以是用户设置的需要去除的水印,或者是对水印进行语义分析后属于预设语义的水印,置信度为水印属于一个类型的水印的置信度,位置可以是水印在图像中的位置,在本发明实施例中,可以将水印所在的矩形的检测框在图像中的位置作为水印的初始水印位置。
在实际应用中,还可以通过其他水印检测算法检测水印的初始水印位置,本发明实施例对此不加以限制。
S103、根据多个初始水印位置确定属于同一个水印的位置,将所述同一个水印的位置作为目标水印位置。
对于视频数据中多帧图像数据的水印,水印的位置相对固定不变,但是,当存在背景或者其他干扰时,水印检测算法存在一定的误差,使得检测到的每帧图像数据的初始水印位置存在差别,即初始水印位置存在抖动,则根据多个初始水印位置确定目标水印位置,使得该目标水印位置能够覆盖多帧图像数据中的水印。可选地,可以根据初始水印位置确定相同的水印,将相同水印的初始水印位置合并得到该水印的目标水印位置,在一实施例中,初始水印位置可以为一矩形框,该矩形框覆盖了图像中的水印,如果相邻两帧图像数据中的水印所在的矩形框位置差异较小,则相邻两帧图像数据中水印为同一个水印,从而可以合并多帧图像数据中同一个水印所在的矩形框得到同一个水印的目标矩形框,该目标矩形框在图像中的位置即为目标水印位置。
S104、去除位于所述目标水印位置中的水印。
目标水印位置表达了同一水印在图像数据中的位置,可以采用水印去除算法去除至少一帧图像数据中位于目标水印位置的水印,可选地,可以采用中值滤波器去除水印,中值滤波是一种非线性数字滤波器技术,可以用于去除图像数据或者其它信号中的噪声,在图像数据中,中值滤波器可以有效地去除图像数据中的水印,保护图像的边缘,使处理后的图像不失真。在实际应用中,还可以通过其他方式去除水印,本发明实施例对去除水印的方式不加以限制。
本发明实施例在得到水印的多个初始水印位置后,根据初始水印位置确定 属于同一个水印的目标水印位置,使得目标水印位置能够包括多帧图像数据中水印的初始水印位置,避免了检测到的初始水印位置出现抖动,检测到的初始水印位置与真实位置出现偏差造成视频数据中水印清除不干净的问题,基于目标水印位置对每帧图像数据去除水印后,能够去除干净视频数据中的水印,提高了用户的观看视频数据的体验。
实施例二
图2A为本发明实施例二提供的一种视频水印去除方法的流程图,本发明实施例在前述实施例一的基础上进行说明,如图2A所示,该方法可以包括如下步骤。
S201、从视频数据中提取多帧图像数据。
S202、针对每帧图像数据,检测出每帧图像数据中指定类型的水印。
在本发明实施例中,指定类型的水印为需要从图像数据中去除的水印,水印检测算法对图像数据进行检测后,可以得到检测结果,该检测结果包括水印的水印类型、置信度和位置,其中,水印类型可以是添加水印的版权方标识,置信度可以是一个水印属于一个版权方的置信程度,位置可以是水印在图像中的位置。在本发明的可选实施例中,可以将指定的版权方以外的其他版权方的水印作为指定类型的水印。例如,当需要通过短视频APP A发布短视频时,图像数据中包含短视频APP A和短视频APP B的水印,在图像数据中检测水印时,将短视频APP B的水印作为指定类型的水印。水印类型还可以包括可见水印和不可见水印,可以将可见水印作为指定类型的水印。
S203、获取所述指定类型的水印在每帧图像数据中的位置,作为初始水印位置。
在一实施例中,如图2B所示,初始水印位置可以是水印所在的检测框在图像中的位置,其中,检测框可以是检测水印时,检测出水印的检测框。该检测框在图像中的位置可以采用检测框的中心点的坐标以及检测框的宽度和高度来表示,如图2B所示,水印1的位置可以表示为(x,y,w,h),其中,x和y为检测框的中心在图像中的坐标,w为检测框的宽,h为检测框的高。
在一实施例中,检测框还可以通过两个对角的顶点在图像中的坐标来表示,本发明实施例对初始水印位置的表示方式不加以限制。
S204、根据相邻两帧图像数据的初始水印位置判断所述相邻两帧图像数据中的水印是否为相同的水印。
在本发明实施例中,相同的水印可以是指需要去除的、在图像中初始水印位置差异不大的水印,在本发明的可选实施例中,可以从图像数据中确定出所 有相邻的两帧图像数据,对于每两帧图像数据,可以采用相邻两帧图像数据的初始水印位置计算相邻两帧图像数据中水印的交并比,在相邻两帧图像数据中水印的交并比大于阈值时确定相邻两帧图像数据中的水印为相同的水印,执行S205,在相邻两帧图像数据中水印的交并比小于阈值时确定相邻两帧图像数据中的水印为不同的水印,执行S206。
如图2C所示,交并比(IoU,intersection-over-union)为两个窗口A和窗口B的交叠率,即IoU=(A∩B)/(A∪B),IoU为0到1的浮点数。在本发明实施例中,如图2B所示,初始水印位置可以是水印所在的检测框的检测框位置,该检测框位置可以采用检测框的中心点的坐标以及检测框的宽度和高度来表示。在计算交并比时,可以从提取的多帧图像数据中确定相邻两帧图像数据,基于相邻两帧图像数据中的水印的检测框位置确定两个检测框的交集和并集,计算交集的面积和并集的面积后,计算交集的面积和并集的面积的比值得到相邻两帧图像数据中水印的交并比。
如图2B所示的水印2和水印3,水印2和水印3的检测框具有重合部分,可以计算水印2和水印3的交并比,如果交并比大于阈值(例如阈值为0.8),则说明水印2和水印3具有极大概率属于同一个水印,水印2和水印3由于检测水印时存在误差,造成水印在相邻两帧图像数据中的位置存在差异;如果交并比小于阈值(例如阈值为0.8),则说明水印2和水印3的位置相差较大,水印2和水印3可能不属于相同位置的水印。
S205、将所述相邻两帧图像数据的初始水印位置添加至预先建立的同一个位置集合中。
如果两帧图像数据中的水印为同一个水印,则将两帧图像数据中属于同一个水印的初始水印位置添加至相同的位置集合中。在一实施例中,可以将两帧图像数据中属于同一个水印的检测框位置添加到同一个位置集合中。如图2B所示,通过水印2和水印3的检测框计算交并比后,如果交并比大于阈值,则将水印2和水印3的检测框位置添加到同一个位置集合中。
S206、将所述相邻两帧图像数据的初始水印位置分别添加至预先建立的与不同的水印对应的不同的位置集合中。
如果两帧图像数据中的水印为不相同的水印,则将两帧图像数据中水印的初始水印位置添加至不同的位置集合中。在一实施例中,可以将两帧图像数据中水印的检测框位置添加到不同的位置集合中,如图2B所示,通过水印1和水印3的检测框计算交并比后,交并比小于阈值,则将水印1和水印3的检测框位置添加到不同的位置集合中。
S207、根据每一个位置集合中的初始水印位置确定属于同一个水印的目标水印位置。
在本发明的可选实施例中,针对每个位置集合,可以根据位置集合中的检测框位置合并多个检测框得到同一个水印的目标检测框,获取目标检测框在图像中的位置作为同一个水印的目标水印位置。
在一实施例中,一个位置集合表达了属于同一个水印所在的检测框在多帧图像中的位置,可以对位置集合中的检测框进行合并,得到该水印的目标水印位置。如图2D中a所示为本发明实施例中的一种检测框的合并方式,图2D中b所示为本发明实施例中另一种检测框的合并方式。如图2D中a所示,所有检测框的并集为目标检测框,如图2D中b所示,目标检测框为矩形框,该矩形框覆盖所有检测框。目标检测框的多个顶角均具有坐标,可以根据坐标确定目标检测框在图像中的位置,将目标检测框的多个顶角的位置作为水印在图像中的位置。
本发明实施例中,通过相邻两帧图像数据中的水印的初始水印位置确定水印是否为同一个水印,将同一个水印的初始水印位置添加到同一个位置集合中,并对位置集合中的初始水印位置进行合并以确定水印的目标水印位置,避免了检测到的初始水印位置出现抖动,检测到的初始水印位置与真实位置出现偏差造成视频数据中水印清除不干净的问题,使得目标水印位置能够覆盖多个初始水印位置。
S208、确定具有同一个水印的图像数据。
在确定目标水印位置后,可以通过确定该目标水印位置时的位置集合确定具有该水印的图像数据,可选地,对于只有一个水印并且水印位置相对固定的视频数据,所有的图像数据具有同一个水印,如果视频数据中水印处于不同位置,则根据不同的位置集合确定同一位置水印的图像数据,例如,在第1帧到第500帧中水印1的位置在A,在第501-1000帧中,水印2的位置在B,则可以根据位置A的位置集合确定第1帧到第500帧为具有水印1的图像数据,根据位置B的位置集合确定第501帧到第1000帧为具有水印1的图像数据。又或者在第1帧到第500帧中水印1的位置在A,在第501-1000帧中,水印1的位置在B,则可以根据位置A的位置集合确定第1帧到第500帧为位置为A的、具有水印1的图像数据,可以根据位置B的位置集合确定第501帧到第1000帧为位置为B的、具有水印1的图像数据。
S209、在具有同一个水印的图像数据中,去除位于目标水印位置中的水印。
在确定图像数据后,可以采用水印去除算法去除多帧图像数据中位于目标 水印位置的水印。可选地,可以采用中值滤波器去除水印,中值滤波是一种非线性数字滤波器技术,可以用于去除图像数据或者其它信号中的噪声。在图像数据中,中值滤波器可以有效地去除图像数据中的水印,保护图像的边缘,使处理后的图像不失真。在实际应用中,还可以通过其他方式去除水印,本发明实施例对去除水印的方式不加以限制。
本发明实施例在得到指定类型的水印的多个初始水印位置后,根据相邻两帧图像数据中水印的交并比确定属于同一个水印,并合并同一个水印的初始水印位置得到该水印的目标水印位置,使得目标水印位置能够包括多帧图像数据中水印的初始水印位置,避免了检测到的初始水印位置出现抖动,检测到的初始水印位置与真实位置出现偏差造成视频数据中水印清除不干净的问题,基于目标水印位置对每帧图像数据去除水印后,能够去除干净视频数据中的水印,提高了用户的观看视频数据的体验。
实施例三
图3为本发明实施例三提供的一种视频水印去除方法的流程图,本发明实施例可适用于去除视频数据中的水印的情况,该方法可以由视频水印去除装置来执行,该装置可以通过软件和/或硬件的方式来实现,并集成在执行本方法的设备中,如图3所示,该方法可以包括如下步骤。
S301、在视频数据解码时,以预设采样率对解码后的视频数据进行采样,得到所述视频数据的多帧稀疏图像数据。
在一实施例中,预设采样率可以根据视频数据的帧率确定,例如,视频帧率为30帧每秒,则可以在视频数据解码时每隔1秒采样1帧解码后的图像数据,采样得到的图像数据即为稀疏图像数据。也可以设置每10帧图像数据采样1帧图像数据,或者以其他的采样方式对解码后的视频数据进行采样,本发明实施例对图像数据的采样方式不加以限制。
S302、针对每帧稀疏图像数据,检测出每帧稀疏图像数据中指定类型的水印。
在本发明实施例中,指定类型的水印为需要从图像数据中去除的水印,水印检测算法对稀疏图像数据进行检测后,可以得到检测结果,该检测结果包括水印的水印类型、置信度和位置,其中,水印类型可以是添加水印的版权方标识,置信度可以是一个水印属于一个版权方的置信程度,位置可以是水印在图像中的位置,可以将指定的版权方以外的其他版权方的水印作为指定类型的水印。
S303、获取所述指定类型的水印在每帧稀疏图像数据中的位置,作为初始 水印位置。
在一实施例中,如图2B所示,初始水印位置可以是水印所在的检测框在图像中的位置,其中,检测框可以是检测水印时,检测出水印的检测框。该检测框在图像中的位置可以采用检测框的中心点的坐标以及检测框宽度和高度来表示,如图2B中,水印1的位置可以表示为(x,y,w,h),x和y为检测框的中心在图像中的坐标,w为检测框的宽,h为检测框的高。
检测框还可以通过两个对角的顶点在图像中的坐标来表示,本发明实施例对初始水印位置的标识方式不加以限制。
S304、采用相邻两帧稀疏图像数据的初始水印位置计算所述相邻两帧稀疏图像数据中水印的交并比。
如图2C所示,交并比(IoU,intersection-over-union)为两个窗口A和窗口B的交叠率,即IoU=(A∩B)/(A∪B),IoU为0到1的浮点数。在本发明实施例中,如图2B所示,初始水印位置可以是水印所在的检测框的检测框位置,该检测框位置可以采用检测框的中心点的坐标以及检测框的宽度和高度来表示。在计算交并比时,可以从提取的多帧稀疏图像数据中确定相邻两帧稀疏图像数据,基于相邻两帧稀疏图像数据中的水印的检测框位置确定两个检测框的交集和并集,计算交集的面积和并集的面积后,计算交集的面积和并集的面积的比值得到交并比。
S305、判断所述相邻两帧稀疏图像数据中水印的交并比是否均大于预设阈值。
在实际应用中,视频数据可以设置有一个水印,并且该水印的水印位置相对固定,对相邻两帧稀疏图像数据计算水印的交并比后,可以得到多个交并比,可以判断所有交并比是否均大于预设阈值,在所述相邻两帧稀疏图像数据中水印的交并比大于所述预设阈值的情况下,说明水印位置无明显变化,执行S306、S310,在所述相邻两帧稀疏图像数据中水印的交并比不大于所述预设阈值的情况下,说明水印位置变化较大,执行S307-S310。
S306、合并所有稀疏图像数据的初始水印位置得到目标水印位置。
如果所有的相邻两帧稀疏图像的水印的交并比均大于预设阈值,说明水印的水印位置相对稳定,偏差不大,则可以合并所有稀疏图像数据的初始水印位置得到目标水印位置。
S307、确定所述相邻两帧稀疏图像数据中水印的交并比小于预设阈值的两帧稀疏图像数据。
如果所有的相邻两帧稀疏图像的水印的交并比中存在小于预设阈值的交并 比,则确定交并比小于预设阈值的两帧稀疏图像数据,例如,取样得到的稀疏图像数据为第1、10、20、30、40、50……100000帧,如果第10帧和第20帧稀疏图像数据计算出的交并比小于预设阈值,则交并比小于预设阈值的两帧稀疏图像数据为第10帧和第20帧图像数据。
S308、获取所述相邻两帧稀疏图像数据中水印的交并比小于预设阈值的两帧稀疏图像数据之间的多个稠密图像数据的初始水印位置。
在一实施例中,稀疏图像数据为采样得到的图像数据,两帧稀疏图像数据之间还包括其他图像数据,即稠密图像数据,例如,交并比小于预设阈值的两帧稀疏图像数据为第10帧和第20帧,则第10帧到第20帧之间的图像数据为稠密图像数据,对第10帧到第20帧之间的稠密图像数据进行水印检测,获得第10帧到第20帧之间的稠密图像数据中水印的初始水印位置。
S309、合并所述多个稠密图像数据的初始水印位置和所有稀疏图像数据的初始水印位置得到目标水印位置。
在一实施例中,可以将所有稀疏图像数据中水印所在的检测框、以及交并比小于预设阈值的两帧稀疏图像数据之间的多个稠密图像数据中水印的检测框进行合并,得到目标检测框,该目标检测框的位置即为目标水印位置。
本发明实施例对解码后的视频数据进行采样得到多帧稀疏图像数据,降低了需要检测水印的图像数据的数量,降低了计算交并比和合并初始水印位置的数据量,提高了水印检测和确定目标水印位置的效率。
S310、去除位于所述目标水印位置中的水印。
在确定目标水印位置后,可以对每帧图像数据中目标水印位置所在的区域进行去水印处理,获得去水印之后的视频数据。
以下结合示例对本发明实施例视频水印的去除过程进行说明。
解码后的视频数据的图像数据集合为G{I},以采样率s对于G{I}进行采样,得到稀疏图像数据集合Gsparse{I},将稀疏图像数据集合Gsparse{I}中的稀疏图像数据输入到水印检测器中得到稀疏水印检测结果KGsparse,通过稀疏水印检测结果KGsparse计算相邻两帧稀疏图像数据之间的IOU(交并比),如果相邻两帧稀疏图像数据之间的IOU均大于一个预设阈值k,说明视频数据中水印位置无明显变化,合并所有稀疏图像数据的水印检测结果KGsparse,得到目标水印位置,将该目标水印位置输入到水印清除器中以对视频数据去除水印。
如果稀疏图像数据集合Gsparse{I}中存在相邻的稀疏图像数据之间IOU小于预设阈值k,则推断出水印位置产生变化,从稀疏图像数据集合Gsparse{I}中确定IOU小于阈值k的两帧稀疏图像数据Is,Ie,并在图像数据集合G{I}中找 到位于稀疏图像数据Is,Ie之间的稠密图像数据构成稠密图像数据集合Gs~e dense{I},将稠密图像数据集合Gs~e dense{I}中的每帧图像数据输入到水印检测器中,得到稠密图像数据集合Gs~e dense{I}中每帧图像数据的水印的稠密检测结果Ks~e Gdense,将稠密检测结果Ks~e Gdense与稀疏水印检测结果KGsparse合并得到目标检测结果KG,该目标检测结果包含了目标水印位置,将该目标水印位置输入到水印清除器以对视频数据去除水印。
本发明实施例以预设采样率对解码后的视频数据进行采样得到多帧稀疏图像数据,并对稀疏图像数据检测水印得到多个初始水印位置,以采用相邻两帧稀疏图像数据的初始水印位置计算相邻两帧稀疏图像数据中水印的交并比,在交并比均大于预设阈值时合并所有稀疏图像数据的初始水印位置得到目标水印位置,一方面,采样后稀疏图像数据的数量远小于视频数据中图像数据的数量,降低了需要检测水印的图像数据的数量以及计算交并比和合并初始水印位置的数据量,提高了水印检测和确定目标水印位置的效率,另一方面,通过合并初始水印位置得到水印的目标水印位置,使得目标水印位置能够包括多帧图像数据中水印的初始水印位置,避免了检测到的初始水印位置出现抖动,检测到的初始水印位置与真实位置出现偏差造成视频数据中水印清除不干净的问题,基于目标水印位置对每帧图像数据去除水印后,能够去除干净视频数据中的水印,提高了用户的观看视频数据的体验。
实施例四
图4为本发明实施例四提供的一种视频数据发布方法的流程图,本发明实施例可适用于去除视频数据中的水印后发布视频数据的情况,该方法可以由视频数据发布装置来执行,该装置可以通过软件和/或硬件的方式来实现,并集成在执行本方法的设备中,如图4所示,该方法可以包括如下步骤。
S401、获取原始视频数据。
在本发明实施例中,原始视频数据可以是需要去除水印后进行发布的视频数据,例如可以是短视频APP拍摄获得的视频数据、直播过程中生成的视频数据或者从网络上下载的视频数据等,并且获得的原始视频数据中存在需要去除的水印。
S402、去除原始视频数据中的水印,得到目标视频数据。
在实际应用中,为了避免原始视频数据中的水印影响用户观看视频,可以在视频数据发布前去除原始视频数据中的水印,以得到去除水印后的目标视频数据。
在一实施例中,可以采用实施例一到实施例三任一所述的视频水印去除方 法去除原始视频数据中的水印,本发明实施例在此不再详述。
S403、在短视频平台发布所述目标视频数据。
视频数据发布可以是将视频数据发送至短视频平台的服务器,以通过服务器对视频数据进行发布。
本发明实施例在获取原始视频数据后,去除原始视频数据中的水印得到目标视频数据,在短视频平台发布所述目标视频数据,避免了视频数据中存在水印影响用户观看体验的问题,提高了用户的观看视频数据的体验。
本发明实施例可以通过实施例一到实施例三任一所述的视频水印去除方法去除原始视频数据中的水印,避免了检测到的水印位置出现抖动,检测到的水印位置与真实位置出现偏差造成视频数据中水印清除不干净的问题,能够去除干净原始视频数据中的水印,提高了用户的观看视频数据的体验。
实施例五
图5是本发明实施例五提供的一种视频水印去除装置的结构框图,本发明实施例的视频水印去除装置可以包括如下模块。
图像数据提取模块501,设置为从视频数据中提取多帧图像数据;
水印检测模块502,设置为检测所述多帧图像数据中的水印,得到多个初始水印位置;
目标水印位置确定模块503,设置为根据所述多个初始水印位置确定属于同一个水印的位置,将所述同一个水印的位置作为目标水印位置;
水印去除模块504,设置为去除位于所述目标水印位置中的水印。
本发明实施例所提供的视频水印去除装置可执行本发明实施例所提供的视频水印去除方法,具备执行方法相应的功能模块和效果。
实施例六
图6是本发明实施例六提供的一种视频数据发布装置的结构框图,本发明实施例的视频数据发布装置可以包括如下模块。
原始视频数据获取模块601,设置为获取原始视频数据,
水印去除模块602,设置为去除原始视频数据中的水印,得到目标视频数据;
发布模块603,设置为在短视频平台发布所述目标视频数据;
在一实施例中,水印去除模块602通过本发明实施例所述的视频水印去除装置中的多个模块去除所述原始视频数据中的水印。
本发明实施例所提供的视频数据发布装置可执行本发明实施例所提供的视频数据发布方法,具备执行方法相应的功能模块和效果。
实施例七
参照图7,示出了本公开一个示例中的一种设备的结构示意图。如图7所示,该设备可以包括:处理器70、存储器71、具有触摸功能的显示屏72、输入装置73、输出装置74以及通信装置75。该设备中处理器70的数量可以是一个或者多个,图7中以一个处理器70为例。该设备中存储器71的数量可以是一个或者多个,图7中以一个存储器71为例。该设备的处理器70、存储器71、显示屏72、输入装置73、输出装置74以及通信装置75可以通过总线或者其他方式连接,图7中以通过总线连接为例。
处理器70通过运行存储在存储器71中的软件程序、指令以及模块,从而执行设备的多种功能应用以及数据处理,即实现上述视频水印去除方法和/或视频数据发布方法。
实施例中,处理器70执行存储器71中存储的一个或多个程序时,实现本发明实施例提供的视频水印去除方法和/或视频数据发布方法。
本发明实施例还提供一种计算机可读存储介质,所述存储介质中的指令由设备的处理器执行时,使得设备能够执行如上述方法实施例所述的视频水印去除方法和/或视频数据发布方法。
对于装置、设备、存储介质实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
本公开可借助软件及必需的通用硬件来实现,也可以通过硬件实现。本公开可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如计算机的软盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、闪存(FLASH)、硬盘或光盘等,包括至少一个指令用以使得一台计算机设备(可以是机器人,个人计算机,服务器,或者网络设备等)执行本公开任意实施例所述的视频水印去除方法和/或视频数据发布方法。
上述视频水印去除装置和/或视频数据发布装置中,所包括的多个单元和模块只是按照功能逻辑进行划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,多个功能单元的名称也只是为了便于相互区分。
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本公开的至少一个实施例或示例中。在本说明书中, 对上述术语的示意性表述不一定指的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。
Claims (15)
- 一种视频水印去除方法,包括:从视频数据中提取多帧图像数据;检测所述多帧图像数据中的水印,得到多个初始水印位置;根据所述多个初始水印位置确定属于同一个水印的位置,将所述同一个水印的位置作为目标水印位置;去除位于所述目标水印位置中的水印。
- 根据权利要求1所述的方法,其中,所述检测所述多帧图像数据中的水印,得到多个初始水印位置,包括:检测出每帧图像数据中指定类型的水印;获取所述指定类型的水印在每帧图像数据中的位置,作为初始水印位置。
- 根据权利要求1所述的方法,其中,所述根据所述多个初始水印位置确定属于同一个水印的位置,将所述同一个水印的位置作为目标水印位置,包括:根据相邻两帧图像数据的初始水印位置判断所述相邻两帧图像数据中的水印是否为相同的水印;在所述相邻两帧图像数据中的水印为相同的水印的情况下,将所述相邻两帧图像数据的初始水印位置添加至预先建立的同一个位置集合中;在所述相邻两帧图像数据中的水印不为相同的水印的情况下,将所述相邻两帧图像数据的初始水印位置分别添加至预先建立的与不同的水印对应的不同的位置集合中;根据每一个位置集合中的初始水印位置确定属于同一个水印的目标水印位置。
- 根据权利要求3所述的方法,其中,所述根据相邻两帧图像数据的初始水印位置判断所述相邻两帧图像数据中的水印是否为相同的水印,包括:采用所述相邻两帧图像数据的初始水印位置计算所述相邻两帧图像数据中水印的交并比;在所述相邻两帧图像数据中水印的交并比大于阈值的情况下,确定所述相邻两帧图像数据中的水印为相同的水印;在所述相邻两帧图像数据中水印的交并比小于阈值的情况下,确定所述相邻两帧图像数据中的水印为不同的水印。
- 根据权利要求4所述的方法,其中,所述采用所述相邻两帧图像数据的 初始水印位置计算所述相邻两帧图像数据中水印的交并比,包括:基于所述相邻两帧图像数据中的水印的检测框位置确定两个检测框的交集和并集;计算所述交集的面积和所述并集的面积;计算所述交集的面积和所述并集的面积的比值得到所述相邻两帧图像数据中水印的交并比。
- 根据权利要求3-5中任一项所述的方法,其中,所述初始水印位置包括水印所在的检测框的检测框位置,所述根据每一个位置集合中的初始水印位置确定属于同一个水印的目标水印位置,包括:针对每个位置集合,根据每个位置集合中的检测框位置合并多个检测框,得到同一个水印的目标检测框;获取所述目标检测框在图像数据中的位置,作为同一个水印的目标水印位置。
- 根据权利要求6所述的方法,其中,所述去除位于所述目标水印位置中的水印,包括:确定具有同一个水印的图像数据;在具有同一个水印的图像数据中,去除位于所述目标水印位置中的水印。
- 根据权利要求1所述的方法,其中,所述从视频数据中提取多帧图像数据,包括:在视频数据解码的情况下,以预设采样率对解码后的视频数据进行采样,得到所述视频数据的多帧稀疏图像数据。
- 根据权利要求8所述的方法,其中,所述检测所述多帧图像数据中的水印,得到多个初始水印位置,包括:检测出每帧稀疏图像数据中指定类型的水印;获取所述指定类型的水印在所述每帧稀疏图像数据中的位置,作为初始水印位置。
- 根据权利要求8或9所述的方法,其中,所述根据所述多个初始水印位置确定属于同一个水印的位置,作为目标水印位置,包括:采用相邻两帧稀疏图像数据的初始水印位置计算所述相邻两帧稀疏图像数据中水印的交并比;判断所述相邻两帧稀疏图像数据中水印的交并比是否均大于预设阈值;在所述相邻两帧稀疏图像数据中水印的交并比大于所述预设阈值的情况下,合并所有稀疏图像数据的初始水印位置得到所述目标水印位置;在所述相邻两帧稀疏图像数据中水印的交并比不大于所述预设阈值的情况下,确定所述相邻两帧稀疏图像数据中水印的交并比小于所述预设阈值的两帧稀疏图像数据;获取所述相邻两帧稀疏图像数据中水印的交并比小于所述预设阈值的两帧稀疏图像数据之间的多个稠密图像数据的初始水印位置;合并所述多个稠密图像数据的初始水印位置和所有稀疏图像数据的初始水印位置得到所述目标水印位置。
- 一种视频数据发布方法,包括:获取原始视频数据;去除所述原始视频数据中的水印,得到目标视频数据;在短视频平台发布所述目标视频数据;其中,所述原始视频数据中的水印通过权利要求1-10任一项所述的视频水印去除方法去除。
- 一种视频水印去除装置,包括:图像数据提取模块,设置为从视频数据中提取多帧图像数据;水印检测模块,设置为检测所述多帧图像数据中的水印,得到多个初始水印位置;目标水印位置确定模块,设置为根据所述多个初始水印位置确定属于同一个水印的位置,将所述同一个水印的位置作为目标水印位置;水印去除模块,设置为去除位于所述目标水印位置中的水印。
- 一种视频数据发布装置,包括:原始视频数据获取模块,设置为获取原始视频数据,水印去除模块,设置为去除所述原始视频数据中的水印,得到目标视频数据;发布模块,设置为在短视频平台发布所述目标视频数据;其中,所述水印去除模块通过权利要求12所述的视频水印去除装置中的多个模块去除所述原始视频数据中的水印。
- 一种设备,包括:一个或多个处理器;存储装置,设置为存储一个或多个程序,所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现以下至少之一:如权利要求1-10中任一项所述的视频水印去除方法、如权利要求11所述的视频数据发布方法。
- 一种计算机可读存储介质,存储有计算机程序,所述计算机程序被处理器执行时实现以下至少之一:如权利要求1-10中任一项所述的视频水印去除方法、如权利要求11所述的视频数据发布方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911204725.1 | 2019-11-29 | ||
| CN201911204725.1A CN110798750B (zh) | 2019-11-29 | 2019-11-29 | 视频水印去除方法、视频数据发布方法及相关装置 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2021103643A1 true WO2021103643A1 (zh) | 2021-06-03 |
Family
ID=69446955
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2020/107461 Ceased WO2021103643A1 (zh) | 2019-11-29 | 2020-08-06 | 视频水印去除方法和装置、视频数据发布方法和装置、设备及存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN110798750B (zh) |
| WO (1) | WO2021103643A1 (zh) |
Families Citing this family (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110798750B (zh) * | 2019-11-29 | 2021-06-29 | 广州市百果园信息技术有限公司 | 视频水印去除方法、视频数据发布方法及相关装置 |
| CN111741329B (zh) * | 2020-07-01 | 2021-09-28 | 腾讯科技(深圳)有限公司 | 一种视频处理方法、装置、设备及存储介质 |
| CN112085716B (zh) * | 2020-09-04 | 2022-06-07 | 厦门大学 | 一种基于时阈聚焦图网络的nafld超声视频分类方法 |
| CN112419132B (zh) * | 2020-11-05 | 2024-06-18 | 广州海外扛把子网络科技有限公司 | 视频水印检测方法、装置、电子设备及存储介质 |
| CN115988259A (zh) * | 2021-10-14 | 2023-04-18 | 腾讯科技(深圳)有限公司 | 一种视频处理方法、装置、终端、介质及程序产品 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20040223612A1 (en) * | 2003-05-09 | 2004-11-11 | International Business Machines Corporation | Motion picture data processing device, method, and program |
| CN106412720A (zh) * | 2015-07-27 | 2017-02-15 | 腾讯科技(深圳)有限公司 | 视频水印去除的方法和装置 |
| CN107644204A (zh) * | 2017-09-12 | 2018-01-30 | 南京凌深信息科技有限公司 | 一种用于安防系统的人体识别与跟踪方法 |
| CN110428357A (zh) * | 2019-08-09 | 2019-11-08 | 厦门美图之家科技有限公司 | 图像中水印的检测方法、装置、电子设备及存储介质 |
| CN110798750A (zh) * | 2019-11-29 | 2020-02-14 | 广州市百果园信息技术有限公司 | 视频水印去除方法、视频数据发布方法及相关装置 |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9965601B2 (en) * | 2016-03-29 | 2018-05-08 | Adobe Systems Incorporated | Editing watermarked assets |
| CN106331746B (zh) * | 2016-09-19 | 2019-12-06 | 北京小度互娱科技有限公司 | 用于识别视频文件中的水印位置的方法和装置 |
| CN109598231B (zh) * | 2018-12-03 | 2021-03-02 | 广州市百果园信息技术有限公司 | 一种视频水印的识别方法、装置、设备及存储介质 |
| CN110349070B (zh) * | 2019-06-12 | 2022-12-16 | 杭州小影创新科技股份有限公司 | 一种短视频水印检测方法 |
-
2019
- 2019-11-29 CN CN201911204725.1A patent/CN110798750B/zh active Active
-
2020
- 2020-08-06 WO PCT/CN2020/107461 patent/WO2021103643A1/zh not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20040223612A1 (en) * | 2003-05-09 | 2004-11-11 | International Business Machines Corporation | Motion picture data processing device, method, and program |
| CN106412720A (zh) * | 2015-07-27 | 2017-02-15 | 腾讯科技(深圳)有限公司 | 视频水印去除的方法和装置 |
| CN107644204A (zh) * | 2017-09-12 | 2018-01-30 | 南京凌深信息科技有限公司 | 一种用于安防系统的人体识别与跟踪方法 |
| CN110428357A (zh) * | 2019-08-09 | 2019-11-08 | 厦门美图之家科技有限公司 | 图像中水印的检测方法、装置、电子设备及存储介质 |
| CN110798750A (zh) * | 2019-11-29 | 2020-02-14 | 广州市百果园信息技术有限公司 | 视频水印去除方法、视频数据发布方法及相关装置 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN110798750B (zh) | 2021-06-29 |
| CN110798750A (zh) | 2020-02-14 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2021103643A1 (zh) | 视频水印去除方法和装置、视频数据发布方法和装置、设备及存储介质 | |
| CN111932432B (zh) | 盲水印的植入方法、检测方法、装置、设备及存储介质 | |
| US9646358B2 (en) | Methods for scene based video watermarking and devices thereof | |
| US9202257B2 (en) | System for determining an illegitimate three dimensional video and methods thereof | |
| CN110083740B (zh) | 视频指纹提取及视频检索方法、装置、终端及存储介质 | |
| US7903868B2 (en) | Video fingerprinting apparatus in frequency domain and method using the same | |
| CN104618803A (zh) | 信息推送方法、装置、终端及服务器 | |
| CN106713964A (zh) | 一种生成视频摘要视点图的方法及装置 | |
| CN103679129A (zh) | 一种图像中的目标物体识别方法及装置 | |
| CN108596916A (zh) | 一种颜色相近的水印识别方法、系统、终端及介质 | |
| CN105554570A (zh) | 一种版权视频监控方法和装置 | |
| CN117710870B (zh) | 基于大数据技术的互联网内容监测方法、设备及存储介质 | |
| CN105898324A (zh) | 视频水印隐藏插入方法及装置 | |
| WO2019192375A1 (zh) | 多媒体处理方法及其装置、存储介质、电子产品 | |
| CN104978706B (zh) | 基于傅里叶描述子的水印嵌入与提取方法、装置及系统 | |
| JP6107037B2 (ja) | 画像処理装置、方法、及びプログラム | |
| CN101354783A (zh) | 边缘检测方法和装置 | |
| US11755758B1 (en) | System and method for evaluating data files | |
| CN118887129B (zh) | 基于声呐的泥沙淤积深度标注方法、设备及介质 | |
| CN118314153A (zh) | 一种图像的展示方法、装置及电子设备 | |
| CN115640424A (zh) | 一种基于深度学习特征图分析的视频库比对方法及系统 | |
| CN102984601A (zh) | 摄像头视频摘要生成系统 | |
| CN111833231B (zh) | 一种水印提取方法、装置及系统 | |
| Wang et al. | Detection of shifted double JPEG compression by an adaptive DCT coefficient model | |
| CN109214311B (zh) | 一种检测方法和装置 |
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: 20892580 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 20892580 Country of ref document: EP Kind code of ref document: A1 |