CN110378831B - Watermark processing method and device - Google Patents

Watermark processing method and device Download PDF

Info

Publication number
CN110378831B
CN110378831B CN201910657051.4A CN201910657051A CN110378831B CN 110378831 B CN110378831 B CN 110378831B CN 201910657051 A CN201910657051 A CN 201910657051A CN 110378831 B CN110378831 B CN 110378831B
Authority
CN
China
Prior art keywords
watermark information
picture
transparency
pixel
pictures
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.)
Active
Application number
CN201910657051.4A
Other languages
Chinese (zh)
Other versions
CN110378831A (en
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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201910657051.4A priority Critical patent/CN110378831B/en
Publication of CN110378831A publication Critical patent/CN110378831A/en
Application granted granted Critical
Publication of CN110378831B publication Critical patent/CN110378831B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics

Abstract

The embodiment of the invention provides a watermark processing method and device, which are used for identifying watermark information of a picture to be processed; determining the first transparency of the watermark information of each first picture in the N first pictures corresponding to the picture to be processed according to the first initial value and the first termination value of the transparency of the watermark information; the first transparency corresponding to the watermark information in each first picture is different, and the first termination value is smaller than the first initial value; and then, in a first playing time period, sequentially playing N first pictures according to the first transparency from high to low. In the first playing time period, the transparency of watermark information in N played first pictures is gradually decreased from high to low, so that a user can see the dynamic desalination process of the watermark information in the first playing time period, and the diversity of picture display is improved.

Description

Watermark processing method and device
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method and an apparatus for processing a watermark.
Background
With the continuous development of internet technology, obtaining a picture through network searching has become a common way to obtain a picture.
When a picture is acquired through network searching, characters related to the picture can be input in a picture searching tool to search for the related picture through the characters. Since the searched pictures are captured in other websites through the network, in many cases, some advertisement information, such as advertisement characters, telephone numbers, or watermarks such as company names, exist on the captured pictures. If the captured picture is directly displayed to the user, the user experience is not high because the quality of the picture is not high.
Therefore, how to perform the desalination process on the watermark in the picture, and make the user see the dynamic desalination process of the watermark information, so as to improve the diversity of the picture display is a problem to be solved by those skilled in the art.
Disclosure of Invention
The embodiment of the invention provides a watermark processing method and a watermark processing device, which enable a user to see a watermark information dynamic desalting process in a watermark desalting process, thereby improving the diversity of picture display.
In a first aspect, an embodiment of the present invention provides a method for processing a watermark, where the method for processing a watermark may include:
identifying watermark information of a picture to be processed;
Determining the first transparency of the watermark information of each first picture in N first pictures corresponding to the picture to be processed according to the first initial value and the first termination value of the transparency of the watermark information; the first transparency corresponding to the watermark information in each first picture is different, the first termination value is smaller than the first initial value, and N is a positive integer greater than or equal to 2;
and in the first playing time period, sequentially playing the N first pictures according to the first transparency from high to low.
In a possible implementation manner, the determining, according to the first initial value and the first termination value of the transparency of the watermark information, the first transparency of the watermark information of each of the N first pictures corresponding to the to-be-processed picture includes:
determining a first transparency interval of watermark information of two adjacent pictures according to a first initial value, a first termination value and N of transparency of the watermark information;
and determining the first transparency of the watermark information of each first picture in the N first pictures corresponding to the pictures to be processed according to the first transparency interval.
In one possible implementation manner, playing the N first pictures includes:
Determining the position information of the water printing information in each first picture in the N first pictures;
respectively matching the color of each pixel point in the position information with the color of watermark information in the first picture, and determining a first pixel point matched with the color of watermark information in the first picture and a second pixel point not matched with the color of watermark information in the first picture;
and playing the first pixel point according to the first transparency of the watermark information in the first picture, and playing the second pixel point according to the first initial value.
In a possible implementation manner, after the N pictures are sequentially played from high to low according to the transparency in the first playing period, the method further includes:
determining the second transparency of the watermark information of each second picture in M second pictures corresponding to the picture to be processed according to the first termination value and the second termination value of the transparency of the watermark information; the second transparency corresponding to watermark information in each of the M second pictures is different, the first termination value is smaller than the second termination value, and M is a positive integer greater than or equal to 2;
Determining a target pixel increment of the watermark information of each second picture according to a second initial value and a third termination value of the pixel increment of the watermark information;
and in a second playing time period, sequentially playing the M second pictures according to the second transparency from low to high and the target pixel increment.
In a possible implementation manner, the determining, according to the first termination value and the second termination value of the transparency of the watermark information, the second transparency of the watermark information of each of the M second pictures corresponding to the to-be-processed picture includes:
determining a second transparency interval of watermark information of two adjacent pictures according to the first termination value, the second termination value and M of the transparency of the watermark information;
and determining the second transparency of the watermark information of each second picture according to the second transparency interval.
In one possible implementation manner, the determining the target pixel increment of the watermark information of each second picture according to the second initial value and the third ending value of the pixel increment of the watermark information includes:
determining the pixel increment interval of watermark information of two adjacent pictures according to the second initial value, the third termination value and M of the watermark information pixel increment;
And determining the target pixel increment of the watermark information of each second picture according to the pixel increment interval.
In one possible implementation manner, playing the M second pictures includes:
determining the position information of the watermark information in each second picture in the M second pictures;
respectively matching the color of each pixel point in the position information with the color of watermark information in the second picture, and determining a third pixel point matched with the color of watermark information in the second picture and a fourth pixel point not matched with the color of watermark information in the second picture;
determining a target color corresponding to the third pixel point according to the target pixel increment of the watermark information of the second picture;
and playing the third pixel point according to the second transparency of the watermark information in the second picture and the target color, and playing the fourth pixel point according to the first initial value and the current color of the fourth pixel point.
In one possible implementation manner, the determining, according to the target pixel increment of the watermark information of the second picture, the target color corresponding to the third pixel point includes:
Respectively obtaining the colors of a plurality of fifth pixel points around the third pixel point, wherein the fifth pixel points are pixel points which do not belong to the watermark text;
and determining a target color corresponding to the third pixel point according to the current color of the third pixel point, the average value of the colors of the plurality of fifth pixel points and the target pixel increment.
In one possible implementation manner, the identifying watermark information in the to-be-processed picture includes:
constructing a watermark identification model;
and identifying watermark information in the picture to be processed through the watermark identification model.
In a second aspect, an embodiment of the present invention further provides a watermark processing apparatus, where the watermark processing apparatus may include:
the identification unit is used for identifying watermark information of the picture to be processed;
the processing unit is used for determining the first transparency of the watermark information of each first picture in the N first pictures corresponding to the picture to be processed according to the first initial value and the first termination value of the transparency of the watermark information; the first transparency corresponding to the watermark information in each first picture is different, the first termination value is smaller than the first initial value, and N is a positive integer greater than or equal to 2;
And the playing unit is used for sequentially playing the N first pictures according to the first transparency from high to low in the first playing time period.
In one possible implementation manner, the processing unit is specifically configured to determine a first transparency interval of watermark information of two adjacent pictures according to a first initial value, a first termination value and N of transparency of the watermark information; and determining the first transparency of watermark information of each first picture in the N first pictures corresponding to the pictures to be processed according to the first transparency interval.
In a possible implementation manner, the processing unit is further configured to determine, for each of the N first pictures, location information where the watermark information in the first picture is located; respectively matching the color of each pixel point in the position information with the color of watermark information in the first picture, and determining a first pixel point matched with the color of watermark information in the first picture and a second pixel point not matched with the color of watermark information in the first picture;
the playing unit is specifically configured to play the first pixel according to the first transparency of the watermark information in the first picture, and play the second pixel according to the first initial value.
In a possible implementation manner, the processing unit is further configured to determine, according to the first termination value and the second termination value of the transparency of the watermark information, a second transparency of watermark information of each of M second pictures corresponding to the to-be-processed picture; the second transparency corresponding to watermark information in each of the M second pictures is different, the first termination value is smaller than the second termination value, and M is a positive integer greater than or equal to 2; determining a target pixel increment of watermark information of each second picture according to a second initial value and a third termination value of the pixel increment of the watermark information;
and the playing unit is further used for sequentially playing the M second pictures according to the second transparency from low to high and the target pixel increment in a second playing time period.
In a possible implementation manner, the processing unit is specifically configured to determine a second transparency interval of watermark information of two adjacent pictures according to the first termination value, the second termination value and M of transparency of the watermark information; and determining the second transparency of the watermark information of each second picture according to the second transparency interval.
In one possible implementation manner, the processing unit is specifically configured to determine a pixel increment interval of watermark information of two adjacent pictures according to the second initial value, the third termination value and M of the watermark information pixel increment; and determining the target pixel increment of the watermark information of each second picture according to the pixel increment interval.
In a possible implementation manner, the processing unit is further configured to determine, for each of the M second pictures, location information where the watermark information in the second picture is located; respectively matching the color of each pixel point in the position information with the color of watermark information in the second picture, and determining a third pixel point matched with the color of watermark information in the second picture and a fourth pixel point not matched with the color of watermark information in the second picture; determining a target color corresponding to the third pixel point according to the target pixel increment of the watermark information of the second picture;
the playing unit is specifically configured to play the third pixel according to the second transparency of the watermark information in the second picture and the target color, and play the fourth pixel according to the first initial value and the current color of the fourth pixel.
In a possible implementation manner, the processing unit is specifically configured to obtain colors of a plurality of fifth pixel points around the third pixel point, where the fifth pixel points are pixel points that do not belong to the watermark text; and determining a target color corresponding to the third pixel point according to the current color of the third pixel point, the average value of the colors of the plurality of fifth pixel points and the target pixel increment.
In a possible implementation manner, the identification unit is specifically configured to construct a watermark identification model; and identifying watermark information in the picture to be processed through the watermark identification model.
In a third aspect, embodiments of the present invention also provide a processing apparatus, which may include a processor and a memory, wherein,
the memory is used for storing program instructions;
the processor is configured to read the program instructions in the memory, and execute the watermark processing method according to any one of the first aspect according to the program instructions in the memory.
In a fourth aspect, embodiments of the present invention also provide a computer storage medium comprising instructions which, when executed by one or more processors, cause a processing apparatus to perform the method of processing a watermark as described in any of the first aspects above.
The watermark processing method and device provided by the embodiment of the invention firstly identify watermark information of the picture to be processed; determining the first transparency of the watermark information of each first picture in the N first pictures corresponding to the picture to be processed according to the first initial value and the first termination value of the transparency of the watermark information; the first transparency corresponding to the watermark information in each first picture is different, and the first termination value is smaller than the first initial value; and then, in a first playing time period, sequentially playing N first pictures according to the first transparency from high to low. In the first playing time period, the transparency of watermark information in N played first pictures is gradually decreased from high to low, so that a user can see the dynamic desalination process of the watermark information in the first playing time period, and the diversity of picture display is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it will be obvious that the drawings in the following description are some embodiments of the present invention, and that other drawings can be obtained according to these drawings without inventive effort to a person skilled in the art.
Fig. 1 is a flow chart of a watermark processing method according to an embodiment of the present invention;
fig. 2 is a flow chart of another watermark processing method according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of playing N first pictures according to an embodiment of the present invention;
fig. 4 is a flowchart of another method for processing watermark information according to an embodiment of the present invention;
fig. 5 is a schematic flow chart of playing M second pictures according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a watermark processing apparatus according to an embodiment of the present invention
Fig. 7 is a schematic structural diagram of a processing apparatus according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In embodiments of the present invention, "at least one" means one or more, and "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: there are three cases, a alone, a and B together, and B alone, wherein a, B may be singular or plural. In the text description of the present invention, the character "/" generally indicates that the front-rear associated object is an or relationship.
In order to enable a user to see a watermark information dynamic desalting process in a watermark desalting process so as to improve the diversity of picture display, the embodiment of the invention provides a watermark processing method, which comprises the steps of firstly identifying watermark information of a picture to be processed; determining the first transparency of the watermark information of each first picture in the N first pictures corresponding to the picture to be processed according to the first initial value and the first termination value of the transparency of the watermark information; the first transparency corresponding to the watermark information in each first picture is different, and the first termination value is smaller than the first initial value; and then, in a first playing time period, sequentially playing N first pictures according to the first transparency from high to low. In the first playing time period, the transparency of watermark information in N played first pictures is gradually decreased from high to low, so that a user can see the dynamic desalination process of the watermark information in the first playing time period, and the diversity of picture display is improved.
The watermark information in the picture refers to that some other information is added in the picture. For example, in the embodiment of the present invention, watermark information in a picture mainly refers to content such as homonymous numbers, characters, frame graphics, etc. added in the picture, and these watermark information are commonly used for propagating advertisement information.
The technical scheme of the invention is described in detail below by specific examples. The following embodiments may be combined with each other, and some embodiments may not be repeated for the same or similar concepts or processes.
Fig. 1 is a schematic flow chart of a watermark processing method according to an embodiment of the present invention, where the watermark processing method may be executed by a watermark processing apparatus, and the watermark processing apparatus may be set independently or may be set in a terminal. For example, referring to fig. 1, the method for processing the watermark may include:
s101, identifying watermark information of a picture to be processed.
By way of example, the watermark information may include the type of watermark information, the color of the watermark information, and the location of the watermark information. The watermark information may be digital, textual, or both digital and textual.
Optionally, when watermark information in the picture to be processed is identified, watermark information in the picture to be processed can be identified through a watermark identification technology, or a watermark identification model can be constructed in advance, and the watermark information in the picture to be processed can be identified through the watermark identification model; of course, the watermark information in the to-be-processed picture may be identified in other manners, and the embodiment of the present invention is merely described by taking the watermark information in the to-be-processed picture identified by the watermark identification technology or the watermark information in the to-be-processed picture identified by the watermark identification model as an example, but the embodiment of the present invention is not limited thereto. The watermark recognition model may be built offline for the terminal.
For example, when watermark information in a picture to be processed is identified through a watermark identification model, the type of the watermark information, the color of the watermark information and the position of the watermark information in the picture to be processed can be identified, and the format of the watermark information can be JSON format and stored in an array form.
Taking watermark information as a digital number of 123456 as an example, identifying the picture to be processed through a watermark identification model to obtain watermark information of 123456 in the picture to be processed, wherein the watermark information of 123456 can be expressed in a format of 6 groups of numbers; wherein, the array corresponding to the number "1" is: [ { type: 'number', value: '1', color: 'yellow', location: { top: xx1, left: xy1, bottom: yx1, right: yy1} ]; the array corresponding to the number "2" is: [ { type: 'number', value: '2', color: 'green', location: { top: xx2, left: xy2, bottom: yx2, right: yy2} ]; … …; similarly, the array corresponding to the number "6" is: [ { type: 'number', value: '6', color: 'red', location: { top: xx6, left: xy6, bottom: yx6, right: yy6} ]. It can be seen that the location area where each number 1 is located is a rectangular area.
After watermark information in the picture to be processed is identified by the watermark identification model, the following S102 may be performed:
s102, determining the first transparency of watermark information of each first picture in N first pictures corresponding to the picture to be processed according to the first initial value and the first termination value of the transparency of the watermark information.
The first transparency corresponding to the watermark information in each first picture is different, the first termination value is smaller than the first initial value, and N is a positive integer greater than or equal to 2. For example, N may be determined according to the first play period and the play speed. The first playing period may be understood as a period of time required for a user to view the transparency of watermark information in N first pictures from the first initial value to the first termination value. For example, when the first playing period may be 200ms and the playing speed is that one picture is played every 2 ms, it is determined that 100 first pictures may be played within the 200ms, that is, N is equal to 100.
The first initial value may be understood as a current transparency value of the watermark information in the picture to be processed after the picture to be processed is acquired. For example, the first initial value of the transparency of the watermark information may be 1, and the first termination value may be 0.5, and of course, the first initial value and the first termination value may also be other values, which may be specifically set according to practical needs, where the embodiment of the present invention only uses the first initial value of the transparency of the watermark information may be 1, and the first termination value may be 0.5 as an example for illustration, but the embodiment of the present invention is not limited thereto.
It should be noted that, in the embodiment of the present invention, each of N first pictures corresponding to a picture to be processed is the picture to be processed, and only the transparency of watermark information in each first picture is different from the transparency of watermark information in the picture to be processed.
After determining the first transparency of the watermark information of each of the N first pictures corresponding to the to-be-processed picture according to the first initial value and the first termination value of the transparency of the watermark information, in a first playing time period, sequentially playing the N first pictures according to the first transparency from high to low, namely executing the following S103:
and S103, in a first playing time period, sequentially playing N first pictures according to the first transparency from high to low.
For example, after determining the first transparency of the watermark information of each of the 100 first pictures corresponding to the to-be-processed picture according to the first initial value 1 and the first termination value 0.5 of the transparency of the watermark information, the 100 first pictures can be sequentially played according to the first transparency from high to low within the first playing time period of 200 ms. As the transparency of the watermark information in the 100 first pictures which are sequentially played in 200ms is gradually decreased from high to low, a user can see the dynamic desalination process of the watermark information in 200ms, and the diversity of picture display is improved.
Therefore, the watermark processing method provided by the embodiment of the invention firstly identifies the watermark information of the picture to be processed; determining the first transparency of the watermark information of each first picture in the N first pictures corresponding to the picture to be processed according to the first initial value and the first termination value of the transparency of the watermark information; the first transparency corresponding to the watermark information in each first picture is different, and the first termination value is smaller than the first initial value; and then, in a first playing time period, sequentially playing N first pictures according to the first transparency from high to low. In the first playing time period, the transparency of watermark information in N played first pictures is gradually decreased from high to low, so that a user can see the dynamic desalination process of the watermark information in the first playing time period, and the diversity of picture display is improved.
In order to more clearly describe how to determine the first transparency of the watermark information of each of the N first pictures corresponding to the to-be-processed picture according to the first initial value and the first termination value of the transparency of the watermark information in the embodiment of the present invention, for example, as shown in fig. 2, fig. 2 is a schematic flow diagram of another processing method of the watermark provided in the embodiment of the present invention, where the processing method of the watermark may further include:
S201, determining a first transparency interval of watermark information of two adjacent pictures according to a first initial value, a first termination value and N of transparency of watermark information.
It is understood that the first transparency intervals of watermark information of two adjacent pictures may be equal or unequal. For example, the first transparency interval between the 2 nd picture and the 3 rd picture may be equal to or not equal to the first transparency interval between the 3 rd picture and the 4 th picture. For convenience of description, in the embodiment of the present invention, description will be given by taking an example that first transparency intervals of watermark information of two adjacent pictures are equal.
For example, taking watermark information as "123456", the first initial value of transparency of watermark information as 1, the first termination value as 0.5, and n as 100 as an example, according to that transparency of watermark information in 100 first pictures is gradually decreased from the first initial value 1 to 0.5, a first transparency interval of watermark information of two adjacent pictures in 100 pictures can be calculated.
After the first transparency interval of the watermark information of the two adjacent pictures is calculated, the first transparency of the watermark information of each of the N first pictures corresponding to the to-be-processed picture may be determined according to the first transparency interval, that is, the following S202 is executed:
S202, determining the first transparency of watermark information of each first picture in N first pictures corresponding to the pictures to be processed according to the first transparency interval.
For example, in combination with the description in S201, after the first transparency interval 0.005 is calculated, the first transparency of watermark information in each of 100 first pictures may be determined according to the first transparency interval 0.005. The first transparency of the watermark information in the 1 st first picture is 1, the first transparency of the watermark information in the 2 nd first picture is 0.995, the first transparency of the watermark information in the 3 rd first picture is 0.990, the first transparency of the watermark information in the 4 th first picture is 0.985, and so on, and the first transparency of the watermark information in the 100 th first picture is 0.5, so that the first transparency of the watermark information of each of the 100 first pictures is obtained.
After obtaining the first transparency of the watermark information in each of the 100 first pictures, the 100 first pictures can be sequentially played within the first playing time period of 200ms according to the first transparency of the watermark information in each of the 100 first pictures from high to low. Since the transparency of watermark information in 100 first pictures played in 200ms is gradually decreased from high to low, users can see the dynamic desalination process of watermark information in 200ms, and thus the diversity of picture display is improved.
It can be understood that, in the first playing period, when N first pictures are sequentially played according to the first transparency of the watermark information in each first picture from high to low, for the first pixel point belonging to the watermark information, the first pixel point is played according to the first transparency of the watermark information in the first picture, and for the second pixel point not belonging to the watermark information, the second pixel point is played according to the first initial value, for example, please refer to fig. 3, fig. 3 is a schematic flow chart of playing N first pictures provided in the embodiment of the invention, where the method may include:
s301, determining position information of watermark information in each of N first pictures.
For example, when determining the position information of the watermark information in the first picture, the watermark identification model may identify the first picture, so as to obtain the type of the watermark information, the color of the watermark information, and the position information of the watermark information. The position information of the watermark information can be represented by coordinates of four points, namely an upper point, a lower point, a left point and a right point, of the watermark information, and the position of the obtained watermark information is a rectangular area.
Taking watermark information as '123456' as an example, identifying the picture to be processed through a watermark identification model, so as to obtain watermark information '123456' in the picture to be processed, wherein the watermark information '123456' can be expressed in a format of 6 groups of numbers; wherein, the array corresponding to the number "1" is: [ { type: 'number', value: '1', color: 'yellow', location: { top: xx1, left: xy1, bottom: yx1, right: yy1} ]; the array corresponding to the number "2" is: [ { type: 'number', value: '2', color: 'green', location: { top: xx2, left: xy2, bottom: yx2, right: yy2} ]; … …; similarly, the array corresponding to the number "6" is: [ { type: 'number', value: '6', color: 'red', location: { top: xx6, left: xy6, bottom: yx6, right: yy6} ]. It can be seen that the location area where each number is located is a rectangular area.
After determining the region information where the watermark information is located in the first picture, the following S302 may be performed:
s302, respectively matching the color of each pixel point in the position information with the color of the watermark information in the first picture, and determining a first pixel point matched with the color of the watermark information in the first picture and a second pixel point not matched with the color of the watermark information in the first picture.
It can be understood that in the embodiment of the present invention, color matching may be understood as the same color, or may be understood as the colors are different, but are relatively close and almost the same, specifically may be set according to actual needs, and the embodiment of the present invention is not limited further herein.
After the position information of the watermark information in the first picture is obtained through the step S301, the color of each pixel point in the position information of the watermark information is matched with the color of the watermark information, and if the color of the first pixel point in the position information of the watermark information is matched with the color of the watermark information, the first pixel point is indicated to be the pixel point in the watermark information; conversely, if the color of the second pixel point in the position information where the watermark information is located is not matched with the color of the watermark information, the second pixel point is not the pixel point in the watermark information, so that the first pixel point matched with the color of the watermark information in the first picture and the second pixel point not matched with the color of the watermark information in the first picture can be determined.
Taking watermark information as "123456" as an example, each pixel point in the position area where the number "1" is located may be first matched with the color of the watermark information, and since the position area corresponding to the number "1" is an area formed by { top: xx1, left: xy1, bottom: yx1, right: yy1}, the area includes a plurality of pixel points, each pixel point in the area may be matched with the color of the number "1", if the color of the first pixel point in the area where the number "1" is located is matched with the color of the number "1", it is indicated that the first pixel point is a pixel point in the number "1"; conversely, if the color of the second pixel point in the area where the number "1" is located does not match the color of the number "1", it is indicated that the second pixel point is not the pixel point in the number "1". Then, each pixel point in the position area where the number "2" is located can be matched with the color of the number "2", and because the position area corresponding to the number "2" is an area formed by { top: xx2, left: xy2, bottom: yx2, right: yy2}, each pixel point in the area can be matched with the color of the number "2", if the color of the first pixel point in the area where the number "2" is located is matched with the color of the number "2", the first pixel point is the pixel point in the number "2"; conversely, if the color of the second pixel point in the area where the number "2" is located does not match the color of the number "2", it is indicated that the second pixel point is not the pixel point in the number "2". The color of each pixel point in the area where each number in the watermark information "123456" is located can be matched in turn similarly, so as to obtain a first pixel point matched with the color of the watermark information and a second pixel point not matched with the color of the watermark information in the position information of the watermark information "123456".
After determining the first pixel point matching the color of the watermark information in the first picture and the second pixel point not matching the color of the watermark information in the first picture, respectively, the following S303 may be performed:
s303, playing the first pixel point according to the first transparency of the watermark information in the first picture, and playing the second pixel point according to the first initial value.
In connection with the above description in S302, in matching the color of each pixel in the region where the number "1" in the first picture is located with the color of the number "1", matching the color of each pixel in the region where the number "2" is located with the color of the number "2", matching the color of each pixel in the region where the number "3" is located with the color of the number "3", matching the color of each pixel in the region where the number "4" is located with the color of the number "4", matching the color of each pixel in the region where the number "5" is located with the color of the number "5", respectively, after the color of each pixel point in the region where the number '6' is located is matched with the color of the number '6', playing the first pixel point according to the first transparency of the watermark information in the first picture, namely when playing 100 first pictures from high to low according to the first transparency, wherein the first transparency of the first pixel point in the 1 st first picture is 1, the first transparency of the first pixel point in the 2 nd first picture is 0.995, the first transparency of the first pixel point in the 3 rd first picture is 0.990, the first transparency of the first pixel point in the 4 th first picture is 0.985, and the like, and the first transparency of the first pixel point in the 100 th first picture is 0.5; meanwhile, for the second pixel point which does not belong to the watermark information in the first picture, the second pixel point is played according to the first initial value, namely when 100 first pictures are played according to the first transparency from high to low, the first transparency of the second pixel point in the 1 st first picture is 1, the first transparency of the second pixel point in the 2 nd first picture is 1, the first transparency of the second pixel point in the 3 rd first picture is 1, the first transparency of the second pixel point in the 4 th first picture is 1, and the like, so that when 100 first pictures are played in the first playing time period, only the first pixel point in the 100 first pictures are played according to the sequence of the first transparency from high to low, and in the playing process, the transparency of the second pixel point in the 100 first pictures is kept unchanged, so that the transparency of the second pixel point in the 100 first pictures is not reduced due to the lower transparency of the pixel point in the watermark information, and other pixel points in the lower quality area of the picture are not reduced.
Therefore, in the embodiment of the invention, when playing N first pictures, judging whether the color of each pixel point in the position information of the watermark information in the first pictures is matched with the color of the watermark information or not so as to determine a first pixel point matched with the color of the watermark information in the first pictures and a second pixel point not matched with the color of the watermark information in the first pictures; and then, playing the first pixel point according to the first transparency of the watermark information in the first picture, and playing the second pixel point according to the first initial value. In the first playing time period, the transparency of the first pixel points in the N played first pictures is gradually decreased from high to low, so that a user can see the dynamic desalination process of watermark information in the first playing time period, and the diversity of picture display is improved. In addition, the transparency of the second pixel points in the N first pictures is kept unchanged, so that the transparency of the first pixel points in the watermark information is not reduced along with gradual reduction of the transparency of the first pixel points, and the quality of the pictures is improved.
Based on the embodiment shown in any one of fig. 1 to 3, since the transparency of watermark information in N first pictures played in the first playing time period is gradually decreased from high to low, a user can see the dynamic desalination process of watermark information in the first playing time period, thereby improving the diversity of picture display. In order to improve the quality of the finally displayed picture, a user can further acquire the picture without watermark, the second transparency of watermark information of each piece of second picture in M pieces of second pictures corresponding to the picture to be processed can be determined according to the first termination value and the second termination value of transparency of watermark information, and the target pixel increment of watermark information of each piece of second picture can be determined according to the second initial value and the third termination value of pixel increment of watermark information; and then, in a second playing time period, sequentially playing M second pictures according to the second transparency from low to high and the target pixel increment, so that the finally played second picture does not contain watermark information any more, and a user can see the process of dynamically dissolving the watermark information in the second playing time period. For example, referring to fig. 4, fig. 4 is a flowchart of another method for processing watermark information according to an embodiment of the present invention, where the method for processing watermark information may further include:
S401, determining second transparency of watermark information of each second picture in M second pictures corresponding to the pictures to be processed according to the first and second termination values of transparency of the watermark information.
The second transparency corresponding to watermark information in each of M second pictures is different, the first termination value is smaller than the second termination value, and M is a positive integer greater than or equal to 2. For example, M may be determined according to the second play period and the play speed. The second playing time period may be understood as a time period required for a user to view the watermark dissolving process in the M second pictures. For example, when the second playing period may be 200ms and the playing speed is that one picture is played every 2 ms, 100 second pictures may be played within the 200ms, that is, M is equal to 100.
Optionally, when determining the second transparency of the watermark information of each of the M second pictures corresponding to the to-be-processed picture according to the first termination value and the second termination value of the transparency of the watermark information, the second transparency interval of the watermark information of two adjacent pictures may be determined according to the first termination value, the second termination value and the M of the transparency of the watermark information; and determining the second transparency of the watermark information of each second picture according to the second transparency interval.
It is understood that the second transparency intervals of watermark information of two adjacent pictures may be equal or unequal. For example, the second transparency interval between the 2 nd picture and the 3 rd picture may be equal to or not equal to the second transparency interval between the 3 rd picture and the 4 th picture. For convenience of description, in the embodiment of the present invention, an example will be described in which the second transparency intervals of watermark information of two adjacent pictures are equal.
For example, taking the watermark information as "123456", the transparency of the watermark information is a first termination value of 0.5, the second termination value is 1, and m is 100 as an example, according to the transparency of the watermark information in 100 second pictures, the transparency of the watermark information in the 100 second pictures is gradually increased from the first termination value of 0.5 to the second termination value of 1, so that the second transparency interval of the watermark information in two adjacent pictures in the 100 pictures can be calculated. After the second transparency interval of 0.05 is calculated, the second transparency of watermark information in each of the 100 second pictures can be determined according to the second transparency interval of 0.005. Wherein the second transparency of the watermark information in the 1 st second picture is 0.5, the second transparency of the watermark information in the 2 nd second picture is 0.505, the second transparency of the watermark information in the 3 rd second picture is 0.51, the second transparency of the watermark information in the 4 th second picture is 0.515, and so on, the second transparency of the watermark information in the 100 th second picture is 1, thereby obtaining the second transparency of the watermark information of each of the 100 second pictures.
S402, determining the target pixel increment of the watermark information of each second picture according to the second initial value and the third termination value of the pixel increment of the watermark information.
For example, the second initial value of the pixel increment may be 0%, and the third ending value may be 100%, and of course, other values may also be used, where the embodiment of the present invention only uses the example that the second initial value of the pixel increment may be 0%, and the third ending value may be 100% as an example, and may be specifically set according to actual needs, and the embodiment of the present invention is not limited further. Where the pixel increment may be represented by beta.
Optionally, when determining the target pixel increment of the watermark information of each second picture according to the second initial value and the third termination value of the pixel increment of the watermark information, determining the pixel increment interval of the watermark information of two adjacent pictures according to the second initial value, the third termination value and M of the pixel increment of the watermark information; and determining the target pixel increment of the watermark information of each second picture according to the pixel increment interval.
It will be appreciated that the pixel increment intervals of watermark information for two adjacent pictures may or may not be equal. For example, the pixel increment interval between the 2 nd and 3 rd pictures may be equal to or not equal to the pixel increment interval between the 3 rd and 4 th pictures. For convenience of description, in the embodiment of the present invention, an example will be described in which pixel increment intervals of watermark information of two adjacent pictures are equal.
Also for example, taking watermark information as "123456", the second initial value of the pixel increment may be 0%, the third ending value may be 100%, and M is 100 as an example, according to that the pixel increment of watermark information in 100 second pictures is gradually increased from the second initial value of 0% to the third ending value of 100%, the pixel increment interval of watermark information of two adjacent pictures in 100 pictures may be calculated to be 1%. After the pixel increment interval of the watermark information is calculated to be 1%, the target pixel increment of the watermark information in each of the 100 second pictures can be determined according to the pixel increment interval of 1%. Wherein the target pixel increment of watermark information in the 1 st second picture is 0%, the target pixel increment of watermark information in the 2 nd second picture is 1%, the target pixel increment of watermark information in the 3 rd second picture is 2%, the target pixel increment of watermark information in the 4 th second picture is 3%, and so on, the target pixel increment of watermark information in the 100 th second picture is 100%, thereby obtaining the target pixel increment of watermark information of each second picture in the 100 second pictures.
It should be noted that, in the embodiment of the present invention, there is no sequence between S401 and S402, and S401 may be executed first, and then S402 may be executed. S402 may be executed first, and S401 may be executed later; of course, S401 and S402 may be performed simultaneously, and the embodiment of the present invention will be described by taking S401 and S402 as examples, but the embodiment of the present invention is not limited thereto.
After determining the second transparency and the target pixel increment of the watermark information of each second picture, M second pictures can be sequentially played in the second playing time period according to the second transparency of the watermark information of each second picture from low to high and the target pixel increment, namely, the following S403 is executed:
s403, in a second playing time period, M second pictures are sequentially played according to the second transparency from low to high and the target pixel increment.
In combination with the descriptions in S401 and S402, after obtaining the second transparency of the watermark information and the target pixel increment of each of the 100 second pictures, respectively, 100 second pictures can be sequentially played within the second playing time period of 200ms according to the second transparency from low to high and the corresponding target pixel increment. As the target pixel increment of watermark information in 100 second pictures which are sequentially played is gradually increased within 200ms and the second transparency of the corresponding watermark information is gradually increased, a user can see the dynamic dissolving process of the watermark information within 200ms under the condition of ensuring better picture quality, thereby improving the diversity of picture display.
It can be understood that, in the second playing period, when M second pictures are played in turn according to the second transparency from low to high and the target pixel increment, for a third pixel point belonging to watermark information, the third pixel point is played according to the second transparency of the watermark information and the target pixel increment in the second picture, and for a fourth pixel point not belonging to the watermark information, the fourth pixel point is played according to the current color of the first initial value and the fourth pixel point. For example, referring to fig. 5, fig. 5 is a schematic flow chart of playing M second pictures according to an embodiment of the present invention, where the method may include:
s501, determining position information of watermark information in each second picture in the M second pictures.
It can be understood that the position information of the watermark information in the first picture is the same as the position information of the watermark information in the second picture, and specifically, reference may be made to the description related to S301, and here, the embodiment of the present invention will not be described in detail.
It should be noted that, when playing M second pictures, S501 may not be executed to determine the location information of the watermark information in the second pictures, but the location information of the watermark information determined in S301 may be directly used.
S502, respectively matching the color of each pixel point in the position information with the color of the watermark information in the second picture, and determining a third pixel point matched with the color of the watermark information in the second picture and a fourth pixel point not matched with the color of the watermark information in the second picture.
It can be understood that the method for respectively matching the color of each pixel in the location information with the color of the watermark information is similar to the method for respectively matching the color of a plurality of pixels in the location information with the color of the watermark information in S302, and specifically, reference may be made to the related description in S302, and detailed description of the embodiment of the present invention is omitted.
It should be noted that, when determining whether each pixel in the position information where the watermark information is located is a pixel of the watermark information, S502 need not be executed, but it may be determined whether each pixel in the position information where the watermark information is located is a pixel of the watermark information directly according to the matching result obtained in S302.
S503, determining a target color corresponding to the third pixel point according to the target pixel increment of the watermark information of the second picture.
Optionally, when determining the target color corresponding to the third pixel according to the target pixel increment of the watermark information of the second picture, the colors of a plurality of fifth pixels around the third pixel may be obtained, where the fifth pixels are pixels not belonging to the watermark information; and determining a target color corresponding to the third pixel point according to the current color of the third pixel point, the average value of the colors of the plurality of fifth pixel points and the target pixel increment. For example, the colors of the fifth pixel points may be three or four, and may be specifically set according to actual needs, where the embodiment of the present invention is not limited specifically.
For example, the colors of four fifth pixel points not belonging to watermark information around the third pixel point may be obtained respectively, and an average avg of the colors of the four fifth pixel points may be calculated, and then according to the current color rgb of the third pixel point, the average avg of the colors of the four fifth pixel points, and the target pixel increment beta of the third pixel point, rgb+ (avg-rgb) is calculated, so as to obtain the target color of the third pixel point, where the target color of the third pixel point is the playing color of the third pixel point in the second playing time period.
After determining the second target transparency and the target color of the third pixel point, respectively, the following S504 may be performed:
s504, playing the third pixel point according to the second transparency of the watermark information in the second picture and the target color, and playing the fourth pixel point according to the first initial value and the current color of the fourth pixel point.
Also taking watermark information as "123456", in matching the color of each pixel in the region where the number "1" in the first picture is located with the color of the number "1", matching the color of each pixel in the region where the number "2" is located with the color of the number "2", matching the color of each pixel in the region where the number "3" is located with the color of the number "3", matching the color of each pixel in the region where the number "4" is located with the color of the number "4", matching the color of each pixel in the region where the number "5" is located with the color of the number "5", respectively, after the color of each pixel point in the region where the number '6' is located is matched with the color of the number '6', playing the third pixel point according to the calculated second transparency and target color of the watermark information in the second picture, namely playing 100 second pictures from low to high according to the second transparency, wherein the second transparency of the third pixel point in the 1 st first picture is 0.5, and the target color corresponding to the third pixel point is rgb+ (avg-rgb) 0%; the second transparency of the third pixel point in the 2 nd second picture is 0.505, and the target color corresponding to the third pixel point is rgb+ (avg-rgb) 1%; the second transparency of the third pixel point in the 3 rd second picture is 0.51, and the target color corresponding to the third pixel point is rgb+ (avg-rgb) 2%; the second transparency of the third pixel point in the 4 th second picture is 0.515, and the target color corresponding to the third pixel point is rgb+ (avg-rgb) 3%; similarly, the second transparency of the third pixel point in the 100 th second picture is 1, and the target color corresponding to the third pixel point is rgb+ (avg-rgb) 100%; meanwhile, for a fourth pixel point which does not belong to watermark information in the second picture, playing a fourth pixel according to the first initial value and the current color of the fourth pixel point, namely when 100 second pictures are played according to the second transparency from low to high, wherein the transparency of the fourth pixel point in the 1 st first picture is 1, and the color corresponding to the fourth pixel point is the current color of the fourth pixel point; the transparency of a fourth pixel point in the 2 nd second picture is 1, and the color corresponding to the fourth pixel point is the current color of the fourth pixel point; the transparency of a fourth pixel point in the 3 rd second picture is 1, and the color corresponding to the fourth pixel point is the current color of the fourth pixel point; the transparency of a fourth pixel point in the 4 th second picture is 1, and the color corresponding to the fourth pixel point is the current color of the fourth pixel point; similarly, the transparency of the fourth pixel point in the 100 th second picture is 1, and the color corresponding to the fourth pixel point is the current color of the fourth pixel point. Because the target pixel increment of watermark information in 100 second pictures sequentially played in the second playing time period of 200ms is gradually increased, and the second transparency of the corresponding watermark information is gradually increased, a user can see the dynamic dissolving process of the watermark information in 200ms under the condition of ensuring better picture quality, thereby improving the diversity of picture display.
Fig. 6 is a schematic structural diagram of a watermark processing apparatus 60 according to an embodiment of the present invention, for example, referring to fig. 6, the watermark processing apparatus 60 may include:
the identifying unit 601 is configured to identify watermark information of a picture to be processed.
The processing unit 602 is configured to determine, according to a first initial value and a first termination value of transparency of watermark information, first transparency of watermark information of each of N first pictures corresponding to a picture to be processed; the first transparency corresponding to the watermark information in each first picture is different, the first termination value is smaller than the first initial value, and N is a positive integer greater than or equal to 2.
And the playing unit 603 is configured to sequentially play the N first pictures according to the first transparency from high to low in the first playing period.
Optionally, the processing unit 602 is specifically configured to determine a first transparency interval of watermark information of two adjacent pictures according to a first initial value, a first termination value, and N of transparency of watermark information; and determining the first transparency of the watermark information of each first picture in the N first pictures corresponding to the pictures to be processed according to the first transparency interval.
Optionally, the processing unit 602 is further configured to determine, for each of the N first pictures, location information of the watermark information in the first picture; and respectively matching the color of each pixel point in the position information with the color of the watermark information in the first picture, and determining a first pixel point matched with the color of the watermark information in the first picture and a second pixel point not matched with the color of the watermark information in the first picture.
The playing unit 603 is specifically configured to play the first pixel according to the first transparency of the watermark information in the first picture, and play the second pixel according to the first initial value.
Optionally, the processing unit 602 is further configured to determine, according to the first termination value and the second termination value of the transparency of the watermark information, a second transparency of watermark information of each of M second pictures corresponding to the to-be-processed picture; the second transparency corresponding to watermark information in each of M second pictures is different, the first termination value is smaller than the second termination value, and M is a positive integer greater than or equal to 2; and determining the target pixel increment of the watermark information of each second picture according to the second initial value and the third termination value of the pixel increment of the watermark information.
The playing unit 603 is further configured to sequentially play M second pictures according to the second transparency from low to high and the target pixel increment in the second playing period.
Optionally, the processing unit 602 is specifically configured to determine a second transparency interval of watermark information of two adjacent pictures according to the first termination value, the second termination value, and M of transparency of watermark information; and determining the second transparency of the watermark information of each second picture according to the second transparency interval.
Optionally, the processing unit 602 is specifically configured to determine a pixel increment interval of watermark information of two adjacent pictures according to the second initial value, the third termination value and M of the pixel increment of watermark information; and determining the target pixel increment of the watermark information of each second picture according to the pixel increment interval.
Optionally, the processing unit 602 is further configured to determine, for each of the M second pictures, location information where the watermark information is located in the second picture; the color of each pixel point in the position information is respectively matched with the color of watermark information in the second picture, and a third pixel point matched with the color of watermark information in the second picture and a fourth pixel point not matched with the color of watermark information in the second picture are determined; and determining the target color corresponding to the third pixel point according to the target pixel increment of the watermark information of the second picture.
The playing unit 603 is specifically configured to play the third pixel according to the second transparency of the watermark information in the second picture and the target color, and play the fourth pixel according to the first initial value and the current color of the fourth pixel.
Optionally, the processing unit 602 is specifically configured to obtain colors of a plurality of fifth pixel points around the third pixel point, where the fifth pixel point is a pixel point that does not belong to the watermark text; and determining a target color corresponding to the third pixel point according to the current color of the third pixel point, the average value of the colors of the plurality of fifth pixel points and the target pixel increment.
Optionally, the identifying unit 601 is specifically configured to construct a watermark identifying model; and identifying watermark information in the picture to be processed through a watermark identification model.
The watermark processing apparatus 60 in the embodiment of the present invention may execute the technical scheme of the watermark processing method in any of the foregoing embodiments, and the implementation principle and beneficial effects of the watermark processing method are similar to those of the watermark processing method, and will not be described herein.
Fig. 7 is a schematic structural diagram of a processing device 70 according to an embodiment of the present invention, for example, referring to fig. 7, the processing device may include a processor 701 and a memory 702, where,
memory 702 is used to store program instructions;
the processor 701 is configured to read the program instructions in the memory 702, and execute the technical scheme of the watermark processing method according to any of the embodiments described above according to the program instructions in the memory 702, and the implementation principle and the beneficial effects of the watermark processing method are similar to those of the watermark processing method, and are not described herein.
The embodiment of the present invention further provides a computer storage medium, which includes instructions, when the instructions are executed by one or more processors, to cause the processing device to execute the technical scheme of the watermark processing method shown in any of the foregoing embodiments, where the implementation principle and the beneficial effects are similar to those of the watermark processing method, and are not described herein again.
The embodiment of the invention also provides a chip, on which a computer program is stored, and when the computer program is executed by a processor, the technical scheme of the watermark processing method shown in any of the above embodiments is executed, and the implementation principle and the beneficial effects of the watermark processing method are similar to those of the watermark processing method, and are not repeated here.
The processor in the above embodiments may be a general purpose processor, a digital signal processor (digital signal processor, DSP), an application specific integrated circuit (application specific integrated circuit, ASIC), an off-the-shelf programmable gate array (field programmable gate array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software modules in a decoding processor. The software modules may be located in a memory medium well known in the art such as random access memory (randomaccess memory, RAM), flash memory, read-only memory (ROM), programmable read-only memory, or electrically erasable programmable memory, registers, and the like. The storage medium is located in a memory, and the processor reads instructions from the memory and, in combination with its hardware, performs the steps of the method described above.
In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in hardware plus software functional units.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The foregoing program may be stored in a computer readable storage medium. The program, when executed, performs steps including the method embodiments described above; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.

Claims (18)

1. A method of processing a watermark, comprising:
identifying watermark information of a picture to be processed;
determining the first transparency of the watermark information of each first picture in N first pictures corresponding to the picture to be processed according to the first initial value and the first termination value of the transparency of the watermark information; the first transparency corresponding to the watermark information in each first picture is different, the first termination value is smaller than the first initial value, and N is a positive integer greater than or equal to 2;
Sequentially playing the N first pictures according to the first transparency from high to low in a first playing time period;
the identifying watermark information in the to-be-processed picture comprises the following steps:
constructing a watermark identification model;
and identifying watermark information in the picture to be processed through the watermark identification model.
2. The method according to claim 1, wherein determining the first transparency of the watermark information of each of the N first pictures corresponding to the to-be-processed picture according to the first initial value and the first termination value of the transparency of the watermark information includes:
determining a first transparency interval of watermark information of two adjacent pictures according to a first initial value, a first termination value and N of transparency of the watermark information;
and determining the first transparency of the watermark information of each first picture in the N first pictures corresponding to the pictures to be processed according to the first transparency interval.
3. The method of claim 2, wherein playing the N first pictures comprises:
determining the position information of the water printing information in each first picture in the N first pictures;
Respectively matching the color of each pixel point in the position information with the color of watermark information in the first picture, and determining a first pixel point matched with the color of watermark information in the first picture and a second pixel point not matched with the color of watermark information in the first picture;
and playing the first pixel point according to the first transparency of the watermark information in the first picture, and playing the second pixel point according to the first initial value.
4. A method according to any one of claims 1-3, wherein, during the first playing period, after sequentially playing the N pictures from high to low according to transparency, the method further comprises:
determining the second transparency of the watermark information of each second picture in M second pictures corresponding to the picture to be processed according to the first termination value and the second termination value of the transparency of the watermark information; the second transparency corresponding to watermark information in each of the M second pictures is different, the first termination value is smaller than the second termination value, and M is a positive integer greater than or equal to 2;
determining a target pixel increment of the watermark information of each second picture according to a second initial value and a third termination value of the pixel increment of the watermark information;
And in a second playing time period, sequentially playing the M second pictures according to the second transparency from low to high and the target pixel increment.
5. The method according to claim 4, wherein determining the second transparency of the watermark information of each of the M second pictures corresponding to the to-be-processed picture according to the first and second termination values of the transparency of the watermark information includes:
determining a second transparency interval of watermark information of two adjacent pictures according to the first termination value, the second termination value and M of the transparency of the watermark information;
and determining the second transparency of the watermark information of each second picture according to the second transparency interval.
6. The method of claim 4, wherein determining the target pixel delta for the watermark information for each second picture based on the second initial value and the third ending value for the pixel delta for the watermark information comprises:
determining the pixel increment interval of watermark information of two adjacent pictures according to the second initial value, the third termination value and M of the watermark information pixel increment;
And determining the target pixel increment of the watermark information of each second picture according to the pixel increment interval.
7. The method of claim 6, wherein playing the M second pictures comprises:
determining the position information of the watermark information in each second picture in the M second pictures;
respectively matching the color of each pixel point in the position information with the color of watermark information in the second picture, and determining a third pixel point matched with the color of watermark information in the second picture and a fourth pixel point not matched with the color of watermark information in the second picture;
determining a target color corresponding to the third pixel point according to the target pixel increment of the watermark information of the second picture;
and playing the third pixel point according to the second transparency of the watermark information in the second picture and the target color, and playing the fourth pixel point according to the first initial value and the current color of the fourth pixel point.
8. The method according to claim 7, wherein the determining the target color corresponding to the third pixel point according to the target pixel increment of the watermark information of the second picture includes:
Respectively obtaining the colors of a plurality of fifth pixel points around the third pixel point, wherein the fifth pixel points are pixel points which do not belong to the watermark text;
and determining a target color corresponding to the third pixel point according to the current color of the third pixel point, the average value of the colors of the plurality of fifth pixel points and the target pixel increment.
9. A watermark processing apparatus, comprising:
the identification unit is used for identifying watermark information of the picture to be processed;
the processing unit is used for determining the first transparency of the watermark information of each first picture in the N first pictures corresponding to the picture to be processed according to the first initial value and the first termination value of the transparency of the watermark information; the first transparency corresponding to the watermark information in each first picture is different, the first termination value is smaller than the first initial value, and N is a positive integer greater than or equal to 2;
the playing unit is used for sequentially playing the N first pictures according to the first transparency from high to low in a first playing time period;
the identification unit is specifically used for constructing a watermark identification model; and identifying watermark information in the picture to be processed through the watermark identification model.
10. The apparatus of claim 9, wherein the device comprises a plurality of sensors,
the processing unit is specifically configured to determine a first transparency interval of watermark information of two adjacent pictures according to a first initial value, a first termination value and N of transparency of the watermark information; and determining the first transparency of watermark information of each first picture in the N first pictures corresponding to the pictures to be processed according to the first transparency interval.
11. The apparatus of claim 10, wherein the device comprises a plurality of sensors,
the processing unit is further configured to determine, for each of the N first pictures, location information where the watermark information is located in the first picture; respectively matching the color of each pixel point in the position information with the color of watermark information in the first picture, and determining a first pixel point matched with the color of watermark information in the first picture and a second pixel point not matched with the color of watermark information in the first picture;
the playing unit is specifically configured to play the first pixel according to the first transparency of the watermark information in the first picture, and play the second pixel according to the first initial value.
12. The device according to any one of claims 9 to 11, wherein,
the processing unit is further configured to determine, according to the first termination value and the second termination value of the transparency of the watermark information, a second transparency of watermark information of each of M second pictures corresponding to the to-be-processed picture; the second transparency corresponding to watermark information in each of the M second pictures is different, the first termination value is smaller than the second termination value, and M is a positive integer greater than or equal to 2; determining a target pixel increment of watermark information of each second picture according to a second initial value and a third termination value of the pixel increment of the watermark information;
and the playing unit is further used for sequentially playing the M second pictures according to the second transparency from low to high and the target pixel increment in a second playing time period.
13. The apparatus of claim 12, wherein the device comprises a plurality of sensors,
the processing unit is specifically configured to determine a second transparency interval of watermark information of two adjacent pictures according to the first termination value, the second termination value and M of transparency of the watermark information; and determining the second transparency of the watermark information of each second picture according to the second transparency interval.
14. The apparatus of claim 12, wherein the device comprises a plurality of sensors,
the processing unit is specifically configured to determine a pixel increment interval of watermark information of two adjacent pictures according to the second initial value, the third termination value and M of the watermark information pixel increment; and determining the target pixel increment of the watermark information of each second picture according to the pixel increment interval.
15. The apparatus of claim 14, wherein the device comprises a plurality of sensors,
the processing unit is further used for determining the position information of the watermark information in each of the M second pictures; respectively matching the color of each pixel point in the position information with the color of watermark information in the second picture, and determining a third pixel point matched with the color of watermark information in the second picture and a fourth pixel point not matched with the color of watermark information in the second picture; determining a target color corresponding to the third pixel point according to the target pixel increment of the watermark information of the second picture;
the playing unit is specifically configured to play the third pixel according to the second transparency of the watermark information in the second picture and the target color, and play the fourth pixel according to the first initial value and the current color of the fourth pixel.
16. The apparatus of claim 15, wherein the device comprises a plurality of sensors,
the processing unit is specifically configured to obtain colors of a plurality of fifth pixel points around the third pixel point, where the fifth pixel points are pixel points that do not belong to the watermark text; and determining a target color corresponding to the third pixel point according to the current color of the third pixel point, the average value of the colors of the plurality of fifth pixel points and the target pixel increment.
17. A processing device is characterized by comprising a processor and a memory, wherein,
the memory is used for storing program instructions;
the processor is configured to read the program instructions in the memory and execute the watermark processing method according to any one of the preceding claims 1-8 according to the program instructions in the memory.
18. A computer storage medium comprising instructions, wherein,
the instructions, when executed by one or more processors, cause a processing device to perform the method of processing a watermark as claimed in any one of claims 1 to 8.
CN201910657051.4A 2019-07-19 2019-07-19 Watermark processing method and device Active CN110378831B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910657051.4A CN110378831B (en) 2019-07-19 2019-07-19 Watermark processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910657051.4A CN110378831B (en) 2019-07-19 2019-07-19 Watermark processing method and device

Publications (2)

Publication Number Publication Date
CN110378831A CN110378831A (en) 2019-10-25
CN110378831B true CN110378831B (en) 2023-05-16

Family

ID=68254429

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910657051.4A Active CN110378831B (en) 2019-07-19 2019-07-19 Watermark processing method and device

Country Status (1)

Country Link
CN (1) CN110378831B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112308754B (en) * 2020-10-30 2023-08-18 东南数字经济发展研究院 Multi-decoding-end parallel extraction method for high-capacity robust watermark application

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101889433A (en) * 2007-12-13 2010-11-17 汤姆森许可贸易公司 Method and apparatus for inserting a removable visible watermark in an image and method and apparatus for removing such watermarks
CN103731759A (en) * 2013-12-09 2014-04-16 乐视网信息技术(北京)股份有限公司 Watermark adding method and device
CN105451035A (en) * 2015-11-13 2016-03-30 北京光慧鸿途科技股份有限公司 Video display method and video display system for preventing video copyright protection icons from being deleted or modified
CN106933467A (en) * 2017-02-25 2017-07-07 杭州领娱科技有限公司 Intelligent watermark moving method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101889433A (en) * 2007-12-13 2010-11-17 汤姆森许可贸易公司 Method and apparatus for inserting a removable visible watermark in an image and method and apparatus for removing such watermarks
CN103731759A (en) * 2013-12-09 2014-04-16 乐视网信息技术(北京)股份有限公司 Watermark adding method and device
CN105451035A (en) * 2015-11-13 2016-03-30 北京光慧鸿途科技股份有限公司 Video display method and video display system for preventing video copyright protection icons from being deleted or modified
CN106933467A (en) * 2017-02-25 2017-07-07 杭州领娱科技有限公司 Intelligent watermark moving method

Also Published As

Publication number Publication date
CN110378831A (en) 2019-10-25

Similar Documents

Publication Publication Date Title
US20210004962A1 (en) Generating effects on images using disparity guided salient object detection
CN109003231B (en) Image enhancement method and device and display equipment
CN110889824A (en) Sample generation method and device, electronic equipment and computer readable storage medium
CN110399842B (en) Video processing method and device, electronic equipment and computer readable storage medium
CN110796664B (en) Image processing method, device, electronic equipment and computer readable storage medium
US9734551B1 (en) Providing depth-of-field renderings
CN108737875B (en) Image processing method and device
CN111415358A (en) Image segmentation method and device, electronic equipment and storage medium
CN110838154A (en) Picture processing method and device
CN110969046A (en) Face recognition method, face recognition device and computer-readable storage medium
CN110378831B (en) Watermark processing method and device
CN110689014B (en) Method and device for detecting region of interest, electronic equipment and readable storage medium
CN109272526B (en) Image processing method and system and electronic equipment
CN108960012B (en) Feature point detection method and device and electronic equipment
CN110533020B (en) Character information identification method and device and storage medium
CN113487473B (en) Method and device for adding image watermark, electronic equipment and storage medium
EP3301908A1 (en) Numerical image conversion method and device, and storage medium and device
US9542760B1 (en) Parallel decoding JPEG images
CN112270384B (en) Loop detection method and device, electronic equipment and storage medium
CN111049735B (en) Group head portrait display method, device, equipment and storage medium
CN108495125B (en) Camera module testing method, device and medium
CN113052768A (en) Method for processing image, terminal and computer readable storage medium
CN113391779B (en) Parameter adjusting method, device and equipment for paper-like screen
CN110619597A (en) Semitransparent watermark removing method and device, electronic equipment and storage medium
CN111383289A (en) Image processing method, image processing device, terminal equipment and computer readable storage medium

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
GR01 Patent grant
GR01 Patent grant