WO2022033485A1 - 视频处理方法及电子设备 - Google Patents

视频处理方法及电子设备 Download PDF

Info

Publication number
WO2022033485A1
WO2022033485A1 PCT/CN2021/111845 CN2021111845W WO2022033485A1 WO 2022033485 A1 WO2022033485 A1 WO 2022033485A1 CN 2021111845 W CN2021111845 W CN 2021111845W WO 2022033485 A1 WO2022033485 A1 WO 2022033485A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
target
frame image
frame
pixel
Prior art date
Application number
PCT/CN2021/111845
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 WO2022033485A1 publication Critical patent/WO2022033485A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/835Generation of protective data, e.g. certificates
    • H04N21/8358Generation of protective data, e.g. certificates involving watermark
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • H04N19/467Embedding additional information in the video signal during the compression process characterised by the embedded information being invisible, e.g. watermarking

Definitions

  • the present disclosure relates to the field of video, and in particular, to a video processing method and an electronic device.
  • a copyright mark such as a watermark is usually added to the video.
  • the copyright mark is usually displayed directly at a specific position of each frame of the video.
  • the present disclosure provides a video processing method and electronic device to reduce the possibility of malicious destruction or elimination.
  • the technical solutions of the present disclosure are as follows:
  • a video processing method including:
  • the identification image including copyright information of the target video
  • the identification image and the target frame image are combined to obtain a mixed frame image, and the mixed frame image is used to replace the target frame image in the target video.
  • the determining a target frame image among multiple frame images of the target video includes:
  • At least one frame image is selected from the plurality of frame images as the target frame image.
  • the process of selecting at least one frame image from the plurality of frame images includes:
  • At least one frame image is selected from multiple candidate frame images, and the multiple candidate frame images are frame images within a preset time period closest to the end moment of the target video; or,
  • the image complexity of the multiple frame images is determined, and at least one frame image with the highest image complexity or image complexity higher than a preset complexity is selected from the multiple frame images.
  • it also includes:
  • the resolution of the identification image is adjusted to be consistent with the resolution of the target frame image.
  • it also includes:
  • performing the visual weakening process on the identification image includes at least one of the following implementations:
  • the image size of the identification image is adjusted based on a preset reduction ratio relative to the target frame image.
  • the merging of the identification image and the target frame image to obtain a mixed frame image includes:
  • the identification image is merged into the target area in the target frame image to obtain the mixed frame image.
  • the determining the target area in the target frame image includes:
  • a region of interest ROI in the target frame image is determined, and other regions in the target frame image other than the ROI are determined as the target region.
  • the identification image is merged into the target area in the target frame image to obtain the mixed frame image, including:
  • a target pixel value is determined based on the pixel value of the first pixel and the pixel value of the second pixel, and the target pixel value is the result of combining the first pixel. the pixel value obtained from the pixel value and the pixel value of the second pixel point, where the second pixel point is the pixel point corresponding to the first pixel point in the identification image;
  • a video processing apparatus including:
  • an identification image determination module configured to determine an identification image of a target video, the identification image containing copyright information of the target video
  • a frame image determination module configured to determine a target frame image from a plurality of frame images of the target video
  • the image merging module is configured to merge the identification image and the target frame image to obtain a mixed frame image, and the mixed frame image is used to replace the target frame image in the target video.
  • the frame image determination module is further configured to:
  • At least one frame image is selected from the plurality of frame images as the target frame image.
  • the frame image determination module is further configured to:
  • At least one frame image is selected from multiple candidate frame images, and the multiple candidate frame images are frame images within a preset time period closest to the end moment of the target video; or,
  • the image complexity of the multiple frame images is determined, and at least one frame image with the highest image complexity or image complexity higher than a preset complexity is selected from the multiple frame images.
  • it also includes:
  • a resolution determination module configured to determine the resolution of the target frame image
  • the resolution adjustment is configured to adjust the resolution of the identification image to be consistent with the resolution of the target frame image.
  • it also includes:
  • a visual weakening module configured to perform a visual weakening process on the identification image.
  • the visual weakening module includes at least one of the following units:
  • a transparency adjustment unit configured to adjust the transparency of the identification image based on a preset transparency value
  • a feathering value adjustment unit configured to adjust the edge feathering degree of the identification image based on a preset feathering value
  • a size adjustment unit configured to adjust the image size of the identification image based on a preset reduction ratio relative to the target frame image.
  • the image merging module includes:
  • an area determination unit configured to determine a target area in the target frame image, the target area having the same size as the identification image
  • An image merging unit configured to merge the identification image into the target area in the target frame image to obtain the mixed frame image.
  • the area determination unit is configured to determine a preset edge position in the target frame image as the target area; or,
  • the image merging unit is configured to, for each first pixel in the target area, determine the target based on the pixel value of the first pixel and the pixel value of the second pixel Pixel value, the target pixel value is the pixel value obtained by combining the pixel value of the first pixel point and the pixel value of the second pixel point, and the second pixel point is the same as the first pixel in the identification image.
  • an electronic device including:
  • a memory for storing the processor-executable instructions
  • the processor is configured to execute the instructions to achieve the following steps:
  • the identification image including copyright information of the target video
  • the identification image and the target frame image are combined to obtain a mixed frame image, and the mixed frame image is used to replace the target frame image in the target video.
  • the processor is configured to execute the instructions to implement the steps of:
  • At least one frame image is selected from the plurality of frame images as the target frame image.
  • the processor is configured to execute the instructions to implement the steps of:
  • At least one frame image is selected from multiple candidate frame images, and the multiple candidate frame images are frame images within a preset time period closest to the end moment of the target video; or,
  • the image complexity of the multiple frame images is determined, and at least one frame image with the highest image complexity or image complexity higher than a preset complexity is selected from the multiple frame images.
  • the processor is configured to execute the instructions to implement the steps of:
  • the resolution of the identification image is adjusted to be consistent with the resolution of the target frame image.
  • the processor is configured to execute the instructions to implement the steps of:
  • the processor is configured to execute the instructions to implement at least one of the following steps:
  • the image size of the identification image is adjusted based on a preset reduction ratio relative to the target frame image.
  • the processor is configured to execute the instructions to implement the steps of:
  • the identification image is merged into the target area in the target frame image to obtain the mixed frame image.
  • the processor is configured to execute the instructions to implement the steps of:
  • a region of interest ROI in the target frame image is determined, and other regions in the target frame image other than the ROI are determined as the target region.
  • the processor is configured to execute the instructions to implement the steps of:
  • a target pixel value is determined based on the pixel value of the first pixel and the pixel value of the second pixel, and the target pixel value is the result of combining the first pixel. the pixel value obtained from the pixel value and the pixel value of the second pixel point, where the second pixel point is the pixel point corresponding to the first pixel point in the identification image;
  • a storage medium when an instruction in the storage medium is executed by a processor of an electronic device, the electronic device can perform the following steps:
  • the identification image including copyright information of the target video
  • the identification image and the target frame image are combined to obtain a mixed frame image, and the mixed frame image is used to replace the target frame image in the target video.
  • a computer program product configured to perform determining an identification image of a target video, the identification image containing copyright information of the target video;
  • the identification image and the target frame image are combined to obtain a mixed frame image, and the mixed frame image is used to replace the target frame image in the target video.
  • a mixed frame image is generated after combining a logo image containing copyright information with a target frame image in the video, so that the copyright logo is added to the target video. Because the copyright logo is incorporated in the mixed frame image rather than directly displayed in a specific area above the video screen, the concealment effect is better, and it is often difficult for viewers to perceive its existence, so that it will basically not block the screen and be difficult to be discovered by infringers. , reducing the possibility of malicious destruction or elimination.
  • FIG. 1 is a flowchart of a video processing method according to an embodiment of the present disclosure
  • FIG. 2 is a flowchart of another video processing method according to an embodiment of the present disclosure.
  • FIG. 3 is a schematic diagram of a frame image corresponding to a target video according to an embodiment of the present disclosure
  • FIG. 4 is a schematic diagram of an image merging process according to an embodiment of the present disclosure.
  • FIG. 5 is a block diagram of a video processing apparatus according to an embodiment of the present disclosure.
  • FIG. 6 is a structural diagram of an electronic device according to an embodiment of the present disclosure.
  • a copyright mark such as a watermark is usually added to the video, so as to realize the effective traceability of the corresponding infringement after the video is released.
  • a copyright identification is usually added to a video by means of a clear watermark.
  • the clear watermark is to directly display the watermark in the upper left corner, upper right corner and other specific positions of each frame of the video.
  • this type of watermark is displayed on each frame indiscriminately, it includes ordinary viewers and potential infringers. All viewers can directly watch the watermark and know the relevant copyright information of the video, which not only may directly affect the viewer's viewing effect of the video due to the screen occlusion caused by the watermark, but also can be easily eliminated by the infringer through screen cropping or watermark removal technology.
  • Such watermarks are examples of the relevant copyright information of the video.
  • the present disclosure proposes the same video processing method: by combining a logo image carrying copyright information and a target frame image in a target video, the copyright information is added to the mixed frame image obtained by mixing, so that the copyright logo is effectively hidden in the mixed frame image. , difficult to be found by the audience.
  • FIG. 1 is a flowchart of a video processing method shown in an exemplary embodiment of the present specification. As shown in Figure 1, the method is applied to electronic devices such as terminals or servers, and includes the following steps:
  • Step 102 The electronic device determines an identification image of the target video, where the identification image includes copyright information of the target video.
  • the execution body of the embodiments of the present disclosure is a terminal, and the terminal is a mobile phone, a tablet computer, a wearable device, a personal computer, etc., wherein the terminal is installed with a video processing APP (Application, application program), or the terminal runs Such as HTML (HyperText Markup Language, hypertext markup language) 5 technology implementation of online "client”.
  • the execution body of the embodiments of the present disclosure is a server, and the server includes but is not limited to a physical server including an independent host, a virtual server carried by a host cluster, a cloud server, and the like. The above-mentioned terminal or server can add copyright information to the target video when running the processing program corresponding to the video processing method of the present disclosure.
  • the electronic device combines the identification image with the target frame image in the target video to obtain a mixed frame image, where the identification image includes copyright information of the target video, so as to realize adding a copyright mark to the target video and mixing the frame image
  • the hidden copyright information is displayed in the , so hereinafter, "adding a copyright mark to the target video" refers to the above-mentioned merging process, and will not be described separately.
  • the target video is the video shot by the terminal, the video produced by the terminal through video materials, the video obtained by the terminal from other devices, etc.; in the case where the execution subject is the server Below, the target video is the video uploaded by the terminal, the video designated by the video providing service, etc.
  • the present disclosure does not limit the source and form of the target video.
  • the above identification image is provided by the account of the publisher of the target video.
  • the account of the publisher adds a copyright mark to the target video when the target video is produced or before the target video is published, that is, the identification image is provided by the account of the publisher. of.
  • the above-mentioned identification image is provided by the publishing platform of the target video.
  • a copyright logo is added to the target video, that is, the uniform format and style provided by the publisher's platform are adopted.
  • logo image or, for the target video that has been published, the publishing platform will perform post-processing of adding copyright logo to it, and the system default logo image will be used at this time.
  • the above identification image is jointly provided by the publisher account of the target video and the publishing platform.
  • a copyright mark is added to the target video, that is, the electronic device uses the publisher platform to provide the target video.
  • logo template combined with its own logo materials to customize the logo image.
  • the copyright information includes at least one of the following: account information of a publisher account of the target video, custom identification information generated by the publisher account, and platform information of a publishing platform of the target video.
  • account information includes at least one of account name, account ID (identification), etc., so as to add copyright information including the account of the publisher in the target video to be published, so as to help the video publisher ( Often video producers) copyright maintenance.
  • self-defined identification information includes at least one of specific characters, specific numbers, and identifying statements customized by the publisher's account.
  • the above-mentioned copyright information is customized by the publisher's account, that is, the copyright information contains specific information, which is convenient for Improve the distinction of copyright information.
  • the above platform information includes at least one of the platform name, platform LOGO (logo), platform trademark or other platform-related indicative information, etc., so that the copyright information containing the platform party is added to the target video maintained by the platform to facilitate the realization of Copyright maintenance for the platform.
  • Step 104 the electronic device determines a target frame image from all frame images of the target video.
  • All frame images are multiple frame images; in this embodiment, the target frame images are acquired from the target video in various ways, which are not limited in the present disclosure. For example, for the target video that has been encapsulated in a specific format, parse it to obtain an independent frame image, and then determine the target frame image; or, for the target video in the form of a real-time video stream, directly extract the corresponding frame from the real-time video stream target frame image.
  • the electronic device determines all frame images corresponding to the target video as target frame images, so as to enhance the reliability and stability of copyright protection , so as to avoid that when the infringer performs down-frame (also known as down-frame) processing on the target video, the mixed frame images containing the copyright logo will be eliminated, resulting in the disappearance of the copyright information (because the infringer usually does not eliminate all video frame images).
  • the electronic device selects at least one frame image from all the frame images as the target frame image.
  • the electronic device only uses part of the frame images as the target frame images to which the version identification is added, thereby effectively reducing the number of images in the target video.
  • the proportion of the number of frame images displaying the copyright logo effectively reduces the degree of occlusion of the copyright logo on the video screen during the video playback process, thereby reducing the possibility of the copyright logo being discovered by ordinary viewers or potential infringers.
  • the electronic device selects at least one frame image from all the frame images as the target frame image in various ways.
  • the electronic device randomly selects at least one frame image from all the frame images as the target frame image.
  • the random selection process is simple and fast, which effectively reduces the time used for selecting the target frame image and helps speed up video processing. overall speed.
  • the electronic device selects at least one frame image from multiple candidate frame images, and the multiple candidate frame images are frame images within a preset time period closest to the end time of the target video. Since viewers usually pay less attention to the latter part of the target video than the previous part during the process of watching the target video, randomly select at least at least For a frame image, selecting the target frame image in the latter part of the target video where the viewer's attention is relatively less focused can help reduce the possibility that the viewer perceives the added copyright mark.
  • the multiple candidate frame images are all frame images within a time period of 5s before the end time, or the multiple candidate frame images are all frame images within a time period of 2s before the end time 2s.
  • the electronic device determines the video frame corresponding to the moment N seconds before the end moment of the target video as the target frame image; N can be set and changed as required, and in the embodiment of the present disclosure, N is not specified. For example, N is 5 or 3; then the electronic device determines the video frame corresponding to the first 5s or the first 3s of the end time of the target video as the target frame image.
  • the electronic device determines the image complexity of all frame images, and then selects at least one frame image with the highest image complexity or image complexity higher than a preset complexity from all frame images as the target frame image. Because viewers usually do not observe video images with complex elements too closely, the copyright mark is added to the frame image with high image complexity, thereby reducing the possibility that the viewer perceives the added copyright mark.
  • the electronic device selects at least one frame image among other frame images except the first frame of the target video as the target frame image; since the viewer observes the first frame image most carefully, the version identification is added to the other frame images , thereby reducing the possibility that the viewer will perceive the added copyright sign.
  • the electronic device after determining the target frame image, performs corresponding processing on the identification image according to the image parameters of the target frame image.
  • the electronic device first determines the resolution of the target frame image, and then adjusts the resolution of the identification image to be consistent with the resolution of the target frame image, thereby ensuring the same resolution and improving the authenticity of the mixed frame image.
  • the electronic device performs special effects processing on the logo image, thereby further ensuring that the added copyright logo is not perceived by the audience.
  • the special effect processing includes visual weakening processing; the electronic device performs visual weakening processing on the logo image.
  • the process that the electronic device performs special effects processing on the logo image includes: the electronic device adjusts the transparency of the logo image according to a preset transparency value, so that the copyright logo in the combined mixed frame image is in a semi-transparent state, Thereby, it is better hidden in the normally displayed image content.
  • the electronic device adjusting the transparency of the logo image according to the preset transparency refers to adjusting the transparency of the logo image to a preset transparency value based on the preset transparency, that is, based on the preset transparency.
  • the process that the electronic device performs special effects processing on the logo image includes: the electronic device adjusts the edge feathering degree of the logo image according to a preset feathering value, thereby blurring the logo boundary between the copyright logo and its surrounding normal pictures, and further Reduce the perceptibility of copyright signs.
  • the electronic device adjusting the edge feathering degree of the logo image according to the preset feathering value refers to adjusting the edge feathering degree of the logo image to the preset feathering value based on the preset feathering value, that is, based on the preset feathering value.
  • the feathering value of of .
  • the electronic device adjusts the image size of the logo image according to a preset reduction ratio relative to the target frame image, thereby ensuring that the added copyright logo is only displayed in a very small area in the corresponding picture of the mixed frame image, reducing the It can block the screen and reduce the possibility of being perceived by the audience.
  • the electronic device adjusting the image size of the logo image according to the preset reduction ratio refers to adjusting the image size of the logo image to the preset size of the target frame image based on the preset reduction ratio, that is, based on the preset reduction ratio. Scale down. For example, if the preset reduction ratio is 1/10, the electronic device adjusts the image size of the identification image to 1/10 of the target frame image.
  • Step 106 the electronic device combines the identification image and the target frame image to obtain a mixed frame image, and the mixed frame image is used to replace the target frame image in the target video.
  • the electronic device incorporates the logo image into any area of the target frame image; in some embodiments, the electronic device first determines the target area in the target frame image, and the target area is the copyright logo after adding in In the area in the mixed frame image, the target area has the same size as the logo image, and the logo image is merged into the target area in the target frame image to obtain the mixed frame image.
  • the electronic device determines a preset edge position in the target frame image as the target area, wherein the preset edge position is the center position of a certain edge of the image, or the preset position of a certain corner of the image, The present disclosure does not limit this.
  • the electronic device directly determines the target area according to the preset edge position, which helps to simplify the determination process of the target area and speed up the merging process.
  • the electronic device determines a ROI (region of interest, region of interest) in the target frame image, and determines a target region in other regions that are different from the ROI; wherein, the other regions that are different from the ROI are the regions other than the ROI In other regions other than the ROI, the electronic device determines the target region in other regions different from the ROI as follows: the electronic device determines other regions in the target frame image except the ROI as the target region. In the embodiment of the present disclosure, the electronic device ensures that the target area is outside the ROI by determining the ROI, thereby ensuring that the added copyright mark is outside the ROI in the mixed frame image, that is, not in the area of interest to the audience, so further Reduces the probability that the copyright sign will be perceived by the audience.
  • the target area in the mixed frame image includes mixed pixels (Pixels), and the combination of the identification image and the target frame image is implemented by the following manner: The color value of the pixel point, and the color value of the second pixel point in the identification image corresponding to the mixed pixel point, calculate the color value of the mixed pixel point, and then use the mixed pixel point to replace the first pixel located at the corresponding position in the target area. , to form a mixed frame image with the original pixels outside the target area in the target frame image.
  • the color value of the above-mentioned mixed pixel point is calculated according to the color value of the first pixel point of the target frame image and the color value of the pixel point in the logo image, so it can show that the copyright logo is fused in the original screen content of the target frame image. display effect, so that the copyright logo will be displayed in the mixed frame image without being too obvious.
  • the color value of any of the above-mentioned pixel points is the value of the pixel point in the preset color space
  • the preset color space is a grayscale space (the color value is a grayscale value at this time), which is RGB (Red Green Blue, red, green and blue) space (at this time, the color value is RGB three-channel value), or YUV space (at this time, the color value is YUV three-channel value), etc., which will not be repeated.
  • the color value refers to the pixel value, that is, for each first pixel in the target area, the electronic device determines the target pixel value based on the pixel value of the first pixel and the pixel value of the second pixel. is the pixel value obtained by combining the pixel value of the first pixel point and the pixel value of the second pixel point, and the second pixel point is the pixel point corresponding to the first pixel point in the identification image; The pixel value of the first pixel in is modified to the target pixel value to obtain the mixed frame image.
  • a mixed frame image is obtained, so that the copyright identification is added to the target video.
  • the copyright logo is incorporated in the mixed frame image rather than directly displayed in a specific area above the video screen, the concealment effect is better, and it is often difficult for viewers to perceive its existence, so that it will basically not block the screen and be difficult to be discovered by infringers. , reducing the possibility of malicious destruction or elimination.
  • the processing process requires low computing power and performance; Processing, it will not eliminate the copyright identification, so the reliability of infringement traceability is high.
  • FIG. 2 is a flowchart of another video processing method according to an embodiment of the present disclosure; as shown in FIG. 2 , the method includes:
  • Step 202 the electronic device determines the target video to be processed.
  • the target video involved in the video processing method described in the present disclosure is the video that needs to be protected by copyright (copyright identification needs to be added), which is the video corresponding to the real-time video stream (such as live video, etc.), or the video that has been produced and pressed
  • a complete video packaged in a preset format, such as a published short video, a photographic clip, a TV series, a movie, etc., is not limited in this embodiment of the present disclosure.
  • Step 204 the electronic device determines the identification images to be combined.
  • the identifying image is provided by at least one of a publisher account of the target video and a publishing platform.
  • the publisher's account adds a copyright mark to the target video in the process of producing the target video, and at this time, the publisher's account uses the pre-made image containing the copyright information as the above-mentioned logo image; or, in the process of publishing the target video to the publishing platform Add a copyright logo to the target video in the video, at this time, it will use the image containing copyright information that it has pre-made or obtained from other devices as the above logo image, or use the logo image provided by the publishing platform or the logo material provided by the platform to customize the production.
  • logo image the publisher's account adds a copyright mark to the target video in the process of producing the target video, and at this time, the publisher's account uses the pre-made image containing the copyright information as the above-mentioned logo image; or, in the process of publishing the target video to the publishing platform Add a copyright logo to the target video in
  • the copyright information includes at least one of the following: account information of the publisher account of the target video, custom identification information generated by the publisher account, and platform information of the target video's publishing platform.
  • the above account information includes at least one of an account name, an account ID, and the like.
  • the above-mentioned custom identification information includes specific characters, specific numbers, and identifying statements, etc. customized by the publisher's account.
  • the above platform information includes at least one of the platform name, platform LOGO, platform trademark or other platform-related indicative information, etc., so that the copyright information containing the platform party is added to the target video maintained by the platform, so as to facilitate the realization of platform-specific copyright information. Maintenance, this disclosure does not limit the content of the above information.
  • Step 206 the electronic device selects the target frame image in the target video.
  • the electronic device After the electronic device determines the target video, it needs to determine the target frame image, and the target frame image is used to combine with the logo image to obtain a mixed frame image (that is, used to add a copyright logo).
  • the process of the target frame image is the process of determining at least one target frame image for adding the copyright mark among all the frame images corresponding to the target video. All frame images corresponding to the target video refer to multiple frame images of the target video.
  • the target video corresponds to P1, P2,...Pi...Pn in sequence, a total of n frame images, the following The process of determining the target video will be described with reference to Figure 3:
  • the electronic device determines all frame images (P1-Pn) in FIG. 3 as target frame images, so as to enhance the reliability and stability of copyright protection, and prevent the infringer from downgrading the video to include The mixed frame image of the copyright logo is culled and the copyright information disappears.
  • the electronic device randomly selects part of the frame images from all the frame images as the target frame images, such as selecting only one frame image Pi among P1-Pn, or selecting multiple frame images P3-Pi among them, etc., This can reduce the proportion of the number of frame images that display the copyright logo in the target video, and use part of the frame images in all the frame images as the target frame image, so as to reduce the degree of occlusion of the copyright logo on the video screen during the video playback process, and reduce the copyright logo.
  • the electronic device selects at least one frame image from multiple candidate frame images, and the multiple candidate frame images are all frame images within a preset time period closest to the end moment of the video; for example, multiple candidate frame images
  • the images are all frame images corresponding to the first 5s of the time tn corresponding to Pn to the 5s duration of the time tn corresponding to Pn (ie, the time period [tn-5s, tn]).
  • the electronic device sequentially determines the image complexity of all frame images (P1-Pn) corresponding to the target video, or sequentially determines the image complexity of all frame images (eg Pi-Pn) corresponding to the target video in a certain time period and then select at least one frame image with the highest image complexity or the image complexity higher than the preset complexity from all the above-mentioned frame images as the target frame image, so that the copyright mark is added to the frame image with higher image complexity, To reduce the likelihood that the viewer will perceive the added copyright sign.
  • the electronic device calculates the complexity value representing the complexity of the image through the content recognition algorithm: the complexity value is positively correlated with the number of objects in the frame image or the color gradient value of the border of adjacent objects, such as the object in the frame image. The more the number of objects or the larger the color gradient value of the adjacent object boundary, the higher the image complexity of the frame image; on the contrary, if the number of objects in the frame image is less or the color gradient value of the adjacent object boundary is higher If it is small, it indicates that the image complexity of the frame image is lower.
  • the foregrounds of frame images P1 and Pi are the same person image, and the backgrounds are large leaves and monochrome walls, respectively.
  • the image complexity of P1 is higher than that of Pi, and P1 is selected as the target frame image. (Or further compare the image complexity of P1 and other frame images, and determine the final target frame image).
  • the above-mentioned random selection rule is selection at equal intervals, such as selecting P1, P3, P5... in sequence, or selecting P1, P6, P11... etc. in sequence; P1, P2, P3, P11, P12, P13, etc., so as to avoid the impact of frame drop as much as possible, and will not be repeated here.
  • steps 202-206 are only exemplary. According to the actual scene, the above steps are performed in the order of steps 202-206-204, or in the order of steps 204-202-206. The sequence is not limited.
  • Step 208 the electronic device adjusts the resolution of the logo image.
  • the electronic device directly merges the identification image and the target frame image; in some embodiments, the electronic device adjusts the resolution of the identification image before merging the identification image and the target frame image to ensure that the identification image and the target frame are The resolution of the images is adjusted to be consistent, so after determining the target frame image, the electronic device first determines the resolution of the target frame image, and then adjusts the resolution of the identification image to be the same as the resolution of the target frame image.
  • the electronic device adjusts the resolution of the logo image to 300ppi so as to facilitate Subsequent image merging.
  • the above-mentioned resolution adjustment is based on technologies such as differential algorithm or super-resolution algorithm, which will not be repeated here.
  • Step 210 the electronic device adjusts the special effect of the logo image.
  • the electronic device performs special effects processing on the logo image, so as to ensure that the added copyright logo is not perceived by the audience.
  • the special effect processing includes visual weakening processing; then the electronic device performs visual weakening processing on the logo image.
  • the electronic device adjusts the transparency of the logo image according to a preset transparency value; wherein, the electronic device adjusts the transparency of the logo image according to the preset transparency refers to taking the preset transparency as a benchmark, that is, based on the preset transparency. Set the transparency to adjust the transparency of the logo image to the preset transparency value. For example, if the preset transparency is 50% or 30%, the electronic device adjusts the transparency of the logo image to 50% or 30%, etc., so as to ensure that the copyright logo in the combined mixed frame image is in a semi-transparent state, so that the Effectively hidden in normally displayed image content.
  • the electronic device adjusts the edge feathering degree of the logo image according to the preset feathering value; wherein, the electronic device adjusting the edge feathering degree of the logo image according to the preset feathering value refers to using the preset feathering value to adjust the edge feathering degree of the logo image.
  • Benchmark that is, based on the preset feather value, adjust the edge feathering degree of the logo image to the preset feather value.
  • the above feathering value is the feathering radius, for example, the feathering radius of the logo image is even 10 pixels or 15 pixels, etc., so as to blur the logo boundary between the copyright logo and the surrounding normal picture, and reduce the perceptibility of the copyright logo.
  • the electronic device adjusts the image size of the logo image according to a preset reduction ratio relative to the target frame image; wherein, the electronic device adjusts the image size of the logo image according to the preset reduction ratio refers to the preset reduction ratio.
  • the image size of the logo image is adjusted to the preset reduction ratio of the target frame image.
  • the image size of the logo image is 480*640pix
  • the image size of the target frame image is 480*720pix
  • the preset reduction ratio corresponding to the target frame image is 1/10
  • the above-mentioned preset reduction ratio is based on the image area, for example, the area of the logo image is adjusted to 1/100, 1/200 of the target frame image, etc., which is not limited in the present disclosure.
  • the preset transparency, feathering value, reduction ratio and other parameters are set and changed according to the specific scene; etc., which is not limited in the present disclosure.
  • the electronic device can also adjust other parameters or special effects for the logo image.
  • only any one of the above-mentioned special effects adjustment is used, or multiple types are used simultaneously in accordance with one or more preset orders, which will not be repeated here.
  • Step 212 the electronic device determines the target area in the target frame image.
  • the electronic device incorporates the logo image into any area of the target frame image; in some embodiments, the electronic device first determines the target area in the target frame image, and the target area is the copyright logo after adding in The area in the blended frame image, the size of the target area is the same as the size of the logo image.
  • the logo image is a rectangular image or other non-rectangular shape, such as an irregular shape corresponding to a platform LOGO that does not include a background, etc., which is not limited in the present disclosure.
  • the following embodiments are all described by taking a logo image having a shape of a rectangle as an example.
  • the electronic device determines a preset edge position in the target frame image as the target area, so as to simplify the determination process of the target area and speed up the merging process.
  • the above-mentioned preset edge positions are the central position of the upper edge of the image, the central position of the lower edge, the position above the right edge of the image relative to 1/4 of the length of the edge, and the position of the lower right corner of the image relative to the position of 1/10 of the length of the edge etc.
  • the distance from the corresponding edge is 1mm, 10pix, etc., because the determined target area has corresponding boundaries, so in order to ensure that the target area is located in the image area of the target frame image, the center of the target area needs to be properly adjusted when determining the above target area. Point location, the specific process will not be repeated.
  • the electronic device first determines the ROI in the target frame image, and then determines the target region in other regions different from the ROI.
  • the other regions that are different from the ROI are other regions except the ROI
  • the electronic device determines the target region in the other regions different from the ROI as follows: the electronic device determines other regions in the target frame image except the ROI as target area.
  • ROI extraction algorithms such as ROI-Pooling, ROI-align, Deformable ROI pooling, etc. are used to realize the determination of ROI, and the specific process will not be repeated here. For example, in a target frame image in which the foreground is a portrait and the background is a distant scene, the electronic device determines the target area in the picture area corresponding to the background.
  • the electronic device determines, according to the complexity of the picture content in the target frame image, the target area in an area with high picture content complexity (an area with numerous and complicated picture contents). For example, when there is a blue sky and white clouds with complex shapes in the picture of the target frame image, it is obvious that the complexity of the picture area corresponding to the white cloud is higher than that of the picture area corresponding to the sky. Determine the target area in the screen area.
  • the electronic device can also determine the target area in the target frame image according to various factors such as color depth and area size, or the electronic device can adjust the shape or rotation angle of the target frame image according to the shape of the object in the target area. , and will not be repeated here.
  • the frame image data contained in the target video is also determined. Therefore, the higher the proportion of target frame images in all frame images, the more If the copyright mark is included, the possibility of the copyright mark being discovered by the audience is relatively high.
  • the frame rate of video playback is faster than the human eye recognition speed, only one frame image is selected as the target frame image to add the copyright mark, or when there are multiple target frame images, the adjacent target
  • the way in which the target areas in the frame image are located at different positions ensures that the position of the copyright mark is constantly changing during the playback of the target video, thereby reducing the probability of the copyright mark being detected.
  • the smaller the number of the above-mentioned target frame images the greater the variation of the position of the target area in the adjacent target frame images, and the lower the probability that the copyright mark is recognized accordingly. Therefore, the number of the target frame images and the position of the target area in the target frame images are determined according to the actual scene, thereby ensuring a better copyright mark hiding effect.
  • Step 214 the electronic device combines the identification image with the target frame image to obtain a mixed frame image.
  • the electronic device combines the identification image with the picture corresponding to the target area in the target frame image, including: the electronic device according to the color value of the first pixel in the target frame image corresponding to the target area and the color of the pixel at the corresponding position in the identification image value, calculate the color value of the mixed pixel at the corresponding position in the target area.
  • the color value of any of the above-mentioned pixel points is the value of the pixel point in the preset color space, such as at least one of gray value, RGB value, YUV value, brightness value, etc. No restrictions apply.
  • the electronic device calculates the corresponding color value by calculating the average color value: the electronic device calculates the color value of the first pixel point Xi_1 corresponding to Xi and The arithmetic mean value between the color values of the corresponding second pixel point Xi_2, the arithmetic mean value is taken as the color value of any mixed pixel point Xi; in some embodiments, the electronic device calculates the weighted average of the preset weights value, and the corresponding color value is obtained by calculation, which will not be repeated. Taking the RGB value as an example, for any mixed pixel Xi, the electronic device calculates its color components in the R, G, and B channels respectively, and then combines the three components into the RGB color value of the pixel, other color values are similar, No longer.
  • the mixed pixel points corresponding to each first pixel point of the target frame image in the target area are obtained through the above calculation, and the first pixel point at the corresponding position is replaced with each mixed pixel point, and the replaced target area.
  • the mixed pixels and the original pixels outside the target area together form a mixed frame image.
  • the color value refers to the pixel value, that is, for each first pixel in the target area, the electronic device determines the target pixel value based on the pixel value of the first pixel and the pixel value of the second pixel. is the pixel value obtained by combining the pixel value of the first pixel point and the pixel value of the second pixel point, and the second pixel point is the pixel point corresponding to the first pixel point in the identification image; The pixel value of the first pixel in is modified to the target pixel value to obtain the mixed frame image.
  • Fig. 4(a) is a schematic diagram of a target frame image, wherein the target frame image 400a includes ROI 401a (portrait area in the foreground of the image) and non-ROI 402a (the building area in the background of the image).
  • ROI 401a portrait area in the foreground of the image
  • non-ROI 402a the building area in the background of the image.
  • the target area 403a is determined in the above-mentioned manner.
  • the logo image 401b in FIG. 4(b) (including the copyright logo in the shape of a pentagram, or in the form of text, characters, etc.) is processed by special effects such as transparency adjustment, feathering value adjustment, and size adjustment to obtain the logo image 402b.
  • a mixed frame image 400c is obtained, wherein the ROI 401c is exactly the same as the ROI 401a, and the target area 403c of the non-ROI 402b is obtained.
  • the picture is composed of mixed pixels obtained after merging, which contains the added copyright mark 404c in the shape of a five-pointed star; in some embodiments, when the target image is displayed in the target frame image, the image shown in the figure will not be displayed.
  • the copyright mark is only displayed in the non-interested area of the viewer, and only flashes when the video is played, so it is difficult for the viewer to discover; on the other hand, the copyright mark has been adjusted for transparency and/or The inconspicuous logo obtained after special effects such as feathering value adjustment is merged, so it is more difficult to find.
  • Step 216 the electronic device replaces the target frame image with the mixed frame image.
  • the electronic device deletes the target frame image in the target video, and adds the mixed frame image to the position where the target frame image is located.
  • the above-mentioned mixed frame image is used to replace the target frame image in the target video, so as to realize the purpose of adding a copyright mark to the target video.
  • the copyright mark added to the target video flashes during the playback of the target video, and will not be displayed in a fixed position. Moreover, it is an inconspicuous mark processed by special effects, so it is difficult for viewers to find it.
  • the above-mentioned target frame image and the merging position corresponding to the video information of the target video are directly recorded in the suspected infringing video according to the above-mentioned target frame image and the merging position when the infringement judgment is made for the suspected infringing video.
  • Check whether there is an added copyright mark at the corresponding location each frame image of the suspected infringing video is amplified for detection or content identification is performed to detect whether there is a copyright mark in it, so as to determine whether the suspected infringing video is indeed infringing.
  • the present disclosure also proposes an embodiment of a video processing apparatus.
  • FIG. 5 is a schematic block diagram of a video processing apparatus according to an embodiment of the present disclosure.
  • the video processing apparatus shown in this embodiment is suitable for video processing applications, and the applications are suitable for terminals or servers.
  • the terminals include but are not limited to electronic devices such as mobile phones, tablet computers, wearable devices, and personal computers.
  • An application is an application program installed in a terminal, or an online "client" provided by technologies such as HTML5, and the user adds copyright information to the target video through the above method through the video processing application; the server includes but is not limited to including an independent The physical server of the host, the virtual server carried by the host cluster, the cloud server, etc.
  • the video processing device includes:
  • An identification image determination module 501 configured to determine an identification image of a target video, where the identification image includes copyright information of the target video;
  • a frame image determination module 502 configured to determine a target frame image from multiple frame images of the target video
  • the image merging module 503 is configured to merge the identification image and the target frame image to obtain a mixed frame image, and the mixed frame image is used to replace the target frame image in the target video.
  • the frame image determination module 502 is further configured to:
  • At least one frame image is selected from the plurality of frame images as the target frame image.
  • the frame image determination module 502 is further configured to:
  • At least one frame image is selected from multiple candidate frame images, and the multiple candidate frame images are frame images within a preset time period closest to the end moment of the target video; or,
  • the image complexity of the multiple frame images is determined, and at least one frame image with the highest image complexity or image complexity higher than a preset complexity is selected from the multiple frame images.
  • it also includes:
  • a resolution determination module 504 configured to determine the resolution of the target frame image
  • the resolution adjustment module 505 is configured to adjust the resolution of the identification image to be consistent with the resolution of the target frame image.
  • it also includes:
  • the visual weakening module 506 is configured to perform visual weakening processing on the identification image.
  • the visual weakening module 504 includes at least one of the following units:
  • a transparency adjustment unit configured to adjust the transparency of the identification image based on a preset transparency value
  • a feathering value adjustment unit configured to identify the edge feathering degree of the image based on a preset feathering value
  • a size adjustment unit configured to adjust the image size of the identification image based on a preset reduction ratio relative to the target frame image.
  • the image merging module 503 includes:
  • an area determination unit configured to determine a target area in the target frame image, the target area having the same size as the identification image
  • An image merging unit configured to merge the identification image into the target area in the target frame image to obtain the mixed frame image.
  • an area determination unit configured to determine a preset edge position in the target frame image as the target area
  • a region of interest ROI in the target frame image is determined, and other regions in the target frame image other than the ROI are determined as the target region.
  • the image merging unit is configured to, for each first pixel in the target area, determine the target based on the pixel value of the first pixel and the pixel value of the second pixel Pixel value, the target pixel value is the pixel value obtained by combining the pixel value of the first pixel point and the pixel value of the second pixel point, and the second pixel point is the same as the first pixel in the identification image.
  • Embodiments of the present disclosure also provide an electronic device, including:
  • a memory for storing the processor-executable instructions
  • the processor is configured to execute the instructions to implement the video processing method according to any one of the above embodiments.
  • An embodiment of the present disclosure further provides a storage medium, when an instruction in the storage medium is executed by a processor of an electronic device, the electronic device can execute the video processing method described in any of the foregoing embodiments.
  • Embodiments of the present disclosure also provide a computer program product, the computer program product being configured to execute the video processing method described in any of the foregoing embodiments.
  • Fig. 6 is a schematic block diagram of an electronic device according to an embodiment of the present disclosure.
  • electronic device 600 is a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, fitness device, personal digital assistant, and the like.
  • an electronic device 600 includes one or more of the following components: a processing component 602, a memory 604, a power supply component 606, a multimedia component 608, an audio component 610, an input/output (I/O) interface 612, a sensor component 614, and communication component 618 .
  • the processing component 602 generally controls the overall operation of the electronic device 600, such as operations associated with display, phone calls, data communications, camera operations, and recording operations.
  • the processing component 602 includes one or more processors 620 to execute instructions to perform all or part of the steps of the video processing method described above. Additionally, processing component 602 includes one or more modules that facilitate interaction between processing component 602 and other components. For example, processing component 602 includes a multimedia module to facilitate interaction between multimedia component 608 and processing component 602 .
  • Memory 604 is configured to store various types of data to support operation at electronic device 600 . Examples of such data include instructions for any application or method operating on electronic device 600, contact data, phonebook data, messages, pictures, videos, and the like. Memory 604 is implemented by any type of volatile or non-volatile storage device or combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read only memory
  • EPROM erasable programmable Read Only Memory
  • PROM Programmable Read Only Memory
  • ROM Read Only Memory
  • Magnetic Memory Flash Memory
  • Magnetic or Optical Disk Magnetic Disk
  • Power supply assembly 606 provides power to various components of electronic device 600 .
  • Power component 606 includes a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 600 .
  • Multimedia component 608 includes a screen that provides an output interface between electronic device 600 and the user.
  • the screen includes a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen is implemented as a touch screen to receive input signals from a user.
  • the touch panel includes one or more touch sensors to sense touch, swipe, and gestures on the touch panel. The touch sensor not only senses the boundaries of a touch or swipe action, but also detects the duration and pressure associated with the touch or swipe action.
  • the multimedia component 608 includes a front-facing camera and/or a rear-facing camera. When the electronic device 600 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera receive external multimedia data. Each front and rear camera is a fixed optical lens system or has focal length and optical zoom capability.
  • Audio component 610 is configured to output and/or input audio signals.
  • audio component 610 includes a microphone (MIC) that is configured to receive external audio signals when electronic device 600 is in operating modes, such as call mode, recording mode, and voice recognition mode. The received audio signal is further stored in memory 604 or transmitted via communication component 618 .
  • audio component 610 also includes a speaker for outputting audio signals.
  • I/O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, and the like. These buttons include, but are not limited to: home button, volume buttons, start button, and lock button.
  • Sensor assembly 614 includes one or more sensors for providing status assessment of various aspects of electronic device 600 .
  • the sensor assembly 614 detects the open/closed state of the electronic device 600, the relative positioning of the components, such as the display and keypad of the electronic device 600, the sensor assembly 614 also detects the electronic device 600 or a component of the electronic device 600. Changes in position, presence or absence of user contact with the electronic device 600 , orientation or acceleration/deceleration of the electronic device 600 , and temperature changes in the electronic device 600 .
  • Sensor assembly 614 includes a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact.
  • Sensor assembly 614 also includes a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications.
  • the sensor assembly 614 also includes an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
  • Communication component 618 is configured to facilitate wired or wireless communication between electronic device 600 and other devices.
  • Electronic device 600 is capable of accessing wireless networks based on communication standards, such as WiFi, carrier networks (eg, 2G, 3G, 4G, or 6G), or a combination thereof.
  • the communication component 618 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel.
  • the communication component 618 also includes a near field communication (NFC) module to facilitate short-range communication.
  • the NFC module may be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
  • RFID radio frequency identification
  • IrDA infrared data association
  • UWB ultra-wideband
  • Bluetooth Bluetooth
  • electronic device 600 is implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A programmed gate array (FPGA), controller, microcontroller, microprocessor or other electronic component is implemented for performing the video processing method described above.
  • ASICs application specific integrated circuits
  • DSPs digital signal processors
  • DSPDs digital signal processing devices
  • PLDs programmable logic devices
  • FPGA field programmable A programmed gate array
  • controller microcontroller, microprocessor or other electronic component is implemented for performing the video processing method described above.
  • a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, and the instructions are executed by the processor 620 of the electronic device 600 to complete the above video processing method.
  • the non-transitory computer-readable storage medium is ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.

Abstract

一种视频处理方法及电子设备,涉及视频领域;所述视频处理方法包括:确定目标视频的标识图像,该标识图像包含目标视频的版权信息;在目标视频的所有帧图像中确定目标帧图像;合并标识图像与目标帧图像,得到混合帧图像,生成的混合帧图像用于替换目标视频中的目标帧图像。被添加的版权标识在目标视频中的隐藏效果较好,基本不会对画面产生遮挡,又难以被侵权者发现,降低了被恶意破坏或消除的可能性;处理过程对机器算力及性能要求较低;而且侵权追溯的可靠性较高。

Description

视频处理方法及电子设备
本公开基于申请号为202010815019.7、申请日为2020年8月13日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本公开作为参考。
技术领域
本公开涉及视频领域,尤其涉及视频处理方法及电子设备。
背景技术
现阶段,为实现对视频的版权保护,通常在视频中添加水印等版权标识。在相关技术中,通常在视频的每帧图像的特定位置直接展示版权标识。
发明内容
本公开提供了视频处理方法及电子设备,以降低被恶意破坏或消除的可能性。本公开的技术方案如下:
根据本公开实施例的一方面,提出一种视频处理方法,包括:
确定目标视频的标识图像,所述标识图像包含所述目标视频的版权信息;
在所述目标视频的多个帧图像中确定目标帧图像;
合并所述标识图像与所述目标帧图像,得到混合帧图像,所述混合帧图像用于替换所述目标视频中的所述目标帧图像。
在一些实施例中,所述在所述目标视频的多个帧图像中确定目标帧图像,包括:
将所述多个帧图像确定为所述目标帧图像;或者,
从所述多个帧图像中选取至少一个帧图像作为所述目标帧图像。
在一些实施例中,从所述多个帧图像中选取至少一个帧图像的过程,包括:
在所述多个帧图像中随机选取至少一个帧图像;或者,
在多个候选帧图像中选取至少一个帧图像,所述多个候选帧图像为最接近所述目标视频的结束时刻的预设时间段内的帧图像;或者,
确定所述多个帧图像的图像复杂度,从所述多个帧图像中选取图像复杂度最高或图像复杂度高于预设复杂度的至少一个帧图像。
在一些实施例中,还包括:
确定所述目标帧图像的分辨率;
将所述标识图像的分辨率调整至与所述目标帧图像的分辨率一致。
在一些实施例中,还包括:
对所述标识图像进行视觉弱化处理。
在一些实施例中,所述对所述标识图像进行视觉弱化处理,包括以下至少一种实现方式:
基于预设的透明度值,调整所述标识图像的透明度;和/或,
基于预设的羽化值,调整所述标识图像的边缘羽化程度;和/或,
基于相对于所述目标帧图像的预设缩小比例,调整所述标识图像的图像尺寸。
在一些实施例中,所述合并所述标识图像与所述目标帧图像,得到混合帧图像,包括:
在所述目标帧图像中确定目标区域,所述目标区域与所述标识图像的尺寸相同;
将所述标识图像合并到所述目标帧图像中的所述目标区域中,得到所述混合帧图像。
在一些实施例中,所述在所述目标帧图像中确定目标区域,包括:
将所述目标帧图像中的预设边缘位置确定为所述目标区域;或者,
确定所述目标帧图像中的感兴趣区域ROI,将所述目标帧图像中除所述ROI以外的其他区域确定为所述目标区域。
在一些实施例中,将所述标识图像合并到所述目标帧图像中的所述目标区域中,得到所述混合帧图像,包括:
对于所述目标区域中的每个第一像素点,基于所述第一像素点的像素值和第二像素点的像素值,确定目标像素值,目标像素值为合并所述第一像素点的像素值和所述第二像素点的像素值得到的像素值,所述第二像素点为所述标识图像中与所述第一像素点对应的像素点;
将所述目标帧图像中的所述第一像素点的像素值修改为所述目标像素值,得到所述混合帧图像。
根据本公开实施例的第二方面,提出一种视频处理装置,包括:
标识图像确定模块,被配置为确定目标视频的标识图像,所述标识图像包含所述目标视频的版权信息;
帧图像确定模块,被配置为在所述目标视频的多个帧图像中确定目标帧图像;
图像合并模块,被配置为合并所述标识图像与所述目标帧图像,得到混合帧图像,所述混合帧图像用于替换所述目标视频中的所述目标帧图像。
在一些实施例中,所述帧图像确定模块还被配置为:
将所述多个帧图像确定为所述目标帧图像;或者,
从所述多个帧图像中选取至少一个帧图像作为所述目标帧图像。
在一些实施例中,所述帧图像确定模块还被配置为:
在所述多个帧图像中随机选取至少一个帧图像作为所述目标帧图像;或者,
在多个候选帧图像中选取至少一个帧图像,所述多个候选帧图像为最接近所述目标视频的结束时刻的预设时间段内的帧图像;或者,
确定所述多个帧图像的图像复杂度,从所述多个帧图像中选取图像复杂度最高或图像复杂度高于预设复杂度的至少一个帧图像。
在一些实施例中,还包括:
分辨率确定模块,被配置为确定所述目标帧图像的分辨率;
分辨率调整,被配置为将所述标识图像的分辨率调整至与所述目标帧图像的分辨率一致。
在一些实施例中,还包括:
视觉弱化模块,被配置为对所述标识图像进行视觉弱化处理。
在一些实施例中,所述视觉弱化模块,包括以下至少一个单元:
透明度调整单元,被配置为基于预设的透明度值,调整所述标识图像的透明度;和/或,
羽化值调整单元,被配置为基于预设的羽化值,调整所述标识图像的边缘羽化程度;和/或,
尺寸调整单元,被配置为基于相对于所述目标帧图像的预设缩小比例,调整所述标识图像的图像尺寸。
在一些实施例中,所述图像合并模块,包括:
区域确定单元,被配置为在所述目标帧图像中确定目标区域,所述目标区域与所述标识图像的尺寸相同;
图像合并单元,被配置为将所述标识图像合并到所述目标帧图像中的所述目标区域中,得到所述混合帧图像。
在一些实施例中,所述区域确定单元,被配置为将所述目标帧图像中的预设边缘位置确定为所述目标区域;或者,
确定所述目标帧图像中的感兴趣区域ROI,将所述目标帧图像中除所述ROI以外的 其他区域中确定为所述目标区域。
在一些实施例中,所述图像合并单元,被配置为对于所述目标区域中的每个第一像素点,基于所述第一像素点的像素值和第二像素点的像素值,确定目标像素值,目标像素值为合并所述第一像素点的像素值和所述第二像素点的像素值得到的像素值,所述第二像素点为所述标识图像中与所述第一像素点对应的像素点;
将所述目标帧图像中的所述第一像素点的像素值修改为所述目标像素值,得到所述混合帧图像。
根据本公开实施例的另一方面,提出一种电子设备,包括:
处理器;
用于存储所述处理器可执行指令的存储器;
其中,所述处理器被配置为执行所述指令,以实现如下步骤:
确定目标视频的标识图像,所述标识图像包含所述目标视频的版权信息;
在所述目标视频的多个帧图像中确定目标帧图像;
合并所述标识图像与所述目标帧图像,得到混合帧图像,所述混合帧图像用于替换所述目标视频中的所述目标帧图像。
在一些实施例中,所述处理器被配置为执行所述指令,以实现如下步骤:
将所述多个帧图像确定为所述目标帧图像;或者,
从所述多个帧图像中选取至少一个帧图像作为所述目标帧图像。
在一些实施例中,所述处理器被配置为执行所述指令,以实现如下步骤:
在所述多个帧图像中随机选取至少一个帧图像;或者,
在多个候选帧图像中选取至少一个帧图像,所述多个候选帧图像为最接近所述目标视频的结束时刻的预设时间段内的帧图像;或者,
确定所述多个帧图像的图像复杂度,从所述多个帧图像中选取图像复杂度最高或图像复杂度高于预设复杂度的至少一个帧图像。
在一些实施例中,所述处理器被配置为执行所述指令,以实现如下步骤:
确定所述目标帧图像的分辨率;
将所述标识图像的分辨率调整至与所述目标帧图像的分辨率一致。
在一些实施例中,所述处理器被配置为执行所述指令,以实现如下步骤:
对所述标识图像进行视觉弱化处理。
在一些实施例中,所述处理器被配置为执行所述指令,以实现如下至少一个步骤:
基于预设的透明度值,调整所述标识图像的透明度;
基于预设的羽化值,调整所述标识图像的边缘羽化程度;
基于相对于所述目标帧图像的预设缩小比例,调整所述标识图像的图像尺寸。
在一些实施例中,所述处理器被配置为执行所述指令,以实现如下步骤:
在所述目标帧图像中确定目标区域,所述目标区域与所述标识图像的尺寸相同;
将所述标识图像合并到所述目标帧图像中的所述目标区域中,得到所述混合帧图像。
在一些实施例中,所述处理器被配置为执行所述指令,以实现如下步骤:
将所述目标帧图像中的预设边缘位置确定为所述目标区域;或者,
确定所述目标帧图像中的感兴趣区域ROI,将所述目标帧图像中除所述ROI以外的其他区域确定为所述目标区域。
在一些实施例中,所述处理器被配置为执行所述指令,以实现如下步骤:
对于所述目标区域中的每个第一像素点,基于所述第一像素点的像素值和第二像素点的像素值,确定目标像素值,目标像素值为合并所述第一像素点的像素值和所述第二像素点的像素值得到的像素值,所述第二像素点为所述标识图像中与所述第一像素点对应的像素点;
将所述目标帧图像中的所述第一像素点的像素值修改为所述目标像素值,得到所述混合帧图像。
根据本公开实施例的另一方面,提出一种存储介质,当所述存储介质中的指令由电子设备的处理器执行时,使得电子设备能够执行如下步骤:
确定目标视频的标识图像,所述标识图像包含所述目标视频的版权信息;
在所述目标视频的多个帧图像中确定目标帧图像;
合并所述标识图像与所述目标帧图像,得到混合帧图像,所述混合帧图像用于替换所述目标视频中的所述目标帧图像。
根据本公开实施例的另一方面,提出了一种计算机程序产品,所述计算机程序产品被配置为执行确定目标视频的标识图像,所述标识图像包含所述目标视频的版权信息;
在所述目标视频的多个帧图像中确定目标帧图像;
合并所述标识图像与所述目标帧图像,得到混合帧图像,所述混合帧图像用于替换所述目标视频中的所述目标帧图像。
根据本公开的实施例,将包含版权信息的标识图像与视频中的目标帧图像合并后生成混合帧图像,从而将版权标识添加在目标视频中。因为版权标识被合并在混合帧图像中而 非直接展示在视频画面上方的特定区域,因此隐藏效果较好,观众往往难以察觉其存在,从而基本不会对画面产生遮挡,又难以被侵权者发现,降低了被恶意破坏或消除的可能性。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理,并不构成对本公开的不当限定。
图1是根据本公开的实施例示出的一种视频处理方法流程图;
图2是根据本公开的实施例示出的另一种视频处理方法流程图;
图3是根据本公开的实施例示出的一种目标视频对应的帧图像示意图;
图4是根据本公开的实施例示出的一种图像合并处理过程示意图;
图5是根据本公开的实施例示出的一种视频处理装置框图;
图6是根据本公开的实施例示出的一种电子设备的结构图。
具体实施方式
为了使本领域普通人员更好地理解本公开的技术方案,下面将结合附图,对本公开实施例中的技术方案进行清楚、完整地描述。
需要说明的是,本公开的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下能够互换,以便这里描述的本公开的实施例能够以除了在这里图示或描述的那些以外的顺序实施。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。
为实现对视频的版权保护,通常在视频中添加水印等版权标识,以便于在视频发布后实现对相应的侵权行为的有效追溯。
在相关技术中,通常采用明水印的方式为视频添加版权标识(水印)。其中,明水印是直接将水印展示在视频的每帧图像的左上角、右上角等特定位置,但是,正因为这类水印被无差别展示在每帧图像上,因此包括普通观众和潜在侵权者的所有观众都能够直接观看到该水印而知晓该视频相关的版权信息,进而不仅可能因水印导致画面遮挡而直接影响观众对视频的观看效果,而且侵权者很容易通过画面裁剪或去水印技术消除这类水印。
本公开提出同一种视频处理方法:通过合并携带版权信息的标识图像与目标视频中的目标帧图像,将版权信息添加在混合得到的混合帧图像中,从而将版权标识有效隐藏在混合帧图像中,难以被观众发现。
图1是本说明书一示例性实施例示出的一种是视频处理方法的流程图。如图1所示,该方法应用于终端或服务器等电子设备,包括以下步骤:
步骤102,电子设备确定目标视频的标识图像,所述标识图像包含所述目标视频的版权信息。
在一些实施例中,本公开实施例的执行主体为终端,终端为手机、平板电脑、可穿戴设备、个人计算机等,其中,终端安装有视频处理APP(Application,应用程序),或者,终端运行诸如HTML(HyperText Markup Language,超文本标记语言)5技术实现的在线“客户端”。在一些实施例中,本公开实施例的执行主体为服务器,该服务器包括但不限于于包含一独立主机的物理服务器、主机集群承载的虚拟服务器、云服务器等。上述终端或服务器在运行本公开所述视频处理方法对应的处理程序时,能够为目标视频添加版权信息。
在一些实施例中,电子设备将标识图像与目标视频中的目标帧图像进行合并,得到混合帧图像,该标识图像包含目标视频的版权信息,从而实现在目标视频中添加版权标识,混合帧图像中显示隐藏后的版权信息,因此下文中以“为目标视频添加版权标识”指代上述合并过程,不再单独说明。
在本实施例中,在执行主体为上述终端的情况下,则目标视频为终端拍摄的视频、终端通过视频素材制作的视频、终端从其他设备获取到的视频等;在执行主体为服务器的情况下,则目标视频为终端上传的视频、视频提供服务指定的视频等,本公开对于目标视频的来源及形式并不进行限制。
在一些实施例中,上述标识图像由目标视频的发布方账号提供,例如,发布方账号在制作目标视频时或发布目标视频前为目标视频添加版权标识,也即该标识图像为发布方账号提供的。在一些实施例中,上述标识图像由目标视频的发布平台提供,例如,在发布方账号发布该目标视频的过程中为目标视频添加版权标识,即采用发布方平台提供的统一格式、统一风格的标识图像;或者,对于已经发布的目标视频,发布平台对其进行添加版权标识的后期处理,此时采用系统默认的标识图像。在一些实施例中,上述标识图像由目标视频的发布方账号和发布平台共同提供,例如,在发布方账号发布该目标视频的过程中为目标视频添加版权标识,即电子设备采用发布方平台提供的标识模板结合自身的标识素材 自定义制作标识图像。
在一些实施例中,上述版权信息包括下述至少之一:目标视频的发布方账号的账号信息、发布方账号生成的自定义标识信息、目标视频的发布平台的平台信息。其中,上述账号信息包括账号名称、账号ID(identification,身份标识)中的至少一项等,以便在发布的目标视频中添加包含发布方账号的版权信息,从而有助于实现针对视频发布者(往往是视频制作者)的版权维护。上述自定义标识信息包括发布方账号自定义的特定字符、特定数字、标识性语句等中的至少一项,由发布方账号自定义上述版权信息,即在版权信息中包含特异性的信息,便于提高版权信息的区分度。上述平台信息包括平台名称、平台LOGO(标识语)、平台商标或其他平台相关的标示性信息等中的至少一项,从而在平台所维护的目标视频中添加包含平台方的版权信息,便于实现针对平台的版权维护。
步骤104,电子设备在所述目标视频的所有帧图像中确定目标帧图像。
所有帧图像为多个帧图像;在本实施例中,采用多种方式从目标视频中获取目标帧图像,本公开对此并不进行限制。例如,对于已封装为特定格式的目标视频,对其进行解析处理,得到独立的帧图像,然后从中确定目标帧图像;或者,对于实时视频流形式的目标视频,直接从实时视频流中抽取相应的目标帧图像。
在一些实施例中,目标帧图像的确定方式有多种,作为一示例性实施例,电子设备将目标视频对应的所有帧图像全部确定为目标帧图像,以便增强版权保护的可靠性和稳定性,从而避免侵权者对目标视频进行降帧(又称降格)处理时,将包含版权标识的混合帧图像剔除而导致版权信息消失(因为侵权者通常不会把所有视频帧图像剔除)。作为另一示例性实施,电子设备从所有帧图像中选取至少一个帧图像作为目标帧图像,此时,电子设备仅将部分帧图像作为添加版本标识的目标帧图像,从而有效减少了目标视频中显示版权标识的帧图像的数量占比,有效降低了视频播放过程中版权标识对视频画面的遮挡程度,进而降低了版权标识被普通观众或潜在侵权者发现的可能性。
电子设备通过多种方式从所有帧图像中选取至少一个帧图像作为目标帧图像。在一些实施例中,电子设备在所有帧图像中随机选取至少一个帧图像作为目标帧图像,此时,随机选取过程简单快捷,有效减少了选取目标帧图像所用的时间,有助于加快视频处理的整体速度。
在一些实施例中,电子设备在多个候选帧图像中选取至少一个帧图像,多个候选帧图像为最接近目标视频的结束时刻的预设时间段内的帧图像。由于观众在观看目标视频的过程中,通常在目标视频后段的注意力不如前段的注意力更集中,因此在最接近目标视频的 结束时刻的预设时间段内的所有帧图像中随机选取至少一个帧图像,在观众注意力相对不太集中的目标视频后段选择目标帧图像,有助于降低观众察觉出添加的版权标识的可能性。
例如,多个候选帧图像为结束时刻前的长度为5s时间段内的所有帧图像,或者,多个候选帧图像为结束时刻2s前的长度为2s的时间段内的所有帧图像。
在一些实施例中,电子设备将目标视频的结束时刻的前N秒的时刻对应的视频帧确定为目标帧图像;N可以根据需要进行设置并更改,在本公开实施例中,对N不作具体限定;例如,N为5或者3;则电子设备将目标视频的结束时刻的前5s或前3s的时刻对应的视频帧确定为目标帧图像。
在一些实施例中,电子设备确定所有帧图像的图像复杂度,然后从所有帧图像中选取图像复杂度最高或图像复杂度高于预设复杂度的至少一个帧图像作为目标帧图像。因为观众通常不会过于仔细的观察元素较为复杂的视频画面,因此将版权标识添加在图像复杂度较高的帧图像中,从而能够降低观众察觉出添加的版权标识的可能性。
在一些实施例中,电子设备在目标视频除首帧以外的其他帧图像中选择至少一个帧图像作为目标帧图像;由于观众对首帧图像的观察最仔细,将版本标识添加到其他帧图像中,从而能够降低观众察觉出添加的版权标识的可能性。
在一些实施例中,电子设备在确定出目标帧图像后,按照目标帧图像的图像参数对标识图像进行相应的处理。电子设备先确定目标帧图像的分辨率,然后将标识图像的分辨率调整至与目标帧图像的分辨率一致,从而能够保证二者的分辨率一致,提高混合帧图像的真实性。
在一些实施例中,电子设备对标识图像进行特效处理,从而进一步保证添加的版权标识不被观众所察觉。其中,特效处理包括视觉弱化处理;则电子设备对标识图像进行视觉弱化处理。
在一些实施例中,电子设备对标识图像进行特效处理的过程包括:电子设备按照预设的透明度值,调整标识图像的透明度,从而使合并后的混合帧图像中的版权标识处于半透明状态,从而更好的隐藏在正常显示的图像内容中。其中,电子设备按照预设透明度,调整标识图像的透明度是指以预设透明度为基准,也即是基于预设的透明度,将标识图像的透明度调整为预设的透明度值。
在一些实施例中,电子设备对标识图像进行特效处理的过程包括:电子设备按照预设的羽化值,调整标识图像的边缘羽化程度,从而模糊版权标识与其周围正常画面之间的标 识边界,进一步降低版权标识的可感知程度。其中,电子设备按照预设的羽化值,调整标识图像的边缘羽化程度是指以预设的羽化值为基准,也即是基于预设的羽化值,将标识图像的边缘羽化程度调整为预设的羽化值。
在一些实施例中,电子设备按照相对于目标帧图像的预设缩小比例,调整标识图像的图像尺寸,从而保证添加后的版权标识仅显示在混合帧图像对应画面中的极小区域内,减少了对画面的遮挡并降低被观众觉察到的可能。其中,电子设备按照预设缩小比例,调整标识图像的图像尺寸是指以预设缩小比例为基准,也即是基于预设缩小比例,将标识图像的图像尺寸调整为目标帧图像的该预设缩小比例。例如,预设缩小比例为1/10,则电子设备将标识图像的图像尺寸调整为目标帧图像的1/10。
步骤106,电子设备合并所述标识图像与所述目标帧图像,得到混合帧图像,所述混合帧图像用于替换所述目标视频中的所述目标帧图像。
在一些实施例中,电子设备将标识图像合并到目标帧图像的任一区域;在一些实施例中,电子设备先在目标帧图像中确定目标区域,该目标区域即为添加后的版权标识在混合帧图像中所处的区域,目标区域与标识图像的尺寸相同,将标识图像合并到目标帧图像中的目标区域中,得到混合帧图像。
在一些实施例中,电子设备将目标帧图像中的预设边缘位置确定为目标区域,其中,上述预设边缘位置为图像某条边的中心位置,或者为图像某个角的预设位置,本公开对此并不进行限制。在本公开实施例中,电子设备直接按照预设边缘位置确定目标区域,有助于简化目标区域的确定过程,加快合并处理的速度。
在一些实施例中,电子设备确定目标帧图像中的ROI(region of interest,感兴趣区域),在区别于该ROI的其他区域中确定目标区域;其中,区别与该ROI的其他区域为除ROI以外的其他区域,电子设备在区别于该ROI的其他区域中确定目标区域的步骤为:电子设备将目标帧图像中除ROI以外的其他区域确定为目标区域。在本公开实施例中,电子设备通过确定ROI保证了目标区域处于ROI之外,进而保证了被添加的版权标识处于混合帧图像中的ROI之外,即不处于观众感兴趣的区域,因此进一步降低了版权标识被观众察觉出的概率。
在一些实施例中,混合帧图像中的目标区域包含混合像素点(Pixels),通过下述方式实现标识图像与目标帧图像的合并:电子设备根据目标帧图像中对应于混合像素点的第一像素点的颜色值,以及标识图像中对应于混合像素点的第二像素点的颜色值,计算混合像素点的颜色值,然后使用混合像素点替换位于目标区域中相应位置处的第一像素点,以 与目标帧图像中位于目标区域之外的原有像素点构成混合帧图像。上述混合像素点的颜色值被根据目标帧图像的第一像素点的颜色值和标识图像中的像素点的颜色值计算得到,因此能够呈现出版权标识融合在目标帧图像的原有画面内容中的显示效果,从而版权标识既会被显示在混合帧图像中又不会显示的过于明显。其中,上述任一像素点的颜色值即为该像素点在预设色彩空间中的取值,该预设色彩空间为灰度空间(此时颜色值为灰度值),为RGB(Red Green Blue,红绿蓝)空间(此时颜色值为RGB三通道值),或者为YUV空间(此时颜色值为YUV三通道值)等,不再赘述。
其中,颜色值是指像素值,也即对于目标区域中的每个第一像素点,电子设备基于第一像素点的像素值和第二像素点的像素值,确定目标像素值,目标像素值为合并第一像素点的像素值和第二像素点的像素值得到的像素值,第二像素点为所述标识图像中与所述第一像素点对应的像素点;将所述目标帧图像中的所述第一像素点的像素值修改为所述目标像素值,得到所述混合帧图像。
根据本公开的实施例,将包含版权信息的标识图像与视频中的目标帧图像合并后,得到混合帧图像,从而将版权标识添加在目标视频中。因为版权标识被合并在混合帧图像中而非直接展示在视频画面上方的特定区域,因此隐藏效果较好,观众往往难以察觉其存在,从而基本不会对画面产生遮挡,又难以被侵权者发现,降低了被恶意破坏或消除的可能性。因为是直接将标识图像与目标帧图像进行合并而无需进行复杂的FFT或逆向FFT处理,所以处理过程对机器算力及性能要求较低;而且即便对混合帧图像进行重新编码或色彩调整等后期处理,也不会消除其中的版权标识,从而侵权追溯的可靠性较高。
下面结合图2-4对在目标视频中添加版权标识的过程进行详细说明。图2是根据本公开的实施例示出的另一种视频处理方法流程图;如图2所示,该方法包括:
步骤202,电子设备确定待处理的目标视频。
本公开所述的视频处理方法涉及到的目标视频即为需要进行版权保护(需要添加版权标识)的视频,其为实时视频流对应的视频(如直播视频等),或者为已经制作完成并按预设格式封装的完整视频,如被发布的短视频、摄影片段、电视剧、电影等,本公开实施例中并不对此进行限制。
步骤204,电子设备确定待合并的标识图像。
在一些实施例中,标识图像由目标视频的发布方账号和发布平台中的至少一方提供。例如,发布方账号在制作目标视频的过程中为目标视频添加版权标识,此时其自身将预先制作完成的包含版权信息的图像作为上述标识图像;或者,在向发布平台发布该目标视频 的过程中为目标视频添加版权标识,此时其将自身预先制作完成或从其他设备处获取的包含版权信息的图像作为上述标识图像,或者使用发布平台统一提供的标识图像或提供的标识素材自定义制作标识图像。
其中,上述版权信息包括下述至少之一:目标视频的发布方账号的账号信息、发布方账号生成的自定义标识信息、目标视频的发布平台的平台信息。上述账号信息包括账号名称、账号ID等中的至少一项。上述自定义标识信息包括发布方账号自定义的特定字符、特定数字、标识性语句等。上述平台信息包括平台名称、平台LOGO、平台商标或其他平台相关的标示性信息等中的至少一项,从而在平台所维护的目标视频中添加包含平台方的版权信息,便于实现针对平台的版权维护,本公开对于上述信息的内容并不进行限制。
步骤206,电子设备选取目标视频中的目标帧图像。
电子设备确定目标视频后,需要确定其中的目标帧图像,该目标帧图像被用于与标识图像合并,得到混合帧图像(即被用于添加版权标识)。通常情况下,目标视频包括多个帧图像,例如,播放时长1min、播放帧率25帧/s的目标视频,目标视频的帧图像为60s×25帧/s=1500个,从目标视频中确定目标帧图像的过程,即为在目标视频对应的所有帧图像中确定用于添加版权标识的至少一个目标帧图像的过程。目标视频对应的所有帧图像是指目标视频的多个帧图像。
以图3所示的一种目标视频对应的帧图像示意图为例,按照目标视频的播放时间顺序,目标视频依次对应于P1、P2、...Pi...Pn共n个帧图像,下面结合图3对确定目标视频的过程进行说明:
在一些实施例中,电子设备将图3中的所有帧图像(P1-Pn)均确定为目标帧图像,从而增强版权保护的可靠性和稳定性,避免侵权者对视频进行降格处理时将包含版权标识的混合帧图像剔除而导致版权信息消失。
在一些实施例中,电子设备在所有帧图像中随机选取部分帧图像作为目标帧图像,如仅选取P1-Pn中的其中一个帧图像Pi,或选取其中的多个帧图像P3-Pi等,从而能够减少目标视频中显示版权标识的帧图像的数量占比,将所有帧图像中的部分帧图像作为目标帧图像,以便降低视频播放过程中版权标识对视频画面的遮挡程度,并减少版权标识被观众或潜在侵权者发现的可能性。
在一些实施例中,电子设备在多个候选帧图像中选取至少一个帧图像,多个候选帧图像为最接近视频的结束时刻的预设时间段内的所有帧图像;例如,多个候选帧图像为在Pn对应时刻tn的前5s至Pn对应的时刻tn的5s时长(即时间段[tn-5s,tn])内对应的所有 帧图像。
在一些实施例中,电子设备依次确定目标视频对应的所有帧图像(P1-Pn)的图像复杂度,或者依次确定目标视频对应的某时间段内所有帧图像(如Pi-Pn)的图像复杂度,然后从上述所有帧图像中选取图像复杂度最高或图像复杂度高于预设复杂度的至少一个帧图像作为目标帧图像,从而将版权标识添加在图像复杂度较高的帧图像中,以降低观众察觉出添加的版权标识的可能性。
其中,电子设备通过内容识别算法,计算出表征图像复杂度的复杂度值:该复杂度值与帧图像中的对象个数或者相邻对象边界的颜色梯度值呈正相关,如帧图像中的对象个数越多或者相邻对象边界的颜色梯度值越大,则表明该帧图像的图像复杂度越高;反之,若帧图像中的对象个数越少或者相邻对象边界的颜色梯度值越小,则表明该帧图像的图像复杂度越低。例如,帧图像P1和Pi的前景均为相同的人物图像,背景分别为大片的树叶和单色的墙壁,此时P1的图像复杂度高于Pi的图像复杂度,则选择P1作为目标帧图像(或者进一步对比P1与其他帧图像的图像复杂度,并确定最终的目标帧图像)。
其中,上述随机选取的规则为等间隔选取,如依次选取P1、P3、P5...,或者依次选取P1、P6、P11...等;或者,选取间隔相同的连续帧图像,如依次选取P1、P2、P3、P11、P12、P13...等,从而尽量避免降帧带来的影响,在此不再赘述。
上述步骤202-206仅是示例性的,根据实际场景,按照步骤202-206-204的顺序,或者步骤204-202-206的顺序执行上述步骤,即本公开对于确定标识图像和目标帧图像的先后顺序并不进行限制。
步骤208,电子设备调整标识图像的分辨率。
在一些实施例中,电子设备直接合并标识图像和目标帧图像;在一些实施例中,电子设备在合并标识图像和目标帧图像之前,先调整标识图像的分辨率,将保证标识图像和目标帧图像的分辨率调整为一致的,因此在确定出目标帧图像后,电子设备先确定目标帧图像的分辨率,然后将标识图像的分辨率调整至与目标帧图像的分辨率相同。
例如,标识图像的分辨率为720ppi(Pixels Per Inch,每英寸像素数,又称像素密度),而目标帧图像的分辨率为300ppi,则电子设备将标识图像的分辨率调整为300ppi,以便于后续图像合并。上述分辨率调整基于诸如差动算法或超分辨率算法等技术,此处不再赘述。
步骤210,电子设备调整标识图像的特效。
电子设备对标识图像进行特效处理,从而保证添加的版权标识不被观众所察觉。其中, 特效处理包括视觉弱化处理;则电子设备对标识图像进行视觉弱化处理。
在一些实施例中,电子设备按照预设的透明度值,调整标识图像的透明度;其中,电子设备按照预设透明度,调整标识图像的透明度是指以预设的透明度为基准,也即是基于预设的透明度,将标识图像的透明度调整为预设的透明度值。例如,预设的透明度为50%或者30%,则电子设备将标识图像的透明度调整至50%或30%等,从而保证合并后的混合帧图像中的版权标识处于半透明状态,从而将其有效地隐藏在正常显示的图像内容中。
在一些实施例中,电子设备按照预设的羽化值,调整标识图像的边缘羽化程度;其中,电子设备按照预设的羽化值,调整标识图像的边缘羽化程度是指以预设的羽化值为基准,也即是基于预设的羽化值,将标识图像的边缘羽化程度调整为预设的羽化值。上述羽化值为羽化半径,例如将标识图像的羽化半径甚至为10个像素或者15个像素等,从而模糊版权标识与其周围正常画面之间的标识边界,降低版权标识的可感知程度。
在一些实施例中,电子设备按照相对于目标帧图像的预设缩小比例,调整标识图像的图像尺寸;其中,电子设备按照预设缩小比例,调整标识图像的图像尺寸是指以预设缩小比例为基准,也即是基于预设缩小比例,将标识图像的图像尺寸调整为目标帧图像的该预设缩小比例。例如,标识图像的图像尺寸为480*640pix,目标帧图像的图像尺寸为480*720pix,目标帧图像对应的预设缩小比例为1/10,则需要将标识图像的图像尺寸调整至48*72pix,使得调整后的标识图像的长和宽分别为目标帧图像对应长和宽的1/10。在一些实施例中,上述预设缩小比例以图像面积为基准,如将标识图像的面积调整为目标帧图像的1/100、1/200等,本公开并不对此进行限制。通过上述尺寸调整,保证了添加后的版权标识仅显示在混合帧图像对应画面中的极小区域内,从而降低对画面的遮挡及被观众觉察到的可能性。
在上述实施例中,预设的透明度、羽化值、缩小比例等参数根据需要具体场景进行设置并更改;例如,预设的透明度、羽化值、缩小比例等参数根据图像尺寸、分辨率、显示效果等进行设置,本公开并不对此进行限制。另外,除调整透明度、羽化值、图像尺寸外,电子设备还能够针对标识图像进行其他参数或特效的调整。而且,针对同一标识图像,上述特效调整仅使用其中任意一种,或者按照一种或多种预设顺序同时使用多种,在此不再赘述。
步骤212,电子设备确定目标帧图像中的目标区域。
在一些实施例中,电子设备将标识图像合并到目标帧图像的任一区域;在一些实施例中,电子设备先在目标帧图像中确定目标区域,该目标区域即为添加后的版权标识在混合 帧图像中所处的区域,目标区域的尺寸与标识图像的尺寸相同。其中,标识图像为矩形图像或者为非矩形的其他形状,如不包含背景的平台LOGO对应的不规则形状等,本公开并不对此进行限制。为便于描述,下述实施例均以形状为矩形的标识图像为例进行说明。
在一些实施例中,电子设备将目标帧图像中的预设边缘位置确定为目标区域,从而简化目标区域的确定过程以加快合并处理速度。其中,上述预设边缘位置为图像上边缘的中心位置处、下边缘的中心位置处、图像右边缘的上方相对于边缘长度1/4位置处、图像右下角相对于边缘长度1/10位置处等,与相应边缘的间距为1mm、10pix等,因为确定的目标区域具有相应的边界,因此为保证目标区域位于目标帧图像的图像区域中,在确定上述目标区域时需要适当调整目标区域的中心点位置,具体过程不再赘述。
在一些实施例中,电子设备先确定目标帧图像中的ROI,然后在区别于ROI的其他区域中确定目标区域。其中,区别与该ROI的其他区域为除ROI以外的其他区域,电子设备在区别于该ROI的其他区域中确定目标区域的步骤为:电子设备将目标帧图像中除ROI以外的其他区域确定为目标区域。其中,采用诸如ROI-Pooling、ROI-align、Deformable ROI pooling等ROI提取算法实现对ROI的确定,具体过程此处不再赘述。例如,在前景为人像,背景为远处的景色的目标帧图像中,电子设备将目标区域确定在背景对应的画面区域中。因为观众在观看视频时通常会将注意力集中在画面中的ROI,而对非ROI的细节不甚关注,因此将目标区域选在区别于ROI的其他区域中,有助于进一步提高被添加的版权标识在目标视频中的隐藏效果,降低版权标识被观众察觉出的可能性。
在一些实施例中,电子设备按照目标帧图像中画面内容的复杂度,将目标区域确定在画面内容复杂度较高的区域(画面内容繁多复杂的区域)。例如,在目标帧图像的画面中存在蓝色的天空和形状复杂的白云的情况下,显然白云所对应画面区域的复杂度高于天空所对应画面区域的复杂度,故此时在白云所对应的画面区域中确定目标区域。
在一些实施例中,电子设备还能够根据颜色深浅、区域大小等多种因素确定目标帧图像中的目标区域,或者电子设备根据目标区域中的对象形状,调整目标帧图像的形状或旋转角度等,在此不再一一赘述。在一些实施例中,对于播放时长和帧率已确定的目标视频,其所包含的帧图像数据也是确定的,因此,所有帧图像中的目标帧图像占比越高,即越多帧图像中包含版权标识,则版权标识被观众发现的可能性也相对越高。但是,因为视频播放的帧率相对于人眼识别速度来说较快,因此仅选取一个帧图像作为目标帧图像添加版权标识,或者在存在多个目标帧图像的情况下,通过令相邻目标帧图像中的目标区域分别位于不同位置的方式,保证目标视频播放过程中版权标识的位置一直处于变动之中,从而降 低版权标识被察觉到的概率。换言之,上述目标帧图像的数目越少、相邻目标帧图像中目标区域的位置变动越大,版权标识被识别出的概率也相应的越低。因此,上述目标帧图像的数目和目标帧图像中目标区域的位置根据实际场景进行确定,从而保证更好的版权标识隐藏效果。
步骤214,电子设备将标识图像与目标帧图像合,得到混合帧图像。
电子设备将标识图像与目标帧图像中目标区域对应的画面进行合并,包括:电子设备根据目标区域对应的目标帧图像中的第一像素点的颜色值和标识图像中相应位置的像素点的颜色值,计算目标区域中相应位置处混合像素点的颜色值。其中,上述任一像素点的颜色值即为该像素点在预设色彩空间中的取值,如灰度值、RGB值、YUV值、亮度值等中的至少一项,本公开对此并不进行限制。
在一些实施例中,对于目标区域中的任一混合像素点Xi,电子设备通过计算平均颜色值的方式计算得到其对应的颜色值:电子设备计算Xi对应的第一像素点Xi_1的颜色值和其对应的第二像素点Xi_2的颜色值之间的算术平均值,将该算术平均值作为任一混合像素点Xi的颜色值;在一些实施例中,电子设备通过计算预设权重的加权平均值,计算得到其对应的颜色值,不再赘述。以RGB值为例,对于任一混合像素点Xi,电子设备分别计算其在R、G、B通道的颜色分量,然后将三个分量合并为该像素点的RGB颜色值,其他颜色值类似,不再赘述。
通过上述计算得到对应于目标帧图像在目标区域中的每个第一像素点分别对应的混合像素点,用各个混合像素点分别替换对应位置处的第一像素点,替换后的目标区域中的混合像素点与目标区域之外的原有像素点共同构成混合帧图像。
其中,颜色值是指像素值,也即对于目标区域中的每个第一像素点,电子设备基于第一像素点的像素值和第二像素点的像素值,确定目标像素值,目标像素值为合并第一像素点的像素值和第二像素点的像素值得到的像素值,第二像素点为所述标识图像中与所述第一像素点对应的像素点;将所述目标帧图像中的所述第一像素点的像素值修改为所述目标像素值,得到所述混合帧图像。
以图4为例,图4(a)为目标帧图像的示意图,其中目标帧图像400a包括ROI 401a(图像前景的人像区域)和非ROI 402a(图像背景的建筑区域),此时,在非ROI 402a中通过上述方式确定出目标区域403a。图4(b)中的标识图像401b(包括五角星形状的版权标识,或者为文字、字符等形式)经过透明度调整、羽化值调整、尺寸调整等特效处理后得到标识图像402b。将标识图像402b与目标帧图像400a合并(即将标识图像402b与目标 区域403a对应的画面进行合并)后,得到混合帧图像400c,其中的ROI 401c与ROI 401a完全相同,非ROI 402b的目标区域403c的画面,由合并后得到的混合像素点构成,其中包含被添加的五角星形状的版权标识404c;在一些实施例中,在目标帧图像中显示目标图像时,并不会显示图中所示目标区域403c边界的虚线框。
一方面,该版权标识仅显示在观众的非感兴趣区域中,而且在视频播放时仅一闪而过,因此难以被观众发现;另一方面,该版权标识是进过经过透明度调整和/或羽化值调整等特效处理后合并得到的不明显的标识,因此更加难以被发现。
步骤216,电子设备使用混合帧图像替换目标帧图像。
电子设备将目标视频中的该目标帧图像删除,将该混合帧图像添加到目标帧图像所在的位置。在本公开实施例中,使用上述混合帧图像替换目标视频中的目标帧图像,从而实现为目标视频添加版权标识的目的。如前所述,目标视频中添加的版权标识在目标视频播放过程中一闪而过,而不会固定展示在某位置,而且是经过特效处理的不明显标识,因此难以被观众发现。
在一些实施例中,对于上述目标帧图像和合并位置与目标视频的视频信息对应的存档记录,以便在针对疑似侵权视频进行侵权判定时,直接按照上述目标帧图像和合并位置在疑似侵权视频的相应位置处查看是否存在被添加的版权标识。或者对疑似侵权视频的每一个帧图像都放大检测或进行内容识别以检测其中是否存在版权标识,进而判断疑似侵权视频是否确实侵权。
与前述视频处理方法的实施例相对应地,本公开还提出了视频处理装置的实施例。
图5是根据本公开的实施例示出的一种视频处理装置的示意框图。本实施例所示的视频处理装置适用于视频处理应用,所述应用适用于终端或服务器,所述终端包括但不限于手机、平板电脑、可穿戴设备、个人计算机等电子设备,所述视频处理应用是安装在终端中的应用程序,或者是采用诸如HTML5技术提供的在线“客户端”,用户通过该视频处理应用通过上述方法为目标视频添加版权信息;所述服务器包括但不限于包含一独立主机的物理服务器、主机集群承载的虚拟服务器、云服务器等。
如图5所示,所述视频处理装置包括:
标识图像确定模块501,被配置为确定目标视频的标识图像,所述标识图像包含所述目标视频的版权信息;
帧图像确定模块502,被配置为在所述目标视频的多个帧图像中确定目标帧图像;
图像合并模块503,被配置为合并所述标识图像与所述目标帧图像,得到混合帧图像, 所述混合帧图像用于替换所述目标视频中的所述目标帧图像。
在一些实施例中,所述帧图像确定模块502还被配置为:
将所述多个帧图像确定为所述目标帧图像;或者,
从所述多个帧图像中选取至少一个帧图像作为所述目标帧图像。
在一些实施例中,所述帧图像确定模块502还被配置为:
在所述多个帧图像中随机选取至少一个帧图像作为所述目标帧图像;或者,
在多个候选帧图像中选取至少一个帧图像,所述多个候选帧图像为最接近所述目标视频的结束时刻的预设时间段内的帧图像;或者,
确定所述多个帧图像的图像复杂度,从所述多个帧图像中选取图像复杂度最高或图像复杂度高于预设复杂度的至少一个帧图像。
在一些实施例中,还包括:
分辨率确定模块504,被配置为确定所述目标帧图像的分辨率;
分辨率调整模块505,被配置为将所述标识图像的分辨率调整至与所述目标帧图像的分辨率一致。
在一些实施例中,还包括:
视觉弱化模块506,被配置为执行对所述标识图像进行视觉弱化处理。
在一些实施例中,视觉弱化模块504,包括以下至少一个单元:
透明度调整单元,被配置为基于预设的透明度值,调整所述标识图像的透明度;
羽化值调整单元,被配置为基于预设的羽化值,所述标识图像的边缘羽化程度;
尺寸调整单元,被配置为基于相对于所述目标帧图像的预设缩小比例,调整所述标识图像的图像尺寸。
在一些实施例中,图像合并模块503,包括:
区域确定单元,被配置为在所述目标帧图像中确定目标区域,所述目标区域与所述标识图像的尺寸相同;
图像合并单元,被配置为将所述标识图像合并到所述目标帧图像中的所述目标区域中,得到所述混合帧图像。
区域确定单元,被配置为将所述目标帧图像中的预设边缘位置确定为所述目标区域;或者,
确定所述目标帧图像中的感兴趣区域ROI,将所述目标帧图像中除所述ROI以外的其他区域确定为所述目标区域。
在一些实施例中,所述图像合并单元,被配置为对于所述目标区域中的每个第一像素点,基于所述第一像素点的像素值和第二像素点的像素值,确定目标像素值,目标像素值为合并所述第一像素点的像素值和所述第二像素点的像素值得到的像素值,所述第二像素点为所述标识图像中与所述第一像素点对应的像素点;
将所述目标帧图像中的所述第一像素点的像素值修改为所述目标像素值,得到所述混合帧图像。
本公开的实施例还提出一种电子设备,包括:
处理器;
用于存储所述处理器可执行指令的存储器;
其中,所述处理器被配置为执行所述指令,以实现如上述任一实施例所述的视频处理方法。
本公开的实施例还提出一种存储介质,当所述存储介质中的指令由电子设备的处理器执行时,使得电子设备能够执行上述任一实施例所述的视频处理方法。
本公开的实施例还提出一种计算机程序产品,所述计算机程序产品被配置为执行上述任一实施例所述的视频处理方法。
图6是根据本公开的实施例示出的一种电子设备的示意框图。例如,电子设备600是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。
参照图6,电子设备600包括以下一个或多个组件:处理组件602,存储器604,电源组件606,多媒体组件608,音频组件610,输入/输出(I/O)的接口612,传感器组件614,以及通信组件618。
处理组件602通常控制电子设备600的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件602包括一个或多个处理器620来执行指令,以完成上述视频处理方法的全部或部分步骤。此外,处理组件602包括一个或多个模块,便于处理组件602和其他组件之间的交互。例如,处理组件602包括多媒体模块,以方便多媒体组件608和处理组件602之间的交互。
存储器604被配置为存储各种类型的数据以支持在电子设备600的操作。这些数据的示例包括用于在电子设备600上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器604由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM), 可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
电源组件606为电子设备600的各种组件提供电力。电源组件606包括电源管理系统,一个或多个电源,及其他与为电子设备600生成、管理和分配电力相关联的组件。
多媒体组件608包括在电子设备600和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件608包括一个前置摄像头和/或后置摄像头。当电子设备600处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头接收外部的多媒体数据。每个前置摄像头和后置摄像头是一个固定的光学透镜系统或具有焦距和光学变焦能力。
音频组件610被配置为输出和/或输入音频信号。例如,音频组件610包括一个麦克风(MIC),当电子设备600处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号被进一步存储在存储器604或经由通信组件618发送。在一些实施例中,音频组件610还包括一个扬声器,用于输出音频信号。
I/O接口612为处理组件602和外围接口模块之间提供接口,上述外围接口模块是键盘,点击轮,按钮等。这些按钮包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。
传感器组件614包括一个或多个传感器,用于为电子设备600提供各个方面的状态评估。例如,传感器组件614检测到电子设备600的打开/关闭状态,组件的相对定位,例如所述组件为电子设备600的显示器和小键盘,传感器组件614还检测电子设备600或电子设备600一个组件的位置改变,用户与电子设备600接触的存在或不存在,电子设备600方位或加速/减速和电子设备600的温度变化。传感器组件614包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件614还包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件614还包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件618被配置为便于电子设备600和其他设备之间有线或无线方式的通信。电子设备600能够接入基于通信标准的无线网络,如WiFi,运营商网络(如2G、3G、4G或6G),或它们的组合。在一个示例性实施例中,通信组件618经由广播信道接收来自外部 广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件618还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。
在本公开一实施例中,电子设备600被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述视频处理方法。
在本公开一实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器604,上述指令由电子设备600的处理器620执行以完成上述视频处理方法。例如,所述非临时性计算机可读存储介质是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。
本领域技术人员在考虑说明书及实践这里公开的公开后,将容易想到本公开的其它实施方案。本公开旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。
需要说明的是,在本公开中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
以上对本公开实施例所提供的方法和装置进行了详细介绍,本文中应用了具体个例对本公开的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本公开的方法及其核心思想;同时,对于本领域的一般技术人员,依据本公开的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本公开的限制。
本公开所有实施例均能够单独被执行,也能够与其他实施例相结合被执行,均视为本 公开要求的保护范围。

Claims (29)

  1. 一种视频处理方法,包括:
    确定目标视频的标识图像,所述标识图像包含所述目标视频的版权信息;
    在所述目标视频的多个帧图像中确定目标帧图像;
    合并所述标识图像与所述目标帧图像,得到混合帧图像,所述混合帧图像用于替换所述目标视频中的所述目标帧图像。
  2. 根据权利要求1所述的方法,其中,所述在所述目标视频的多个帧图像中确定目标帧图像,包括:
    将所述多个帧图像确定为所述目标帧图像;或者,
    从所述多个帧图像中选取至少一个帧图像作为所述目标帧图像。
  3. 根据权利要求2所述的方法,其中,从所述多个帧图像中选取至少一个帧图像的过程,包括:
    在所述多个帧图像中随机选取至少一个帧图像;或者,
    在多个候选帧图像中选取至少一个帧图像,所述多个候选帧图像为最接近所述目标视频的结束时刻的预设时间段内的帧图像;或者,
    确定所述多个帧图像的图像复杂度,从所述多个帧图像中选取图像复杂度最高或图像复杂度高于预设复杂度的至少一个帧图像。
  4. 根据权利要求1所述的方法,其中,还包括:
    确定所述目标帧图像的分辨率;
    将所述标识图像的分辨率调整至与所述目标帧图像的分辨率一致。
  5. 根据权利要求1所述的方法,其中,还包括:
    对所述标识图像进行视觉弱化处理。
  6. 根据权利要求5所述的方法,其中,所述对所述标识图像进行视觉弱化处理,包括以下至少一种实现方式:
    基于预设的透明度值,调整所述标识图像的透明度;
    基于预设的羽化值,调整所述标识图像的边缘羽化程度;
    基于相对于所述目标帧图像的预设缩小比例,调整所述标识图像的图像尺寸。
  7. 根据权利要求1所述的方法,其中,所述合并所述标识图像与所述目标帧图像,得到混合帧图像,包括:
    在所述目标帧图像中确定目标区域,所述目标区域与所述标识图像的尺寸相同;
    将所述标识图像合并到所述目标帧图像中的所述目标区域中,得到所述混合帧图像。
  8. 根据权利要求7所述的方法,其中,所述在所述目标帧图像中确定目标区域,包括:
    将所述目标帧图像中的预设边缘位置确定为所述目标区域;或者,
    确定所述目标帧图像中的感兴趣区域ROI,将所述目标帧图像中除所述ROI以外的其他区域确定为所述目标区域。
  9. 根据权利要求7所述的方法,其中,所述将所述标识图像合并到所述目标帧图像中的所述目标区域中,得到所述混合帧图像,包括:
    对于所述目标区域中的每个第一像素点,基于所述第一像素点的像素值和第二像素点的像素值,确定目标像素值,目标像素值为合并所述第一像素点的像素值和所述第二像素点的像素值得到的像素值,所述第二像素点为所述标识图像中与所述第一像素点对应的像素点;
    将所述目标帧图像中的所述第一像素点的像素值修改为所述目标像素值,得到所述混合帧图像。
  10. 一种视频处理装置,包括:
    标识图像确定模块,被配置为确定目标视频的标识图像,所述标识图像包含所述目标视频的版权信息;
    帧图像确定模块,被配置为在所述目标视频的多个帧图像中确定目标帧图像;
    图像合并模块,被配置为合并所述标识图像与所述目标帧图像,得到混合帧图像,所述混合帧图像用于替换所述目标视频中的所述目标帧图像。
  11. 根据权利要求10所述的装置,其中,所述帧图像确定模块还被配置为:
    将所述多个帧图像确定为所述目标帧图像;或者,
    从所述多个帧图像中选取至少一个帧图像作为所述目标帧图像。
  12. 根据权利要求11所述的装置,其中,所述帧图像确定模块还被配置为:
    在所述多个帧图像中随机选取至少一个帧图像作为所述目标帧图像;或者,
    在多个候选帧图像中选取至少一个帧图像,所述多个候选帧图像为最接近所述目标视频的结束时刻的预设时间段内的帧图像;或者,
    确定所述多个帧图像的图像复杂度,从所述多个帧图像中选取图像复杂度最高或图像复杂度高于预设复杂度的至少一个帧图像。
  13. 根据权利要求10所述的装置,其中,还包括:
    分辨率确定模块,被配置为确定所述目标帧图像的分辨率;
    分辨率调整模块,被配置为将所述标识图像的分辨率调整至与所述目标帧图像的分辨率一致。
  14. 根据权利要求10所述的装置,其中,还包括:
    视觉弱化模块,被配置为对所述标识图像进行视觉弱化处理。
  15. 根据权利要求14所述的装置,其中,所述视觉弱化模块,包括以下至少一个单元:
    透明度调整单元,被配置为基于预设的透明度值,调整所述标识图像的透明度;
    羽化值调整单元,被配置为基于预设的羽化值,调整所述标识图像的边缘羽化程度;
    尺寸调整单元,被配置为基于相对于所述目标帧图像的预设缩小比例,调整所述标识图像的图像尺寸。
  16. 根据权利要求10所述的装置,其中,所述图像合并模块,包括:
    区域确定单元,被配置为在所述目标帧图像中确定目标区域,所述目标区域与所述标识图像的尺寸相同;
    图像合并单元,被配置为将所述标识图像合并到所述目标帧图像中的所述目标区域中,得到所述混合帧图像。
  17. 根据权利要求16所述的装置,其中,所述区域确定单元,被配置为将所述目标帧图像中的预设边缘位置确定为所述目标区域;或者,
    确定所述目标帧图像中的感兴趣区域ROI,将所述目标帧图像中除所述ROI以外的其他区域确定为所述目标区域。
  18. 根据权利要求16所述的装置,其特征在于,所述图像合并单元,被配置为对于所述目标区域中的每个第一像素点,基于所述第一像素点的像素值和第二像素点的像素值,确定目标像素值,目标像素值为合并所述第一像素点的像素值和所述第二像素点的像素值得到的像素值,所述第二像素点为所述标识图像中与所述第一像素点对应的像素点;
    将所述目标帧图像中的所述第一像素点的像素值修改为所述目标像素值,得到所述混合帧图像。
  19. 一种电子设备,包括:
    处理器;
    用于存储所述处理器可执行指令的存储器;
    其中,所述处理器被配置为执行所述指令,以实现如下步骤:
    确定目标视频的标识图像,所述标识图像包含所述目标视频的版权信息;
    在所述目标视频的多个帧图像中确定目标帧图像;
    合并所述标识图像与所述目标帧图像,得到混合帧图像,所述混合帧图像用于替换所述目标视频中的所述目标帧图像。
  20. 根据权利要求19所述的电子设备,其中,所述处理器被配置为执行所述指令,以实现如下步骤:
    将所述多个帧图像确定为所述目标帧图像;或者,
    从所述多个帧图像中选取至少一个帧图像作为所述目标帧图像。
  21. 根据权利要求20所述的电子设备,其中,所述处理器被配置为执行所述指令,以实现如下步骤:
    在所述多个帧图像中随机选取至少一个帧图像;或者,
    在多个候选帧图像中选取至少一个帧图像,所述多个候选帧图像为最接近所述目标视频的结束时刻的预设时间段内的帧图像;或者,
    确定所述多个帧图像的图像复杂度,从所述多个帧图像中选取图像复杂度最高或图像复杂度高于预设复杂度的至少一个帧图像。
  22. 根据权利要求19所述的电子设备,其中,所述处理器被配置为执行所述指令,以实现如下步骤:
    确定所述目标帧图像的分辨率;
    将所述标识图像的分辨率调整至与所述目标帧图像的分辨率一致。
  23. 根据权利要求19所述的电子设备,其中,所述处理器被配置为执行所述指令,以实现如下步骤:
    对所述标识图像进行视觉弱化处理。
  24. 根据权利要求23所述的电子设备,其中,所述处理器被配置为执行所述指令,以实现如下至少一个步骤:
    基于预设的透明度值,调整所述标识图像的透明度;
    基于预设的羽化值,调整所述标识图像的边缘羽化程度;
    基于相对于所述目标帧图像的预设缩小比例,调整所述标识图像的图像尺寸。
  25. 根据权利要求19所述的电子设备,其中,所述处理器被配置为执行所述指令,以实现如下步骤:
    在所述目标帧图像中确定目标区域,所述目标区域与所述标识图像的尺寸相同;
    将所述标识图像合并到所述目标帧图像中的所述目标区域中,得到所述混合帧图像。
  26. 根据权利要求25所述的电子设备,其中,所述处理器被配置为执行所述指令,以实现如下步骤:
    将所述目标帧图像中的预设边缘位置确定为所述目标区域;或者,
    确定所述目标帧图像中的感兴趣区域ROI,将所述目标帧图像中除所述ROI以外的其他区域确定为所述目标区域。
  27. 根据权利要求25所述的电子设备,其中,所述处理器被配置为执行所述指令,以实现如下步骤:
    对于所述目标区域中的每个第一像素点,基于所述第一像素点的像素值和第二像素点的像素值,确定目标像素值,目标像素值为合并所述第一像素点的像素值和所述第二像素点的像素值得到的像素值,所述第二像素点为所述标识图像中与所述第一像素点对应的像素点;
    将所述目标帧图像中的所述第一像素点的像素值修改为所述目标像素值,得到所述混合帧图像。
  28. 一种计算机可读存储介质,当所述存储介质中的指令由电子设备的处理器执行时,使得所述电子设备能够执行如下步骤:
    确定目标视频的标识图像,所述标识图像包含所述目标视频的版权信息;
    在所述目标视频的多个帧图像中确定目标帧图像;
    合并所述标识图像与所述目标帧图像,得到混合帧图像,所述混合帧图像用于替换所述目标视频中的所述目标帧图像。
  29. 一种计算机程序产品,所述计算机程序产品被配置为执行确定目标视频的标识图像,所述标识图像包含所述目标视频的版权信息;
    在所述目标视频的多个帧图像中确定目标帧图像;
    合并所述标识图像与所述目标帧图像,得到混合帧图像,所述混合帧图像用于替换所述目标视频中的所述目标帧图像。
PCT/CN2021/111845 2020-08-13 2021-08-10 视频处理方法及电子设备 WO2022033485A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010815019.7A CN111988672A (zh) 2020-08-13 2020-08-13 视频处理方法、装置、电子设备和存储介质
CN202010815019.7 2020-08-13

Publications (1)

Publication Number Publication Date
WO2022033485A1 true WO2022033485A1 (zh) 2022-02-17

Family

ID=73435074

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/111845 WO2022033485A1 (zh) 2020-08-13 2021-08-10 视频处理方法及电子设备

Country Status (2)

Country Link
CN (1) CN111988672A (zh)
WO (1) WO2022033485A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115293949A (zh) * 2022-07-14 2022-11-04 河南和畅利信息科技有限公司 一种图像加密方法
CN116567353A (zh) * 2023-07-10 2023-08-08 湖南快乐阳光互动娱乐传媒有限公司 一种视频投放方法及装置、存储介质及电子设备

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111988672A (zh) * 2020-08-13 2020-11-24 北京达佳互联信息技术有限公司 视频处理方法、装置、电子设备和存储介质
CN112529757B (zh) * 2020-12-04 2024-01-19 平安科技(深圳)有限公司 屏幕信息保护的方法、装置、计算机设备及可读存储介质
CN112969080B (zh) * 2021-02-24 2023-06-06 厦门物之联智能科技有限公司 一种图像处理方法、系统、设备和存储介质
CN113825013B (zh) * 2021-07-30 2023-11-14 腾讯科技(深圳)有限公司 图像显示方法和装置、存储介质及电子设备

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160353167A1 (en) * 2015-05-29 2016-12-01 Xiaomi Inc. Method and device for processing identification of video file
CN108550101A (zh) * 2018-04-19 2018-09-18 腾讯科技(深圳)有限公司 图像处理方法、装置及存储介质
CN110198492A (zh) * 2019-04-28 2019-09-03 腾讯科技(深圳)有限公司 一种视频的水印添加方法、装置、设备及存储介质
CN110896484A (zh) * 2018-09-12 2020-03-20 中兴通讯股份有限公司 视频水印添加和提取方法、装置、视频播放端及存储介质
CN110971931A (zh) * 2018-09-30 2020-04-07 北京微播视界科技有限公司 视频水印添加方法、装置、电子设备及存储介质
CN111510776A (zh) * 2020-05-11 2020-08-07 知安视娱(南京)科技有限公司 水印标识插入与提取的方法及系统
CN111988672A (zh) * 2020-08-13 2020-11-24 北京达佳互联信息技术有限公司 视频处理方法、装置、电子设备和存储介质

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106385539A (zh) * 2016-09-22 2017-02-08 深圳市思创奇科技有限公司 一种照片处理方法及系统
CN110087098B (zh) * 2018-01-26 2021-12-03 阿里巴巴(中国)有限公司 水印处理方法及装置
CN108513037A (zh) * 2018-04-03 2018-09-07 优视科技有限公司 多媒体处理方法及其装置、存储介质、电子产品
CN109102453A (zh) * 2018-08-10 2018-12-28 优视科技新加坡有限公司 一种添加水印的方法、装置、设备/终端/服务器以及存储介质

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160353167A1 (en) * 2015-05-29 2016-12-01 Xiaomi Inc. Method and device for processing identification of video file
CN108550101A (zh) * 2018-04-19 2018-09-18 腾讯科技(深圳)有限公司 图像处理方法、装置及存储介质
CN110896484A (zh) * 2018-09-12 2020-03-20 中兴通讯股份有限公司 视频水印添加和提取方法、装置、视频播放端及存储介质
CN110971931A (zh) * 2018-09-30 2020-04-07 北京微播视界科技有限公司 视频水印添加方法、装置、电子设备及存储介质
CN110198492A (zh) * 2019-04-28 2019-09-03 腾讯科技(深圳)有限公司 一种视频的水印添加方法、装置、设备及存储介质
CN111510776A (zh) * 2020-05-11 2020-08-07 知安视娱(南京)科技有限公司 水印标识插入与提取的方法及系统
CN111988672A (zh) * 2020-08-13 2020-11-24 北京达佳互联信息技术有限公司 视频处理方法、装置、电子设备和存储介质

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115293949A (zh) * 2022-07-14 2022-11-04 河南和畅利信息科技有限公司 一种图像加密方法
CN115293949B (zh) * 2022-07-14 2024-01-02 中技安全科技有限公司 一种图像加密方法
CN116567353A (zh) * 2023-07-10 2023-08-08 湖南快乐阳光互动娱乐传媒有限公司 一种视频投放方法及装置、存储介质及电子设备
CN116567353B (zh) * 2023-07-10 2023-09-12 湖南快乐阳光互动娱乐传媒有限公司 一种视频投放方法及装置、存储介质及电子设备

Also Published As

Publication number Publication date
CN111988672A (zh) 2020-11-24

Similar Documents

Publication Publication Date Title
WO2022033485A1 (zh) 视频处理方法及电子设备
CN110675310B (zh) 视频处理方法、装置、电子设备及存储介质
CN108965980B (zh) 推荐内容显示方法、装置、终端及存储介质
CN109068166B (zh) 一种视频合成方法、装置、设备及存储介质
US10645332B2 (en) Subtitle displaying method and apparatus
WO2016192325A1 (zh) 视频文件的标识处理方法及装置
JP6357589B2 (ja) 画像表示方法、装置、プログラムおよび記録媒体
US20120069143A1 (en) Object tracking and highlighting in stereoscopic images
US20150371014A1 (en) Obscurely rendering content using masking techniques
WO2017211250A1 (zh) 图像的叠加显示方法和系统
CN108122195B (zh) 图片处理方法及装置
WO2022073389A1 (zh) 视频画面的展示方法及电子设备
WO2020233201A1 (zh) 图标位置确定方法和装置
CN114422692B (zh) 视频录制方法、装置及电子设备
JP6564859B2 (ja) 色域マッピング方法および装置
TWI708506B (zh) 視訊播放方法及裝置
TWI673644B (zh) 介面展示方法、介面展示裝置及非揮發性計算機可讀儲存介質
US11600300B2 (en) Method and device for generating dynamic image
CN112184535B (zh) 图像防伪方法、装置及设备
CN110620947A (zh) 字幕显示区域确定方法及装置
CN114666623A (zh) 视频内容显示方法、装置、电子设备、存储介质
WO2019041163A1 (zh) 一种自动水印和方形拍照双重实现的方法及系统
CN109413232B (zh) 屏幕显示方法及装置
CN114070998A (zh) 一种拍摄月亮的方法、装置、电子设备及介质
TWI807598B (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: 21855537

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 06/06/2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21855537

Country of ref document: EP

Kind code of ref document: A1