WO2017124940A1 - 识别规格图片中是否包含水印的方法及装置 - Google Patents

识别规格图片中是否包含水印的方法及装置 Download PDF

Info

Publication number
WO2017124940A1
WO2017124940A1 PCT/CN2017/070677 CN2017070677W WO2017124940A1 WO 2017124940 A1 WO2017124940 A1 WO 2017124940A1 CN 2017070677 W CN2017070677 W CN 2017070677W WO 2017124940 A1 WO2017124940 A1 WO 2017124940A1
Authority
WO
WIPO (PCT)
Prior art keywords
value
sample
watermark
picture
pixel
Prior art date
Application number
PCT/CN2017/070677
Other languages
English (en)
French (fr)
Inventor
汪铖杰
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Priority to MYPI2017704730A priority Critical patent/MY188906A/en
Publication of WO2017124940A1 publication Critical patent/WO2017124940A1/zh
Priority to US15/945,613 priority patent/US10504202B2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
    • G06V10/462Salient features, e.g. scale invariant feature transforms [SIFT]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/32Circuits or arrangements for control or supervision between transmitter and receiver or between image input and image output device, e.g. between a still-image camera and its memory or between a still-image camera and a printer device
    • H04N1/32101Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title
    • H04N1/32144Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title embedded in the image data, i.e. enclosed or integrated in the image, e.g. watermark, super-imposed logo or stamp
    • H04N1/32149Methods relating to embedding, encoding, decoding, detection or retrieval operations
    • 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
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • G06T1/005Robust watermarking, e.g. average attack or collusion attack resistant
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/22Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition
    • G06V10/225Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition based on a marking or identifier characterising the area
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/752Contour matching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/32Circuits or arrangements for control or supervision between transmitter and receiver or between image input and image output device, e.g. between a still-image camera and its memory or between a still-image camera and a printer device
    • H04N1/32101Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title
    • H04N1/32144Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title embedded in the image data, i.e. enclosed or integrated in the image, e.g. watermark, super-imposed logo or stamp
    • H04N1/32149Methods relating to embedding, encoding, decoding, detection or retrieval operations
    • H04N1/32267Methods relating to embedding, encoding, decoding, detection or retrieval operations combined with processing of the image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2201/00General purpose image data processing
    • G06T2201/005Image watermarking
    • G06T2201/0051Embedding of the watermark in the spatial domain
    • 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

Definitions

  • the present invention relates to the field of computer technologies, and in particular, to a method and apparatus for identifying whether a watermark is included in a specification picture.
  • the edge detection is usually used to obtain the outline information in the specification picture, and then the outline information is used to determine whether the picture file contains the contour corresponding to the watermark feature (for example, oblique text). , netting, oversized text, etc., as shown in Figure 1, note: in the absence of infringement, the face area has been mosaic), thus identifying the watermark in the specification picture.
  • the contour corresponding to the watermark feature for example, oblique text. , netting, oversized text, etc., as shown in Figure 1, note: in the absence of infringement, the face area has been mosaic), thus identifying the watermark in the specification picture.
  • the inventors have found that at least the following problems exist in the conventional technology for recognizing the watermark information contained in the specification picture file: in the specification picture, such as the ID card picture, the portrait area usually includes a background such as clothes, which may cause interference.
  • the outline information leads to misjudgment. Therefore, the accuracy of the method of recognizing the watermark information contained in the specification picture file in the conventional art is insufficient.
  • a method for identifying whether a watermark is included in a specification picture including:
  • the pixel attribute value is a grayscale gradient value
  • the step of calculating the average value of the pixel attribute values of the sample images in the sample size picture set at each pixel position of the preset size further includes:
  • the pixel attribute value is a difference between a gray value and a background gray level
  • the step of calculating the average value of the pixel attribute values of the sample images in the sample size picture set at each pixel position of the preset size further includes:
  • the sample picture in the sample size picture set is converted into a grayscale picture according to the background gray level.
  • the pixel attribute value is a gray value
  • the step of calculating the average value of the pixel attribute values of the sample images in the sample size picture set at each pixel position of the preset size further includes:
  • the step of normalizing the average value of the pixel attribute values of the respective pixel positions of the preset size is:
  • the step of obtaining the watermark probability value of each pixel position of the preset size is:
  • the step of determining whether the target picture includes a watermark according to the watermark probability evaluation value further comprises:
  • a device for identifying whether a watermark is included in a specification picture including:
  • a sample specification picture obtaining module configured to acquire a sample specification picture set, adjust a sample picture in the sample specification picture set to a preset size, and the sample picture in the sample specification picture set does not include watermark information
  • a mean value calculation module configured to calculate an average value of pixel attribute values of the sample pictures in the sample size picture set at respective pixel positions of the preset size
  • a watermark probability calculation module configured to normalize an average value of pixel attribute values of each pixel position of the preset size to obtain a watermark probability value of each pixel position of the preset size
  • a watermark determination module configured to acquire a target image adjusted to the preset size, and calculate a sum of a product of a pixel attribute value of each target position of the target image and a corresponding watermark probability value, according to the The sum of the products determines whether the target picture contains a watermark.
  • the pixel attribute value is a grayscale gradient value
  • the mean value calculation module is further configured to calculate a gray level gradient value of the sample picture in the sample specification picture set at each pixel position of the preset size.
  • the pixel attribute value is a difference between a gray value and a background gray level
  • the mean value calculation module is further configured to sample the sample size picture set according to the background gray level This image is converted to a grayscale image.
  • the pixel attribute value is a gray value
  • the mean calculation module is further configured to convert the sample picture in the sample specification picture set into a binarized picture according to the gray value.
  • the watermark probability calculation module is further configured to acquire a maximum value of an average value of pixel attribute values of respective pixel positions of the preset size, and calculate pixel attributes of each pixel position of the preset size. A ratio of an average value of the values to the maximum value, and a probability value corresponding to each pixel position of the preset size is obtained.
  • the watermark probability calculation module is further configured to calculate an opposite event probability value of a probability value corresponding to each pixel position of the preset size, as a watermark probability corresponding to each pixel position of the preset size. value.
  • the watermark determination module is further configured to determine whether the watermark probability evaluation value is greater than or equal to a threshold, and if yes, determine that the target image includes a watermark.
  • the watermark probability value which is different from the pixel attribute value of the background area is obtained for each pixel position of the preset size. And then receiving the input target image, calculating the sum of the pixel attribute value of each pixel on the target image and the watermark probability value of the corresponding pixel position, because the pixel attribute of the face and the clothing has a pixel attribute mutation due to the sum
  • the watermark probability value of the region is small. Therefore, the face information on the clothes can be ignored, and the watermark probability value is large for the watermark information on the background region.
  • Figure 1 is a comparison of the watermarked and unwatermarked specification pictures
  • FIG. 2 is a flow chart of a method for identifying whether a watermark is included in a specification picture in an embodiment
  • FIG. 3 is a schematic diagram of an apparatus for identifying whether a watermark is included in a specification picture in an embodiment
  • FIG. 4 is a block diagram showing the structure of a computer system for operating a method for storing a watermark in a picture of the aforementioned identification specification in an embodiment.
  • the method may be implemented by a computer program, which may be run on a computer system based on a von Neumann system, which may be an image recognition program for a specification picture, and has a specification image information recognition and comparison function.
  • IT applications such as ID information recognition applications or IT systems with document information recognition, OCR (Optical Character Recognition) applications or OCR-enabled programs.
  • the computer system can be a server or terminal running the computer program described above.
  • a method for identifying whether a watermark is included in a specification picture includes:
  • Step S102 Acquire a sample specification picture set, and adjust the sample picture in the sample specification picture set to a preset size.
  • the specification picture can be an ID card picture, a social security card picture, a driver's license picture, and the like, as well as a screenshot of the same board document, a photo page of a paper document, and the like.
  • the sample specification picture set is a preset plurality of specification pictures as samples, and the plurality of specification pictures are taken as samples No watermark information is included.
  • an image file of N normal watermark-free ID card photos may be pre-recorded as a sample size picture collection.
  • the size and the scaling ratio need to be adjusted. If the preset size is 600 ⁇ 300, The sample image is adjusted to a 600 ⁇ 300 image file by scaling or cropping through the sample image.
  • Step S104 Calculate an average value of pixel attribute values of the sample pictures in the sample specification picture set at respective pixel positions of the preset size.
  • the pixel attribute value is a parameter value of the pixel point attribute, and may include a gray value, a difference between the gray value and the preset background gray level, a gray level value, and the like.
  • an attribute value reflecting a pixel point feature may be arbitrarily selected as a pixel attribute value to participate in the calculation.
  • the gradation gradient value is taken as an example of the pixel attribute value. Calculating a sample picture in the sample specification picture set at the preset before calculating the average of the pixel attribute values of the sample pictures in the sample size picture set at the respective pixel positions of the preset size The grayscale gradient value for each pixel location of the size.
  • the size is a preset size.
  • the size of the sample picture in the sample specification picture set is 600 ⁇ 300, so the sample can be obtained.
  • the pixel coordinates, D k, S are the pixel attribute values of the pixel points at the pixel position S in the kth sample picture in the sample size picture set. Then through calculation
  • the pixel value of the pixel to obtain the attribute of average position S D avg, S, and then calculate the average value D avg preset position of each pixel on the size of 600 ⁇ 300, S, to obtain the average D avg, S configuration of FIG. .
  • Step S106 normalize the average value of the pixel attribute values of the respective pixel positions of the preset size to obtain a watermark probability value of each pixel position of the preset size.
  • the step of normalizing the average value of the pixel attribute values of the pixel positions of the preset size may be specifically: obtaining an average of the pixel attribute values of the respective pixel positions of the preset size. And a maximum value of the value, a ratio of an average value of the pixel attribute values of the respective pixel positions of the preset size to the maximum value is calculated, and a probability value corresponding to each pixel position of the preset size is obtained.
  • the first predetermined dimension of 600 ⁇ 300 pixels all positions S1, S2, S3, S4 ... is selected in the first D avg, D avg S of maximum, MAX, and then for each pixel position S, Calculated:
  • a probability value P(i, j) corresponding to each pixel position (i, j) is obtained.
  • the P(i,j) is a probability value corresponding to the pixel position (i, j) obtained after normalization, and is used to indicate the probability that a pixel attribute value having a feature exists at the pixel position (i, j). Or the probability that the pixel position (i, j) is similar to the sample specification picture and there is no watermark information.
  • the opposite event probability value of the probability value corresponding to each pixel position of the preset size may also be calculated as the watermark probability value corresponding to each pixel position of the preset size.
  • the watermark probability value may also be defined by other means, but the defined watermark probability value must be decremented as the probability value corresponding to each pixel location of the preset size is incremented.
  • Step S108 Acquire a target picture adjusted to the preset size, and calculate a sum of a product of a pixel attribute value of each target position of the target image and a corresponding watermark probability value, according to the product And determining whether the target picture includes a watermark.
  • the input target image is the image that needs to be determined whether or not the watermark is included, and it needs to be cropped and scaled in the same manner as the sample specification image to adjust it to the same preset size.
  • the input will be input.
  • the picture is adjusted to a 600 ⁇ 300 picture.
  • T ⁇ D (i,j) ⁇ (1-P(i,j))
  • T The product of the pixel attribute value at each pixel position (i, j) on the target picture and the watermark probability value 1-P(i, j) of the corresponding pixel position (i, j) is calculated, and then the sum is calculated to obtain T. In this embodiment, it may be determined whether T is greater than or equal to a threshold, and if so, it is determined that the target picture includes a watermark.
  • the pixel attribute value is selected as the gray level gradient value, and if the average value of the gray level gradient values of the plurality of sample size pictures at a certain pixel position (i, j) is large, and the variance Smaller, that is, in the sample specification picture, the position is defined by the picture specification, so there is a high probability that the gradient causes the gray level to be abrupt, and there may be an image outline, for example, a face area and a text description area of the document picture. Due to the limitation of the document image specification, more contours will appear, resulting in a larger gradient value.
  • the average value of the gray gradient values of a plurality of sample size pictures at a certain pixel position (i, j) is small and the variance is small, it means that the pixel position may be the background position defined in the specification picture, There is a small probability that a gradient will result in a grayscale mutation. Therefore, after the target picture is input, if the gradient value of the target picture at the pixel position (i, j) is large, and the gradient value of the sample specification picture here is small with respect to the gradient of the entire picture, the watermark probability If the value is large, the product of the two is larger:
  • the target image is analyzed as a whole, that is, the product is calculated for each pixel position (i, j), and then summed to obtain T. Since the watermark probability value 1-P(i,j) is small for the gradient information on the clothes and the face area, the infection of the watermark recognition by the outline on the clothes and the face area is filtered out, and the size of the T is made. It reflects the difference between the target image and the sample size image on the image background, so the recognition is more accurate.
  • the difference between the gray value and the background gray may also be selected as the pixel attribute value.
  • the sample before the step of calculating the average value of the pixel attribute values of the sample pictures in the sample size picture set at the respective pixel positions of the preset size, the sample may be according to the background gray level.
  • the sample image in the spec image collection is converted to a grayscale image.
  • step S102 and step S104 can still be performed according to the foregoing steps, but in the normalization, the background gray level of the preset sample specification picture can be normalized, for example, if the specification picture is In the definition, the background gray scale is not white, but the background color with a gray scale of 100, and the difference between the average value of each pixel position of the preset size and the background gray scale 100 can be calculated, and the difference is The values are normalized.
  • T ⁇ D (i,j) ⁇ (1-P(i,j))
  • the face of the document, the P(i,j) of the pixel with a large difference between the background and the background color is larger, therefore, the watermark probability value 1-P(i,j) is smaller, thus making the target
  • the P(i, j) of the pixel in this area is small, and the watermark probability value 1-P(i, j) is large, so
  • the target image has pixels in the region with a large difference in background gray scale, and the number is large, the T value will rise significantly, so that the watermark information in the specification picture can be easily distinguished.
  • the gray value of the pixel attribute value may also be used as the pixel attribute value.
  • the method before the step of calculating an average value of the pixel attribute values of the sample images in the sample size picture set at the respective pixel positions of the preset size, the method further includes: determining the sample specification picture according to the gray value. The sample image in the collection is converted to a binarized image.
  • the binarized picture is a black and white picture and contains only two gray values.
  • the grayscale threshold may be set in advance, and the grayscale value of the pixel above the grayscale threshold is set to 255, and the grayscale value of the pixel below the grayscale threshold is set to zero. Then still use the above formula:
  • T ⁇ D (i, j) ⁇ (1-P (i, j))
  • the target picture contains a watermark
  • the P(i, j) of the pixel of the background area is 0, if the target picture has obvious watermark information in the background area, it will be significantly reflected in the T value.
  • P(i, j) is 1, and the corresponding watermark probability value is 0, so the image information in the face and the clothing region can be filtered out.
  • the watermark judges the interference, thereby improving the accuracy.
  • the gray value (requires binarized picture), the difference between the gray value and the background gray level, or the gray level value is used as the pixel attribute value to determine whether the target picture contains a definition that does not conform to the specification picture.
  • the method of determining the grayscale gradient value as the pixel attribute value is optimal, since it only considers the contour information, and does not involve too much in the target image and the target.
  • the content of the picture may be related to the gray level information of the pixel itself, thus making it known Don't be the most accurate.
  • An apparatus for identifying whether a watermark is included in a specification picture includes: a sample specification picture acquisition module 102, an average calculation module 104, a watermark probability calculation module 106, and a watermark determination module 108, wherein:
  • the sample specification picture obtaining module 102 is configured to obtain a sample specification picture set, and adjust the sample picture in the sample specification picture set to a preset size, and the sample picture in the sample specification picture set does not include watermark information.
  • the mean value calculation module 104 is configured to calculate an average value of pixel attribute values of the sample pictures in the sample size picture set at respective pixel positions of the preset size.
  • the watermark probability calculation module 106 is configured to normalize the average value of the pixel attribute values of the respective pixel positions of the preset size to obtain watermark probability values of the respective pixel positions of the preset size.
  • the watermark determination module 108 is configured to acquire a target image adjusted to the preset size, and calculate a sum of a product of a pixel attribute value of each target position of the target image and a corresponding watermark probability value, according to The sum of the products determines whether the target picture contains a watermark.
  • the pixel attribute value is a grayscale gradient value.
  • the mean value calculation module 104 is further configured to calculate a gray level gradient value of the sample picture in the sample size picture set at each pixel position of the preset size.
  • the pixel attribute value is a difference between the gray value and the background gray level; the mean value calculation module 104 is further configured to convert the sample picture in the sample specification picture set into a grayscale picture according to the background gray level. .
  • the pixel attribute value is a gray value
  • the mean value calculation module 104 is further configured to convert the sample picture in the sample specification picture set into a binarized picture according to the gray value.
  • the watermark probability calculation module 106 is further configured to acquire a maximum value of an average value of pixel attribute values of respective pixel positions of the preset size, and calculate a pixel attribute value of each pixel position of the preset size. a ratio of the average value to the maximum value to obtain respective pixel positions of the preset size Set the corresponding probability value.
  • the watermark probability calculation module 106 is further configured to calculate an opposite event probability value of a probability value corresponding to each pixel position of the preset size, as a watermark probability value corresponding to each pixel position of the preset size.
  • the watermark determination module 108 is further configured to determine whether the watermark probability evaluation value is greater than or equal to a threshold, and if yes, determine that the target image includes a watermark.
  • the watermark probability value which is different from the pixel attribute value of the background area is obtained for each pixel position of the preset size. And then receiving the input target image, calculating the sum of the pixel attribute value of each pixel on the target image and the watermark probability value of the corresponding pixel position, because the pixel attribute of the face and the clothing has a pixel attribute mutation due to the sum
  • the watermark probability value of the region is small. Therefore, the face information on the clothes can be ignored, and the watermark probability value is large for the watermark information on the background region.
  • FIG. 4 illustrates a von Neumann system-based computer system that operates a method of determining whether a watermark is included in the above-described identification specification picture.
  • the computer system can be a terminal device such as a smart phone, a tablet computer, a palmtop computer, a notebook computer or a personal computer.
  • the computer system can include an external input interface 1001, a processor 1002, a memory 1003, and an output interface 1004 connected by a system bus.
  • the external input interface 1001 can optionally include at least a network interface 10012.
  • the memory 1003 may include an external memory 10032 (eg, a hard disk, an optical disk, or a floppy disk, etc.) and an internal memory 10034.
  • the output interface 1004 can include at least a device such as a display 10042.
  • the operation of the method is based on a computer program whose program file is stored in the external memory 10032 of the aforementioned von Neumann system-based computer system, loaded into the internal memory 10034 at runtime, and then After being compiled into a machine code, it is passed to the processor 1002.
  • the row is such that a logical sample specification picture acquisition module 102, a mean calculation module 104, a watermark probability calculation module 106, and a watermark determination module 108 are formed in the von Neumann system-based computer system.
  • the input parameters are all received through the external input interface 1001, and transferred to the buffer in the memory 1003, and then input to the processor 1002 for processing, and the processed result data or
  • the cache is cached in the memory 1003 for subsequent processing, or is passed to the output interface 1004 for output.
  • a non-volatile machine readable storage medium storing a program product for identifying whether a watermark is included in a specification picture
  • the program product may include the sample specification picture acquisition module described above 102.
  • the program product is called by the computer system to perform the method of identifying whether a watermark is included in the specification picture.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Signal Processing (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Image Processing (AREA)

Abstract

一种识别规格图片中是否包含水印的方法,包括:获取样本规格图片集合,将样本规格图片集合中的样本图片调整到预设尺寸(S102);计算所述样本规格图片集合中的样本图片在所述预设尺寸的各个像素位置的像素属性值的平均值(S104);对预设尺寸的各个像素位置的像素属性值的平均值进行归一化处理,得到所述预设尺寸的各个像素位置的水印概率值(S106);获取调整到所述预设尺寸的目标图片,计算所述目标图片在所述预设尺寸的各个像素位置的像素属性值与相应的水印概率值的乘积之和,根据所述乘积之和判定所述目标图片是否包含水印(S108)。上述方法具有较高的识别准确率。

Description

识别规格图片中是否包含水印的方法及装置
本发明要求2016年1月21日递交的发明名称为“识别规格图片中是否包含水印的方法及装置”的申请号201610038952.1的在先申请优先权,上述在先申请的内容以引入的方式并入本文本中。
技术领域
本发明涉及计算机技术领域,尤其涉及一种识别规格图片中是否包含水印的方法及装置。
背景技术
现有技术中,为了在办理业务时方便机器识别,IT系统中通常使用了各种规格图片,例如方便网上办理银行业务、金融业务、社会服务业务的身份证图片、社保卡图片、驾驶证图片等证件照图片,以及相同板式的文档截图、纸质文件的页面拍照图片等。由于规格图片通常用于作为证明文件存档或者用于机器识别,通常需要保证较高的清晰度以及关键信息没有被遮挡,不会产生歧义或机器识别误判,因此规格图片中通常不能存在水印等干扰信息。
传统技术中为了识别出规格图片文件中包含的水印,通常采用边缘检测的方式来获取规格图片中的轮廓信息,然后根据轮廓信息判断图片文件中是否包含有符合水印特征的轮廓(例如斜向文字、网纹、超大文字等,参考图1所示,注:为不涉及侵权,人脸区域已打马赛克),从而对规格图片中的水印进行识别。
然而,发明人经研究发现传统技术中识别规格图片文件中包含的水印信息的方式至少存在如下问题:规格图片例如身份证图片中,人像区域中通常还包含有衣物等背景,可能出现容易引起干扰的轮廓信息,从而导致误判。因此,传统技术中识别规格图片文件中包含的水印信息的方式的准确度不足。
发明内容
基于此,为解决传统技术中的在识别规格图片中是否包含水印信息时容易 受到人体、衣物上花纹的干扰,从而导致的识别准确率不高的技术问题,特提出了一种识别规格图片中是否包含水印的方法。
一种识别规格图片中是否包含水印的方法,包括:
获取样本规格图片集合,将所述样本规格图片集合中的样本图片调整到预设尺寸,且所述样本规格图片集合中的样本图片中不包含水印信息;
计算所述样本规格图片集合中的样本图片在所述预设尺寸的各个像素位置的像素属性值的平均值;
对所述预设尺寸的各个像素位置的像素属性值的平均值进行归一化处理,得到所述预设尺寸的各个像素位置的水印概率值;
获取调整到所述预设尺寸的目标图片,计算所述目标图片在所述预设尺寸的各个像素位置的像素属性值与相应的水印概率值的乘积之和,根据所述乘积之和判定所述目标图片是否包含水印。
在其中一个实施例中,所述像素属性值为灰度梯度值;
所述计算所述样本规格图片集合中的样本图片在所述预设尺寸的各个像素位置的像素属性值的平均值的步骤之前还包括:
计算所述样本规格图片集合中的样本图片在所述预设尺寸的各个像素位置的灰度梯度值。
在其中一个实施例中,所述像素属性值为灰度值与背景灰度的差值;
所述计算所述样本规格图片集合中的样本图片在所述预设尺寸的各个像素位置的像素属性值的平均值的步骤之前还包括:
根据背景灰度将所述样本规格图片集合中的样本图片转化为灰度图片。
在其中一个实施例中,所述像素属性值为灰度值;
所述计算所述样本规格图片集合中的样本图片在所述预设尺寸的各个像素位置的像素属性值的平均值的步骤之前还包括:
根据灰度值将所述样本规格图片集合中的样本图片转化为二值化图片。
在其中一个实施例中,所述对所述预设尺寸的各个像素位置的像素属性值的平均值进行归一化处理的步骤为:
获取所述预设尺寸的各个像素位置的像素属性值的平均值的最大值,计算所述预设尺寸的各个像素位置的像素属性值的平均值与所述最大值的比值,得 到所述预设尺寸的各个像素位置对应的概率值。
在其中一个实施例中,所述得到所述预设尺寸的各个像素位置的水印概率值的步骤为:
计算所述预设尺寸的各个像素位置对应的概率值的对立事件概率值,作为所述预设尺寸的各个像素位置对应的水印概率值。
在其中一个实施例中,所述根据所述水印概率评价值判定所述目标图片是否包含水印的步骤还包括:
判断所述水印概率评价值是否大于或等于阈值,若是,则判定所述目标图片中包含水印。
此外,为解决传统技术中的在识别规格图片中是否包含水印信息时容易受到人体、衣物上花纹的干扰,从而导致的识别准确率不高的技术问题,特提出了一种识别规格图片中是否包含水印的装置。
一种识别规格图片中是否包含水印的装置,包括:
样本规格图片获取模块,用于获取样本规格图片集合,将所述样本规格图片集合中的样本图片调整到预设尺寸,且所述样本规格图片集合中的样本图片中不包含水印信息;
均值计算模块,用于计算所述样本规格图片集合中的样本图片在所述预设尺寸的各个像素位置的像素属性值的平均值;
水印概率计算模块,用于对所述预设尺寸的各个像素位置的像素属性值的平均值进行归一化处理,得到所述预设尺寸的各个像素位置的水印概率值;
水印判定模块,用于获取调整到所述预设尺寸的目标图片,计算所述目标图片在所述预设尺寸的各个像素位置的像素属性值与相应的水印概率值的乘积之和,根据所述乘积之和判定所述目标图片是否包含水印。
在其中一个实施例中,所述像素属性值为灰度梯度值;
所述均值计算模块还用于计算所述样本规格图片集合中的样本图片在所述预设尺寸的各个像素位置的灰度梯度值。
在其中一个实施例中,所述像素属性值为灰度值与背景灰度的差值;
所述均值计算模块还用于根据背景灰度将所述样本规格图片集合中的样 本图片转化为灰度图片。
在其中一个实施例中,所述像素属性值为灰度值;
所述均值计算模块还用于根据灰度值将所述样本规格图片集合中的样本图片转化为二值化图片。
在其中一个实施例中,所述水印概率计算模块还用于获取所述预设尺寸的各个像素位置的像素属性值的平均值的最大值,计算所述预设尺寸的各个像素位置的像素属性值的平均值与所述最大值的比值,得到所述预设尺寸的各个像素位置对应的概率值。
在其中一个实施例中,所述水印概率计算模块还用于计算所述预设尺寸的各个像素位置对应的概率值的对立事件概率值,作为所述预设尺寸的各个像素位置对应的水印概率值。
在其中一个实施例中,所述水印判定模块还用于判断所述水印概率评价值是否大于或等于阈值,若是,则判定所述目标图片中包含水印。
实施本发明实施例,将具有如下有益效果:
采用了上述识别规格图片中是否包含水印的方法和装置之后,先根据没有水印的样本规格图片集合得到预设尺寸的每个像素位置出现与背景区域的像素属性值有较大差异的水印概率值,然后再接收输入的目标图片,计算目标图片上各个像素点的像素属性值与相应像素位置的水印概率值的乘积之和,由于该和中,人脸、衣服上像素属性存在像素属性突变的区域的水印概率值较小,因此,可忽略掉人脸,衣服上的轮廓信息对水印识别的干扰,而对于背景区域上的水印信息,其水印概率值较大,若背景区域出现水印,则在该区域上将出现较大的像素属性值,再与较大的水印概率值相乘之后再相加将得到较大的和,从而可根据该较大的和判定出规格图片中是否包含水印,并且由于过滤掉了人脸,和衣服上本身存在的轮廓,使得判定结果更加准确。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述 中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
其中:
图1为有水印和无水印的规格图片的对比图;
图2为一个实施例中一种识别规格图片中是否包含水印的方法的流程图;
图3为一个实施例中一种识别规格图片中是否包含水印的装置的示意图;
图4为一个实施例中运行前述识别规格图片中是否包含水印的方法的计算机系统的结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
为解决传统技术中的在识别规格图片中是否包含水印信息时容易受到人体、衣物上花纹的干扰,从而导致的识别准确率不高的技术问题,特提出了一种识别规格图片中是否包含水印的方法,该方法的实现可依赖于计算机程序,该计算机程序可运行于基于冯诺依曼体系的计算机系统之上,该计算机程序可以是规格图片的图像识别程序、具有规格图像信息识别对比功能的IT应用程序,例如,证件信息识别应用或带有证件信息识别功能的IT系统,文档图片OCR(Optical Character Recognition,光学字符识别)应用或带有OCR功能的程序。该计算机系统可以是运行上述计算机程序的服务器或终端。
具体的,如图1所示,一种识别规格图片中是否包含水印的方法,包括:
步骤S102:获取样本规格图片集合,将所述样本规格图片集合中的样本图片调整到预设尺寸。
如前所述,规格图片可以是身份证图片、社保卡图片、驾驶证图片等证件照图片,以及相同板式的文档截图、纸质文件的页面拍照图片等。样本规格图片集合即为预设的多个作为样本的规格图片,且该作为样本的多个规格图片中 均不包含水印信息。例如,在一个身份证件识别系统的应用场景中,可预先录入N张正常的没有包含水印的身份证照片的图像文件,作为样本规格图片集合。
在本实施例中,对于样本规格图片集合中的样本图片,在将其选入样本规格图片集合中后,需要调整其大小及缩放比例,若预设的尺寸为600×300的尺寸,则可通过样本图片进行缩放或裁减将样本图片调整为600×300的图片文件。
步骤S104:计算所述样本规格图片集合中的样本图片在所述预设尺寸的各个像素位置的像素属性值的平均值。
像素属性值即为反映像素点特征属性值,可包括灰度值、灰度值与预设的背景灰度的差值、灰度梯度值等。在不同的实施例中,可以任意选取一种反映像素点特征的属性值作为像素属性值参与计算。在本实施例中,以灰度梯度值为例作为像素属性值进行说明。在计算所述样本规格图片集合中的样本图片在所述预设尺寸的各个像素位置的像素属性值的平均值的步骤之前还可计算所述样本规格图片集合中的样本图片在所述预设尺寸的各个像素位置的灰度梯度值。
在本步骤中,对于样本规格图片集合中的每个样本图片,其尺寸均为预设尺寸,如上例中,样本规格图片集合中的样本图片的尺寸均为600×300,因此,可以获取样本规格图片集合中的每个样本图片在某个像素位置S:(i,j)上的像素属性值Dk,S,其中,(i,j)为在预设尺寸上的某个像素位置S的像素坐标,Dk,S为样本规格图片集合中的第k个样本图片中在像素位置S处的像素点的像素属性值。然后通过计算
Figure PCTCN2017070677-appb-000001
得到像素位置S的像素属性值的平均值Davg,S,然后计算预设尺寸600×300上的每一个像素位置的平均值Davg,S,即得到了平均值Davg,S构成的图。
步骤S106:对所述预设尺寸的各个像素位置的像素属性值的平均值进行归一化处理,得到所述预设尺寸的各个像素位置的水印概率值。
在本实施例中,对所述预设尺寸的各个像素位置的像素属性值的平均值进行归一化处理的步骤可具体为:获取所述预设尺寸的各个像素位置的像素属性值的平均值的最大值,计算所述预设尺寸的各个像素位置的像素属性值的平均值与所述最大值的比值,得到所述预设尺寸的各个像素位置对应的概率值。
也就是说,可以先在预设尺寸600×300中的所有像素位置S1,S2,S3,S4…中先选出Davg,S的最大值Davg,MAX,然后对于每一个像素位置S,均计算:
Figure PCTCN2017070677-appb-000002
得到各个像素位置(i,j)处对应的概率值P(i,j)。该P(i,j)即为归一化后得到的与像素位置(i,j)处对应的概率值,用于表示像素位置(i,j)处存在具有特征的像素属性值的概率,或者说像素位置(i,j)处与样本规格图片相似且无水印信息的概率。
进一步的,在本实施例中,还可计算所述预设尺寸的各个像素位置对应的概率值的对立事件概率值,作为所述预设尺寸的各个像素位置对应的水印概率值。
如上例中,由于P(i,j)表示了像素位置(i,j)处与样本规格图片相似且无水印信息的概率,因此其对立事件概率值:1-P(i,j)为相应的像素位置(i,j)处可能出现水印的概率值,即水印概率值。
在其他实施例中,也可通过通过其他方式定义水印概率值,但定义的水印概率值必须随着预设尺寸的各个像素位置对应的概率值的递增而递减。
通过对预设尺寸的每一个像素位置进行上述步骤S102至步骤S106的计算,即可得到
步骤S108:获取调整到所述预设尺寸的目标图片,计算所述目标图片在所述预设尺寸的各个像素位置的像素属性值与相应的水印概率值的乘积之和,根据所述乘积之和判定所述目标图片是否包含水印。
输入的目标图片即为需要判定是否包含水印的图片,也需要以对待样本规格图片相同的方式对其进行裁剪和缩放,从而将其调整到相同的预设尺寸,如上例中,即为将输入的图片调整为600×300的图片。
如上例中,在得到调整到所述预设尺寸的目标图片之后,即可通过公式:
T=∑D(i,j)×(1-P(i,j))
计算目标图片上各个像素位置(i,j)处的像素属性值与相应像素位置(i,j)的水印概率值1-P(i,j)的乘积,然后计算求和得到T。在本实施例中,可通过判断T是否大于或等于阈值,若是,则判定所述目标图片中包含水印。
也就是说,在本实施例中,像素属性值选择为灰度梯度值,若多个样本规格图片在某个像素位置(i,j)处的灰度梯度值的平均值较大,且方差较小,即表示在样本规格图片中,该位置由于图片规格的定义,因此具有较高的概率出现梯度导致灰度突变,可能存在图像轮廓,例如,证件图片的人脸区域和文字说明区域,由于证件图片规格的限制,必然会出现较多的轮廓,从而导致梯度值较大。若多个样本规格图片在某个像素位置(i,j)处的灰度梯度值的平均值较小,且方差较小,则意味着该像素位置可能为规格图片中定义的背景位置,在规格中有较小的概率出现梯度导致灰度突变。因此,当输入了目标图片之后,若目标图片在像素位置(i,j)处的梯度值较大,而此处的样本规格图片的梯度值相对于图片整体的梯度变化较小,则水印概率值较大,则两者的乘积较大:
D(i,j)×(1-P(i,j))
为排除噪点,对目标图片整体进行分析,即对于每一个像素位置(i,j)均计算该乘积,然后进行求和得到T。由于对于衣服、人脸区域上的梯度信息,水印概率值1-P(i,j)均较小,因此过滤掉了衣服、人脸区域上的轮廓对水印识别的感染,而使得T的大小反映了目标图片在图像背景上与样本规格图片的差异,因此,识别更加准确。
在另一个实施例中,也可选用灰度值与背景灰度的差值作为像素属性值。在本实施例中,在计算所述样本规格图片集合中的样本图片在所述预设尺寸的各个像素位置的像素属性值的平均值的步骤之前,则可根据与背景灰度将所述样本规格图片集合中的样本图片转化为灰度图片。
在本实施例中,仍可按照前述的步骤执行步骤S102和步骤S104,但在归一化时,可参考预设的样本规格图片的背景灰度进行归一化处理,例如,若规格图片的定义中,背景灰度并不为白色,而是灰度为100的背景色,则可通过计算预设尺寸的各个像素位置上的平均值与该背景灰度100的差值,并以该差 值进行归一化。
而在根据上述公式:
T=∑D(i,j)×(1-P(i,j))
计算时,证件图片中的人脸,衣服上与背景色差距较大的像素点的P(i,j)较大,因此,水印概率值1-P(i,j)较小,从而使得目标图片中的人脸,衣服等与背景色差距较大的像素点在中T的权重较小。而对于目标图片中的水印信息,由于其出现的位置位于背景色区域,此区域的像素点的P(i,j)较小,而水印概率值1-P(i,j)较大,因此,当目标图片中在该区域存在于背景灰度差距较大的像素点,且数量较多时,T值将显著上升,从而可方便地甄别出规格图片中的水印信息。
在另一个实施例中,对于纯白或纯黑为背景色的规格图片,还可以像素属性值的灰度值作为像素属性值。在本实施例中,计算所述样本规格图片集合中的样本图片在所述预设尺寸的各个像素位置的像素属性值的平均值的步骤之前还包括:根据灰度值将所述样本规格图片集合中的样本图片转化为二值化图片。
二值化图片即为黑白图片,仅包含两种灰度值。可预先设置灰度阈值,高于灰度阈值的像素点其灰度值设置为255,低于灰度阈值的像素点其灰度值设置为0。然后仍然采用上述公式:
T=∑D(i,j)×(1-P(i,j))
来判定目标图片中是否包含水印,由于背景区域的像素点的P(i,j)为0,则目标图片在背景区域的若有明显的水印信息,则会显著体现在T值中。而对于人脸、衣服等灰度值相对背景差距较大的区域,则P(i,j)为1,相应的水印概率值为0,因此可过滤掉人脸和衣服区域中的图像信息对水印判断的干扰,从而提高准确率。
需要说明的是,上述以灰度值(需要二值化图片)、灰度值与背景灰度的差值或灰度梯度值作为像素属性值判定目标图片中是否包含有不合乎规格图片的定义的水印信息的实施例中,经发明人测试得出以灰度梯度值作为像素属性值进行判定的方式为最优,由于其仅考虑了轮廓信息,而没有过多的涉及目标图片中与目标图片的内容可能相关的像素点本身的灰度信息,从而使得其识 别准确度最高。
此外,为解决传统技术中的在识别规格图片中是否包含水印信息时容易受到人体、衣物上花纹的干扰,从而导致的识别准确率不高的技术问题,在一个实施例中,如图3所示,特提出了一种识别规格图片中是否包含水印的装置,包括:样本规格图片获取模块102、均值计算模块104、水印概率计算模块106和水印判定模块108,其中:
样本规格图片获取模块102,用于获取样本规格图片集合,将所述样本规格图片集合中的样本图片调整到预设尺寸,且所述样本规格图片集合中的样本图片中不包含水印信息。
均值计算模块104,用于计算所述样本规格图片集合中的样本图片在所述预设尺寸的各个像素位置的像素属性值的平均值。
水印概率计算模块106,用于对所述预设尺寸的各个像素位置的像素属性值的平均值进行归一化处理,得到所述预设尺寸的各个像素位置的水印概率值。
水印判定模块108,用于获取调整到所述预设尺寸的目标图片,计算所述目标图片在所述预设尺寸的各个像素位置的像素属性值与相应的水印概率值的乘积之和,根据所述乘积之和判定所述目标图片是否包含水印。
在一个实施例中,所述像素属性值为灰度梯度值。均值计算模块104还用于计算所述样本规格图片集合中的样本图片在所述预设尺寸的各个像素位置的灰度梯度值。
在一个实施例中,所述像素属性值为灰度值与背景灰度的差值;均值计算模块104还用于根据背景灰度将所述样本规格图片集合中的样本图片转化为灰度图片。
在一个实施例中,所述像素属性值为灰度值;均值计算模块104还用于根据灰度值将所述样本规格图片集合中的样本图片转化为二值化图片。
在一个实施例中,水印概率计算模块106还用于获取所述预设尺寸的各个像素位置的像素属性值的平均值的最大值,计算所述预设尺寸的各个像素位置的像素属性值的平均值与所述最大值的比值,得到所述预设尺寸的各个像素位 置对应的概率值。
在一个实施例中,水印概率计算模块106还用于计算所述预设尺寸的各个像素位置对应的概率值的对立事件概率值,作为所述预设尺寸的各个像素位置对应的水印概率值。
在一个实施例中,水印判定模块108还用于判断所述水印概率评价值是否大于或等于阈值,若是,则判定所述目标图片中包含水印。
实施本发明实施例,将具有如下有益效果:
采用了上述识别规格图片中是否包含水印的方法和装置之后,先根据没有水印的样本规格图片集合得到预设尺寸的每个像素位置出现与背景区域的像素属性值有较大差异的水印概率值,然后再接收输入的目标图片,计算目标图片上各个像素点的像素属性值与相应像素位置的水印概率值的乘积之和,由于该和中,人脸、衣服上像素属性存在像素属性突变的区域的水印概率值较小,因此,可忽略掉人脸,衣服上的轮廓信息对水印识别的干扰,而对于背景区域上的水印信息,其水印概率值较大,若背景区域出现水印,则在该区域上将出现较大的像素属性值,再与较大的水印概率值相乘之后再相加将得到较大的和,从而可根据该较大的和判定出规格图片中是否包含水印,并且由于过滤掉了人脸,和衣服上本身存在的轮廓,使得判定结果更加准确。
在一个实施例中,如图4所示,图4展示了一种运行上述识别规格图片中是否包含水印的方法的基于冯诺依曼体系的计算机系统。该计算机系统可以是智能手机、平板电脑、掌上电脑,笔记本电脑或个人电脑等终端设备。具体的,该计算机系统可包括通过系统总线连接的外部输入接口1001、处理器1002、存储器1003和输出接口1004。其中,外部输入接口1001可选的可至少包括网络接口10012。存储器1003可包括外存储器10032(例如硬盘、光盘或软盘等)和内存储器10034。输出接口1004可至少包括显示屏10042等设备。
在本实施例中,本方法的运行基于计算机程序,该计算机程序的程序文件存储于前述基于冯诺依曼体系的计算机系统的外存储器10032中,在运行时被加载到内存储器10034中,然后被编译为机器码之后传递至处理器1002中执 行,从而使得基于冯诺依曼体系的计算机系统中形成逻辑上的样本规格图片获取模块102、均值计算模块104、水印概率计算模块106和水印判定模块108。且在上述识别规格图片中是否包含水印的方法执行过程中,输入的参数均通过外部输入接口1001接收,并传递至存储器1003中缓存,然后输入到处理器1002中进行处理,处理的结果数据或缓存于存储器1003中进行后续地处理,或被传递至输出接口1004进行输出。
根据本发明的实施方式,还提供了一种非易失机器可读存储媒介,存储有用于识别规格图片中是否包含水印的程序产品,所述程序产品可包括上述所述的样本规格图片获取模块102、均值计算模块104、水印概率计算模块106和水印判定模块108。所述程序产品被计算机系统调用以执行上述的识别规格图片中是否包含水印的方法。
以上所揭露的仅为本发明较佳实施例而已,当然不能以此来限定本发明之权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。

Claims (28)

  1. 一种识别规格图片中是否包含水印的方法,其特征在于,包括:
    获取样本规格图片集合,将所述样本规格图片集合中的样本图片调整到预设尺寸,且所述样本规格图片集合中的样本图片中不包含水印信息;
    计算所述样本规格图片集合中的样本图片在所述预设尺寸的各个像素位置的像素属性值的平均值;
    对所述预设尺寸的各个像素位置的像素属性值的平均值进行归一化处理,得到所述预设尺寸的各个像素位置的水印概率值;
    获取调整到所述预设尺寸的目标图片,计算所述目标图片在所述预设尺寸的各个像素位置的像素属性值与相应的水印概率值的乘积之和,根据所述乘积之和判定所述目标图片是否包含水印。
  2. 根据权利要求1所述的一种识别规格图片中是否包含水印的方法,其特征在于,所述像素属性值为灰度梯度值;
    所述计算所述样本规格图片集合中的样本图片在所述预设尺寸的各个像素位置的像素属性值的平均值的步骤之前还包括:
    计算所述样本规格图片集合中的样本图片在所述预设尺寸的各个像素位置的灰度梯度值。
  3. 根据权利要求1所述的一种识别规格图片中是否包含水印的方法,其特征在于,所述像素属性值为灰度值与背景灰度的差值;
    所述计算所述样本规格图片集合中的样本图片在所述预设尺寸的各个像素位置的像素属性值的平均值的步骤之前还包括:
    根据背景灰度将所述样本规格图片集合中的样本图片转化为灰度图片。
  4. 根据权利要求1所述的一种识别规格图片中是否包含水印的方法,其特征在于,所述像素属性值为灰度值;
    所述计算所述样本规格图片集合中的样本图片在所述预设尺寸的各个像素位置的像素属性值的平均值的步骤之前还包括:
    根据灰度值将所述样本规格图片集合中的样本图片转化为二值化图片。
  5. 根据权利要求1所述的一种识别规格图片中是否包含水印的方法,其 特征在于,所述对所述预设尺寸的各个像素位置的像素属性值的平均值进行归一化处理的步骤为:
    获取所述预设尺寸的各个像素位置的像素属性值的平均值的最大值,计算所述预设尺寸的各个像素位置的像素属性值的平均值与所述最大值的比值,得到所述预设尺寸的各个像素位置对应的概率值。
  6. 根据权利要求5所述的一种识别规格图片中是否包含水印的方法,其特征在于,所述得到所述预设尺寸的各个像素位置的水印概率值的步骤为:
    计算所述预设尺寸的各个像素位置对应的概率值的对立事件概率值,作为所述预设尺寸的各个像素位置对应的水印概率值。
  7. 根据权利要求6所述的一种识别规格图片中是否包含水印的方法,其特征在于,所述根据所述水印概率评价值判定所述目标图片是否包含水印的步骤还包括:
    判断所述水印概率评价值是否大于或等于阈值,若是,则判定所述目标图片中包含水印。
  8. 一种识别规格图片中是否包含水印的装置,其特征在于,包括:
    样本规格图片获取模块,用于获取样本规格图片集合,将所述样本规格图片集合中的样本图片调整到预设尺寸,且所述样本规格图片集合中的样本图片中不包含水印信息;
    均值计算模块,用于计算所述样本规格图片集合中的样本图片在所述预设尺寸的各个像素位置的像素属性值的平均值;
    水印概率计算模块,用于对所述预设尺寸的各个像素位置的像素属性值的平均值进行归一化处理,得到所述预设尺寸的各个像素位置的水印概率值;
    水印判定模块,用于获取调整到所述预设尺寸的目标图片,计算所述目标图片在所述预设尺寸的各个像素位置的像素属性值与相应的水印概率值的乘积之和,根据所述乘积之和判定所述目标图片是否包含水印。
  9. 根据权利要求8所述的一种识别规格图片中是否包含水印的装置,其特征在于,所述像素属性值为灰度梯度值;
    所述均值计算模块还用于计算所述样本规格图片集合中的样本图片在所 述预设尺寸的各个像素位置的灰度梯度值。
  10. 根据权利要求8所述的一种识别规格图片中是否包含水印的装置,其特征在于,所述像素属性值为灰度值与背景灰度的差值;
    所述均值计算模块还用于根据背景灰度将所述样本规格图片集合中的样本图片转化为灰度图片。
  11. 根据权利要求8所述的一种识别规格图片中是否包含水印的方法,其特征在于,所述像素属性值为灰度值;
    所述均值计算模块还用于根据灰度值将所述样本规格图片集合中的样本图片转化为二值化图片。
  12. 根据权利要求8所述的一种识别规格图片中是否包含水印的装置,其特征在于,所述水印概率计算模块还用于获取所述预设尺寸的各个像素位置的像素属性值的平均值的最大值,计算所述预设尺寸的各个像素位置的像素属性值的平均值与所述最大值的比值,得到所述预设尺寸的各个像素位置对应的概率值。
  13. 根据权利要求12所述的一种识别规格图片中是否包含水印的装置,其特征在于,所述水印概率计算模块还用于计算所述预设尺寸的各个像素位置对应的概率值的对立事件概率值,作为所述预设尺寸的各个像素位置对应的水印概率值。
  14. 根据权利要求13所述的一种识别规格图片中是否包含水印的装置,其特征在于,所述水印判定模块还用于判断所述水印概率评价值是否大于或等于阈值,若是,则判定所述目标图片中包含水印。
  15. 一种计算机系统,包括:
    存储器,存储计算机可执行程序代码;以及
    处理器,用于调用所述计算机可执行程序代码以执行以下操作:
    获取样本规格图片集合,将所述样本规格图片集合中的样本图片调整到预设尺寸,且所述样本规格图片集合中的样本图片中不包含水印信息;
    计算所述样本规格图片集合中的样本图片在所述预设尺寸的各个像素位置的像素属性值的平均值;
    对所述预设尺寸的各个像素位置的像素属性值的平均值进行归一化处理,得到所述预设尺寸的各个像素位置的水印概率值;
    获取调整到所述预设尺寸的目标图片,计算所述目标图片在所述预设尺寸的各个像素位置的像素属性值与相应的水印概率值的乘积之和,根据所述乘积之和判定所述目标图片是否包含水印。
  16. 根据权利要求15所述的计算机系统,其特征在于,所述像素属性值为灰度梯度值;
    所述计算所述样本规格图片集合中的样本图片在所述预设尺寸的各个像素位置的像素属性值的平均值的步骤之前还包括:
    计算所述样本规格图片集合中的样本图片在所述预设尺寸的各个像素位置的灰度梯度值。
  17. 根据权利要求15所述的计算机系统,其特征在于,所述像素属性值为灰度值与背景灰度的差值;
    所述计算所述样本规格图片集合中的样本图片在所述预设尺寸的各个像素位置的像素属性值的平均值的步骤之前还包括:
    根据背景灰度将所述样本规格图片集合中的样本图片转化为灰度图片。
  18. 根据权利要求15所述的计算机系统,其特征在于,所述像素属性值为灰度值;
    所述计算所述样本规格图片集合中的样本图片在所述预设尺寸的各个像素位置的像素属性值的平均值的步骤之前还包括:
    根据灰度值将所述样本规格图片集合中的样本图片转化为二值化图片。
  19. 根据权利要求15所述的计算机系统,其特征在于,所述对所述预设尺寸的各个像素位置的像素属性值的平均值进行归一化处理的步骤为:
    获取所述预设尺寸的各个像素位置的像素属性值的平均值的最大值,计算所述预设尺寸的各个像素位置的像素属性值的平均值与所述最大值的比值,得到所述预设尺寸的各个像素位置对应的概率值。
  20. 根据权利要求19所述的一种识别规格图片中是否包含水印的方法,其特征在于,所述得到所述预设尺寸的各个像素位置的水印概率值的步骤为:
    计算所述预设尺寸的各个像素位置对应的概率值的对立事件概率值,作为 所述预设尺寸的各个像素位置对应的水印概率值。
  21. 根据权利要求20所述的计算机系统,其特征在于,所述根据所述水印概率评价值判定所述目标图片是否包含水印的步骤还包括:
    判断所述水印概率评价值是否大于或等于阈值,若是,则判定所述目标图片中包含水印。
  22. 一种计算机可读存储媒介,存储计算机可执行程序代码,所述计算机可执行程序代码使得计算机系统执行以下操作:
    获取样本规格图片集合,将所述样本规格图片集合中的样本图片调整到预设尺寸,且所述样本规格图片集合中的样本图片中不包含水印信息;
    计算所述样本规格图片集合中的样本图片在所述预设尺寸的各个像素位置的像素属性值的平均值;
    对所述预设尺寸的各个像素位置的像素属性值的平均值进行归一化处理,得到所述预设尺寸的各个像素位置的水印概率值;
    获取调整到所述预设尺寸的目标图片,计算所述目标图片在所述预设尺寸的各个像素位置的像素属性值与相应的水印概率值的乘积之和,根据所述乘积之和判定所述目标图片是否包含水印。
  23. 根据权利要求22所述的计算机可读存储媒介,其特征在于,所述像素属性值为灰度梯度值;
    所述计算所述样本规格图片集合中的样本图片在所述预设尺寸的各个像素位置的像素属性值的平均值的步骤之前还包括:
    计算所述样本规格图片集合中的样本图片在所述预设尺寸的各个像素位置的灰度梯度值。
  24. 根据权利要求22所述的计算机可读存储媒介,其特征在于,所述像素属性值为灰度值与背景灰度的差值;
    所述计算所述样本规格图片集合中的样本图片在所述预设尺寸的各个像素位置的像素属性值的平均值的步骤之前还包括:
    根据背景灰度将所述样本规格图片集合中的样本图片转化为灰度图片。
  25. 根据权利要求22所述的计算机可读存储媒介,其特征在于,所述像 素属性值为灰度值;
    所述计算所述样本规格图片集合中的样本图片在所述预设尺寸的各个像素位置的像素属性值的平均值的步骤之前还包括:
    根据灰度值将所述样本规格图片集合中的样本图片转化为二值化图片。
  26. 根据权利要求22所述的计算机可读存储媒介,其特征在于,所述对所述预设尺寸的各个像素位置的像素属性值的平均值进行归一化处理的步骤为:
    获取所述预设尺寸的各个像素位置的像素属性值的平均值的最大值,计算所述预设尺寸的各个像素位置的像素属性值的平均值与所述最大值的比值,得到所述预设尺寸的各个像素位置对应的概率值。
  27. 根据权利要求26所述的计算机可读存储媒介,其特征在于,所述得到所述预设尺寸的各个像素位置的水印概率值的步骤为:
    计算所述预设尺寸的各个像素位置对应的概率值的对立事件概率值,作为所述预设尺寸的各个像素位置对应的水印概率值。
  28. 根据权利要求27所述的计算机可读存储媒介,其特征在于,所述根据所述水印概率评价值判定所述目标图片是否包含水印的步骤还包括:
    判断所述水印概率评价值是否大于或等于阈值,若是,则判定所述目标图片中包含水印。
PCT/CN2017/070677 2016-01-21 2017-01-09 识别规格图片中是否包含水印的方法及装置 WO2017124940A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
MYPI2017704730A MY188906A (en) 2016-01-21 2017-01-09 Method, device and computer-readable storage medium for identifying whether image comprises watermark
US15/945,613 US10504202B2 (en) 2016-01-21 2018-04-04 Method and device for identifying whether standard picture contains watermark

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610038952.1 2016-01-21
CN201610038952.1A CN106991423B (zh) 2016-01-21 2016-01-21 识别规格图片中是否包含水印的方法及装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/945,613 Continuation-In-Part US10504202B2 (en) 2016-01-21 2018-04-04 Method and device for identifying whether standard picture contains watermark

Publications (1)

Publication Number Publication Date
WO2017124940A1 true WO2017124940A1 (zh) 2017-07-27

Family

ID=59361396

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/070677 WO2017124940A1 (zh) 2016-01-21 2017-01-09 识别规格图片中是否包含水印的方法及装置

Country Status (4)

Country Link
US (1) US10504202B2 (zh)
CN (1) CN106991423B (zh)
MY (1) MY188906A (zh)
WO (1) WO2017124940A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200302324A1 (en) * 2019-03-20 2020-09-24 Fujitsu Limited Data complementing method, data complementing apparatus, and non-transitory computer-readable storage medium for storing data complementing program
CN113810189A (zh) * 2021-10-27 2021-12-17 中电金信软件有限公司 一种密钥图片的生成方法及装置

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109426775B (zh) * 2017-08-25 2022-02-25 株式会社日立制作所 一种检测人脸图像中网纹的方法、装置及设备
US10650530B2 (en) * 2018-03-29 2020-05-12 Uveye Ltd. Method of vehicle image comparison and system thereof
US10643332B2 (en) * 2018-03-29 2020-05-05 Uveye Ltd. Method of vehicle image comparison and system thereof
CN108810619B (zh) * 2018-06-29 2021-03-26 北京奇虎科技有限公司 识别视频中水印的方法、装置和电子设备
CN109214995A (zh) * 2018-08-20 2019-01-15 阿里巴巴集团控股有限公司 图片质量的确定方法、装置和服务器
CN109903210B (zh) * 2019-01-04 2024-02-06 创新先进技术有限公司 水印的去除方法、装置和服务器
CN111612681A (zh) * 2019-02-22 2020-09-01 阿里巴巴集团控股有限公司 数据获取方法、水印识别方法、水印去除方法及装置
WO2021045781A1 (en) * 2019-09-06 2021-03-11 Google Llc Detecting semi-transparent image watermarks
CN111008925A (zh) * 2019-12-11 2020-04-14 京东数字科技控股有限公司 证件水印的验证方法、装置、设备及存储介质
CN111428791B (zh) * 2020-03-26 2023-08-29 北京互金新融科技有限公司 图像对比方法及装置
CN111681151A (zh) * 2020-04-14 2020-09-18 海南车智易通信息技术有限公司 一种图像水印检测方法、装置和计算设备
CN113761991A (zh) * 2020-06-12 2021-12-07 北京沃东天骏信息技术有限公司 水印识别方法和装置以及计算机可读存储介质
CN112070034A (zh) * 2020-09-10 2020-12-11 北京字节跳动网络技术有限公司 图像识别方法、装置、电子设备和计算机可读介质
CN112951348B (zh) * 2020-11-05 2023-11-03 苏州精美科光电材料有限公司 一种用于提高芯片制造良品率的AlSc靶材的制造方法
CN112492343B (zh) * 2020-12-16 2023-11-10 浙江大华技术股份有限公司 一种视频直播监控方法及相关装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100034469A1 (en) * 2006-10-11 2010-02-11 Spikenet Technology Method of fast searching and recognition of a digital image representative of at least one graphical pattern in a bank of digital images
CN103870597A (zh) * 2014-04-01 2014-06-18 北京奇虎科技有限公司 一种无水印图片的搜索方法及装置
CN104268822A (zh) * 2014-09-18 2015-01-07 上海理工大学 网络上传图像的防伪认证方法
CN104504639A (zh) * 2014-11-07 2015-04-08 张重雄 一种数字水印防伪商标实现方法及其检测仪

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3735521B2 (ja) * 1999-09-30 2006-01-18 株式会社東芝 埋め込み符号生成方法及び装置、埋め込み符号検出方法及び装置並びに電子透かし埋め込み装置
JP4005780B2 (ja) * 2001-07-12 2007-11-14 興和株式会社 電子透かしの埋め込みおよび検出
GB2421134A (en) * 2004-12-09 2006-06-14 Sony Uk Ltd Detection of payload data from a watermarked image by calculation of payload probability values
JP4516629B2 (ja) * 2007-03-07 2010-08-04 富士通株式会社 パターン検出プログラム、パターン検出方法およびパターン検出装置
TW201110701A (en) * 2009-09-07 2011-03-16 Univ Nat Taiwan Science Tech Image processing method combining compression and watermark techniques
WO2012127611A1 (ja) * 2011-03-22 2012-09-27 富士通株式会社 位置情報付加装置、位置情報付加方法及び位置情報付加用コンピュータプログラムならびに位置検出装置
US9521291B2 (en) * 2013-07-19 2016-12-13 Digimarc Corporation Feature-based watermark localization in digital capture systems
CN104484850A (zh) * 2014-12-20 2015-04-01 辽宁师范大学 基于模糊分类的鲁棒图像水印检测方法
CN104915918B (zh) * 2015-06-23 2017-12-19 哈尔滨工程大学 一种面向影像地图的强鲁棒数字水印方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100034469A1 (en) * 2006-10-11 2010-02-11 Spikenet Technology Method of fast searching and recognition of a digital image representative of at least one graphical pattern in a bank of digital images
CN103870597A (zh) * 2014-04-01 2014-06-18 北京奇虎科技有限公司 一种无水印图片的搜索方法及装置
CN104268822A (zh) * 2014-09-18 2015-01-07 上海理工大学 网络上传图像的防伪认证方法
CN104504639A (zh) * 2014-11-07 2015-04-08 张重雄 一种数字水印防伪商标实现方法及其检测仪

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200302324A1 (en) * 2019-03-20 2020-09-24 Fujitsu Limited Data complementing method, data complementing apparatus, and non-transitory computer-readable storage medium for storing data complementing program
US11562275B2 (en) * 2019-03-20 2023-01-24 Fujitsu Limited Data complementing method, data complementing apparatus, and non-transitory computer-readable storage medium for storing data complementing program
CN113810189A (zh) * 2021-10-27 2021-12-17 中电金信软件有限公司 一种密钥图片的生成方法及装置
CN113810189B (zh) * 2021-10-27 2024-01-09 中电金信软件有限公司 一种密钥图片的生成方法及装置

Also Published As

Publication number Publication date
US20180225800A1 (en) 2018-08-09
CN106991423B (zh) 2019-06-07
US10504202B2 (en) 2019-12-10
MY188906A (en) 2022-01-13
CN106991423A (zh) 2017-07-28

Similar Documents

Publication Publication Date Title
WO2017124940A1 (zh) 识别规格图片中是否包含水印的方法及装置
US11302109B2 (en) Range and/or polarity-based thresholding for improved data extraction
US20200410074A1 (en) Identity authentication method and apparatus, electronic device, and storage medium
US9754164B2 (en) Systems and methods for classifying objects in digital images captured using mobile devices
WO2018010657A1 (zh) 结构化文本检测方法和系统、计算设备
WO2019153739A1 (zh) 基于人脸识别的身份认证方法、装置、设备和存储介质
US8837830B2 (en) Finding text in natural scenes
US8189961B2 (en) Techniques in optical character recognition
US8155442B2 (en) Method and apparatus for modifying the histogram of an image
US8041139B2 (en) Method and apparatus for calculating the background color of an image
WO2020082731A1 (zh) 电子装置、证件识别方法及存储介质
US11625954B2 (en) Method and apparatus with liveness testing
WO2019061658A1 (zh) 眼镜定位方法、装置及存储介质
US20240087358A1 (en) Liveness test method and apparatus and biometric authentication method and apparatus
US20100061655A1 (en) Method and Apparatus for Despeckling an Image
EP4109332A1 (en) Certificate authenticity identification method and apparatus, computer-readable medium, and electronic device
WO2019200872A1 (zh) 身份验证方法和装置、电子设备、计算机程序和存储介质
CN112651953B (zh) 图片相似度计算方法、装置、计算机设备及存储介质
US11086977B2 (en) Certificate verification
US20160125253A1 (en) Method and apparatus for image matching
CN108268778B (zh) 数据处理方法、装置及存储介质
WO2019196298A1 (zh) 电子装置、基于证件图片的身份识别方法及存储介质
CN113780269A (zh) 图像识别方法、装置、计算机系统及可读存储介质
Bharadwaja The analysis of online and offline signature verification techniques to counter forgery
US20240153126A1 (en) Automatic image cropping using a reference feature

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17740971

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17740971

Country of ref document: EP

Kind code of ref document: A1