CN111681151A - Image watermark detection method and device and computing equipment - Google Patents

Image watermark detection method and device and computing equipment Download PDF

Info

Publication number
CN111681151A
CN111681151A CN202010292263.XA CN202010292263A CN111681151A CN 111681151 A CN111681151 A CN 111681151A CN 202010292263 A CN202010292263 A CN 202010292263A CN 111681151 A CN111681151 A CN 111681151A
Authority
CN
China
Prior art keywords
target
image
watermark
color
threshold
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010292263.XA
Other languages
Chinese (zh)
Inventor
邢万祥
田强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hainan Chezhiyi Communication Information Technology Co ltd
Original Assignee
Hainan Chezhiyi Communication Information 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 Hainan Chezhiyi Communication Information Technology Co ltd filed Critical Hainan Chezhiyi Communication Information Technology Co ltd
Priority to CN202010292263.XA priority Critical patent/CN111681151A/en
Publication of CN111681151A publication Critical patent/CN111681151A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2201/00General purpose image data processing
    • G06T2201/005Image watermarking
    • G06T2201/0065Extraction of an embedded watermark; Reliable detection

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses an image watermark detection method, which is suitable for being executed in computing equipment, and comprises the following steps: generating a standard image of the target watermark, and intercepting images of specific parts in each image to be detected in batches according to the width and height values of the standard image to obtain a plurality of target images; calculating a color index of the target image based on the standard image, wherein the color index comprises at least one of color standard deviation, color average value, relative sizes of files after the target image is compressed and the standard image is compressed, and pixel matrix dot products of the target image and the standard image; and sequentially determining target images without the target watermarks according to the priority orders of the multiple combination modes of the color indexes, and judging the remaining target images as images with the target watermarks. The invention also discloses a computing device for executing the method.

Description

Image watermark detection method and device and computing equipment
Technical Field
The present invention relates to the field of image processing, and in particular, to an image watermark detection method, an image watermark detection apparatus, and a computing device.
Background
Watermarking is a digital copyright protection technology commonly used for multimedia resources such as digital images and videos, and is a mode of superposing a small picture or other digital signals with little visual influence on an original digital media, and whether a large amount of media data are protected by a specific watermark or not needs to be detected in practical application. One important indicator of watermark detection is computational performance, i.e., whether batch processing can be performed quickly in real time. Unlike conventional pattern recognition in the case of weak interference, such as OCR, Hu moments, etc., watermark recognition is usually performed under a background image of strong interference.
The current watermark identification methods include a probability distribution function method based on statistics, a Hu moment method and a face feature method. But the probability distribution function method ignores the geometric characteristics of the graph; the Hu moment method contains geometric characteristics, but has a good effect only on a graph with a relatively pure monochromatic graph, and is not suitable for a strong interference scene. The facial feature method is applicable only to facial images.
The neural network based on deep learning also has good effect on the aspect of watermark identification, but the method needs to manually index a large amount of gallery materials, has very large initialization workload and calculation workload, and also needs to use special hardware to complete the identification within relatively short time. If higher accuracy is needed, the adjustment parameters need to be refined, but the parameter adjustment needs to be carried out with accuracy statistics, so that the manual workload is large, the use cost is too high, the customization is difficult, and the interpretation of the recognition result is influenced.
Therefore, it is desirable to provide a faster and more efficient method of watermark identification.
Disclosure of Invention
In view of the above, the present invention provides an image watermark detection method, apparatus and computing device, which seek to solve, or at least solve, the above existing problems.
According to an aspect of the present invention, there is provided an image watermark detection method, adapted to be executed in a computing device, the method comprising the steps of: generating a standard image of the target watermark, and intercepting images of specific parts in each image to be detected in batches according to the width and height values of the standard image to obtain a plurality of target images; calculating a color index of the target image based on the standard image, wherein the color index comprises at least one of color standard deviation, color average value, relative sizes of files after the target image is compressed and the standard image is compressed, and pixel matrix dot products of the target image and the standard image; and sequentially determining target images without the target watermarks according to the priority orders of the multiple combination modes of the color indexes, and judging the remaining target images as images with the target watermarks.
Optionally, in the image watermark detection method according to the present invention, the color indexes are normalized index values, and the method further includes a step of calculating a relative size of the file: taking the size of a memory of a compressed monochromatic image with the same width and height as the standard image according to a preset format as the minimum value of the memory; the memory size of a white noise image which has the same width and height as the standard image and is generated by using a random number and compressed according to the preset format is used as the maximum memory value; and converting the memory size of the target image compressed according to the preset format into the corresponding relative size of the file based on the normalized mapping interval of the minimum value and the maximum value of the memory.
Optionally, in the image watermark detection method according to the present invention, the color average is an average of RGB three channels of all pixels in the target image; color standard deviation sigmaestThe formula for calculating the dot product P of the sum pixel matrix is:
Figure BDA0002450848980000021
P=S*A
where a and S are pixel matrices of the target image and the standard image, respectively, and N is the total number of pixels.
Optionally, in the image watermark detection method according to the present invention, the step of sequentially determining the target images without the target watermarks according to the priority order of the multiple combination manners of the color indexes includes: in the first priority, if the color standard deviation of the target image is smaller than a first threshold, judging that the target image does not contain the target watermark; in the second priority, if the color average value of the target image is greater than a second threshold, the target image is judged not to contain the target watermark; in the third priority, if the color average value of the target image is greater than the third threshold and the color standard deviation is less than the fourth threshold, it is determined that the target image does not contain the target watermark.
Optionally, in the image watermark detection method according to the present invention, the step of sequentially determining the target image without the target watermark according to the priority order of the multiple combination modes of the color indexes further includes: in the fourth priority, if the color average value of the target image is greater than the third threshold, the color standard deviation is less than the fourth threshold and the relative size of the file is greater than the fifth threshold, determining that the target image does not contain the target watermark; in the fifth priority, if the relative size of the file of the target image is smaller than a sixth threshold, the target image is judged not to contain the target watermark; in the sixth priority, if the relative file size of the target image is greater than the seventh threshold, it is determined that the target image does not contain the target watermark.
Optionally, in the image watermark detection method according to the present invention, the step of sequentially determining the target image without the target watermark according to the priority order of the multiple combination modes of the color indexes further includes: in the seventh priority, if the color standard deviation of the target image is smaller than an eighth threshold, the relative file size is smaller than a ninth threshold, and the pixel matrix dot product is smaller than a tenth threshold, determining that the target image does not contain the target watermark; in the eighth priority, if the pixel matrix dot product of the target image is smaller than an eleventh threshold, it is determined that the target image does not contain the target watermark.
Alternatively, in the image watermark detection method according to the present invention, the first threshold value is 0.014, the second threshold value is 0.98, the third threshold value is 0.93, the fourth threshold value is 0.25, the fifth threshold value is 2, the sixth threshold value is 1, the seventh threshold value is 28, the eighth threshold value is 0.1, the ninth threshold value is 4, the tenth threshold value is 0.5, and the eleventh threshold value is 0.007.
Optionally, in the image watermark detection method according to the present invention, an eleventh threshold value of the first target watermark is known, and the method further includes the step of determining eleventh threshold values of other target watermarks: respectively calculating the maximum dot product value of the first target watermark and other target watermarks, wherein the maximum dot product value of the target watermark i is Pi,max=Si*Si,SiA pixel matrix for the target watermark i; and calculating eleventh threshold values of other target watermarks respectively based on the eleventh threshold value of the first target watermark and the maximum click value of each target watermark.
Alternatively, in the image watermark detection method according to the present invention, the specific portion is an image area that is a predetermined distance away from the lower right corner of the target image.
According to another aspect of the present invention, there is provided an image watermark detection apparatus adapted to reside in a computing device, the apparatus comprising: the image intercepting module is suitable for generating a standard image of the target watermark and intercepting images of specific parts in each image to be detected in batches according to the width and height values of the standard image to obtain a plurality of target images; the index calculation module is suitable for calculating a color index of the target image based on the standard image, wherein the color index comprises at least one of color standard deviation, color average value, relative file sizes of the compressed target image and the compressed standard image, and pixel matrix dot products of the target image and the standard image; and the watermark determining module is suitable for sequentially determining the target images without the target watermarks according to the priority orders of the multiple combination modes of the color indexes, and determining the rest target images as the images with the target watermarks.
According to yet another aspect of the present invention, there is provided a computing device comprising: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs when executed by the processors implement the steps of the image watermark detection method as described above.
According to a further aspect of the present invention, there is provided a computer readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by a computing device, implement the steps of the image watermark detection method as described above.
According to the technical scheme of the invention, the method for rapidly and efficiently detecting whether the image contains the watermark in batch by carrying out decision tree analysis on the digital characteristics of the image is provided. Based on a specific non-interference target watermark image, the unlikely data is eliminated, the existing invalid data is eliminated, and the efficiency and the accuracy of the whole detection algorithm are improved. The scheme has the advantages of good user experience, quick, accurate and reliable detection, no need of special hardware equipment support, portability and expandability.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
To the accomplishment of the foregoing and related ends, certain illustrative aspects are described herein in connection with the following description and the annexed drawings, which are indicative of various ways in which the principles disclosed herein may be practiced, and all aspects and equivalents thereof are intended to be within the scope of the claimed subject matter. The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description read in conjunction with the accompanying drawings. Throughout this disclosure, like reference numerals generally refer to like parts or elements.
FIG. 1 shows a block diagram of a computing device 100, according to one embodiment of the invention;
FIG. 2 shows a flow diagram of an image watermark detection method 200 according to an embodiment of the invention;
FIG. 3 shows a schematic diagram of an image watermark detection method according to another embodiment of the invention;
FIG. 4 shows a schematic diagram of a standard image of a target watermark, according to one embodiment of the invention;
FIG. 5 shows a schematic diagram of a plurality of target images according to one embodiment of the invention; and
fig. 6 shows a block diagram of an image watermark detection apparatus 600 according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
FIG. 1 is a block diagram of a computing device 100 according to one embodiment of the invention. In a basic configuration 102, computing device 100 typically includes system memory 106 and one or more processors 104. A memory bus 108 may be used for communication between the processor 104 and the system memory 106.
Depending on the desired configuration, the processor 104 may be any type of processing, including but not limited to: a microprocessor (μ P), a microcontroller (μ C), a Digital Signal Processor (DSP), or any combination thereof. The processor 104 may include one or more levels of cache, such as a level one cache 110 and a level two cache 112, a processor core 114, and registers 116. The example processor core 114 may include an Arithmetic Logic Unit (ALU), a Floating Point Unit (FPU), a digital signal processing core (DSP core), or any combination thereof. The example memory controller 118 may be used with the processor 104, or in some implementations the memory controller 118 may be an internal part of the processor 104.
Depending on the desired configuration, system memory 106 may be any type of memory, including but not limited to: volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.), or any combination thereof. System memory 106 may include an operating system 120, one or more applications 122, and program data 124. In some embodiments, application 122 may be arranged to operate with program data 124 on an operating system. Program data 124 includes instructions that in computing device 100 according to the present invention program data 124 includes instructions for performing image watermark detection method 200.
Computing device 100 may also include an interface bus 140 that facilitates communication from various interface devices (e.g., output devices 142, peripheral interfaces 144, and communication devices 146) to the basic configuration 102 via the bus/interface controller 130. The example output device 142 includes a graphics processing unit 148 and an audio processing unit 150. They may be configured to facilitate communication with various external devices, such as a display or speakers, via one or more a/V ports 152. Example peripheral interfaces 144 may include a serial interface controller 154 and a parallel interface controller 156, which may be configured to facilitate communication with external devices such as input devices (e.g., keyboard, mouse, pen, voice input device, touch input device) or other peripherals (e.g., printer, scanner, etc.) via one or more I/O ports 158. An example communication device 146 may include a network controller 160, which may be arranged to facilitate communications with one or more other computing devices 162 over a network communication link via one or more communication ports 164.
A network communication link may be one example of a communication medium. Communication media may typically be embodied by computer readable instructions, data structures, program modules, and may include any information delivery media, such as carrier waves or other transport mechanisms, in a modulated data signal. A "modulated data signal" may be a signal that has one or more of its data set or its changes made in such a manner as to encode information in the signal. By way of non-limiting example, communication media may include wired media such as a wired network or private-wired network, and various wireless media such as acoustic, Radio Frequency (RF), microwave, Infrared (IR), or other wireless media. The term computer readable media as used herein may include both storage media and communication media.
Computing device 100 may be implemented as a server, such as a file server, a database server, an application server, a WEB server, etc., or as part of a small-form factor portable (or mobile) electronic device, such as a cellular telephone, a Personal Digital Assistant (PDA), a personal media player device, a wireless WEB-watch device, a personal headset device, an application specific device, or a hybrid device that include any of the above functions. Computing device 100 may also be implemented as a personal computer including both desktop and notebook computer configurations. In some embodiments, the computing device 100 is configured to perform the image watermark detection method 200.
Fig. 2 shows a flow diagram of an image watermark detection method 200 according to an embodiment of the present invention. The method 200 is executed in a computing device, such as the computing device 100, to detect whether a target watermark remains in an image under test in batch. The optimization of the method 200 is shown in fig. 3, and the method 200 of fig. 2 will be described in detail below with reference to fig. 3.
As shown in fig. 2, the method begins at step S210. In step S210, a standard image of the target watermark is generated, and images of specific portions in each to-be-detected image are cut in batch according to the width and height values of the standard image, so as to obtain a plurality of target images.
For each watermark identification, a corresponding watermark standard image can be generated. Fig. 4 is a standard image of a "car home" watermark. Fig. 5 is a set of a plurality of target images cut from each image to be measured in batch, and the target images have the same width and height as the standard images. The specific part can be an image area which is away from the lower right corner of the target image by a preset distance, the length and the width can be obtained through an identification command in imagewise software, and then the specific part is cut by using a 'convert-crop' script. Taking the "car home" picture watermark as an example, the watermark is regularly located at the lower right corner of the picture, and occupies pixels of about 20x70, so that the corresponding target image can be obtained by cutting the image to be detected. The complete cut script is as follows:
Figure BDA0002450848980000071
Figure BDA0002450848980000081
subsequently, in step S220, a color index of the target image is calculated based on the standard image, the color index including at least one of a color standard deviation, a color average, a relative file size after compression of the target image and after compression of the standard image, and a pixel matrix dot product of the target image and the standard image.
According to one embodiment, the color indicators are normalized indicator values, i.e. the color standard deviation is a normalized color standard deviation and the color mean is a normalized color mean. Specifically, the color average is an average of RGB three channels of all pixels in the target image. Color standard deviation sigmaestAnd the calculation formula of the pixel matrix dot product P is respectively as follows:
Figure BDA0002450848980000082
P=S*A
where a and S are pixel matrices of the target image and the standard image, respectively, and N is the total number of pixels. The image matrix operation is carried out by adopting a standard method of an opencv library. Each element of the color matrix is a pixel RGB color value, each pixel RGB value is converted into three double-precision floating point numbers between 0 and 255 during actual calculation, the variance is calculated by using a common-math 3 standard statistical function, and then the standard deviation of RGB is calculated, because the value range of the color is 0 to 255, the normalization is to divide the average value of the standard deviations of the RGB three colors by 255. The pixel matrix dot product can be directly calculated by adopting a matrix dot product function mat.dot (Mat) in an OpenCV software package.
In addition, the method 200 may further include a step of calculating the relative size of the file, specifically including: taking the size of a memory of a compressed monochromatic image with the same width and height as the standard image according to a preset format as the minimum value of the memory; the method comprises the steps that a white noise image which has the same width and height as a standard image and is generated by using a random number is compressed according to a preset format, and then the size of a memory is used as the maximum value of the memory; and converting the memory size of the target image compressed according to the preset format into the corresponding relative size of the file based on the normalized mapping interval of the minimum value and the maximum value of the memory. The predetermined format may be a currently-used image format, such as a PNG format, a JPG format, a JPEG format, and the like. If the memory size after the compression of the monochromatic image is a and the memory size after the compression of the white noise image is b, the corresponding relative size of the file can be calculated according to the memory size value c after the compression of the target image after the normalized mapping of the intervals [ a, b ] is carried out.
Subsequently, in step S220, the target images not including the target watermark are sequentially determined according to the priority order of the plurality of combinations of the color indexes, and the remaining target images are determined as images including the target watermark.
As shown in fig. 3, in the first priority, if the color standard deviation of the target image is smaller than the first threshold, it is determined that the target image does not contain the target watermark. Even if the watermark exists, the color of the picture is too close to the watermark, so that the picture cannot be identified by naked eyes and the application significance is not realized. The value range of the first threshold may be [0.01,0.012], preferably may be 0.014, but is not limited thereto.
And in the second priority, if the color average value of the target image is larger than a second threshold value, judging that the target image does not contain the target watermark. At this time, the picture is in an overexposure condition, the color of the picture is too close to the watermark, and the picture cannot be identified by naked eyes.
In the third priority, if the color average value of the target image is greater than the third threshold and the color standard deviation is less than the fourth threshold, it is determined that the target image does not contain the target watermark. In the third priority, graphics that are close to the two priority conditions above but are not screened out may be culled.
In the fourth priority, if the color average value of the target image is greater than the third threshold, the color standard deviation is less than the fourth threshold, and the relative size of the file is greater than the fifth threshold, it is determined that the target image does not contain the target watermark. On the premise of equal width and height of the image, when the information entropy (represented by the bit number after the image compression) displayed by the size of the file after the white noise image compression is the maximum, the watermark has a certain rule, and the information entropy after the compression is necessarily smaller than the information entropy of the white noise to a certain extent, so that some non-watermark images can be removed through the combination of the average value, the standard deviation and the size of the file.
In the fifth priority, if the relative file size of the target image is smaller than the sixth threshold, it is determined that the target image does not contain the target watermark. Like the fourth priority scheme, when the entropy of the compressed image information is smaller than that of a pure watermark, the compressed image information is a mark that the image cannot contain the watermark.
In the sixth priority, if the relative file size of the target image is greater than the seventh threshold, it is determined that the target image does not contain the target watermark. This is the determination of each image to be measured at a more accurate level to avoid false determinations.
In the seventh priority, if the color standard deviation of the target image is smaller than the eighth threshold, the relative file size is smaller than the ninth threshold, and the pixel matrix dot product is smaller than the tenth threshold, it is determined that the target image does not contain the target watermark. The standard deviation, the file size and the dot product are simultaneously considered to judge whether the similarity is similar, and the similarity is mathematically equivalent to the Person similarity and is also a case of vector cosine similarity.
In the eighth priority, if the pixel matrix dot product of the target image is smaller than the eleventh threshold, it is determined that the target image does not contain the target watermark. The eleventh threshold is related to different standard graphs, and each standard graph with different sizes has a corresponding eleventh threshold, so that the inconvenience of independently setting the parameter when different watermarks are tested each time can be avoided by calculating the maximum/minimum dot product sum of the images with specific sizes and then carrying out normalization calculation.
Knowing the eleventh threshold value of the first target watermark, the method 200 may further comprise the step of determining the eleventh threshold values of the other target watermarks: respectively calculating the maximum dot product value of the first target watermark and other target watermarks, wherein the maximum dot product value of the target watermark i is Pi,max=Si*Si,SiA pixel matrix for the target watermark i; and calculating eleventh threshold values of other target watermarks respectively based on the eleventh threshold value of the first target watermark and the maximum click value of each target watermark. Wherein the plurality of target watermarks correspond to different image sizes, respectively, so that an eleventh threshold value for each image size can be calculated in advance.
Here the pixel matrix of the standard image is multiplied by itself to obtain the maximum value of the dot product. Since the colors all take positive values, zero is considered as the minimum possible dot product, and therefore the maximum and minimum dot product values of each target watermark can be obtained, and further the normalized mapping value between 0 and the maximum can be obtained. And knowing the eleventh threshold of the first target watermark, the corresponding threshold of other target watermarks can be obtained by a conversion method.
Furthermore, the invention can assign a small negative number to the pixel not adjacent to the watermark in the standard image to obtain the modified pixel matrix so as to improve the pixel difference around the watermark, thereby avoiding the condition that the pure white image and the standard image can obtain the maximum value and cannot be distinguished.
It should be noted that, a plurality of threshold values are mentioned above, the value of each threshold value is not specifically limited in the present invention, and may be taken in any interval or set to any value as needed, which is not limited in the present invention. Wherein, the value range of the first threshold is [0.01, 0.02], and preferably can be 0.014. The second threshold value is in the range of [0.95, 1], and preferably may be 0.98. The third threshold value is in the range of [0.9, 0.95], and preferably may be 0.93. The value of the fourth threshold is [0.2, 0.3], and preferably may be 0.25. The value of the fifth threshold is [1, 4], and preferably may be 2. The value of the sixth threshold is [0.5, 3], and preferably may be 1. The value of the seventh threshold is [25, 30], and preferably 28. The eighth threshold value is in the range of [0.05, 0.15], and preferably may be 0.1. The ninth threshold value has a value in the range of [2, 6], and preferably may be 4. The value of the tenth threshold is [0.1, 1], and preferably may be 0.5. The value of the eleventh threshold is [0.005, 0.01], and preferably may be 0.007.
In step S230, multiple priority processing sequences are used, and for a sample set including multiple target images, the present invention sequentially uses the multiple priority sequences, gradually filters out images without watermarks, and inputs the remaining images to the next priority for filtering, so that all situations where watermarks are not possible can be eliminated, and finally the remaining target images can be determined as containing target watermarks.
In the step-by-step filtration, the screening effect of key indexes in the detection process is adopted, the index which is easiest to calculate is placed at the forefront, the calculation requirement is reduced as far as possible, and the detection speed is improved. The invention finally adopts a dot product comparison algorithm for judgment, but the simple dot product comparison has poor effect when the color of the graph is not greatly different from that of the watermark or the noise is excessive, so that most of the conditions can be eliminated by indexes such as standard deviation, relative file size and the like before the dot product comparison algorithm, thereby greatly improving the accuracy of the result.
In a specific experiment, the accuracy rate of the invention for identifying the watermarks of 1 ten thousand images is about 95%. Therefore, the watermark detection method in the decision tree mode not only ensures the accuracy of the detection result, but also improves the detection speed, and realizes the rapid and efficient detection of batch images. The method is suitable for any image, is not limited to facial images, has good detection effect in a strong interference scene, does not need to mark a complex sample set to train a neural network, and reduces the calculation workload.
Further, after step S230, the determined images containing the target watermark (these images are referred to as candidate images) may be further analyzed and identified to improve the identification accuracy again. For example, character recognition may be performed on each candidate image to recognize the character content in the image to determine whether the character content is the character content of the target watermark. If yes, the candidate image is judged to contain the target watermark, otherwise, the candidate image is judged to not contain the target watermark. Therefore, the hundred percent identification rate of the target watermark can be achieved by combining the early-stage image index identification and the later-stage character content identification. Index recognition is adopted for batch images, character recognition is adopted for screened candidate images, and on the premise of ensuring recognition accuracy, the overall calculated amount is reduced.
For the image of the text content of which the text content is not the target watermark, the text format, the color and the typesetting information in the image can be automatically extracted, and the text content is replaced by the text content of the target watermark, so that equivalent batch replacement of image watermarks is realized, and the images with watermarks in the batch of images are guaranteed to be the target watermarks.
Fig. 6 shows a block diagram of an image watermark detection apparatus 600 according to an embodiment of the present invention, which may reside in the computing device 100. As shown in fig. 6, the apparatus 600 includes: an image interception module 610, an index calculation module 620 and a watermark determination module 630.
The image capture module 610 generates a standard image of the target watermark, and captures images of specific portions in each image to be detected in batch according to the width and height values of the standard image to obtain a plurality of target images. The image interception module 610 may perform processing corresponding to the processing described above in step S210, and the detailed description thereof will not be repeated.
The index calculation module 620 calculates a color index of the target image based on the standard image, the color index including at least one of a color standard deviation, a color average, a relative size of a file after the target image is compressed and a file after the standard image is compressed, and a pixel matrix dot product of the target image and the standard image. The index calculation module 620 may perform processing corresponding to the processing described above in step S220, and the detailed description thereof will not be repeated.
The watermark determining module 630 sequentially determines the target images without the target watermarks according to the priority order of the multiple combination modes of the color indexes, and determines the remaining target images as the images with the target watermarks. The watermark determination module 630 may perform the identification filtering on the image according to various priority orders in step S230, and may also determine eleventh thresholds of other target watermarks: respectively calculating the maximum dot product value of the first target watermark and other target watermarks, wherein the maximum dot product value of the target watermark i is Pi,max=Si*Si,SiA pixel matrix for the target watermark i; and calculating eleventh threshold values of other target watermarks respectively based on the eleventh threshold value of the first target watermark and the maximum click value of each target watermark.
In addition, the watermark determining module 630 may further analyze and identify the determined images containing the target watermark (these images are referred to as candidate images) to improve the identification accuracy again. For example, character recognition may be performed on each candidate image to recognize the character content in the image to determine whether the character content is the character content of the target watermark. If yes, the candidate image is judged to contain the target watermark, otherwise, the candidate image is judged to not contain the target watermark. For the image of the text content of which the text content is not the target watermark, the text format, the color and the typesetting information in the image can be automatically extracted, and the text content is replaced by the text content of the target watermark, so that equivalent batch replacement of image watermarks is realized, and the images with watermarks in the batch of images are guaranteed to be the target watermarks. The watermark determination module 630 may perform processing corresponding to the processing described above in step S230, and the detailed description thereof is omitted.
According to the technical scheme of the invention, the method for rapidly detecting the specific watermark is provided, the watermark can be used as the template to be calculated with the image to be detected only by providing the specific non-interference watermark, the detection accuracy is high, the calculation amount is small, the calculation performance is high, and the real-time processing can be rapidly carried out in a large batch.
A8, the method as claimed in a6, the eleventh threshold of the first target watermark being known, the method further comprising the step of determining the eleventh thresholds of the other target watermarks: respectively calculating the maximum dot product value of the first target watermark and other target watermarks, wherein the maximum dot product value of the target watermark i is Pi,max=Si*Si,SiA pixel matrix for the target watermark i; and calculating eleventh threshold values of other target watermarks respectively based on the eleventh threshold value of the first target watermark and the maximum click value of each target watermark. A9, the method as in any one of a1-A8, wherein the specific part is an image area having a predetermined distance from a lower right corner of the target image.
The various techniques described herein may be implemented in connection with hardware or software or, alternatively, with a combination of both. Thus, the methods and apparatus of the present invention, or certain aspects or portions thereof, may take the form of program code (i.e., instructions) embodied in tangible media, such as removable hard drives, U.S. disks, floppy disks, CD-ROMs, or any other machine-readable storage medium, wherein, when the program is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention.
In the case of program code execution on programmable computers, the computing device will generally include a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. Wherein the memory is configured to store program code; the processor is configured to perform the method of the invention according to instructions in said program code stored in the memory.
By way of example, and not limitation, readable media may comprise readable storage media and communication media. Readable storage media store information such as computer readable instructions, data structures, program modules or other data. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Combinations of any of the above are also included within the scope of readable media.
In the description provided herein, algorithms and displays are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with examples of this invention. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in a device as described in this embodiment or alternatively may be located in one or more devices different from the devices in this example. The modules in the foregoing examples may be combined into one module or may be further divided into multiple sub-modules.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
Furthermore, some of the described embodiments are described herein as a method or combination of method elements that can be performed by a processor of a computer system or by other means of performing the described functions. A processor having the necessary instructions for carrying out the method or method elements thus forms a means for carrying out the method or method elements. Further, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is used to implement the functions performed by the elements for the purpose of carrying out the invention.
As used herein, unless otherwise specified the use of the ordinal adjectives "first", "second", "third", etc., to describe a common object, merely indicate that different instances of like objects are being referred to, and are not intended to imply that the objects so described must be in a given sequence, either temporally, spatially, in ranking, or in any other manner.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this description, will appreciate that other embodiments can be devised which do not depart from the scope of the invention as described herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the appended claims. The present invention has been disclosed in an illustrative rather than a restrictive sense with respect to the scope of the invention, as defined in the appended claims.

