CN111047496A - Threshold determination method, watermark detection device and electronic equipment - Google Patents

Threshold determination method, watermark detection device and electronic equipment Download PDF

Info

Publication number
CN111047496A
CN111047496A CN201911280362.XA CN201911280362A CN111047496A CN 111047496 A CN111047496 A CN 111047496A CN 201911280362 A CN201911280362 A CN 201911280362A CN 111047496 A CN111047496 A CN 111047496A
Authority
CN
China
Prior art keywords
image
watermark
matching
degree
matching degree
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
CN201911280362.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.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou 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 Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN201911280362.XA priority Critical patent/CN111047496A/en
Publication of CN111047496A publication Critical patent/CN111047496A/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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/16Program or content traceability, e.g. by watermarking
    • 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

Abstract

The present specification provides embodiments of a threshold determination method, a watermark detection method, an apparatus, and an electronic device. The watermark detection method comprises the following steps: calculating a first matching degree between an image to be detected and a watermark image, wherein the watermark image corresponds to a matching threshold value; comparing the first degree of match to the match threshold; and determining whether the image to be detected carries watermark information or not according to the comparison result. Some embodiments of the present description may detect whether an image carries a specified type of watermark information through a watermark image and a matching threshold, so as to avoid misusing the image and protect private data.

Description

Threshold determination method, watermark detection device and electronic equipment
Technical Field
The embodiment of the specification relates to the technical field of computers, in particular to a threshold determining method, a watermark detecting device and electronic equipment.
Background
With the development of internet technology, images have gained applications in many fields, such as application login, payment authentication, and the like. In some cases, the image may be abused by a lawbreaker, resulting in leakage of private data of the user. For example, it is possible for a lawbreaker to perform face recognition using face images gathered from a network and log in to an application.
Disclosure of Invention
The embodiment of the specification provides a threshold determination method, a watermark detection device and electronic equipment, so that an image is prevented from being abused and private data is protected.
In order to achieve the above purpose, one or more embodiments in the present specification provide the following technical solutions.
According to a first aspect of one or more embodiments of the present specification, there is provided a threshold determination method including: generating a watermark image according to a plurality of sample images carrying the same watermark information; calculating a first matching degree between each sample image and the watermark image; and determining a matching threshold according to the first matching degree, wherein the matching threshold is used for detecting whether the image carries the watermark information.
According to a second aspect of one or more embodiments of the present specification, there is provided a method of calculating a first degree of matching between an image to be detected and a watermark image, the watermark image having a matching threshold; comparing the first degree of match to the match threshold; and determining whether the image to be detected carries watermark information or not according to the comparison result.
According to a third aspect of one or more embodiments of the present specification, there is provided a threshold value determination apparatus including: the generating unit is used for generating a watermark image according to a plurality of sample images carrying the same watermark information; the computing unit is used for computing a first matching degree between each sample image and the watermark image; and the determining unit is used for determining a matching threshold according to the first matching degree, and the matching threshold is used for detecting whether the image carries the watermark information.
According to a fourth aspect of one or more embodiments of the present specification, there is provided a watermark detection apparatus including: the computing unit is used for computing a first matching degree between an image to be detected and a watermark image, and the watermark image corresponds to a matching threshold value; a comparison unit for comparing the first matching degree with the matching threshold; and the determining unit is used for determining whether the image to be detected carries watermark information or not according to the comparison result.
According to a fifth aspect of one or more embodiments of the present specification, there is provided an electronic device including: at least one processor; a memory storing program instructions configured to be suitable for execution by the at least one processor, the program instructions comprising instructions for performing the method steps of the first or second aspect.
According to the technical scheme provided by the embodiment of the specification, the embodiments of the specification can detect whether the image carries the watermark information of the specified type or not through the watermark image and the matching threshold value, so that the abuse of the image can be avoided, and the private data can be protected.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, the drawings in the following description are only some embodiments described in the present specification, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of a threshold determination method according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a search process according to an embodiment of the present disclosure;
fig. 3 is a flowchart of a watermark detection method according to an embodiment of the present specification;
FIG. 4 is a schematic diagram of a threshold determination process according to an embodiment of the present disclosure;
FIG. 5 is a diagram illustrating an example scenario in accordance with an embodiment of the present disclosure;
FIG. 6 is a functional block diagram of a threshold determination device according to an embodiment of the present disclosure;
fig. 7 is a functional block diagram of a watermark detection apparatus according to an embodiment of the present specification;
fig. 8 is a functional block diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, and not all of the embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments in the present specification without any inventive step should fall within the scope of protection of the present specification.
The present specification provides one embodiment of a threshold determination method. The subject of execution of the threshold determination method may comprise an electronic device. The electronic equipment can be equipment such as a server, a mobile phone, a tablet computer or a personal computer; alternatively, the system may be a system including a plurality of devices, for example, a server cluster including a plurality of servers.
Please refer to fig. 1 and 4. The threshold determination method may include the following steps.
Step S11: and generating a watermark image according to a plurality of sample images carrying the same watermark information.
In some embodiments, the electronic device may acquire a plurality of sample images.
The sample image may be a grayscale image. Alternatively, the sample image may be a color image. The color of the color image can be represented by any one of the following color modes: RGB mode, CMYK mode, HSL mode, HSB mode. The sample image may be a face image. Of course, the sample image may also be other types of images.
The sample image may carry watermark information. The watermark information can be embedded into the image through a digital watermark technology, and is used for preventing the image from being illegally tampered or used. The watermark information may include words, characters, logos, and any combination thereof. For example, the electronic device may capture a screenshot of a video in a tremble (a short video social software) as a sample image, where the sample image may carry watermark information, and the watermark information may include a flag of the tremble.
The plurality of sample images may carry the same watermark information, and the positions of the watermark information in the plurality of sample images may be the same. In addition, the sizes of the plurality of sample images may be the same; alternatively, it may be different. If the sample images are different in size, the electronic device may process part or all of the sample images, so that the processed sample images are the same in size; a watermark image may be generated from the processed plurality of sample images.
In some embodiments, the electronic device may calculate an edge detection value for a pixel point in each sample image using an edge detection algorithm; a watermark image may be generated based on the edge detection value. Wherein the edge detection algorithm may be used to perform edge detection on an image. The edge detection algorithm may include any one of: sobel algorithm, Laplacian algorithm, Canny algorithm, and the like.
In this embodiment, the Sobel algorithm is taken as an example to describe the calculation process of the edge detection value.
The Sobel algorithm may include a horizontal convolution factor and a vertical convolution factor. For each pixel point in the sample image, the electronic device may calculate a lateral component of an edge detection value of the pixel point according to the lateral convolution factor; the longitudinal component of the edge detection value of the pixel point can be calculated according to the longitudinal convolution factor; the edge detection value of the pixel point can be calculated according to the transverse component and the longitudinal component of the edge detection value. The transverse convolution factor may be as shown in table 1 below and the longitudinal convolution factor may be as shown in table 2 below.
TABLE 1
-1 0 1
-2 0 2
-1 0 1
TABLE 2
1 2 1
0 0 0
-1 -2 -1
For example, an image coordinate system may be established with the upper left corner of the sample image as the origin, the horizontal rightward direction as the positive direction of the X-axis, and the vertical downward direction as the positive direction of the Y-axis. An edge detection value of a pixel (x, y) in the sample image is a transverse component Gx (-1) × f (x-1, y-1) +0 xf (x, y-1) +1 xf (x +1, y-1) + (-2) × f (x-1, y) +0 xf (x, y) +2 xf (x +1, y) + (-1) × f (x-1, y +1) +0 xf (x, y +1) +1 xf 1, y +1), an edge detection value of a pixel (x, y) in the sample image is a longitudinal component Gy (-1 xf (x-1, y-1) +2 xf (x, y-1) +1 xf 1, y-1) +0 xf (x-1, y) +0 xf (x, y +0 xf (x +1), y) + (-1) × f (x-1, y +1) + (-2) × f (x, y +1) + (-1) × f (x +1, y + 1). Edge detection value of pixel point (x, y)
Figure BDA0002316570890000041
Wherein f (x-1, y-1) represents the gray value of the pixel (x-1, y-1), f (x, y-1) represents the gray value of the pixel (x, y-1), f (x +1, y-1) represents the gray value of the pixel (x +1, y-1), f (x-1, y) represents the gray value of the pixel (x-1, y), f (x, y) represents the gray value of the pixel (x, y), f (x +1, y) represents the gray value of the pixel (x +1, y), f (x-1, y +1) represents the gray value of the pixel (x-1, y +1), f (x, y +1) represents the gray value of the pixel (x, y +1), and f (x +1, y +1) represents the gray value of the pixel (x +1, y + 1).
In this embodiment, the electronic device may generate an edge detection image according to the edge detection value; the watermark region in the edge detection image may be extracted as a watermark image.
The edge detection image may be the same size as the sample image. In the edge detection image, the pixel value of each pixel point may be a statistical value, the statistical value is obtained by performing statistics on the edge detection values of the pixel points at the same position in the plurality of sample images, and the statistical value may be a median, an average, a mode, or the like. For example, the plurality of sample images may include sample images Image1, Image2, Image3, and Image 4. Sample images Image1, Image2, Image3, and Image4 have the same size. The positions of the pixel point a0 in the edge detection Image, the position of the pixel point a1 in the sample Image1, the position of the pixel point a2 in the sample Image2, the position of the pixel point A3 in the sample Image3, and the position of the pixel point a4 in the sample Image4 are the same. The electronic equipment can count the edge detection value of the pixel A1, the edge detection value of the pixel A2, the edge detection value of the pixel A3 and the median of the edge detection value of the pixel A4; the median may be taken as the pixel value of pixel a 0.
In the edge detection image, the pixel values of the edge pixel points and the pixel values of the non-edge pixel points have larger difference. Thus, the electronic device can determine a watermark region in the edge detection image according to a preset edge threshold; the watermark region may be truncated as a watermark image. The preset edge threshold may be an empirical value; alternatively, it can be obtained by machine learning. For example, the electronic device may select a pixel point having a pixel value greater than or equal to a preset edge threshold as an edge pixel point; the watermark region can be determined in the edge detection image according to the edge pixel points.
It is worth noting that the watermark image may correspond to watermark information carried in the sample image. In the watermark image, the pixel value of the pixel point may be a statistical value.
Step S13: a first degree of match between each sample image and the watermark image is calculated.
In some embodiments, the electronic device may separately calculate a first degree of match between each sample image and the watermark image using an image matching algorithm. The first degree of matching may be used to measure a similarity between the sample image and the watermark image. The image matching algorithm may comprise any one of: a Chamfer Matching (Chamfer Matching) algorithm, a mean absolute difference algorithm (MAD), a sum of absolute difference algorithm (SAD), a sum of squared error algorithm (SSD) algorithm, etc. The Chamfer Matching algorithm may include a basic Chamfer Matching algorithm and a deformation algorithm thereof, and the deformation algorithm may include Hierarchical Chamfer Matching, directive Chamfer Matching, Fast directive Chamfer Matching, and the like.
It is worth noting that the first degree of matching used to measure the similarity between the sample image and the watermark image may also be different depending on the image matching algorithm utilized. For example, the electronic device may calculate a chamfer distance between the sample image and the watermark image using a chamfer matching algorithm; the chamfer distance may be taken as the first degree of matching.
In some embodiments, the following describes the calculation process of the first matching degree by taking the chamfer matching algorithm as an example.
The electronic device may determine, in each sample image, a plurality of search regions from the watermark image; a second degree of match between each search area and the watermark image may be calculated; a first degree of match between the sample image and the watermark image may be determined based on the second degree of match.
In this embodiment, the electronic device may calculate a distance transform value of a pixel point in each sample image. Specifically, the electronic device may calculate an edge detection value of a pixel point in the sample image by using an edge detection algorithm; edge pixel points and non-edge pixel points can be determined in the sample image according to the edge detection value. For example, the electronic device may select, as an edge pixel, a pixel having an edge detection value greater than or equal to a preset edge threshold; other pixels may be used as non-edge pixels. For each non-edge pixel point, the electronic device may calculate a distance between the non-edge pixel point and a nearest edge pixel point as a distance transformation value of the non-edge pixel point. The electronic device may use a preset value, which may be 0, for example, as a distance transformation value of the edge pixel. Thus, by distinguishing edge pixel points from non-edge pixel points, the electronic device can calculate a distance transform value for pixel points in each sample image.
In this embodiment, the electronic device may determine edge pixel points in the watermark image. Specifically, the electronic device may calculate an edge detection value of a pixel point in the watermark image by using an edge detection algorithm; edge pixel points can be determined in the watermark image according to the edge detection value. For example, the pixel points with the edge detection value greater than or equal to the preset edge threshold may be selected as the edge pixel points.
In this embodiment, the electronic device may determine, according to the watermark image, a plurality of search regions in the sample image by using a certain search policy, where the size of the search regions is the same as that of the watermark image. Please refer to fig. 2. For example, the electronic device may treat the watermark image as a sliding window; the sliding window can be slid on the sample image from the upper left corner of the sample image according to a certain horizontal step length and a certain longitudinal step length and from left to right in the horizontal direction and from top to bottom in the vertical direction; for each sliding, the sliding window may cover an area on the sample image, and the covered area may be used as a search area. The size of the transverse step length and the size of the longitudinal step length can be flexibly set according to actual needs. For example, the size of the horizontal step may be 2 pixel points, and the size of the vertical step may be 3 pixel points. For another example, the lateral step size may be equal to the long side of the sliding window, and the longitudinal step size may be equal to the short side of the sliding window.
For each search region in the sample image, the electronic device may determine a target pixel point in the search region; and calculating a second matching degree between the search area and the watermark image according to the distance transformation value of the target pixel point. Wherein the second matching degree is used for measuring the similarity between the search area and the watermark image, and may include a chamfer distance, for example. And the position of the target pixel point in the search area is the same as the position of the edge pixel point in the watermark image. The electronic device may determine a plurality of target pixel points in the search area; the sum of the distance transform values of the plurality of target pixel points may be calculated as a chamfer distance (i.e., a second degree of matching) between the search area and the watermark image. Of course, the electronic device may also determine the second matching degree in other manners. For example, an average value of the distance transformation values of the plurality of target pixel points may be calculated as the second matching degree.
The plurality of search regions of the sample image correspond to the plurality of second matching degrees. The electronic device may select a largest one of the plurality of second degrees of matching as the first degree of matching between the sample image and the watermark image. Of course, the electronic device may also determine the first matching degree in other manners. For example, an average value of the plurality of second matching degrees may be calculated as the first matching degree.
In this embodiment, of course, in practical applications, the electronic device may further calculate a distance transform value of a pixel point in each sample image; a distance transformed image corresponding to the sample image may be generated from the distance transformed values. The distance transformed image is the same size as the sample image. In the distance-transformed image, the pixel value of each pixel point may be the distance-transformed value of the pixel point at the same position in the sample image.
The electronic equipment can calculate the edge detection value of a pixel point in the watermark image by using an edge detection algorithm; a binary image may be generated from the edge detection values. The size of the binary image is the same as that of the watermark image. The edge detection value of the pixel point with the pixel value of 1 in the binary image is larger than or equal to a preset edge threshold value; and the edge detection value of the pixel point with the pixel value of 0 in the binary image is smaller than the preset edge threshold value.
The electronic equipment can determine a plurality of search areas in the distance transformation image by adopting a certain search strategy according to the binary image; for each search area, determining a target pixel point in the search area; and calculating a second matching degree between the search area and the watermark image according to the distance transformation value of the target pixel point. And the position of the target pixel point in the search area is the same as the position of the pixel point with the pixel value of 1 in the binary image. The plurality of search regions of the distance-converted image correspond to the plurality of second matching degrees. The electronic device may select a largest one of the plurality of second degrees of matching as the first degree of matching between the sample image and the watermark image.
Step S15: and determining a matching threshold according to the first matching degree.
In some embodiments, the plurality of sample images correspond to a plurality of first degrees of matching. The electronic device may select a largest one of the plurality of first degrees of matching as the matching threshold. Or, the electronic device may select a maximum one of the plurality of first matching degrees, and may correct the selected first matching degree to obtain the matching threshold. For example, the electronic device may multiply the selected first matching degree by a preset coefficient to obtain the matching threshold. The preset coefficient may be an empirical value; alternatively, it can be obtained by machine learning. For example, the preset coefficient may be a positive number slightly greater than 1. Of course, according to the plurality of first matching degrees, the electronic device may determine the matching threshold in other manners.
In some embodiments, the matching threshold may be used to detect whether watermark information is carried in an image. Specifically, the matching threshold may be used to detect whether an image carries a specified type of watermark information, where the specified type of watermark information is watermark information corresponding to the watermark image.
Notably, the electronic device can acquire at least one set of sample images. Each group of sample images may correspond to a watermark information and may include a plurality of sample images carrying the watermark information. For each group of sample images, the electronic device may obtain a watermark image and a matching threshold value using the embodiment corresponding to fig. 1. The matching threshold may be used to detect whether watermark information corresponding to the watermarked image is carried in the image.
The threshold determination method in some embodiments of the present description may generate a watermark image according to a plurality of sample images that carry the same watermark information; a first degree of match between each sample image and the watermark image may be calculated; a matching threshold may be determined according to the first matching degree, where the matching threshold is used to detect whether the image carries the watermark information. Therefore, convenience is provided for detecting whether the image carries the watermark information.
The present specification provides one embodiment of a watermark detection method. The execution subject of the watermark detection method may comprise an electronic device. The electronic equipment can be equipment such as a server, a mobile phone, a tablet computer or a personal computer; alternatively, the system may be a system including a plurality of devices, for example, a server cluster including a plurality of servers.
Please refer to fig. 3. The watermark detection method may comprise the following steps.
Step S21: and calculating a first matching degree between the image to be detected and the watermark image.
In some embodiments, the image to be detected may be a grayscale image. Alternatively, the image to be detected may be a color image. The image to be detected can be a face image. Of course, the image to be detected can also be other types of images. The watermark image may correspond to a matching threshold, and the matching threshold may be used to detect whether the image carries a specified type of watermark information, where the specified type of watermark information is the watermark information corresponding to the watermark image. The watermark image and the matching threshold may be obtained using the embodiment corresponding to fig. 1.
In some embodiments, the process of calculating the first matching degree between the image to be detected and the watermark image by the electronic device may be similar to the process of calculating the first matching degree between the sample image and the watermark image in the embodiment corresponding to fig. 1.
Step S23: comparing the first degree of match to the match threshold.
Step S25: and determining whether the image to be detected carries watermark information or not according to the comparison result.
In some embodiments, the electronic device may compare the first degree of match to the match threshold; if the first matching degree is smaller than or equal to the matching threshold, determining that the watermark information is carried in the image to be detected; and if the first matching degree is greater than the matching threshold, determining that the watermark information is not carried in the image to be detected.
It should be noted that if the image to be detected is a processed image, the watermark image may be correspondingly processed, and then the first matching degree between the image to be detected and the processed watermark image may be calculated. For example, if the image to be detected is a rotated image, the watermark image may be rotated by the same angle.
The watermark detection method of some embodiments of the present description may calculate a first matching degree between an image to be detected and a watermark image; the first degree of match may be compared to the match threshold; and determining whether the image to be detected carries watermark information or not according to the comparison result. Therefore, whether the image carries the watermark information of the specified type or not can be detected through the watermark image and the matching threshold value, so that the abuse of the image can be avoided, and the private data can be protected.
An example of a scenario for this specification is presented below.
The face recognition technology is widely applied to scenes such as application login, equipment unlocking, payment authentication and the like. In some cases, a lawbreaker may perform face recognition using a face image collected from a network, which may cause leakage of user privacy data. Considering that the face image collected from the network usually carries the watermark information, if the face image carries the watermark information by detecting, the abuse of the face image can be avoided, and the privacy data can be protected.
Please refer to fig. 5. The electronic device can acquire at least one set of sample images. Each group of sample images may correspond to a watermark information and may include a plurality of sample images carrying the watermark information. For each group of sample images, the electronic device may obtain a watermark image and a matching threshold value using the embodiment corresponding to fig. 1. In the actual use process, aiming at a face image input by a user, the electronic equipment can calculate the matching degree between the face image and the watermark image; if the matching degree is smaller than or equal to the matching threshold, determining that the face image carries the watermark information corresponding to the watermark image, thereby avoiding the execution of the subsequent face recognition process and protecting the private data; if the matching degree is greater than the matching threshold, determining that the face image does not carry watermark information, and executing a subsequent face recognition process.
The present specification provides one embodiment of a threshold determination device.
Please refer to fig. 6. The threshold determining means may include the following elements.
A generating unit 31 configured to generate a watermark image from a plurality of sample images carrying the same watermark information;
a calculating unit 33 for calculating a first matching degree between each sample image and the watermark image;
a determining unit 35, configured to determine a matching threshold according to the first matching degree, where the matching threshold is used to detect whether the image carries the watermark information.
This specification provides one embodiment of a watermark detection apparatus.
Please refer to fig. 7. The watermark detection apparatus may include the following elements.
A calculating unit 41, configured to calculate a first matching degree between an image to be detected and a watermark image, where the watermark image corresponds to a matching threshold;
a comparison unit 43, configured to compare the first matching degree with the matching threshold;
and the determining unit 45 is used for determining whether the image to be detected carries watermark information or not according to the comparison result.
An embodiment of an electronic device of the present description is described below. Fig. 8 is a schematic diagram of a hardware configuration of the electronic apparatus in this embodiment. As shown in fig. 8, the electronic device may include one or more processors (only one of which is shown), memory, and a transmission module. Of course, it is understood by those skilled in the art that the hardware structure shown in fig. 8 is only an illustration, and does not limit the hardware structure of the electronic device. In practice the electronic device may also comprise more or fewer component elements than those shown in fig. 8; or have a different configuration than that shown in fig. 8.
The memory may comprise high speed random access memory; alternatively, non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory may also be included. Of course, the memory may also comprise a remotely located network memory. The remotely located network storage may be connected to the blockchain client through a network such as the internet, an intranet, a local area network, a mobile communications network, or the like. The memory may be used to store program instructions or modules of application software, such as the program instructions or modules of the embodiments corresponding to fig. 1 or fig. 3 in this specification.
The processor may be implemented in any suitable way. For example, the processor may take the form of, for example, a microprocessor or processor and a computer-readable medium that stores computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, an embedded microcontroller, and so forth. The processor may read and execute the program instructions or modules in the memory.
The transmission module may be used for data transmission via a network, for example via a network such as the internet, an intranet, a local area network, a mobile communication network, etc.
This specification also provides one embodiment of a computer storage medium. The computer storage medium includes, but is not limited to, a Random Access Memory (RAM), a Read-Only Memory (ROM), a Cache (Cache), a Hard Disk (HDD), a Memory Card (Memory Card), and the like. The computer storage medium stores computer program instructions. The computer program instructions when executed implement: the program instructions or modules of the embodiments corresponding to fig. 1 or fig. 3 in this specification.
It should be noted that, in the present specification, each embodiment is described in a progressive manner, and the same or similar parts in each embodiment may be referred to each other, and each embodiment focuses on differences from other embodiments. In particular, as for the method embodiment (for example, the embodiments corresponding to fig. 1 and fig. 3), the apparatus embodiment, the electronic device embodiment, and the computer storage medium embodiment which are implemented on a single side, since they are substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment. In addition, it is understood that one skilled in the art, after reading this specification document, may conceive of any combination of some or all of the embodiments listed in this specification without the need for inventive faculty, which combinations are also within the scope of the disclosure and protection of this specification.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Language Description Language), traffic, pl (core unified Programming Language), HDCal, JHDL (Java Hardware Description Language), langue, Lola, HDL, laspam, hardsradware (Hardware Description Language), vhjhd (Hardware Description Language), and vhigh-Language, which are currently used in most popular applications. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
From the above description of the embodiments, it is clear to those skilled in the art that the present specification can be implemented by software plus a necessary general hardware platform. Based on such understanding, the technical solutions of the present specification may be essentially or partially implemented in the form of software products, which may be stored in a storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and include instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments of the present specification.
The description is operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
While the specification has been described with examples, those skilled in the art will appreciate that there are numerous variations and permutations of the specification that do not depart from the spirit of the specification, and it is intended that the appended claims include such variations and modifications that do not depart from the spirit of the specification.

Claims (20)

1. A method of threshold determination, comprising:
generating a watermark image according to a plurality of sample images carrying the same watermark information;
calculating a first matching degree between each sample image and the watermark image;
and determining a matching threshold according to the first matching degree, wherein the matching threshold is used for detecting whether the image carries the watermark information.
2. The method of claim 1, in the step of generating a watermark image, comprising:
calculating the edge detection value of a pixel point in each sample image by using an edge detection algorithm;
and generating a watermark image according to the edge detection value.
3. The method of claim 2, in the step of generating a watermark image, comprising:
generating an edge detection image; in the edge detection image, the pixel value of each pixel point comprises a statistical value, and the statistical value is obtained by carrying out statistics on the edge detection values of the pixel points at the same position in the plurality of sample images;
and extracting the watermark area in the edge detection image as a watermark image.
4. The method of claim 3, wherein the statistical value is a median, mean, or mode.
5. The method of claim 1, wherein the step of calculating the first degree of match comprises:
determining a plurality of search areas in each sample image according to the watermark image;
calculating a second matching degree between each search area and the watermark image;
and determining a first matching degree between the sample image and the watermark image according to the second matching degree.
6. The method of claim 5, further comprising:
calculating a distance transformation value of a pixel point in each sample image;
determining edge pixel points in the watermark image;
accordingly, the step of calculating the second matching degree includes:
and in each search area, calculating a second matching degree between the search area and the watermark image according to the distance transformation value of the target pixel point, wherein the position of the target pixel point in the search area is the same as the position of the edge pixel point in the watermark image.
7. The method of claim 6, wherein the step of calculating the second degree of match comprises:
and summing the distance transformation values of the target pixel points to obtain a second matching degree between the search area and the watermark image.
8. The method of claim 5, in the step of determining a first degree of match, comprising:
and selecting the maximum one from the second matching degrees of the plurality of search areas as the first matching degree.
9. The method of claim 1, in the step of determining a match threshold, comprising:
selecting the largest one from the first matching degrees of the plurality of sample images;
and correcting the selected first matching degree to obtain a matching threshold value.
10. The method of claim 1, the first degree of match comprising a chamfer distance;
the sample image includes a face image.
11. A watermark detection method, comprising:
calculating a first matching degree between an image to be detected and a watermark image, wherein the watermark image corresponds to a matching threshold value;
comparing the first degree of match to the match threshold;
and determining whether the image to be detected carries watermark information or not according to the comparison result.
12. The method of claim 11, in the step of calculating the first degree of match, comprising:
determining a plurality of search areas in the image to be detected according to the watermark image;
calculating a second matching degree between each search area and the watermark image;
and determining the first matching degree between the image to be detected and the watermark image according to the second matching degree.
13. The method of claim 12, further comprising:
calculating a distance transformation value of a pixel point in an image to be detected;
determining edge pixel points in the watermark image;
accordingly, the step of calculating the second matching degree includes:
and in each search area, calculating a second matching degree between the search area and the watermark image according to the distance transformation value of the target pixel point, wherein the position of the target pixel point in the search area is the same as the position of the edge pixel point in the watermark image.
14. The method of claim 13, wherein the step of calculating the second degree of match comprises:
and summing the distance transformation values of the target pixel points to obtain a second matching degree between the search area and the watermark image.
15. The method of claim 12, in the step of determining a first degree of match, comprising:
and selecting the maximum one from the second matching degrees of the plurality of search areas as the first matching degree.
16. The method of claim 11, wherein the step of determining whether to carry watermark information comprises:
if the first matching degree is smaller than or equal to the matching threshold, determining that the image to be detected carries watermark information;
and if the first matching degree is greater than the matching threshold, determining that the image to be detected does not carry watermark information.
17. The method of claim 11, the first degree of match comprising a chamfer distance;
the image to be detected comprises a face image.
18. A threshold determination apparatus, comprising:
the generating unit is used for generating a watermark image according to a plurality of sample images carrying the same watermark information;
the computing unit is used for computing a first matching degree between each sample image and the watermark image;
and the determining unit is used for determining a matching threshold according to the first matching degree, and the matching threshold is used for detecting whether the image carries the watermark information.
19. A watermark detection apparatus comprising:
the computing unit is used for computing a first matching degree between an image to be detected and a watermark image, and the watermark image corresponds to a matching threshold value;
a comparison unit for comparing the first matching degree with the matching threshold;
and the determining unit is used for determining whether the image to be detected carries watermark information or not according to the comparison result.
20. An electronic device, comprising:
at least one processor;
a memory storing program instructions configured for execution by the at least one processor, the program instructions comprising instructions for performing the method of any of claims 1-17.
CN201911280362.XA 2019-12-13 2019-12-13 Threshold determination method, watermark detection device and electronic equipment Pending CN111047496A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911280362.XA CN111047496A (en) 2019-12-13 2019-12-13 Threshold determination method, watermark detection device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911280362.XA CN111047496A (en) 2019-12-13 2019-12-13 Threshold determination method, watermark detection device and electronic equipment

Publications (1)

Publication Number Publication Date
CN111047496A true CN111047496A (en) 2020-04-21

Family

ID=70236105

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911280362.XA Pending CN111047496A (en) 2019-12-13 2019-12-13 Threshold determination method, watermark detection device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111047496A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112837202A (en) * 2021-01-26 2021-05-25 支付宝(杭州)信息技术有限公司 Watermark image generation and attack tracing method and device based on privacy protection
CN113570604A (en) * 2021-09-28 2021-10-29 武汉精创电子技术有限公司 Automatic generation method and device for crystal grain detection sample
CN113761991A (en) * 2020-06-12 2021-12-07 北京沃东天骏信息技术有限公司 Watermark recognition method and device and computer readable storage medium
CN116030280A (en) * 2023-02-22 2023-04-28 青岛创新奇智科技集团股份有限公司 Template matching method, device, storage medium and equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101147159A (en) * 2005-02-21 2008-03-19 三菱电机株式会社 Fast method of object detection by statistical template matching
CN101882338A (en) * 2009-05-08 2010-11-10 中国印钞造币总公司 Method and device for detection of banknote paper watermark
CN102542660A (en) * 2011-12-05 2012-07-04 中钞实业有限公司 Bill anti-counterfeiting identification method based on bill watermark distribution characteristics
CN107134047A (en) * 2017-05-11 2017-09-05 深圳怡化电脑股份有限公司 White watermark detection method and device
CN109635844A (en) * 2018-11-14 2019-04-16 网易传媒科技(北京)有限公司 The method and device and method of detecting watermarks and device of training classifier
CN110349070A (en) * 2019-06-12 2019-10-18 杭州趣维科技有限公司 A kind of short-sighted frequency method of detecting watermarks

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101147159A (en) * 2005-02-21 2008-03-19 三菱电机株式会社 Fast method of object detection by statistical template matching
CN101882338A (en) * 2009-05-08 2010-11-10 中国印钞造币总公司 Method and device for detection of banknote paper watermark
CN102542660A (en) * 2011-12-05 2012-07-04 中钞实业有限公司 Bill anti-counterfeiting identification method based on bill watermark distribution characteristics
CN107134047A (en) * 2017-05-11 2017-09-05 深圳怡化电脑股份有限公司 White watermark detection method and device
CN109635844A (en) * 2018-11-14 2019-04-16 网易传媒科技(北京)有限公司 The method and device and method of detecting watermarks and device of training classifier
CN110349070A (en) * 2019-06-12 2019-10-18 杭州趣维科技有限公司 A kind of short-sighted frequency method of detecting watermarks

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
王竟爽 等: "《模糊边缘检测算法在水印模糊检测中的应用》", 《计算机应用》 *
胡裕峰, 朱善安: "《基于 PCA 和混沌置乱的零水印算法》", 《浙江大学学报(工学版)》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113761991A (en) * 2020-06-12 2021-12-07 北京沃东天骏信息技术有限公司 Watermark recognition method and device and computer readable storage medium
CN112837202A (en) * 2021-01-26 2021-05-25 支付宝(杭州)信息技术有限公司 Watermark image generation and attack tracing method and device based on privacy protection
CN112837202B (en) * 2021-01-26 2022-04-08 支付宝(杭州)信息技术有限公司 Watermark image generation and attack tracing method and device based on privacy protection
CN113570604A (en) * 2021-09-28 2021-10-29 武汉精创电子技术有限公司 Automatic generation method and device for crystal grain detection sample
CN116030280A (en) * 2023-02-22 2023-04-28 青岛创新奇智科技集团股份有限公司 Template matching method, device, storage medium and equipment

Similar Documents

Publication Publication Date Title
US20200380643A1 (en) Content-based detection and three dimensional geometric reconstruction of objects in image and video data
CN111047496A (en) Threshold determination method, watermark detection device and electronic equipment
KR102435365B1 (en) Certificate recognition method and apparatus, electronic device, computer readable storage medium
US20110311100A1 (en) Method, Apparatus and Computer Program Product for Providing Object Tracking Using Template Switching and Feature Adaptation
CN111814194B (en) Image processing method and device based on privacy protection and electronic equipment
CN109215037B (en) Target image segmentation method and device and terminal equipment
CN110008997B (en) Image texture similarity recognition method, device and computer readable storage medium
JP6465215B2 (en) Image processing program and image processing apparatus
CN110852311A (en) Three-dimensional human hand key point positioning method and device
US11086977B2 (en) Certificate verification
CN114187333A (en) Image alignment method, image alignment device and terminal equipment
US9922263B2 (en) System and method for detection and segmentation of touching characters for OCR
CN113129298B (en) Method for identifying definition of text image
CN108665459B (en) Image blur detection method, computing device and readable storage medium
Kim et al. Algorithm of a perspective transform-based PDF417 barcode recognition
WO2020237481A1 (en) Method for determining color inversion region, fingerprint chip, and electronic device
CN113228105A (en) Image processing method and device and electronic equipment
CN108364024B (en) Image matching method and device, computer equipment and storage medium
KR20210098930A (en) Method and apparatus for detection element image in drawings
CN113762027A (en) Abnormal behavior identification method, device, equipment and storage medium
CN111754411A (en) Image noise reduction method, image noise reduction device and terminal equipment
CN113837287B (en) Certificate abnormal information identification method, device, equipment and medium
CN111080550B (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
CN108764327B (en) Image template detection method and device, computing equipment and readable storage medium
CN107507224B (en) Moving object detection method, device, medium and computing device

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200421

RJ01 Rejection of invention patent application after publication