CN116109466A - Anti-counterfeiting watermark processing method for printed image - Google Patents
Anti-counterfeiting watermark processing method for printed image Download PDFInfo
- Publication number
- CN116109466A CN116109466A CN202310396928.5A CN202310396928A CN116109466A CN 116109466 A CN116109466 A CN 116109466A CN 202310396928 A CN202310396928 A CN 202310396928A CN 116109466 A CN116109466 A CN 116109466A
- Authority
- CN
- China
- Prior art keywords
- point
- gray level
- value
- initial
- gray
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/0021—Image watermarking
- G06T1/0028—Adaptive watermarking, e.g. Human Visual System [HVS]-based watermarking
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/28—Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/50—Extraction of image or video features by performing operations within image blocks; by using histograms, e.g. histogram of oriented gradients [HoG]; by summing image-intensity values; Projection analysis
- G06V10/507—Summing image-intensity values; Histogram projection analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/762—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks
- G06V10/763—Non-hierarchical techniques, e.g. based on statistics of modelling distributions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2201/00—General purpose image data processing
- G06T2201/005—Image watermarking
- G06T2201/0065—Extraction of an embedded watermark; Reliable detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2201/00—General purpose image data processing
- G06T2201/005—Image watermarking
- G06T2201/0202—Image watermarking whereby the quality of watermarked images is measured; Measuring quality or performance of watermarking methods; Balancing between quality and robustness
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Software Systems (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Health & Medical Sciences (AREA)
- Probability & Statistics with Applications (AREA)
- Artificial Intelligence (AREA)
- Computing Systems (AREA)
- Databases & Information Systems (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Editing Of Facsimile Originals (AREA)
- Image Processing (AREA)
Abstract
The invention relates to the technical field of image processing, in particular to an anti-counterfeiting watermark processing method of a printed image. Firstly, a plurality of proper initial peak points are initially selected by setting a pixel point quantity threshold value, then corresponding initial zero value points are selected according to calculation of each initial peak point, and further, the characteristics of a printed image on a gray level histogram and the characteristics of the printed image when each initial peak point carries out histogram translation are analyzed, and the quality influence degree of the printed image is obtained. And combining the resolution capability of human eyes to obtain the resolution influence degree of the printed image under the human eyes after watermark embedding, and finally obtaining the optimal peak point probability and the optimal peak point through the correction of the watermark embedding capacity, so that the distortion degree of the printed image after watermark embedding can be reduced under the condition of ensuring the watermark information embedding capacity.
Description
Technical Field
The invention relates to the technical field of image processing, in particular to an anti-counterfeiting watermark processing method of a printed image.
Background
With the development of digital technology and network, the digital watermarking technology effectively solves the problems of copyright protection and content verification of a printing product owner, and some identification information is directly embedded into a printing image, when the problem of copyright dispute occurs, the identification information can be extracted from the printing image to serve as a proof of copyright attribution, so that the anti-counterfeiting purpose can be achieved under the conditions that the use value of the printing image is not affected and the printing image is not easy to be ascertained and modified again.
However, in the existing histogram shift image reversible watermarking algorithm, the optimal peak point is selected only by considering that the embedding capacity of watermark information is the maximum, namely, the embedding capacity of watermark information is only ensured on one or two gray levels with the maximum number of pixel points in a gray level histogram, so that the embedded capacity of watermark information can possibly cause serious distortion of a printed image after watermark embedding, and the quality and the use experience of the printed image are affected.
Disclosure of Invention
In order to solve the technical problem of serious distortion of a printed image after watermark embedding caused by unreasonable selection of peak points in the histogram translation algorithm, the invention aims to provide an anti-counterfeiting watermark processing method of the printed image, and the adopted technical scheme is as follows:
acquiring a gray level histogram of a printing image and a binary image of a watermark, acquiring a fitting curve of the gray level histogram, and selecting an initial peak point according to the fitting curve through a preset pixel point number threshold; obtaining a gray level interval of a peak curve segment corresponding to each initial peak point; obtaining corresponding initial zero points and initial zero point probabilities in the gray level histogram according to the gray level number of the gray level interval;
clustering positions of pixel points in the gray level interval in the printed image to obtain a cluster; obtaining the minimum gray level difference between the pixel points of the gray level interval and the neighborhood pixel points in the neighborhood range, and obtaining the corresponding histogram translation influence degree according to the minimum gray level difference, the number of clusters, the number of the pixel points of the gray level interval and the number of the neighborhood pixel points;
obtaining resolution influence degree according to the gray average value of the pixel points in the gray level interval and the difference characteristic of the preset optimal human eye resolution gray value; obtaining the optimal peak point probability of the initial peak point according to the resolution influence degree, the corresponding histogram translation influence degree, the initial zero point probability and the pixel point number corresponding to the initial peak point; selecting an optimal peak point and a corresponding optimal zero point according to the size relation of the probability of the optimal peak point;
and embedding and extracting the anti-counterfeiting watermark through a histogram translation algorithm according to the optimal peak value point and the optimal zero value point.
Further, the step of obtaining the initial zero point and the initial zero point probability includes:
selecting the gray level with the minimum number of pixel points in the gray level interval as zero points in the gray level histogram, and taking the zero point closest to the initial peak point as the initial zero point when a plurality of zero points exist and are distributed on the same side of the initial peak point;
when the zero points are distributed on two sides of the initial peak point, respectively taking the nearest zero points on the left side and the right side of the initial peak point, calculating the zero point probability of each zero point, and selecting the zero point with the maximum zero point probability as the initial zero point;
the zero point probability obtaining step comprises the following steps: calculating the number of gray levels between the zero point and the initial peak point and normalizing the number of gray levels to be used as a first adjustment coefficient; calculating the sum of the pixel point numbers of each gray level between the zero point and the initial peak point as a first numerical value; calculating the product of the first adjustment coefficient and the first numerical value and carrying out negative correlation mapping to obtain the zero point probability;
and the zero point probability corresponding to the initial zero point is the initial zero point probability.
Further, the step of obtaining the minimum gray scale difference includes:
setting up a preset size window by taking a pixel point in the gray level interval as a central pixel point and taking the central pixel point as a center, and if the gray values of all the pixel points in the preset size window are the same, increasing the size of the preset size window by preset adjustment step length each time until the gray values of the pixel points in the window are different, wherein the size window at the moment is a neighborhood range corresponding to the central pixel point;
and calculating the minimum gray value difference between the central pixel point and the neighborhood pixel point in the neighborhood range of the central pixel point, and taking the minimum gray value difference as the minimum gray value difference.
Further, the step of obtaining the histogram panning influence degree includes:
calculating the number of the neighborhood pixel points with the same gray value as the gray value of the central pixel point in the neighborhood range, and carrying out normalization processing to obtain a second adjustment coefficient; calculating the product of the second adjustment coefficient and the minimum gray level difference of the corresponding center pixel point and carrying out negative correlation mapping to obtain a second numerical value; calculating a second numerical value average value of all pixel points in the gray level interval as a third numerical value;
and calculating the product of the reciprocal of the number of the clusters and the corresponding third numerical value to obtain the translation influence degree of the histogram.
Further, the step of obtaining the resolution influence degree includes:
calculating and normalizing the absolute value of the difference between the gray value mean value of all pixel points in the gray level interval and the preset optimal human eye resolution gray value to obtain a fourth numerical value; and calculating a difference value between the first value and the fourth value to obtain the resolution influence degree.
Further, the step of obtaining the optimal peak point probability includes:
calculating the product of the resolution influence degree and the corresponding histogram translation influence degree and carrying out negative correlation mapping to obtain a fifth numerical value; calculating the product of the number of the pixel points corresponding to the initial peak value point and the probability of the corresponding initial zero value point to be used as a sixth numerical value;
and calculating the product of the fifth value and the sixth value to obtain the optimal peak point probability.
Further, the step of obtaining the initial peak point includes:
obtaining a fitting curve of the gray level histogram by a least square method, counting the number of pixel points corresponding to all gray level peak points in the fitting curve, and selecting gray level peak points larger than a preset pixel point number threshold in the fitting curve to obtain the initial peak point.
Further, the step of obtaining the peak curve segment includes:
in the fitted curve, the curve between the trough corresponding to the initial peak point and the nearest trough is the peak curve segment.
The invention has the following beneficial effects:
in the embodiment of the invention, in order to ensure the embedding capacity of the watermark, an initial peak point is selected according to a fitting curve through a preset pixel point number threshold; in order to make the total gray value change of the printed image smaller in the histogram shifting process, the quality influence of watermark embedding on the printed image is reduced, so that corresponding initial zero value points and initial zero value point probabilities are obtained through the gray level number of the gray level interval. The number of the clusters can represent the discrete degree of the distribution of the pixel points in the gray level interval in the printed image, and the degree of the translation influence of the histogram is further judged through the discrete degree; because the quality influence degree of the histogram shift on the printed image is related to the number of pixels in the gray level interval and the difference characteristics of the neighborhood pixels in the neighborhood range, the corresponding histogram shift influence degree is obtained through the minimum gray level difference, the number of clusters, the number of pixels in the gray level interval and the number of the neighborhood pixels; and characterizing the quality influence of watermark embedding on the printed image according to the translation influence degree of the histogram. Because watermark embedding needs to reduce the influence of the quality of a printed image and is beneficial to the resolution of human eyes on the printed image while guaranteeing the information embedding capacity, the optimal peak point probability is obtained through the histogram translation influence degree, the resolution influence degree, the number of pixels of the initial peak point corresponding to the gray level and the corresponding initial zero value point probability. The magnitude of the optimum peak probability can characterize the quality impact of different initial peak points on the watermark embedded printed image and the capacity of watermark embedding. Therefore, the optimal peak point is selected according to the optimal peak point probability, watermark embedding is completed through a histogram translation algorithm according to the optimal peak point, the distortion degree of the printed image after watermark embedding can be reduced, and the quality of the printed image is improved under the condition that the watermark embedding capacity is ensured.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions and advantages of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a method for processing anti-counterfeit watermark of a printed image according to an embodiment of the present invention.
Detailed Description
In order to further describe the technical means and effects adopted by the invention to achieve the preset aim, the following detailed description is given below of a method for processing anti-counterfeit watermark of a printed image according to the invention, which is specific to the implementation, structure, characteristics and effects thereof, with reference to the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The following specifically describes a specific scheme of the anti-counterfeiting watermarking processing method for the printed image provided by the invention with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of a method for anti-counterfeit watermarking a printed image according to an embodiment of the present invention is shown, the method includes the following steps:
step S1, acquiring a gray level histogram of a printing image and a binary image of a watermark, acquiring a fitting curve of the gray level histogram, and selecting an initial peak point according to the fitting curve through a preset pixel point number threshold; obtaining a gray level interval of a peak curve segment corresponding to each initial peak point; and obtaining corresponding initial zero points and initial zero point probabilities in the gray level histogram according to the gray level number of the gray level interval.
In the embodiment of the invention, the implementation scene is the embedding and extraction of the anti-counterfeiting watermark in the printed image. In the traditional histogram translation image reversible watermarking algorithm, a watermark image is embedded into a peak point of a gray level histogram of a printing image, namely, a gray level with the maximum number of pixel points, but only the maximum embedding capacity of anti-counterfeiting watermark information is considered, so that the printing image after watermark embedding is possibly distorted, and the quality is influenced. Therefore, in order to reduce the distortion degree of the printed image after watermark embedding under the condition of guaranteeing the watermark embedding capacity, the embodiment of the invention improves the selection of the optimal peak point and the optimal zero point in the histogram translation process, and adaptively selects the optimal peak point and the optimal zero point by combining the image quality influence characteristics of the printed image when the watermark is embedded by the peak point.
Firstly, collecting a printing image and an anti-counterfeiting watermark image, obtaining a binary image of the anti-counterfeiting watermark, and carrying out graying treatment on the printing image to obtain a gray histogram of the printing image, wherein the method for obtaining the binary image and the gray histogram belongs to the prior art, and specific steps are not repeated.
Further, in order to select the optimal peak point, a plurality of initial peak points are first selected, and the optimal peak point is selected according to analysis and comparison of the initial peak points. Firstly, obtaining a fitting curve of a gray level histogram, and selecting an initial peak point according to the fitting curve through a preset pixel point number threshold, wherein the method specifically comprises the following steps: obtaining a fitting curve of a gray histogram by a least square method, counting the number of pixel points corresponding to all gray level peak points in the fitting curve, selecting gray level peak points larger than a preset pixel point number threshold value in the fitting curve, and obtaining initial peak points, wherein the least square method belongs to the prior art, and specific calculation steps are not repeated.
Because the information embedding capacity of the anti-counterfeit watermark is limited by the number of pixel points on the peak point, and the information embedding capacity needs to be ensured as much as possible, in the embodiment of the invention, the preset pixel point number threshold value is as follows: the average value of the number of pixels for each gray level in the gray level histogram. In the fitting curve, a peak point exceeding the average value of the number of pixel points of each gray level in the gray level histogram is taken as an initial peak point, so that the information embedding capacity of the anti-counterfeit watermark can be ensured, and an implementer can determine a preset threshold value of the number of pixel points according to implementation scenes. So far, the initial peak point is obtained through the fitting curve of the gray level histogram and the preset pixel point quantity threshold value.
After the initial peak point is obtained, an initial zero point corresponding to the initial peak point needs to be selected, the principle of a histogram shifting algorithm shows that the zero point is the gray level with the number of the nearest pixel points to the peak point being 0 or the minimum, and the histogram shifting algorithm needs to perform gray level conversion on the gray level of the pixel points between the peak point and the zero point, so that the smaller the number of the pixel points between the peak point and the zero point is, the smaller the total gray level change of the printed image is, and the smaller the influence on the printing quality is. The method for obtaining the gray level interval of the peak curve segment corresponding to each initial peak point specifically comprises the following steps: in the fitting curve, a curve between the troughs of which the initial peak point corresponds to the left and right nearest troughs is a peak curve section, and the gray level corresponding to the peak curve section is used as a gray level section corresponding to the initial peak point.
After the gray level interval of the initial peak point is obtained, the initial peak point is determined from the corresponding gray level interval, so that the gray value change of the whole printed image after the anti-counterfeiting watermark is embedded can be reduced, and the influence of the printing quality is further reduced. Obtaining corresponding initial zero points and initial zero point probabilities according to the gray level number of the gray level interval, wherein the method specifically comprises the following steps:
and selecting the gray level with the minimum number of pixels in the gray level interval as zero points, wherein the fitting curve is obtained by fitting, so that the number of pixels with individual gray levels possibly has larger difference from the corresponding numerical value of the fitting curve in the whole gray level interval, and the zero points are selected according to the gray level histogram. When a plurality of zero points exist and are distributed on the same side of the initial peak point, taking the zero point closest to the initial peak point as the initial zero point; when the zero points are distributed on two sides of the initial peak point, the closest zero points on the left side and the right side of the initial peak point are respectively taken, the zero point probability of each zero point is calculated, and the zero point with the maximum zero point probability is selected as the initial zero point.
The zero point probability obtaining step: calculating the number of gray levels between the zero point and the initial peak point and normalizing the number of gray levels to be used as a first adjustment coefficient; calculating the sum of the pixel point numbers of all gray levels between the zero point and the initial peak point to be used as a first numerical value; calculating the product of the first adjustment coefficient and the first numerical value and carrying out negative correlation mapping to obtain zero point probability; the zero point probability corresponding to the initial zero point is the initial zero point probability. The calculation formula of the zero point probability comprises:
in the method, in the process of the invention,corresponding to the initial peak pointZero point probability of zero point, when zero points are distributed on the same side of the initial peak point, the firstThe zero points are the closest zero points to the initial peak point; when zero points are distributed on two sides of the initial peak pointThe zero points are the closest zero points to each side of the initial peak point.Represents an exponential function with a base of a natural constant,indicating that the values in brackets are mapped negatively.Represent the firstZero value points and corresponding initial peak value pointsNot including therebetweenIs used for the number of gray levels of (a),andrespectively represent initial peak pointsGray scales corresponding to the left and right trough points on the fitted curve,represent the firstZero value points and initial peak value pointsNot including therebetweenThe sum of the number of pixels of each gray level is used as a first value. Because ofThe maximum value of (2) tends to the value of the gray level interval of the initial peak point, soRepresentation of number of gray levelsAnd normalizing the processed first adjustment coefficient.
Acquisition of zero point probability: because the histogram shifting algorithm needs to perform gray level conversion on the gray level value of the pixel point between the peak point and the zero point, the number of the pixel point between the initial zero point and the initial peak pointThe less the total gray value change of the printed image, the less; and when the initial zero value is point and initialNumber of gray levels between the starting peak pointsThe less the impact on the quality of the printed image. Thus after normalizationAs the number of pixel pointsThe smaller the product is, the larger the zero point probability corresponding to the initial zero point is, and the smaller the influence on the quality of the printed image is. If two zero points exist around the initial peak point, the zero point with the maximum zero point probability is selected as the initial zero point, and the zero point probability of the initial zero point is taken as the initial zero point probability.
The initial peak point, the corresponding initial zero point and the initial zero point probability are obtained according to the gray level histogram, and the quality influence condition of the embedded watermark on the printed image is required to be analyzed according to the selected initial peak point and the initial zero point in the subsequent step.
Step S2, clustering positions of pixel points in a gray level interval in a printed image to obtain a cluster; obtaining the minimum gray difference between the pixel points in the gray level interval and the neighborhood pixel points in the neighborhood range, and obtaining the corresponding histogram translation influence degree according to the minimum gray difference, the number of clusters, the number of the pixel points in the gray level interval and the number of the neighborhood pixel points.
Since the embedding of the anti-counterfeit watermark by histogram shifting transforms the pixel gray values between the peak point and the zero point, it is necessary to calculate the degree of influence of the transformed pixel point in the original peak point gray level interval within the printed image. Firstly, according to human visual perception, when pixels in a gray level interval where the gray level is converted are densely distributed in an image and are gathered at a certain position in a printed image, the quality influence on the printed image after the gray level is converted is more obvious, so that the distribution density of the pixels in the gray level interval in the printed image needs to be analyzed.
Further, in the embodiment of the present invention, the pixels in the gray level interval of the initial peak point are clustered in the print image by using the DBSCAN clustering algorithm of density clustering, and it should be noted that the DBSCAN clustering algorithm belongs to the prior art, specific steps are not repeated, in the embodiment of the present invention, the cluster radius is set to 3, the core object is set to 4, and the implementer can set according to the implementation scenario. After the clustering is completed, clustering clusters are obtained, and the more the number of the clustering clusters is, the more discrete the distribution of the pixel points in the initial peak point gray level interval in the printed image is indicated; the smaller the number of clusters, the denser the distribution of pixels in the printed image at the initial peak gray level interval.
In order to obtain the level of the shift influence of the histogram, it is also necessary to analyze the minimum gray level difference of each pixel point in the gray level interval, and when the minimum gray level difference is smaller, the quality influence caused by the change of the gray value of the pixel point is more obvious. The method for acquiring the minimum gray level difference between the pixel point of the gray level interval and the neighborhood pixel point in the neighborhood range specifically comprises the following steps: setting up a preset size window by taking a pixel point in a gray level interval as a central pixel point and taking the central pixel point as a center, and if the gray values of all the pixel points in the preset size window are the same, increasing the size of the preset size window by preset adjustment step length each time until the gray values of the pixel points in the window are different, wherein the size window is a neighborhood range corresponding to the central pixel point; and calculating the minimum difference value of the gray values of the central pixel point and the neighborhood pixel points in the neighborhood range of the central pixel point, and taking the minimum difference value as the minimum gray difference. In the embodiment of the invention, the preset size window is 3*3, the preset adjustment step length is 2, and the implementation can be set by the implementation personnel according to the implementation scene. Thus, the neighborhood range of the pixel points in the gray level interval of the initial peak point is obtained, so that the corresponding histogram translation influence degree can be obtained according to the minimum gray level difference, the number of clusters, the number of the pixel points in the gray level interval and the number of the neighborhood pixel points, and the method specifically comprises the following steps:
calculating the number of the neighborhood pixel points with the same gray value as the gray value of the central pixel point in the neighborhood range, and carrying out normalization processing to obtain a second adjustment coefficient; calculating the product of the second adjustment coefficient and the minimum gray level difference of the corresponding center pixel point and carrying out negative correlation mapping to obtain a second numerical value; calculating a second numerical value average value of all pixel points in the gray level interval to obtain a third numerical value; and calculating the product of the reciprocal of the number of the clusters and the corresponding third numerical value to obtain the translation influence degree of the histogram. The acquisition formula of the histogram translation influence degree comprises the following steps:
in the method, in the process of the invention,representing the initial peak point asThe degree of influence of the histogram shifting in time,representing the number of clusters to be clustered,representing the initial peak point asThe number of pixels within a gray level interval,representing different pixels in the corresponding gray level interval.Represents an exponential function with a base of a natural constant,indicating that the values in brackets are mapped negatively.Represent the firstIndividual pixelsThe minimum gray level difference of the dots,represent the firstThe number of pixels is the same as the gray value of the neighborhood pixel in the neighborhood range,represent the firstThe number of neighborhood pixels within the neighborhood of each pixel.For the second adjustment coefficient,at the level of the second value of the first value,and is a third value.
For obtaining the translation influence degree of the histogram, when the gray value in the printed image is in the first peak point gray level intervalMinimum gray scale difference between each pixel point and neighborhood range thereofThe smaller the pixel gray value is, the more obvious the quality effect caused by the change of the pixel gray value is, for example, when the minimum gray difference which can be resolved by human eyes is assumed to be 34, after gray level conversion3, which results in indistinguishable human eyes whenAt 10, the gray scale becomesAfter replacement9, still clearly resolved. Meanwhile, when the number of the pixel points in the neighborhood range is the same as the gray value of the pixel pointThe larger the gray scale transformation is, the larger the influence of the gray scale transformation on the neighborhood range of the pixel point is, so that the total number of the neighborhood pixel points in the neighborhood range of the pixel point is passedFor a pair ofNormalization is performed, and the adjustment coefficient which is the minimum gray scale difference of the pixel point is called a second adjustment coefficient. I.e. byRepresent the firstThe greater the result, the greater the degree of influence of the local area of the printed image in the neighborhood of the pixel point gradation conversion. The average value of the influence degree of each local area of the printed image can reflect the influence degree of each pixel point in the local area of the printed image in the gray level section of the initial peak point. And due to the number of clustersThe density of the pixel points in the gray level interval in the distribution of the printed image can be reflected whenSmaller means denser distribution and more concentrated at a certain place of the printed image, and more obvious quality influence is caused on the printed image after gray level conversion, thus the image is obtained byRepresenting the degree of the overall influence of each pixel point in the gray level interval on the printed image. The degree of influence of the histogram shift is expressed by calculating the product of the reciprocal of the number of clusters and the corresponding third value whenThe larger the initial peak point isThe more serious the histogram shift effect is.
The pixel points in the gray level interval of the initial peak point in the printed image are analyzed to obtain the histogram translation influence degree, and the probability that the initial peak point is the optimal peak point can be obtained by combining the human eye resolution according to the histogram translation influence degree.
Step S3, obtaining resolution influence degree according to the gray average value of pixel points in a gray level interval and the difference characteristic of a preset optimal human eye resolution gray value; obtaining the optimal peak point probability of the initial peak point according to the resolution influence degree, the corresponding histogram translation influence degree, the initial zero point probability and the pixel point number corresponding to the initial peak point; and selecting an optimal peak point and a corresponding optimal zero point according to the size relation of the probability of the optimal peak point.
In the process of selecting the optimal peak point to finish the histogram translation, not only the influence degree of the histogram translation is considered, but also the embedding capacity of the watermark is required to be ensured as much as possible. At the same time, the printed image with the watermark embedded is provided for human eyes to observe, and the resolution of the eyes refers to the discrimination of the small difference of gray scale. Therefore, the probability calculation of the optimal peak point needs to consider the resolution influence degree of human eyes, the histogram shift influence degree, the initial zero value point probability and the number of pixel points corresponding to the initial peak point. Firstly, obtaining a resolution influence degree according to a gray average value of pixel points in a gray level interval and a difference characteristic of a preset optimal human eye resolution gray value, wherein the resolution influence degree specifically comprises the following steps:
calculating and normalizing the absolute value of the difference between the gray value average value of all pixel points in the gray level interval and the preset optimal human eye resolution gray value, and taking the absolute value as a fourth numerical value; and calculating the difference between the first value and the fourth value to obtain the resolution influence degree. Since the human eye has poor resolution for gray scale in the case of high or low gray scale values of the image, the human eye has strong resolution in the case of moderate gray scale values of the image. Therefore, in the embodiment of the invention, the optimal human eye resolution gray value is preset to be 128, when the image gray value is 128, the human eye resolution is determined to be the strongest, and the micro gray conversion can be perceived, so that the implementer can set the device according to the implementation scene. Therefore, the smaller the absolute value of the difference between the gray value average value of all the pixels in the gray level interval and the preset optimal human eye resolution gray value, the stronger the human eye perceives the gray value change of the pixels in the printed image, which means that the greater the quality influence degree on the printed image is caused when the histogram shifting is performed in the gray level interval.
After the resolution influence degree is obtained, the optimal peak point probability of the initial peak point can be obtained according to the product of the resolution influence degree and the corresponding histogram translation influence degree, the initial zero point probability and the pixel point number corresponding to the initial peak point, and the method specifically comprises the following steps: calculating the product of the resolution influence degree and the corresponding histogram translation influence degree and carrying out negative correlation mapping to obtain a fifth numerical value; calculating the product of the number of pixel points corresponding to the initial peak value and the probability of the corresponding initial zero value point to be used as a sixth numerical value; and calculating the product of the fifth value and the sixth value to obtain the optimal peak point probability. The acquisition formula of the optimal peak point probability comprises the following steps:
in the method, in the process of the invention,representing the initial peak pointIs set to be the optimum peak point probability of (1),representing the initial peak pointThe probability of the corresponding initial zero point,representing the initial peak pointThe number of pixels corresponding to the gray level,representation ofThe gray value average value of all pixel points in the gray level interval,representing a preset optimal human eye resolution gray value.Indicating the degree of influence of the resolution,in the case of the fifth value of the number,and is the sixth value.
For the acquisition of the best peak point probability,is the initial peak pointThe number of pixel points corresponding to gray level can represent the optimal peak point asThe maximum embedding capacity of the anti-counterfeiting watermark is obtained,the larger the value of (c) is, the larger the embedding capacity of the anti-counterfeit watermark information is, and the larger the probability of being the optimal peak point is.To correspond to the probability of an initial zero point,the greater the zero point probability of the initial zero point, the less the impact on the quality of the printed image, and thus the more likely the image will beAs a means ofIs expressed as the product of the two adjustment valuesProbability of being the best peak point.Representing the initial peak point asThe degree to which the shift in the histogram affects the quality of the printed image,the larger the number, the more serious the print image quality impact. Meanwhile, the printed image embedded with the anti-counterfeiting watermark is observed by human eyes, so that the initial peak point needs to be analyzedWhen the absolute value of the difference between the gray value average value of all the pixel points in the gray level interval and the preset optimal human eye resolution gray value is smaller, the human eye perceives the gray value change of the pixel points in the printed image more strongly, which means that the quality influence degree on the printed image is larger when the histogram is translated in the gray level interval. Thus byIndicating the degree of effect that the histogram shift actually causes on the printed image, the greater the value, the descriptionThe smaller the probability of being the optimal peak point, the fifth value is obtained by performing the negative correlation mapping. Finally, obtaining the optimal peak value of the initial peak value through the product of the fifth value and the sixth valueProbability.
So far, calculating the optimal peak point probability of all the initial peak points, selecting the initial peak point with the maximum optimal peak point probability as the optimal peak point, and simultaneously taking the initial zero point corresponding to the optimal peak point as the optimal zero point.
The watermark image is embedded into the gray level histogram peak point of the printing image in the traditional histogram translation image reversible algorithm, namely, the gray level with the maximum number of pixel points is only considered, the embedded capacity of watermark information is the maximum, but the printing image after watermark embedding is possibly seriously distorted, so that the quality influence degree of the printing image is obtained by preliminarily selecting a plurality of proper initial peak points by setting the threshold value of the number of the pixel points, then calculating and selecting corresponding initial zero value points according to each initial peak point, and further analyzing the characteristics of the printing image on the gray level histogram and the characteristics of the printing image when each initial peak point carries out histogram translation. And combining the resolution capability of human eyes to obtain the resolution influence degree of the printed image under the human eyes after watermark embedding, and finally obtaining the optimal peak point probability and the optimal peak point through the correction of the watermark embedding capacity, so that the distortion degree of the printed image after watermark embedding can be reduced under the condition of ensuring the watermark information embedding capacity.
After the optimal peak value point and the optimal zero value point of the printed image are obtained, the anti-counterfeiting watermark can be embedded and extracted in the subsequent steps.
And S4, embedding and extracting the anti-counterfeiting watermark through a histogram translation algorithm according to the optimal peak point and the optimal zero point.
Because the histogram translation algorithm belongs to the prior art, the embodiment of the invention only briefly describes main anti-counterfeit watermark embedding and extracting steps, and the specific process is not repeated, and the anti-counterfeit watermark embedding and extracting steps comprise: the area of the anti-counterfeiting watermark image is smaller than or equal to the number of pixel points corresponding to the optimal peak point; and counting gray values from the upper left corner in the binary image of the anti-counterfeiting watermark from left to right and from top to bottom, and obtaining a data sequence by counting gray values from pixel point to pixel point.
When the optimal zero pointGreater than the optimum peak pointMaking the gray level interval corresponding to the optimal peak point in the gray level histogramAdding one to the gray value of all pixels in the pixel; starting from the upper left corner of the printed image, counting pixels with gray values which are the optimal peak points from left to right and from top to bottom, and sequentially adding the data sequence of the anti-counterfeiting watermark binary image with the gray values of the pixels with the optimal peak points to finish watermark embedding;
when the optimal zero pointLess than the optimum peak pointMaking the gray level interval corresponding to the optimal peak point in the gray level histogramSubtracting one from the gray value of all pixels in the pixel; starting from the upper left corner of the printed image, counting pixels with gray values being the optimal peak points from left to right and from top to bottom, and sequentially subtracting the gray values of the pixels counted as the optimal peak points from the data sequence of the anti-counterfeiting watermark binary image to finish watermark embedding;
setting the key as the optimal peak value point, the optimal zero value point and the length and width of the anti-counterfeiting watermark, taking the pixel point with the gray value as the optimal peak value point as 0 in the printed image embedded with the watermark according to the size of the optimal peak value point and the optimal zero value point and the statistical sequence when the watermark is embedded, and when the optimal zero value point is obtainedGreater than the optimum peak pointTaking gray value asThe pixel point of (1); when the optimal zero pointLess than the optimum peak pointTaking gray value asThe pixel point of the watermark is 1, a corresponding data sequence is obtained, and an embedded anti-counterfeiting watermark binary image is obtained according to the length and width of the watermark image.
In summary, the embodiment of the invention provides an anti-counterfeit watermark processing method for a printed image. Firstly, a plurality of proper initial peak points are initially selected by setting a pixel point quantity threshold value, then corresponding initial zero value points are selected according to calculation of each initial peak point, and further, the characteristics of a printed image on a gray level histogram and the characteristics of the printed image when each initial peak point carries out histogram translation are analyzed, and the quality influence degree of the printed image is obtained. And combining the resolution capability of human eyes to obtain the resolution influence degree of the printed image under the human eyes after watermark embedding, and finally obtaining the optimal peak point probability and the optimal peak point through the correction of the watermark embedding capacity, so that the distortion degree of the printed image after watermark embedding can be reduced under the condition of ensuring the watermark information embedding capacity.
It should be noted that: the sequence of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.
Claims (8)
1. A method of anti-counterfeit watermarking a printed image, the method comprising the steps of:
acquiring a gray level histogram of a printing image and a binary image of a watermark, acquiring a fitting curve of the gray level histogram, and selecting an initial peak point according to the fitting curve through a preset pixel point number threshold; obtaining a gray level interval of a peak curve segment corresponding to each initial peak point; obtaining corresponding initial zero points and initial zero point probabilities in the gray level histogram according to the gray level number of the gray level interval;
clustering positions of pixel points in the gray level interval in the printed image to obtain a cluster; obtaining the minimum gray level difference between the pixel points of the gray level interval and the neighborhood pixel points in the neighborhood range, and obtaining the corresponding histogram translation influence degree according to the minimum gray level difference, the number of clusters, the number of the pixel points of the gray level interval and the number of the neighborhood pixel points;
obtaining resolution influence degree according to the gray average value of the pixel points in the gray level interval and the difference characteristic of the preset optimal human eye resolution gray value; obtaining the optimal peak point probability of the initial peak point according to the resolution influence degree, the corresponding histogram translation influence degree, the initial zero point probability and the pixel point number corresponding to the initial peak point; selecting an optimal peak point and a corresponding optimal zero point according to the size relation of the probability of the optimal peak point;
and embedding and extracting the anti-counterfeiting watermark through a histogram translation algorithm according to the optimal peak value point and the optimal zero value point.
2. The method for anti-counterfeit watermarking a printed image according to claim 1, wherein the step of obtaining the initial zero point and the initial zero point probability comprises:
selecting the gray level with the minimum number of pixel points in the gray level interval as zero points in the gray level histogram, and taking the zero point closest to the initial peak point as the initial zero point when a plurality of zero points exist and are distributed on the same side of the initial peak point;
when the zero points are distributed on two sides of the initial peak point, respectively taking the nearest zero points on the left side and the right side of the initial peak point, calculating the zero point probability of each zero point, and selecting the zero point with the maximum zero point probability as the initial zero point;
the zero point probability obtaining step comprises the following steps: calculating the number of gray levels between the zero point and the initial peak point and normalizing the number of gray levels to be used as a first adjustment coefficient; calculating the sum of the pixel point numbers of each gray level between the zero point and the initial peak point as a first numerical value; calculating the product of the first adjustment coefficient and the first numerical value and carrying out negative correlation mapping to obtain the zero point probability;
and the zero point probability corresponding to the initial zero point is the initial zero point probability.
3. The method for anti-counterfeit watermarking a printed image according to claim 1, wherein the step of obtaining the minimum gray level difference comprises:
setting up a preset size window by taking a pixel point in the gray level interval as a central pixel point and taking the central pixel point as a center, and if the gray values of all the pixel points in the preset size window are the same, increasing the size of the preset size window by preset adjustment step length each time until the gray values of the pixel points in the window are different, wherein the size window at the moment is a neighborhood range corresponding to the central pixel point;
and calculating the minimum gray value difference between the central pixel point and the neighborhood pixel point in the neighborhood range of the central pixel point, and taking the minimum gray value difference as the minimum gray value difference.
4. A method of anti-counterfeit watermarking a printed image according to claim 3, wherein the step of obtaining the degree of influence of the translation of the histogram comprises:
calculating the number of the neighborhood pixel points with the same gray value as the gray value of the central pixel point in the neighborhood range, and carrying out normalization processing to obtain a second adjustment coefficient; calculating the product of the second adjustment coefficient and the minimum gray level difference of the corresponding center pixel point and carrying out negative correlation mapping to obtain a second numerical value; calculating a second numerical value average value of all pixel points in the gray level interval as a third numerical value;
and calculating the product of the reciprocal of the number of the clusters and the corresponding third numerical value to obtain the translation influence degree of the histogram.
5. The method for anti-counterfeit watermarking a printed image according to claim 1, wherein the step of obtaining the degree of influence of resolution comprises:
calculating and normalizing the absolute value of the difference between the gray value mean value of all pixel points in the gray level interval and the preset optimal human eye resolution gray value to obtain a fourth numerical value; and calculating a difference value between the first value and the fourth value to obtain the resolution influence degree.
6. The method for anti-counterfeit watermarking a printed image according to claim 1, wherein the obtaining of the optimal peak point probability comprises:
calculating the product of the resolution influence degree and the corresponding histogram translation influence degree and carrying out negative correlation mapping to obtain a fifth numerical value; calculating the product of the number of the pixel points corresponding to the initial peak value point and the probability of the corresponding initial zero value point to be used as a sixth numerical value;
and calculating the product of the fifth value and the sixth value to obtain the optimal peak point probability.
7. The method for anti-counterfeit watermarking a printed image according to claim 1, wherein the step of obtaining the initial peak point comprises:
obtaining a fitting curve of the gray level histogram by a least square method, counting the number of pixel points corresponding to all gray level peak points in the fitting curve, and selecting gray level peak points larger than a preset pixel point number threshold in the fitting curve to obtain the initial peak point.
8. A method of anti-counterfeit watermarking a printed image according to claim 1, wherein the step of obtaining the peak curve segment includes:
in the fitted curve, the curve between the trough corresponding to the initial peak point and the nearest trough is the peak curve segment.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310396928.5A CN116109466B (en) | 2023-04-14 | 2023-04-14 | Anti-counterfeiting watermark processing method for printed image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310396928.5A CN116109466B (en) | 2023-04-14 | 2023-04-14 | Anti-counterfeiting watermark processing method for printed image |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116109466A true CN116109466A (en) | 2023-05-12 |
CN116109466B CN116109466B (en) | 2023-07-04 |
Family
ID=86265942
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310396928.5A Active CN116109466B (en) | 2023-04-14 | 2023-04-14 | Anti-counterfeiting watermark processing method for printed image |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116109466B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117830204A (en) * | 2023-05-25 | 2024-04-05 | 浙江华舜电子科技有限公司 | Digital system is administered to fire control potential safety hazard |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040223627A1 (en) * | 2003-05-06 | 2004-11-11 | Yun-Qing Shi | Methods and apparatus for reversible data hiding through histogram modification |
CN113112392A (en) * | 2020-01-13 | 2021-07-13 | 国际关系学院 | Watermark embedding and extracting method, embedding and extracting device, and processing system |
CN113763226A (en) * | 2021-09-17 | 2021-12-07 | 海南大学 | Reversible double-water-printing scheme suitable for color images |
CN114827380A (en) * | 2022-06-30 | 2022-07-29 | 智联信通科技股份有限公司 | Network security detection method based on artificial intelligence |
CN115131190A (en) * | 2022-08-29 | 2022-09-30 | 江苏司笠泰信息科技有限公司 | Computer information security protection method |
-
2023
- 2023-04-14 CN CN202310396928.5A patent/CN116109466B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040223627A1 (en) * | 2003-05-06 | 2004-11-11 | Yun-Qing Shi | Methods and apparatus for reversible data hiding through histogram modification |
CN113112392A (en) * | 2020-01-13 | 2021-07-13 | 国际关系学院 | Watermark embedding and extracting method, embedding and extracting device, and processing system |
CN113763226A (en) * | 2021-09-17 | 2021-12-07 | 海南大学 | Reversible double-water-printing scheme suitable for color images |
CN114827380A (en) * | 2022-06-30 | 2022-07-29 | 智联信通科技股份有限公司 | Network security detection method based on artificial intelligence |
CN115131190A (en) * | 2022-08-29 | 2022-09-30 | 江苏司笠泰信息科技有限公司 | Computer information security protection method |
Non-Patent Citations (4)
Title |
---|
P.ROHINI ET AL: "Robust Reversible Watermarking using Zero Mean Spreading Code", 《THE INTERNATIONAL JOURNAL OF ENGINEERING AND SCIENCE (IJES)》 * |
SIDHAM ABHILASH ET AL: "A Novel Lossless Robust Reversible Watermarking Method for Copyright Protection of Images", 《SIDHAM ABHILASH ET AL INT. JOURNAL OF ENGINEERING RESEARCH AND APPLICATIONS》 * |
侯冬冬: "非一致失真度量下可逆信息隐藏模型及应用", 《中国博士学位论文全文数据库电子期刊 信息科技辑》, vol. 2019, no. 8 * |
杨灿吉: "无损的数据库水印算法研究", 《中国博士学位论文全文数据库电子期刊 信息科技辑》, vol. 2021, no. 5 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117830204A (en) * | 2023-05-25 | 2024-04-05 | 浙江华舜电子科技有限公司 | Digital system is administered to fire control potential safety hazard |
Also Published As
Publication number | Publication date |
---|---|
CN116109466B (en) | 2023-07-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111784609B (en) | Image dynamic range compression method, device and computer readable storage medium | |
CN109671035B (en) | Infrared image enhancement method based on histogram | |
CN108280797B (en) | Image digital watermarking algorithm system based on texture complexity and JND model | |
CN107578451A (en) | A kind of adaptive key color extraction method towards natural image | |
US20160247259A1 (en) | Image processing apparatus and image processing method | |
CN116030052B (en) | Etching quality detection method for lamination process of computer display panel | |
CN115345802A (en) | Remote monitoring method for operation state of electromechanical equipment | |
CN112102217B (en) | Method and system for quickly fusing visible light image and infrared image | |
CN116485934A (en) | Infrared image colorization method based on CNN and ViT | |
CN114842524B (en) | Face false distinguishing method based on irregular significant pixel cluster | |
CN112700363A (en) | Self-adaptive visual watermark embedding method and device based on region selection | |
CN116596879A (en) | Grape downy mildew self-adaptive identification method based on quantiles of boundary samples | |
CN117593193B (en) | Sheet metal image enhancement method and system based on machine learning | |
CN116109466B (en) | Anti-counterfeiting watermark processing method for printed image | |
CN117764864A (en) | nuclear magnetic resonance tumor visual detection method based on image denoising | |
CN109377465A (en) | A kind of image quality verification method based on image information entropy | |
CN116958126A (en) | Method and system for detecting injection molding of mold based on computer vision | |
CN112217958A (en) | Method for preprocessing digital watermark carrier image irrelevant to device color space | |
CN116580220A (en) | Digital government platform data optimization transmission method and system | |
CN109447952A (en) | A kind of half reference image quality evaluation method based on Gabor differential box weighting dimension | |
CN115222652A (en) | Method for identifying, counting and centering end faces of bundled steel bars and memory thereof | |
CN117557785B (en) | Image processing-based long-distance fishing boat plate recognition method | |
CN117635411B (en) | Digital watermark processing method based on mixed domain decomposition technology | |
CN116957524B (en) | Talent information intelligent management method and system in technology transfer process | |
CN117558068B (en) | Intelligent device gesture recognition method based on multi-source data fusion |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |