CN114004726A - Watermark display method, watermark display device, computer equipment and storage medium - Google Patents

Watermark display method, watermark display device, computer equipment and storage medium Download PDF

Info

Publication number
CN114004726A
CN114004726A CN202111209017.4A CN202111209017A CN114004726A CN 114004726 A CN114004726 A CN 114004726A CN 202111209017 A CN202111209017 A CN 202111209017A CN 114004726 A CN114004726 A CN 114004726A
Authority
CN
China
Prior art keywords
watermark
switching
switching time
time point
coordinate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111209017.4A
Other languages
Chinese (zh)
Inventor
吕俊
张森
刘祯晖
白云飞
谭春宏
李劭
黄敏
陈仕军
唐寅
黎艳秋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yunnan Tengyun Information Industry Co ltd
Original Assignee
Yunnan Tengyun Information Industry Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yunnan Tengyun Information Industry Co ltd filed Critical Yunnan Tengyun Information Industry Co ltd
Priority to CN202111209017.4A priority Critical patent/CN114004726A/en
Publication of CN114004726A publication Critical patent/CN114004726A/en
Pending legal-status Critical Current

Links

Images

Classifications

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

Abstract

The application relates to a watermark display method, a watermark display device, computer equipment and a storage medium. The method comprises the following steps: the method comprises the steps of obtaining duration information of video content and initial coordinates of watermarks, selecting watermark switching time points with the quantity positively correlated to preset watermark position switching times within a time period corresponding to the duration information to obtain a watermark switching time point sequence, determining coordinate values of the watermarks corresponding to the watermark switching time points to obtain a watermark switching coordinate sequence, switching and displaying the watermarks from the initial coordinates according to the watermark switching time point sequence and the watermark switching coordinate sequence in the playing process of the video content, and displaying the watermarks in a blank area when the fact that visual elements of a single-frame image corresponding to the watermarks and the watermark switching time points are shielded is detected. The dynamic watermark data generated by the method has high safety.

Description

Watermark display method, watermark display device, computer equipment and storage medium
Technical Field
The present application relates to the field of multimedia data processing technologies, and in particular, to a watermark display method and apparatus, a computer device, and a storage medium.
Background
The watermarking technology is an information hiding technology, and copyright information, identification information, images and other information can be embedded into carrier images such as videos, audios, pictures, texts and the like in a visible or invisible mode. When the invisible watermark information is embedded, the embedded watermark information is lower than the minimum granularity discovery range which can be born by the human visual system, so that the embedded watermark information can be used for proving the source of the work as an evidence of infringement prosecution on one hand, and can also be used for detecting and analyzing the watermark of the digital work to realize the integrity protection of the work on the other hand.
At present, the existing watermarks added in videos are basically static, and once the static watermarks are generated, the static watermarks cannot change any more, and because the positions of the static watermarks are fixed, the watermarks can be covered by the video contents, and the situation of shielding the video contents can also exist, so that the watermarks are easy to imitate and forge technically, and the effective anti-counterfeiting and anti-piracy effects cannot be achieved.
In summary, the existing video watermarking scheme has the defect of low data security.
Disclosure of Invention
In view of the above, it is desirable to provide a watermark display method, device, computer device, and storage medium with high data security.
A watermark display method, the method comprising:
acquiring duration information of video content and initial coordinates of a watermark;
selecting watermark switching time points with the quantity positively correlated with the preset watermark position switching times in a time period corresponding to the duration information to obtain a watermark switching time point sequence;
determining the coordinate value of the watermark corresponding to each watermark switching time point to obtain a watermark switching coordinate sequence;
in the playing process of the video content, according to the watermark switching time point sequence and the watermark switching coordinate sequence, the watermark is switched from the initial coordinate to the coordinate and displayed;
and when the fact that the visual elements of the single-frame images corresponding to the watermark and the watermark switching time point are shielded is detected, displaying the watermark in the blank area.
In one embodiment, the detecting that the visual element of the single-frame image corresponding to the watermark switching time point has occlusion comprises:
when the video content is played to a watermark switching time point, acquiring a single-frame image of the watermark switching time point;
detecting visual elements of the single-frame image, and acquiring frame attribute data of the detected visual elements and frame attribute data of the watermark;
and if the detected frame attribute data of the visual elements and the frame attribute data of the watermark have intersection, judging that the visual elements of the single-frame image corresponding to the watermark and the watermark switching time point are shielded.
In one embodiment, detecting a visual element in a single frame image comprises:
and detecting visual elements in the single-frame image through the trained visual element recognition model, wherein the visual element recognition model is obtained by training based on the historical video image.
In one embodiment, before detecting the visual element in the single-frame image, the method further includes:
and compressing the single frame image into an image with a preset format.
In one embodiment, in a time period corresponding to the duration information, selecting watermark switching time points whose number is positively correlated to the preset watermark position switching times, and obtaining a watermark switching time point sequence includes:
randomly selecting watermark switching time points of which the number is positively correlated with the preset watermark position switching times in a time period corresponding to the duration information;
and sequencing the watermark switching time points to obtain a watermark switching time point sequence.
In one embodiment, determining the coordinate value of the watermark corresponding to each watermark switching time point, and obtaining the watermark switching coordinate sequence includes:
and performing map operation on the watermark switching time point sequence, determining the random coordinate value of the watermark corresponding to each watermark switching time point by taking each watermark switching time point as an input parameter, and obtaining the watermark switching coordinate sequence.
In one embodiment, after it is detected that there is occlusion in the visual element of the single-frame image corresponding to the watermark switching time point, the method further includes:
and if the single frame image corresponding to the watermark switching time point does not have a blank area, keeping the shielding state of the watermark.
In one embodiment, after it is detected that there is occlusion in the visual element of the single-frame image corresponding to the watermark switching time point, the method further includes:
if the size of the blank area in the single-frame image corresponding to the watermark switching time point is smaller than that of the watermark, the size of the watermark is scaled to be smaller than or equal to the target watermark of the blank area, and the scaled watermark is displayed in the blank area.
A watermark display apparatus, the apparatus comprising:
the data acquisition module is used for acquiring the duration information of the video content and the initial coordinates of the watermark;
the time point sequence determining module is used for selecting watermark switching time points with the quantity positively correlated to the preset watermark position switching times in a time period corresponding to the duration information to obtain a watermark switching time point sequence;
the coordinate sequence determination module is used for determining the coordinate values of the watermarks corresponding to the watermark switching time points to obtain a watermark switching coordinate sequence;
the watermark position switching module is used for switching and displaying the watermark from the initial coordinate according to the watermark switching time point sequence and the watermark switching coordinate sequence in the playing process of the video content;
and the watermark shielding processing module is used for displaying the watermark in the blank area when detecting that the visual elements of the single-frame image corresponding to the watermark and the watermark switching time point are shielded.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring duration information of video content and initial coordinates of a watermark;
selecting watermark switching time points with the quantity positively correlated with the preset watermark position switching times in a time period corresponding to the duration information to obtain a watermark switching time point sequence;
determining the coordinate value of the watermark corresponding to each watermark switching time point to obtain a watermark switching coordinate sequence;
in the playing process of the video content, according to the watermark switching time point sequence and the watermark switching coordinate sequence, the watermark is switched from the initial coordinate to the coordinate and displayed;
and when the fact that the visual elements of the single-frame images corresponding to the watermark and the watermark switching time point are shielded is detected, displaying the watermark in the blank area.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring duration information of video content and initial coordinates of a watermark;
selecting watermark switching time points with the quantity positively correlated with the preset watermark position switching times in a time period corresponding to the duration information to obtain a watermark switching time point sequence;
determining the coordinate value of the watermark corresponding to each watermark switching time point to obtain a watermark switching coordinate sequence;
in the playing process of the video content, according to the watermark switching time point sequence and the watermark switching coordinate sequence, the watermark is switched from the initial coordinate to the coordinate and displayed;
and when the fact that the visual elements of the single-frame images corresponding to the watermark and the watermark switching time point are shielded is detected, displaying the watermark in the blank area.
The watermark display method, the device, the computer equipment and the storage medium select the watermark switching time points with the quantity positively correlated with the preset watermark position switching times in the time period corresponding to the duration information to obtain the watermark switching time point sequence, and also obtain the watermark switching coordinate sequence by taking the coordinate value of each watermark switching time point, so that in the video playing process, according to the watermark switching time point sequence and the watermark switching coordinate sequence, the coordinate switching and the displaying of the watermark are carried out, so that the position of the watermark in the video is constantly changed, the difficulty of imitating and forging the watermark in the video can be increased, the illegal recording of the video is effectively prevented, in addition, watermark shielding detection is carried out in the coordinate switching process of the watermark, so that the watermark can be effectively prevented from being shielded or shielding video content, the integrity of the watermark can be ensured, and the copyright owner of the video content can be clearly shown. In conclusion, the data security of the dynamic watermark generated by the scheme is high.
Drawings
FIG. 1 is a flow diagram illustrating a method for displaying a watermark in one embodiment;
fig. 2 is a flowchart illustrating a watermark display method according to another embodiment;
fig. 3 is a block diagram showing the structure of a watermark display device in one embodiment;
fig. 4 is a block diagram showing the structure of a watermark display apparatus in another embodiment;
FIG. 5 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In an embodiment, as shown in fig. 1, a watermark display method is provided, and this embodiment is illustrated by applying the method to a terminal, and it is to be understood that the method may also be applied to a server, and may also be applied to a system including a terminal and a server, and is implemented by interaction between the terminal and the server. In this embodiment, the method includes the steps of:
step 202, obtaining duration information of the video content and initial coordinates of the watermark.
In practical application, a video rendering layer and a watermark layer are preset in a system, the watermark layer is positioned on the video rendering layer, the sizes of the video rendering layer and the watermark layer are equal, and the video rendering layer and the watermark layer share the same coordinate system: the upper left corner is set as the origin (0, 0), and the lower right corner is set as the coordinate (1, 1). The video rendering layer bears video content and can perform editing operation on the video content, and the watermark layer bears watermarks and provides a moving space. The watermark can be in a text or picture form, and the position, the size, the color, the transparency and the like of the watermark can be adjusted in a self-defining way. In this embodiment, the duration information of the video content refers to the total duration of the video, and may be in units of time/minute/second. The initial coordinate of the watermark preset by the system is (1, 0), namely the upper right corner of the video.
Step 204, selecting watermark switching time points with the quantity positively correlated to the preset watermark position switching times in a time period corresponding to the duration information to obtain a watermark switching time point sequence.
In order to ensure the security of the watermark, the times of switching the watermark positions of the video with longer video time are more intensive, and the size of the video needs to be correspondingly increased, so that an operator can preset the times of switching the watermark positions so as to determine the times of switching the watermark positions according to the time of the video. And then, according to the video duration and the watermark position switching times, selecting time points in a segmented manner to obtain a watermark switching time point sequence. In this embodiment, a time point equal to the number of times of switching the watermark position may be selected. In specific implementation, after the duration information of the video is acquired, the duration is uniformly converted into duration taking seconds as a unit. For example, a video with a duration of 6 minutes has a duration of 360 seconds, and if the preset number of times of switching the watermark position is 6 times, 6 time points are selected according to the duration of the video and the number of times of switching the watermark position, so as to obtain a watermark switching time point sequence TimeArray.
And step 206, determining the coordinate value of the watermark corresponding to each watermark switching time point to obtain a watermark switching coordinate sequence.
After the watermark switching time point sequence is obtained, the random coordinate value of the watermark corresponding to each watermark switching time point can be removed to obtain the watermark switching coordinate sequence. With the above embodiment, the coordinate values of the watermarks corresponding to the watermark switching time points in the watermark switching time point sequence are determined, and a watermark switching coordinate sequence CoordinateArray is obtained: [(0,1),(0,0.5),(1,1),(0,1),(1,1),(0,0)].
And step 208, in the playing process of the video content, according to the watermark switching time point sequence and the watermark switching coordinate sequence, performing coordinate switching on the watermark from the initial coordinate and displaying the watermark.
After the video content is played, in the playing process, along with the time lapse, when the video is played to the watermark switching time point in the TimeArray, according to the watermark switching coordinate sequence Coordinatearray, the coordinate switching operation corresponding to the subscript in the Coordinatearray is executed, and the watermark is displayed, so that the effect of dynamically switching the watermark position is achieved. It can be understood that, in this embodiment, the coordinate switching is performed according to the coordinate sequence, so as to achieve the effect of dynamically switching the watermark, that is, when the video is played to the next watermark switching time point, the watermark disappears from the current position, and then is directly displayed on the coordinate position corresponding to the current watermark switching time point, so that the effect of beautifying the watermark switching can be achieved, and the viewing experience of the user can be improved.
And step 210, when the fact that the visual elements of the single-frame image corresponding to the watermark and the watermark switching time point are shielded is detected, displaying the watermark in the blank area.
Visual elements refer to objects appearing in still pictures of video, including watermarks, people, scenes, and the like. In this embodiment, in the process of switching the coordinates of the watermark, intrusion detection of the watermark is also introduced, that is, it is detected whether there is a block (i.e., intrusion coverage) with a visual element in a video single-frame image at a watermark switching time point when the video is played to the watermark switching time point and the watermark is moved to the coordinate corresponding to the watermark switching time point, if there is a block, the watermark is displayed in the blank area, the coordinates of the watermark are updated, and then the coordinate switching operation and the intrusion detection are continued until the video is played completely. In specific implementation, whether the watermark and the visual element are blocked or not can be detected by using a computer vision identification technology and a collision detection mechanism.
In the watermark display method, in the time period corresponding to the duration information, the watermark switching time points with the quantity positively correlated to the preset watermark position switching times are selected to obtain a watermark switching time point sequence, and the coordinate values of the watermark switching time points are also taken to obtain a watermark switching coordinate sequence, so that in the video playing process, the watermarks are subjected to coordinate switching and display according to the watermark switching time point sequence and the watermark switching coordinate sequence, the positions of the watermarks in the video are continuously changed, the imitation and counterfeiting difficulty of the watermarks in the video can be increased, the video is effectively prevented from being stolen and recorded, in addition, the watermark shielding detection is carried out in the watermark coordinate switching process, the watermarks can be effectively prevented from being shielded or shielding the video content, the integrity of the watermarks can be ensured, and the copyright owners of the video content can be clearly shown. In conclusion, the dynamic watermark generated by the scheme is high in safety and can well play a role in protecting the video copyright.
In one embodiment, the detecting that the visual element of the single-frame image corresponding to the watermark switching time point has occlusion comprises:
when the video content is played to a watermark switching time point, acquiring a single-frame image of the watermark switching time point;
detecting visual elements of the single-frame image, and acquiring frame attribute data of the detected visual elements and frame attribute data of the watermark;
and if the detected frame attribute data of the visual elements and the frame attribute data of the watermark have intersection, judging that the visual elements of the single-frame image corresponding to the watermark and the watermark switching time point are shielded.
In practical applications, all visual elements have two basic attributes, namely coordinates (x, y) and sizes (widths, height) thereof. From the above two basic attributes, the frame attribute frame (coordinates. x, coordinates. y, centers. width, centers. height) can be composed together. Thus, it can be determined whether there is an intrusion behavior in the watermark by determining whether there is an intersection (i.e., mutual occlusion) between the frame of the watermark and the frame of the visual element (person or scene). In specific implementation, when a video is played to a certain watermark switching time point, a single-frame image corresponding to the watermark switching time point is collected, the single-frame image is subjected to visual identification, a visual element in the single-frame image is detected, then a frame of the detected visual element and a frame of a watermark are obtained, whether an intersection exists between the frames of the two is compared, if the intersection exists, it is indicated that shielding, namely intrusion coverage behavior exists between the two, at the moment, the watermark is moved to a blank area in the single-frame image, so that the purpose of completely displaying the watermark is achieved, and meanwhile, the video watching experience of a user is optimized.
In one embodiment, detecting a visual element in a single frame image comprises:
and detecting visual elements in the single-frame image through the trained visual element recognition model, wherein the visual element recognition model is obtained by training based on the historical video image.
In practical applications, the detecting of the visual elements in the single-frame image may be detecting and positioning the visual elements of the single-frame image by using a visual element recognition model trained by a computer visual recognition technology. Specifically, the pedestrian in OpenCV may be used to detect the person element in a single frame image, and the techniques such as YOLO, SSD, rcnn, fast rcnn, and fast rcnn may be used to detect the scene. In specific implementation, the video images include historical character images and historical scene images, and may be obtained by training the historical character images and the historical scene images by using a physical detection algorithm, and detecting visual elements in a single frame of image by using the trained visual element recognition model. In this embodiment, the trained visual element recognition model is used to efficiently detect the visual elements in the single-frame image.
In one embodiment, before detecting the visual element in the single-frame image, the method further includes: and compressing the single frame image into an image with a preset format.
In this embodiment, after the single-frame image corresponding to the watermark switching time point is collected, in order to improve the performance of computer processing, before the visual element in the single-frame image is detected, the visual element in the single-frame image is detected after the single-frame image is compressed by using a JPEG compression algorithm, so that the speed of detecting the visual element of the single-frame image and the subsequent processing speed of the single-frame image can be improved. It is understood that in other embodiments, the single frame image may also be compressed into a JPG, BMP, or other format image.
As shown in FIG. 2, in one embodiment, step 204 includes: and 224, randomly selecting watermark switching time points with the quantity positively correlated to the preset watermark position switching times in a time period corresponding to the duration information, and sequencing the watermark switching time points to obtain a watermark switching time point sequence.
In this embodiment, still taking an example that a period of video with a duration of 6 minutes and the preset number of times of switching the watermark position is 6 times, and still selecting the watermark switching time point equal to the number of times of switching the watermark position, may be randomly selecting 6 time points from a time period [0,360] by using a random number algorithm, such as (27, 98, 234, 344, 55, 40), and then performing positive sequence sorting on the randomly selected watermark switching time points to obtain a watermark switching time point sequence TimeArray: [27, 40, 55, 98, 234, 344]. In the embodiment, by randomly selecting the time points, the randomness of the watermark switching time is increased, and the possibility of preventing the video from being illegally recorded is improved.
As shown in FIG. 2, in one embodiment, step 206 includes: step 226, performing map operation on the watermark switching time point sequence, taking each watermark switching time point as a parameter, and determining a random coordinate value of the watermark corresponding to each watermark switching time point to obtain a watermark switching coordinate sequence.
In this embodiment, the determining of the coordinate of each watermark switching time point may be performed by performing map operation on the watermark switching time point sequence, such as time array. Specifically, the map operation is a high-order function in the Swift programming language, and functions as "transforming each element in the array and generating an array containing the transformed new elements". In this example, the original elements in the TimeArray are a series of integers, and by performing a map operation, taking each integer element in the array as an entry, and calling the randomCoordinate function, the incoming integer can be converted into a random coordinate value. It can be understood that the random coordinate values of the watermarks corresponding to the watermark switching time points may also be determined by means of for-loop and the like, and may be specifically adjusted according to the actual situation, which is not limited herein. In this embodiment, the random coordinate values of the watermarks corresponding to the watermark switching time points can be determined quickly and efficiently by map operation.
In one embodiment, after it is detected that there is occlusion in the visual element of the single-frame image corresponding to the watermark switching time point, the method further includes:
and if the single frame image corresponding to the watermark switching time point does not have a blank area, keeping the shielding state of the watermark.
In one embodiment, after it is detected that there is occlusion in the visual element of the single-frame image corresponding to the watermark switching time point, the method further includes:
if the size of the blank area in the single-frame image corresponding to the watermark switching time point is smaller than the size of the watermark, the size of the watermark is scaled to be smaller than or equal to the size of the blank area, and the scaled watermark is displayed in the blank area.
In practical application, after it is detected that a visual element of a single-frame image corresponding to a watermark switching time point is blocked, when the watermark is displayed in a blank area, a situation that the blank area does not exist in the single-frame image or the size of the blank area is smaller than that of the watermark may occur, and at this time, exception processing needs to be performed to ensure complete display of the watermark. Specifically, if a blank area does not exist in a single frame image corresponding to the watermark switching time point, the shielding state of the watermark is kept; if the size of the blank area in the single-frame image corresponding to the watermark switching time point is smaller than the size of the watermark, the size of the watermark is scaled to be smaller than or equal to the size of the blank area, and the scaled watermark is displayed in the blank area. In this embodiment, by processing the abnormal condition of the watermark, the complete display of the watermark can be ensured, and the effect of protecting the copyright well is achieved.
It should be understood that, although the steps in the flowcharts related to the above embodiments are shown in sequence as indicated by the arrows, the steps are not necessarily executed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a part of the steps in each flowchart related to the above embodiments may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least a part of the steps or stages in other steps.
In one embodiment, as shown in fig. 3, there is provided a watermark display apparatus including: a data obtaining module 310, a time point sequence determining module 320, a coordinate sequence determining module 330, a watermark position switching module 340, and a watermark occlusion processing module 350, wherein:
and the data acquisition module 310 is configured to acquire the duration information of the video content and the initial coordinates of the watermark.
The time point sequence determining module 320 is configured to select watermark switching time points, the number of which is positively correlated to the preset watermark position switching times, in a time period corresponding to the duration information, so as to obtain a watermark switching time point sequence.
The coordinate sequence determining module 330 is configured to determine a coordinate value of the watermark corresponding to each watermark switching time point, so as to obtain a watermark switching coordinate sequence.
And the watermark position switching module 340 is configured to, in the playing process of the video content, perform coordinate switching on the watermark from the initial coordinate and display the watermark according to the watermark switching time point sequence and the watermark switching coordinate sequence.
And a watermark blocking processing module 350, configured to display the watermark in the blank area when it is detected that the visual element of the single-frame image corresponding to the watermark and the watermark switching time point is blocked.
In the watermark display device, in the time period corresponding to the duration information, the watermark switching time points with the quantity positively correlated to the preset watermark position switching times are selected to obtain a watermark switching time point sequence, and the coordinate values of the watermark switching time points are also taken to obtain a watermark switching coordinate sequence, so that in the video playing process, the watermarks are subjected to coordinate switching and display according to the watermark switching time point sequence and the watermark switching coordinate sequence, the positions of the watermarks are continuously changed, the imitation and counterfeiting difficulty of the watermarks in the video can be increased, the video is effectively prevented from being illegally recorded, in addition, the watermark shielding detection is carried out in the watermark coordinate switching process, the watermarks can be effectively prevented from being shielded or shielding the video content, the integrity of the watermarks can be ensured, and the copyright owner of the video content can be clearly shown. In conclusion, the dynamic watermark generated by the scheme is high in safety and can well play a role in protecting the video copyright.
In an embodiment, the watermark occlusion processing module 350 is further configured to, when the video content is played to the watermark switching time point, acquire a single frame image of the watermark switching time point, detect a visual element of the single frame image, and acquire frame attribute data of the detected visual element and frame attribute data of the watermark, and if there is an intersection between the frame attribute data of the detected visual element and the frame attribute data of the watermark, determine that the visual element of the single frame image corresponding to the watermark switching time point is occluded by the watermark.
In one embodiment, the watermark occlusion processing module 350 is further configured to detect visual elements in the single-frame image through a trained visual element recognition model, which is trained based on historical video images.
As shown in fig. 4, in one embodiment, the apparatus further includes an image compression module 360 for compressing the single frame image into an image of a preset format.
In an embodiment, the time point sequence determining module 320 is further configured to randomly select watermark switching time points, the number of which is positively correlated to the preset watermark position switching times, in a time period corresponding to the duration information, and sort the watermark switching time points to obtain a watermark switching time point sequence.
In an embodiment, the coordinate sequence determining module 330 is further configured to perform map operation on the watermark switching time point sequence, and determine a random coordinate value of the watermark corresponding to each watermark switching time point by taking each watermark switching time point as a reference, so as to obtain the watermark switching coordinate sequence.
As shown in fig. 4, in an embodiment, the apparatus further includes an exception handling module 370, configured to keep the occlusion state of the watermark if there is no blank area in the single frame image corresponding to the watermark switching time point.
In an embodiment, the exception handling module 370 is further configured to scale the size of the watermark to be smaller than or equal to the size of the blank area if the size of the blank area in the single frame image corresponding to the watermark switching time point is smaller than the size of the watermark, and display the scaled watermark in the blank area.
For a specific embodiment of the watermark display apparatus, reference may be made to the above embodiment of the watermark display method, which is not described herein again. The modules in the watermark display device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 5. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a watermark presentation method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 5 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, which includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the watermark display method when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, realizes the steps of the above-mentioned watermark display method.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A watermark display method, characterized in that the method comprises:
acquiring duration information of video content and initial coordinates of a watermark;
selecting watermark switching time points with the quantity positively correlated with the preset watermark position switching times in a time period corresponding to the duration information to obtain a watermark switching time point sequence;
determining the coordinate value of the watermark corresponding to each watermark switching time point to obtain a watermark switching coordinate sequence;
in the playing process of the video content, according to the watermark switching time point sequence and the watermark switching coordinate sequence, the watermark is switched from the initial coordinate to the coordinate and displayed;
and when the fact that the visual elements of the single-frame images corresponding to the watermarks and the watermark switching time points are shielded is detected, displaying the watermarks in the blank area.
2. The watermark display method according to claim 1, wherein detecting that the visual element of the single-frame image corresponding to the watermark switching time point has occlusion comprises:
when the video content is played to the watermark switching time point, acquiring a single-frame image of the watermark switching time point;
detecting visual elements of the single-frame image, and acquiring frame attribute data of the detected visual elements and frame attribute data of the watermark;
and if the detected frame attribute data of the visual elements and the frame attribute data of the watermark have intersection, judging that the visual elements of the single-frame images corresponding to the watermark and the watermark switching time point are shielded.
3. The watermark display method according to claim 2, wherein the detecting the visual element in the single-frame image includes:
and detecting visual elements in the single-frame image through a trained visual element recognition model, wherein the visual element recognition model is obtained by training based on historical video images.
4. The watermark display method according to claim 1, wherein the selecting, in the time period corresponding to the duration information, watermark switching time points whose number is positively correlated with a preset watermark position switching number to obtain a watermark switching time point sequence comprises:
randomly selecting watermark switching time points of which the number is positively correlated with the switching times of the preset watermark positions in a time period corresponding to the duration information;
and sequencing the watermark switching time points to obtain a watermark switching time point sequence.
5. The watermark display method according to claim 1, wherein the determining the coordinate values of the watermark corresponding to each of the watermark switching time points to obtain the watermark switching coordinate sequence comprises:
and performing map operation on the watermark switching time point sequence, determining the random coordinate value of the watermark corresponding to each watermark switching time point by taking each watermark switching time point as a parameter, and obtaining the watermark switching coordinate sequence.
6. The watermark display method according to any one of claims 1 to 5, wherein after it is detected that there is an occlusion in the visual element of the single-frame image corresponding to the watermark switching time point, the method further comprises:
if the size of the hollow area in the single-frame image corresponding to the watermark switching time point is smaller than the size of the watermark, the size of the watermark is scaled to be smaller than or equal to the size of the hollow area, and the scaled watermark is displayed in the hollow area.
7. The watermark display method according to any one of claims 1 to 5, wherein after it is detected that there is an occlusion in the visual element of the single-frame image corresponding to the watermark switching time point during the switching of the coordinates of the watermark, the method further comprises:
and if the single-frame image corresponding to the watermark switching time point does not have a blank area, keeping the shielding state of the watermark.
8. A watermark display apparatus, characterized in that the apparatus comprises:
the data acquisition module is used for acquiring the duration information of the video content and the initial coordinates of the watermark;
the time point sequence determining module is used for selecting watermark switching time points with the quantity positively correlated to the preset watermark position switching times in a time period corresponding to the duration information to obtain a watermark switching time point sequence;
the coordinate sequence determining module is used for determining the coordinate values of the watermarks corresponding to the watermark switching time points to obtain a watermark switching coordinate sequence;
the watermark position switching module is used for switching and displaying the watermark from the initial coordinate according to the watermark switching time point sequence and the watermark switching coordinate sequence in the playing process of the video content;
and the watermark shielding processing module is used for displaying the watermark in the blank area when detecting that the visual elements of the single-frame image corresponding to the watermark and the watermark switching time point are shielded.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202111209017.4A 2021-10-18 2021-10-18 Watermark display method, watermark display device, computer equipment and storage medium Pending CN114004726A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111209017.4A CN114004726A (en) 2021-10-18 2021-10-18 Watermark display method, watermark display device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111209017.4A CN114004726A (en) 2021-10-18 2021-10-18 Watermark display method, watermark display device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114004726A true CN114004726A (en) 2022-02-01

Family

ID=79923000

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111209017.4A Pending CN114004726A (en) 2021-10-18 2021-10-18 Watermark display method, watermark display device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114004726A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117095411A (en) * 2023-10-16 2023-11-21 青岛文达通科技股份有限公司 Detection method and system based on image fault recognition

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117095411A (en) * 2023-10-16 2023-11-21 青岛文达通科技股份有限公司 Detection method and system based on image fault recognition
CN117095411B (en) * 2023-10-16 2024-01-23 青岛文达通科技股份有限公司 Detection method and system based on image fault recognition

Similar Documents

Publication Publication Date Title
JP6672305B2 (en) Method and apparatus for generating extrapolated images based on object detection
US20170104893A1 (en) System and method of pixel manipulation and screen display disruption
WO2022033485A1 (en) Video processing method and electronic device
CN111277910B (en) Bullet screen display method and device, electronic equipment and storage medium
CN108037830B (en) Method for realizing augmented reality
CN111327947B (en) Screen capture management method and device and mobile terminal
US20170011212A1 (en) Access control for a resource
JP2008304805A5 (en)
CN111212246B (en) Video generation method and device, computer equipment and storage medium
CN113407436A (en) Play component compatibility detection method and device, computer equipment and storage medium
CN114004726A (en) Watermark display method, watermark display device, computer equipment and storage medium
CA3132010A1 (en) Systems and methods for producing a privacy-protected video clip
CN110719415B (en) Video image processing method and device, electronic equipment and computer readable medium
CN108256360A (en) The display methods and terminal of a kind of sensitive information
CN106651751B (en) Image processing method and terminal
CN116028901A (en) Watermark embedding method, device, equipment and storage medium
JP2007536861A (en) Selective video blanking
CN115147318A (en) Privacy blocking method and device
CN112752110B (en) Video presentation method and device, computing device and storage medium
CN114245053A (en) Video watermark generation method and device
JP2007110571A (en) Video change device, data structure of changed video frame, video restoration device, video change method, video restoration method, video change program and video restoration program
CN113596354A (en) Image processing method, image processing device, computer equipment and storage medium
KR20210119982A (en) Sensor device, encryption method
KR101864454B1 (en) Apparatus and method for composing images in an image processing device
CN112184535B (en) Image anti-counterfeiting method, device and equipment

Legal Events

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