Claims (10)

1. An image watermark detection method, adapted to be executed in a computing device, the method comprising the steps of:
generating a standard image of the target watermark, and intercepting images of specific parts in each image to be detected in batches according to the width and height values of the standard image to obtain a plurality of target images;
calculating a color index of the target image based on the standard image, wherein the color index comprises at least one of color standard deviation, color average value, relative file sizes of the compressed target image and the compressed standard image, and pixel matrix dot products of the target image and the standard image; and
and sequentially determining target images without the target watermarks according to the priority orders of the multiple combination modes of the color indexes, and judging the remaining target images as images with the target watermarks.
2. The method of claim 1, wherein the color indicators are normalized indicator values, the method further comprising the step of calculating the relative size of the file:
the memory size of the compressed monochromatic image with the same width and height as the standard image according to a preset format is used as the minimum memory value;
the memory size of a white noise image which has the same width and height as the standard image and is generated by using a random number and compressed according to the preset format is used as the maximum memory value; and
and converting the memory size of the target image compressed according to the preset format into the corresponding relative size of the file based on the normalized mapping interval of the minimum value and the maximum value of the memory.
3. The method of claim 1, wherein,
the color average value is an average value of RGB three channels of all pixels in the target image;
the color standard deviation σestThe formula for calculating the dot product P of the sum pixel matrix is:
Figure FDA0002450848970000011
P=S*A
where a and S are pixel matrices of the target image and the standard image, respectively, and N is the total number of pixels.
4. The method according to any one of claims 1-3, wherein the step of sequentially determining the target images without the target watermark according to the priority order of the plurality of combinations of the color indicators comprises:
in the first priority, if the color standard deviation of the target image is smaller than a first threshold, judging that the target image does not contain the target watermark;
in the second priority, if the color average value of the target image is greater than a second threshold, determining that the target image does not contain the target watermark;
in the third priority, if the color average value of the target image is greater than the third threshold and the color standard deviation is less than the fourth threshold, it is determined that the target image does not contain the target watermark.
5. The method according to any one of claims 1-4, wherein the step of sequentially determining the target image without the target watermark according to the priority order of the plurality of combinations of the color indicators further comprises:
in the fourth priority, if the color average value of the target image is greater than a third threshold, the color standard deviation is less than a fourth threshold, and the relative size of the file is greater than a fifth threshold, determining that the target image does not contain the target watermark;
in the fifth priority, if the relative size of the file of the target image is smaller than a sixth threshold, the target image is judged not to contain the target watermark;
in the sixth priority, if the relative file size of the target image is larger than a seventh threshold, it is determined that the target image does not contain the target watermark.
6. The method according to any one of claims 1-5, wherein the step of sequentially determining the target image without the target watermark according to the priority order of the plurality of combinations of the color indicators further comprises:
in the seventh priority, if the color standard deviation of the target image is smaller than an eighth threshold, the relative file size is smaller than a ninth threshold, and the pixel matrix dot product is smaller than a tenth threshold, determining that the target image does not contain the target watermark;
in the eighth priority, if the pixel matrix dot product of the target image is smaller than an eleventh threshold, it is determined that the target image does not contain the target watermark.
7. The method of claim 6, wherein the first threshold value is 0.014, the second threshold value is 0.98, the third threshold value is 0.93, the fourth threshold value is 0.25, the fifth threshold value is 2, the sixth threshold value is 1, the seventh threshold value is 28, the eighth threshold value is 0.1, the ninth threshold value is 4, the tenth threshold value is 0.5, and the eleventh threshold value is 0.007.
8. An image watermark detection apparatus adapted to reside in a computing device, the apparatus comprising:
the image intercepting module is suitable for generating a standard image of the target watermark and intercepting images of specific parts in each image to be detected in batches according to the width and height values of the standard image to obtain a plurality of target images;
the index calculation module is suitable for calculating a color index of the target image based on the standard image, wherein the color index comprises at least one of color standard deviation, color average value, relative file sizes of the compressed target image and the compressed standard image, and pixel matrix dot products of the target image and the standard image; and
and the watermark determining module is suitable for sequentially determining the target images without the target watermarks according to the priority orders of the multiple combination modes of the color indexes, and judging the rest target images as the images with the target watermarks.
9. A computing device, comprising:
a memory;
one or more processors;
one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for performing any of the methods of claims 1-8.
10. A computer readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by a computing device, cause the computing device to perform any of the methods of claims 1-8.
CN202010292263.XA 2020-04-14 2020-04-14 Image watermark detection method and device and computing equipment Pending CN111681151A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010292263.XA CN111681151A (en) 2020-04-14 2020-04-14 Image watermark detection method and device and computing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010292263.XA CN111681151A (en) 2020-04-14 2020-04-14 Image watermark detection method and device and computing equipment

Publications (1)

Publication Number Publication Date
CN111681151A true CN111681151A (en) 2020-09-18

Family

ID=72451645

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010292263.XA Pending CN111681151A (en) 2020-04-14 2020-04-14 Image watermark detection method and device and computing equipment

Country Status (1)

Country Link
CN (1) CN111681151A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105913441A (en) * 2016-04-27 2016-08-31 四川大学 Shadow removal method for improving target detection performance in video
CN106991423A (en) * 2016-01-21 2017-07-28 腾讯科技(深圳)有限公司 Whether the method and device of watermark is included in identification specification picture
US9959586B1 (en) * 2016-12-13 2018-05-01 GoAnimate, Inc. System, method, and computer program for encoding and decoding a unique signature in a video file as a set of watermarks
CN108269220A (en) * 2016-12-30 2018-07-10 北京思源互联科技有限公司 Method and device for positioning digital watermark
CN108810619A (en) * 2018-06-29 2018-11-13 北京奇虎科技有限公司 Identify the method, apparatus and electronic equipment of watermark in video
CN110660115A (en) * 2019-08-20 2020-01-07 海南车智易通信息技术有限公司 Method, device and system for generating advertisement picture

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106991423A (en) * 2016-01-21 2017-07-28 腾讯科技(深圳)有限公司 Whether the method and device of watermark is included in identification specification picture
CN105913441A (en) * 2016-04-27 2016-08-31 四川大学 Shadow removal method for improving target detection performance in video
US9959586B1 (en) * 2016-12-13 2018-05-01 GoAnimate, Inc. System, method, and computer program for encoding and decoding a unique signature in a video file as a set of watermarks
CN108269220A (en) * 2016-12-30 2018-07-10 北京思源互联科技有限公司 Method and device for positioning digital watermark
CN108810619A (en) * 2018-06-29 2018-11-13 北京奇虎科技有限公司 Identify the method, apparatus and electronic equipment of watermark in video
CN110660115A (en) * 2019-08-20 2020-01-07 海南车智易通信息技术有限公司 Method, device and system for generating advertisement picture

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
MARZIEH AMINI: ""Multichannel color image watermark detection utilizing vector-based hidden Markov model"", 《IEEE》, 31 May 2017 (2017-05-31) *
马玲: ""基于内积空间非空子空间变换关系的含水印彩色图像特征分析"", 《》, vol. 40, no. 5, 31 May 2017 (2017-05-31) *

Similar Documents

Publication Publication Date Title
CN109977943B (en) Image target recognition method, system and storage medium based on YOLO
US10062172B2 (en) Automated tattoo recognition techniques
EP3396625A1 (en) Image tampering detection method and system, electronic apparatus and storage medium
CN113159147B (en) Image recognition method and device based on neural network and electronic equipment
US20130039588A1 (en) Image processing method and apparatus for tamper proofing
CN108875534B (en) Face recognition method, device, system and computer storage medium
CN111461165A (en) Image recognition method, recognition model training method, related device and equipment
WO2020143325A1 (en) Electronic document generation method and device
WO2020082731A1 (en) Electronic device, credential recognition method and storage medium
CN109993221B (en) Image classification method and device
CN112651953B (en) Picture similarity calculation method and device, computer equipment and storage medium
CN109740417B (en) Invoice type identification method, invoice type identification device, storage medium and computer equipment
CN111160169B (en) Face detection method, device, equipment and computer readable storage medium
CN111507957B (en) Identity card picture conversion method and device, computer equipment and storage medium
CN110766007B (en) Certificate shielding detection method, device, equipment and readable storage medium
CN112001362A (en) Image analysis method, image analysis device and image analysis system
CN108665459B (en) Image blur detection method, computing device and readable storage medium
WO2021159802A1 (en) Graphical captcha recognition method, apparatus, computer device, and storage medium
CN111489347B (en) Business license picture quality detection method and device, computer equipment and storage medium
CN108960246B (en) Binarization processing device and method for image recognition
CN108268778B (en) Data processing method, device and storage medium
CN113052234A (en) Jade classification method based on image features and deep learning technology
CN111681151A (en) Image watermark detection method and device and computing equipment
CN115527024A (en) Detection positioning method and system based on image information
CN112084874B (en) Object detection method and device and terminal equipment

Legal Events

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