CN109840875A - A kind of anti-counterfei waterprint generation method, device, electronic equipment and storage medium - Google Patents

A kind of anti-counterfei waterprint generation method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN109840875A
CN109840875A CN201910168615.8A CN201910168615A CN109840875A CN 109840875 A CN109840875 A CN 109840875A CN 201910168615 A CN201910168615 A CN 201910168615A CN 109840875 A CN109840875 A CN 109840875A
Authority
CN
China
Prior art keywords
watermark
image
information
block
gray level
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
CN201910168615.8A
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.)
Shenzhen Jintian Speed Technology Co Ltd
Original Assignee
Shenzhen Jintian Speed 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 Shenzhen Jintian Speed Technology Co Ltd filed Critical Shenzhen Jintian Speed Technology Co Ltd
Priority to CN201910168615.8A priority Critical patent/CN109840875A/en
Publication of CN109840875A publication Critical patent/CN109840875A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

The invention discloses a kind of anti-counterfei waterprint generation method, device, electronic equipment and storage mediums.The sectional image that this method is embedded in region by intercepting watermark from two dimensional code gray level image to be processed;The sectional image is generated into multiple images block of information by preset transformation piecemeal rule;The gray level image of watermark is generated into multiple watermark information blocks by preset piecemeal rule;The corresponding relationship of described image block of information Yu the watermark information block is established by random Obfuscating Algorithms;The watermark information block is embedded into described image block of information by default embedded mode;Image information block after insertion watermark information block is subjected to inverse transformation, and it is substituted into the two dimensional code gray level image that the watermark insertion Area generation has watermark information, the watermark of addition is overlapped with the image space of original two dimensional code, it can not be replicated by extracting the information of two dimensional code, can quickly confirm the true and false for carrying the product of two dimensional code and carry out the retrospect in duplication source.

Description

A kind of anti-counterfei waterprint generation method, device, electronic equipment and storage medium
Technical field
The present invention relates to digital anti-counterfeiting technology more particularly to a kind of anti-counterfei waterprint generation method, device, electronic equipment and deposit Storage media.
Background technique
Two dimensional code is with certain specific geometric figure according to certain rules in the black and white phase of plane (on two-dimensional directional) distribution Between graphic recording data symbol information;In code compilation dexterously using constitute computer-internal logical foundations " 0 ", The concept of " 1 " bit stream indicates text numerical information using several geometrical bodies corresponding with binary system, passes through image Input equipment or photoelectric scanning device automatically identifying and reading are to realize automatic processing of information.
But the coding and decoding of two dimensional code is professional standard, two dimensional code is easy to be replicated forgery, and the use of two dimensional code is more Mostly be for can public information carrier or access link carrier, it is impossible to be used in identity legitimacy verifying.
Summary of the invention
The present invention provides a kind of anti-counterfei waterprint generation method, device, electronic equipment and storage medium, to realize based on two dimension The identity legitimacy verifying of code.
To realize that above-mentioned design object, first aspect present invention provide a kind of anti-counterfei waterprint generation method, this method comprises:
The sectional image in watermark insertion region is intercepted from two dimensional code gray level image to be processed;
The sectional image is generated into multiple images block of information by preset transformation piecemeal rule;
The gray level image of watermark is generated into multiple watermark information blocks by preset piecemeal rule;
The corresponding relationship of described image block of information Yu the watermark information block is established by random Obfuscating Algorithms;
The watermark information block is embedded into described image block of information by default embedded mode;
Image information block after insertion watermark information block is subjected to inverse transformation, and it is raw to be substituted into watermark insertion region At the two dimensional code gray level image for having watermark information.
It is wherein, described that the sectional image is generated into multiple images block of information by preset transformation piecemeal rule, specifically:
Wavelet transformation is carried out to the sectional image, the sectional image after wavelet transformation is subjected to the change of blocking discrete cosine It changes, generates multiple images block of information;Or,
Blocking discrete cosine transform is carried out to the sectional image, generates multiple images block of information.
Wherein, the method also includes:
The two dimensional code gray level image to be processed is associated with the gray level image of the watermark and is saved in server;
Image information block after the watermark information block by insertion carries out inverse transformation, and is substituted into watermark insertion area Domain generates after the two dimensional code gray level image with watermark information, further includes:
The corresponding server of Rule Extraction is read according to two dimensional code from two dimensional code gray level image to be identified and saves information, Watermarking images are read from the watermark of the two dimensional code gray level image to be identified insertion region;
The gray level image of corresponding watermark is obtained from the server according to server preservation acquisition of information;
Compare the similarity of the gray level image of the watermarking images read and the watermark got;
The legitimacy of the two dimensional code gray level image to be identified is confirmed according to the similarity.
Wherein, watermark insertion region is full images region, lower right field or central area.
Wherein, the default embedded mode is to one of angie type insertion and sectional type insertion.
Second aspect of the present invention provides a kind of anti-counterfei waterprint generating means, which includes:
Sectional image extraction unit, for intercepting the subregion in watermark insertion region from two dimensional code gray level image to be processed Image;
Sectional image blocking unit, for the sectional image to be generated multiple images letter by preset transformation piecemeal rule Cease block;
Watermarking images blocking unit, for the gray level image of watermark to be generated multiple watermark informations by preset piecemeal rule Block;
Piecemeal corresponds to associative cell, for establishing described image block of information and the watermark information by random Obfuscating Algorithms The corresponding relationship of block;
Image embedded unit, for the watermark information block to be embedded into described image information by default embedded mode Block;
Watermarking images generation unit carries out inverse transformation for that will be embedded in the image information block after watermark information block, and replaces Change to the two dimensional code gray level image that the watermark insertion Area generation has watermark information.
Wherein, the sectional image blocking unit, is specifically used for:
Wavelet transformation is carried out to the sectional image, the sectional image after wavelet transformation is subjected to the change of blocking discrete cosine It changes, generates multiple images block of information;Or,
Blocking discrete cosine transform is carried out to the sectional image, generates multiple images block of information.
Wherein, described device further include:
Image is associated with storage unit, for by the gray level image of the two dimensional code gray level image and the watermark to be processed Association is saved in server;
Image information reading unit, for reading Rule Extraction according to two dimensional code from two dimensional code gray level image to be identified Corresponding server saves information, reads watermarking images from the watermark of the two dimensional code gray level image to be identified insertion region;
Server access unit obtains corresponding water from the server for saving acquisition of information according to the server The gray level image of print;
Similarity-rough set unit, it is similar to the gray level image of the watermark got for comparing the watermarking images read Degree;
Validity judgement unit, for confirming the legal of the two dimensional code gray level image to be identified according to the similarity Property.
Wherein, watermark insertion region is full images region, lower right field or central area.
Wherein, the default embedded mode is to one of angie type insertion and sectional type insertion.
Third aspect present invention provides a kind of electronic equipment, which includes:
Memory and one or more processors;
The memory, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processing Device realizes the anti-counterfei waterprint generation method as described in first aspect is any.
Fourth aspect present invention provides a kind of storage medium comprising computer executable instructions, and the computer is executable Instruction by computer processor when being executed for executing the anti-counterfei waterprint generation method as described in first aspect is any.
The sectional image that the present invention is embedded in region by intercepting watermark from two dimensional code gray level image to be processed;It will be described Sectional image generates multiple images block of information by preset transformation piecemeal rule;The gray level image of watermark is advised by preset piecemeal Then generate multiple watermark information blocks;It is corresponding with the watermark information block that described image block of information is established by random Obfuscating Algorithms Relationship;The watermark information block is embedded into described image block of information by default embedded mode;Will insertion watermark information block it Image information block afterwards carries out inverse transformation, and is substituted into the two dimensional code gray scale that the watermark insertion Area generation has watermark information Image, the watermark of addition are overlapped with the image space of original two dimensional code, can not be replicated by extracting the information of two dimensional code, can be fast Speed confirmation carries the true and false of the product of two dimensional code and carries out the retrospect in duplication source.
Detailed description of the invention
Fig. 1 is a kind of method flow diagram of the anti-counterfei waterprint generation method provided in the embodiment of the present invention;
Fig. 2 is the method flow diagram of another anti-counterfei waterprint generation method provided in the embodiment of the present invention;
Fig. 3 is the position view that watermark is embedded in region in the anti-counterfei waterprint generation method provided in the embodiment of the present invention.
Fig. 4 is a kind of structural schematic diagram of the anti-counterfei waterprint generating means provided in the embodiment of the present invention;
Fig. 5 is the structural schematic diagram of a kind of electronic equipment provided in the embodiment of the present invention.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
The application scenarios of the embodiment of the present application are introduced first, which can effectively realize production Product are anti-fake, and the two dimensional code with watermark is printed on product or in the packaging of product, pass through dedicated barcode scanning tool scans two dimension Code can confirm whether the product is genuine piece according to the similarity of watermark in barcode scanning result and true watermark.
Referring to FIG. 1, it is a kind of method flow diagram of the anti-counterfei waterprint generation method provided in the embodiment of the present invention, such as Shown in figure, this method comprises:
Step 101: the sectional image in watermark insertion region is intercepted from two dimensional code gray level image to be processed.
Two dimensional code gray level image to be processed is inputted after the information to be carried, and general two dimensional code generating algorithm is passed through The image of generation, in the present solution, image for being initially generated, needs to carry out range processing and gray scale is avoided to overflow, then from The image in preset range is intercepted in treated image for being embedded in watermark, which is watermark insertion region, the range Parameter it is main there are two, one is relative position, the other is size.
Step 102: the sectional image is generated into multiple images block of information by preset transformation piecemeal rule.
In order to be embedded in watermark insertion region and watermark smoothly, need to convert sectional image, such as wavelet transformation And discrete cosine transform, to carry out necessary compression of images and image enhancement processing to sectional image, on the basis of transformation again Carry out piecemeal.
Step 103: the gray level image of watermark is generated into multiple watermark information blocks by preset piecemeal rule.
The piecemeal rule of watermark and the piecemeal rule of sectional image are adapted, to avoid sectional image is changed after watermark insertion Original shape, that is, avoid increasing new grey blocks in the region of original blank.
Step 104: the corresponding relationship of described image block of information Yu the watermark information block is established by random Obfuscating Algorithms.
Random Obfuscating Algorithms can be understood as a kind of Encryption Algorithm, watermark information block can be corresponded to image information at random Block avoids arbitrarily reading out watermark from the two dimensional code with watermark.
Step 105: the watermark information block is embedded by described image block of information by default embedded mode.
For single watermark information block and image information block, telescopiny can be completed using a variety of embedded modes, Such as Spatial LSB algorithm, LSB are the english abbreviations of Least Significant Bit (least significant bit).Its realization principle Very simple, the numerical value of each pixel of digital color image are indicated using 3 group of 8 bit, and lowest order is modified Numerical value is influenced caused by the color of the point nearly equivalent to zero.In another example the hidden close algorithm based on bit plane theory, it will figure Each bit of picture regards a plane as, by the signature analysis to Different Plane, position is selected to carry out the insertion of information.
Step 106: the image information block after insertion watermark information block being subjected to inverse transformation, and it is embedding to be substituted into the watermark Enter the two dimensional code gray level image that Area generation has watermark information.
Image information after insertion watermark information block is subjected to inverse transformation, then original watermark insertion region is carried out Replacement generates the two dimensional code gray level image for having watermark information, the watermarking images in thus obtained two dimensional code gray level image with The image space coincidence of two dimensional code itself does not separate, and can not be replicated by extracting the method that two-dimensional barcode information regenerates, in turn The normal identification of the image of two dimensional code itself is nor affected on, i.e., image is remained to by the positive common sense of two dimensional code recognizer after insertion watermark Not.And the watermark insertion by completing after transformation has certain holding capacity for rotation, translation and distortion of projection etc., can use In the presence and quality of recognition and verification watermark of taking pictures, the content of watermark can also be used for the source that track identification forges duplication.
The sectional image that the present embodiment is embedded in region by intercepting watermark from two dimensional code gray level image to be processed;By institute It states sectional image and generates multiple images block of information by preset transformation piecemeal rule;The gray level image of watermark is pressed into preset piecemeal Rule generates multiple watermark information blocks;Pair of described image block of information Yu the watermark information block is established by random Obfuscating Algorithms It should be related to;The watermark information block is embedded into described image block of information by default embedded mode;Watermark information block will be embedded in Image information block later carries out inverse transformation, and is substituted into two dimensional code ash of the watermark insertion Area generation with watermark information Image is spent, the watermark of addition is overlapped with the image space of original two dimensional code, can not be by the information duplication of extraction two dimensional code, it can be with Quickly confirmation carries the true and false of the product of two dimensional code and carries out the retrospect in duplication source.
Referring to FIG. 2, it is the method flow diagram of another anti-counterfei waterprint generation method provided in the embodiment of the present invention, As shown, this method comprises:
Step 201: the sectional image in watermark insertion region is intercepted from two dimensional code gray level image to be processed.
It is preferably square area that watermark, which is embedded in region, and in the specific implementation, watermark insertion region can be full images area Domain, lower right field or central area, full images region are to choose entire two-dimension code area to carry out as the part of insertion watermark Watermark insertion;Lower right field carries out watermark insertion from the lower right corner selected part of two dimensional code;Avoid two dimension in central area The locating piece of code image, the region that the square of Selection Center is embedded in as image.Certainly the above only optional mode, such as Image in 2 D code in Fig. 3 can choose top left region, i.e. 401 regions, also can choose lower right area, i.e. 402 regions.This It outside, can also be embedding to being carried out after selection region progress size conversion operation in addition to the insertion to each region progress same size Enter.
Step 202: to the sectional image carry out wavelet transformation, by after wavelet transformation sectional image carry out blocking from Cosine transform is dissipated, multiple images block of information is generated.
The generating process of image information block can also be directly to the sectional image in addition to the implementation in step 202 Blocking discrete cosine transform is carried out, multiple images block of information is generated.
Step 203: the gray level image of watermark is generated into multiple watermark information blocks by preset piecemeal rule.
Step 204: the corresponding relationship of described image block of information Yu the watermark information block is established by random Obfuscating Algorithms.
Step 205: the watermark information block is embedded by described image block of information by default embedded mode.
Wherein, the default embedded mode is to one of angie type insertion and sectional type insertion.
To angie type insertion i.e. by watermark information block along correspondence image block of information diagonal line from the top down, be embedded in from right to left Watermark information.When sectional type insertion is by watermark information block embedded images block of information, it is embedding to choose one of progress watermark information Enter.
Step 206: the image information block after insertion watermark information block being subjected to inverse transformation, and it is embedding to be substituted into the watermark Enter the two dimensional code gray level image that Area generation has watermark information.
Step 207: the two dimensional code gray level image to be processed being associated with the gray level image of the watermark and is saved in clothes Business device.
To complete subsequent anti-fake judgement, by the gray level image of the image in 2 D code being printed on product and corresponding watermark It is associated with the server saved, judgment basis when using as barcode scanning.
Step 208: the corresponding server of Rule Extraction being read according to two dimensional code from two dimensional code gray level image to be identified Information is saved, reads watermarking images from the watermark of the two dimensional code gray level image to be identified insertion region.
When identifying to two dimensional code gray level image to be identified, acquired image is first subjected to gray processing, Gauss Smooth and binary conversion treatment, obtains the image that can carry out outline identification.The identification process of two dimensional code is standard operation, is not done herein Independent explanation.
For the gray level image in watermark insertion region, according to the generation method in step 202, corresponding selection the following two kinds side One of formula is formerly handled: 1) carrying out wavelet transformation to gray level image, progress blocking is discrete remaining after extracting principal component String transformation;2) to the direct blocking discrete cosine transform of gray level image.Formerly after processing, used when based on preamble insertion embedding Enter algorithm progress information extraction and obtain multiple watermark information blocks, then according to the corresponding key of random Obfuscating Algorithms, for extraction Watermark information block is combined recovery and obtains watermarking images.
It is further to note that can pass through in the step to the identification of two dimensional code when realizing the program in the terminal Various application software are realized by general two dimensional code identifying schemes, if to identify the watermark of insertion, need to be somebody's turn to do using corresponding The specific barcode scanning tool that watermark is embedded in scheme carries out barcode scanning.
Step 209: obtaining the grayscale image of corresponding watermark from the server according to server preservation acquisition of information Picture.
In the server, the information in two dimensional code is associated with guarantor with the gray level image (or fingerprint characteristic of watermark) of watermark Deposit, when barcode scanning obtain information in two dimensional code and be wherein embedded in watermark when, by the information access server in two dimensional code, obtain Take the gray level image of the corresponding legal watermark of the two dimensional code.
Step 210: comparing the similarity of the gray level image of the watermarking images read and the watermark got.
In specific comparison procedure, image array PCA characteristic value is carried out to the gray level image of the watermark saved in server It decomposes, obtains the characteristic fingerprint of original image.Equally, image array PCA eigen value decomposition is carried out to the watermarking images read, Then the characteristic fingerprint of the watermarking images read two characteristic fingerprints is compared, calculate according to comparing, obtain two The similarity degree of person.
Step 211: the legitimacy of the two dimensional code gray level image to be identified is confirmed according to the similarity.
If similarity reaches targets threshold, the watermarking images that show the watermarking images read and stored in server Similarity it is sufficiently high, it is believed that it is legal for carrying the product of the watermarking images;Otherwise it is assumed that carrying the product of the watermarking images It is illegal, and can be right according to the substantially sale whereabouts of the information tracing carried in corresponding two dimensional code the part product The approximate range for making and selling the illegal product is positioned.
On the basis of the above embodiments, Fig. 4 is that the structure of anti-counterfei waterprint generating means provided by the embodiments of the present application is shown It is intended to.With reference to Fig. 4, anti-counterfei waterprint generating means provided in this embodiment are specifically included: sectional image extraction unit 301, subregion Image block unit 302, watermarking images blocking unit 303, piecemeal correspond to associative cell 304, image embedded unit 305 and watermark Image generation unit 306.
Wherein, sectional image extraction unit 301 is embedded in area for intercepting watermark from two dimensional code gray level image to be processed The sectional image in domain;Sectional image blocking unit 302 is more for generating the sectional image by preset transformation piecemeal rule A image information block;Watermarking images blocking unit 303, it is multiple for generating the gray level image of watermark by preset piecemeal rule Watermark information block;Piecemeal corresponds to associative cell 304, for establishing described image block of information and the water by random Obfuscating Algorithms Print the corresponding relationship of block of information;Image embedded unit 305, for being embedded into the watermark information block by default embedded mode Described image block of information;Watermarking images generation unit 306, for will be embedded in the image information block after watermark information block carry out it is anti- Transformation, and it is substituted into the two dimensional code gray level image that the watermark insertion Area generation has watermark information.
The sectional image for being embedded in region by intercepting watermark from two dimensional code gray level image to be processed;By the block plan As generating multiple images block of information by preset transformation piecemeal rule;The gray level image of watermark is generated by preset piecemeal rule Multiple watermark information blocks;The corresponding relationship of described image block of information Yu the watermark information block is established by random Obfuscating Algorithms; The watermark information block is embedded into described image block of information by default embedded mode;By the figure after insertion watermark information block As block of information progress inverse transformation, and it is substituted into the two dimensional code gray level image that the watermark insertion Area generation has watermark information, The watermark of addition is overlapped with the image space of original two dimensional code, can not be replicated by extracting the information of two dimensional code, can quickly really Recognize the true and false for carrying the product of two dimensional code and carries out the retrospect in duplication source.
Wherein, the sectional image blocking unit 302, is specifically used for:
Wavelet transformation is carried out to the sectional image, the sectional image after wavelet transformation is subjected to the change of blocking discrete cosine It changes, generates multiple images block of information;Or,
Blocking discrete cosine transform is carried out to the sectional image, generates multiple images block of information.
Wherein, described device further include:
Image is associated with storage unit, for by the gray level image of the two dimensional code gray level image and the watermark to be processed Association is saved in server;
Image information reading unit, for reading Rule Extraction according to two dimensional code from two dimensional code gray level image to be identified Corresponding server saves information, reads watermarking images from the watermark of the two dimensional code gray level image to be identified insertion region;
Server access unit obtains corresponding water from the server for saving acquisition of information according to the server The gray level image of print;
Similarity-rough set unit, it is similar to the gray level image of the watermark got for comparing the watermarking images read Degree;
Validity judgement unit, for confirming the legal of the two dimensional code gray level image to be identified according to the similarity Property.
Wherein, watermark insertion region is full images region, lower right field or central area.
Wherein, the default embedded mode is to one of angie type insertion and sectional type insertion.
Anti-counterfei waterprint generating means provided by the embodiments of the present application can be used for executing anti-fake water provided by the above embodiment Generation method is printed, has corresponding function and beneficial effect.
The embodiment of the present application provides a kind of electronic equipment, and can integrate in the electronic equipment provided by the embodiments of the present application Anti-counterfei waterprint generating means.Fig. 5 is the structural schematic diagram of a kind of electronic equipment provided by the embodiments of the present application.With reference to Fig. 5, the electricity Sub- equipment includes: processor 110, memory 111.The quantity of processor 110 can be one or more in the electronic equipment, In Fig. 5 by taking a processor 110 as an example.The quantity of memory 111 can be one or more in the electronic equipment, in Fig. 5 By taking a memory 111 as an example.The processor 110 and memory 111 of the electronic equipment can pass through bus or other modes It connects, in Fig. 5 for being connected by bus.
Memory 111 is used as a kind of computer readable storage medium, can be used for storing software program, journey can be performed in computer Sequence and module, the corresponding program instruction/module of anti-counterfei waterprint generation method as described in the application any embodiment (such as are divided Area's image extraction unit 301, sectional image blocking unit 302, watermarking images blocking unit 303, piecemeal correspond to associative cell 304, image embedded unit 305 and watermarking images generation unit 306).Memory 111 can mainly include storing program area and storage Data field, wherein storing program area can application program needed for storage program area, at least one function;It storage data area can Storage uses created data etc. according to electronic equipment.In addition, memory 111 may include high random access storage Device, can also include nonvolatile memory, a for example, at least disk memory, flush memory device or other are non-volatile Solid-state memory.In some instances, memory 111 can further comprise the storage remotely located relative to processor 110 Device, these remote memories can pass through network connection to electronic equipment.The example of above-mentioned network include but is not limited to internet, Intranet, local area network, mobile radio communication and combinations thereof.
Software program, instruction and the module that processor 110 is stored in memory 111 by operation, thereby executing electricity The various function application and data processing of sub- equipment, that is, realize above-mentioned anti-counterfei waterprint generation method, which generates Method, comprising: the sectional image in watermark insertion region is intercepted from two dimensional code gray level image to be processed;By the sectional image Multiple images block of information is generated by preset transformation piecemeal rule;The gray level image of watermark is more by the generation of preset piecemeal rule A watermark information block;The corresponding relationship of described image block of information Yu the watermark information block is established by random Obfuscating Algorithms;It is logical It crosses default embedded mode and the watermark information block is embedded into described image block of information;By the image after insertion watermark information block Block of information carries out inverse transformation, and is substituted into the two dimensional code gray level image that the watermark insertion Area generation has watermark information.
The electronic equipment of above-mentioned offer can be used for executing anti-counterfei waterprint generation method provided by the above embodiment, have corresponding Function and beneficial effect.
The embodiment of the present application also provides a kind of storage medium comprising computer executable instructions, and the computer is executable When being executed by computer processor for executing a kind of anti-counterfei waterprint generation method, which is wrapped for instruction It includes: intercepting the sectional image in watermark insertion region from two dimensional code gray level image to be processed;By the sectional image by default Transformation piecemeal rule generate multiple images block of information;The gray level image of watermark is generated into multiple watermarks by preset piecemeal rule Block of information;The corresponding relationship of described image block of information Yu the watermark information block is established by random Obfuscating Algorithms;By default The watermark information block is embedded into described image block of information by embedded mode;By the image information block after insertion watermark information block Inverse transformation is carried out, and is substituted into the two dimensional code gray level image that the watermark insertion Area generation has watermark information.
Storage medium --- any various types of memory electronic equipments or storage equipment.Term " storage medium " purport It is including: install medium, such as CD-ROM, floppy disk or magnetic tape equipment;Computer system memory or random access memory, it is all Such as DRAM, DDR RAM, SRAM, EDO RAM, Lan Basi (Rambus) RAM etc.;Nonvolatile memory, such as flash memory, magnetic are situated between Matter (such as hard disk or optical storage);Register or the memory component of other similar types etc..Storage medium can further include it The memory or combinations thereof of its type.In addition, storage medium can be located at program in the first computer system being wherein performed In, or can be located in different second computer systems, second computer system is connected by network (such as internet) To first computer system.Second computer system can provide program instruction to the first computer for executing.Term " storage Medium " may include two for may reside in different location (such as in the different computer systems by network connection) Or more storage medium.It is (such as specific real that storage medium can store the program instruction that can be performed by one or more processors It is now computer program).
Certainly, a kind of storage medium comprising computer executable instructions, computer provided by the embodiment of the present application The anti-counterfei waterprint generation method that executable instruction is not limited to the described above, can also be performed provided by the application any embodiment Relevant operation in anti-counterfei waterprint generation method.
It is any that the application can be performed in anti-counterfei waterprint generating means, storage medium and the electronic equipment provided in above-described embodiment Anti-counterfei waterprint generation method provided by embodiment, the not technical detail of detailed description in the above-described embodiments, reference can be made to this Shen It please anti-counterfei waterprint generation method provided by any embodiment.
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.

Claims (10)

1. a kind of anti-counterfei waterprint generation method characterized by comprising
The sectional image in watermark insertion region is intercepted from two dimensional code gray level image to be processed;
The sectional image is generated into multiple images block of information by preset transformation piecemeal rule;
The gray level image of watermark is generated into multiple watermark information blocks by preset piecemeal rule;
The corresponding relationship of described image block of information Yu the watermark information block is established by random Obfuscating Algorithms;
The watermark information block is embedded into described image block of information by default embedded mode;
Image information block after insertion watermark information block is subjected to inverse transformation, and is substituted into the watermark insertion Area generation band There is the two dimensional code gray level image of watermark information.
2. the method according to claim 1, wherein described advised the sectional image by preset transformation piecemeal Multiple images block of information is then generated, specifically:
Wavelet transformation is carried out to the sectional image, the sectional image after wavelet transformation is subjected to blocking discrete cosine transform, Generate multiple images block of information;Or,
Blocking discrete cosine transform is carried out to the sectional image, generates multiple images block of information.
3. according to method as stated in claim 1, which is characterized in that the method also includes:
The two dimensional code gray level image to be processed is associated with the gray level image of the watermark and is saved in server;
Image information block after the watermark information block by insertion carries out inverse transformation, and it is raw to be substituted into watermark insertion region After the two dimensional code gray level image with watermark information, further includes:
The corresponding server of Rule Extraction is read according to two dimensional code from two dimensional code gray level image to be identified and saves information, from institute Read watermarking images in the watermark insertion region for stating two dimensional code gray level image to be identified;
The gray level image of corresponding watermark is obtained from the server according to server preservation acquisition of information;
Compare the similarity of the gray level image of the watermarking images read and the watermark got;
The legitimacy of the two dimensional code gray level image to be identified is confirmed according to the similarity.
4. the method according to claim 1, wherein watermark insertion region is full images region, the lower right corner Region or central area.
5. the method according to claim 1, wherein the default embedded mode is to angie type insertion and sectional type One of insertion.
6. a kind of anti-counterfei waterprint generating means characterized by comprising
Sectional image extraction unit, for intercepting the block plan in watermark insertion region from two dimensional code gray level image to be processed Picture;
Sectional image blocking unit, for the sectional image to be generated multiple images information by preset transformation piecemeal rule Block;
Watermarking images blocking unit, for the gray level image of watermark to be generated multiple watermark information blocks by preset piecemeal rule;
Piecemeal corresponds to associative cell, for establishing described image block of information and the watermark information block by random Obfuscating Algorithms Corresponding relationship;
Image embedded unit, for the watermark information block to be embedded into described image block of information by default embedded mode;
Watermarking images generation unit carries out inverse transformation for that will be embedded in the image information block after watermark information block, and is substituted into The watermark insertion Area generation has the two dimensional code gray level image of watermark information.
7. device according to claim 6, which is characterized in that the sectional image blocking unit is specifically used for:
Wavelet transformation is carried out to the sectional image, the sectional image after wavelet transformation is subjected to blocking discrete cosine transform, Generate multiple images block of information;Or,
Blocking discrete cosine transform is carried out to the sectional image, generates multiple images block of information.
8. according to device described in claim requirement 6, which is characterized in that described device further include:
Image is associated with storage unit, for the two dimensional code gray level image to be processed to be associated with the gray level image of the watermark It is saved in server;
Image information reading unit, it is corresponding for reading Rule Extraction according to two dimensional code from two dimensional code gray level image to be identified Server save information, from the watermark of the two dimensional code gray level image to be identified insertion region read watermarking images;
Server access unit obtains corresponding watermark from the server for saving acquisition of information according to the server Gray level image;
Similarity-rough set unit, for comparing the similarity of the watermarking images read with the gray level image of the watermark got;
Validity judgement unit, for confirming the legitimacy of the two dimensional code gray level image to be identified according to the similarity.
9. a kind of electronic equipment characterized by comprising
Memory and one or more processors;
The memory, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processors are real Existing anti-counterfei waterprint generation method a method as claimed in any one of claims 1 to 5.
10. a kind of storage medium comprising computer executable instructions, which is characterized in that the computer executable instructions by For executing anti-counterfei waterprint generation method a method as claimed in any one of claims 1 to 5 when computer processor executes.
CN201910168615.8A 2019-03-06 2019-03-06 A kind of anti-counterfei waterprint generation method, device, electronic equipment and storage medium Pending CN109840875A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910168615.8A CN109840875A (en) 2019-03-06 2019-03-06 A kind of anti-counterfei waterprint generation method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910168615.8A CN109840875A (en) 2019-03-06 2019-03-06 A kind of anti-counterfei waterprint generation method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN109840875A true CN109840875A (en) 2019-06-04

Family

ID=66885425

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910168615.8A Pending CN109840875A (en) 2019-03-06 2019-03-06 A kind of anti-counterfei waterprint generation method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109840875A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110263893A (en) * 2019-06-13 2019-09-20 深圳劲嘉集团股份有限公司 A kind of anti-fake two-dimension code generation method and device being embedded in watermark
CN110634095A (en) * 2019-08-02 2019-12-31 北京大米科技有限公司 Watermark adding method, watermark identifying method, watermark adding device, watermark identifying device and electronic equipment
CN111597517A (en) * 2020-04-28 2020-08-28 南京新智客信息科技有限公司 Document anti-copying method and system based on image scrambling
CN112016655A (en) * 2020-08-18 2020-12-01 杭州僖磊科技发展有限公司 Traceable scanning code printing method and system
CN112395565A (en) * 2019-08-15 2021-02-23 中国移动通信集团广东有限公司 Watermark information embedding and extracting method and device and electronic equipment
CN114139665A (en) * 2021-10-14 2022-03-04 珠海丹德图像技术有限公司 Anti-counterfeiting embedding method and identification method of negotiable securities, anti-counterfeiting device and negotiable securities
CN114330621A (en) * 2021-11-23 2022-04-12 深圳市祯源科技有限公司 Two-dimensional code anti-counterfeiting method and device based on identification information and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102184520A (en) * 2011-05-26 2011-09-14 浙江工商大学 Complete blind detection robust quantization watermarking method
CN103440617A (en) * 2013-09-18 2013-12-11 黄良永 Image processing method for improving safety of medical image
CN107481179A (en) * 2017-05-17 2017-12-15 上海冠众光学科技有限公司 Antifalsification label recognition methods with watermarked information and device
CN109191361A (en) * 2018-09-11 2019-01-11 中国科学院自动化研究所 Image Watermarking, extracting method and correlation technique

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102184520A (en) * 2011-05-26 2011-09-14 浙江工商大学 Complete blind detection robust quantization watermarking method
CN103440617A (en) * 2013-09-18 2013-12-11 黄良永 Image processing method for improving safety of medical image
CN107481179A (en) * 2017-05-17 2017-12-15 上海冠众光学科技有限公司 Antifalsification label recognition methods with watermarked information and device
CN109191361A (en) * 2018-09-11 2019-01-11 中国科学院自动化研究所 Image Watermarking, extracting method and correlation technique

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
李廷洪: "一种基于DCT的静态图像的数字水印算法", 《内蒙古大学学报(自然科学版)》 *
蔡汉添等: "一种基于DCT中频的图像水印技术", 《华南理工大学学报(自然科学版)》 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110263893A (en) * 2019-06-13 2019-09-20 深圳劲嘉集团股份有限公司 A kind of anti-fake two-dimension code generation method and device being embedded in watermark
CN110634095A (en) * 2019-08-02 2019-12-31 北京大米科技有限公司 Watermark adding method, watermark identifying method, watermark adding device, watermark identifying device and electronic equipment
WO2021023085A1 (en) * 2019-08-02 2021-02-11 北京大米科技有限公司 Watermark adding method and apparatus, watermark recognition method and apparatus, and electronic device
CN110634095B (en) * 2019-08-02 2023-08-08 北京大米科技有限公司 Watermark adding method, watermark identifying device and electronic equipment
CN112395565A (en) * 2019-08-15 2021-02-23 中国移动通信集团广东有限公司 Watermark information embedding and extracting method and device and electronic equipment
CN111597517A (en) * 2020-04-28 2020-08-28 南京新智客信息科技有限公司 Document anti-copying method and system based on image scrambling
CN112016655A (en) * 2020-08-18 2020-12-01 杭州僖磊科技发展有限公司 Traceable scanning code printing method and system
CN114139665A (en) * 2021-10-14 2022-03-04 珠海丹德图像技术有限公司 Anti-counterfeiting embedding method and identification method of negotiable securities, anti-counterfeiting device and negotiable securities
CN114330621A (en) * 2021-11-23 2022-04-12 深圳市祯源科技有限公司 Two-dimensional code anti-counterfeiting method and device based on identification information and storage medium
CN114330621B (en) * 2021-11-23 2024-04-09 深圳市祯源科技有限公司 Two-dimensional code anti-counterfeiting method, device and storage medium based on identification information

Similar Documents

Publication Publication Date Title
CN109840875A (en) A kind of anti-counterfei waterprint generation method, device, electronic equipment and storage medium
US10019646B2 (en) Method for object recognition and/or verification on portable devices
Piva An overview on image forensics
US7017816B2 (en) Extracting graphical bar codes from template-based documents
CN110766594B (en) Information hiding method and device, detection method and device and anti-counterfeiting tracing method
CN103793990A (en) Invoice verification method and system
JP2016540329A (en) Two-dimensional barcode and authentication method of such barcode
US7305131B2 (en) Extracting graphical bar codes from an input image
KR20160006595A (en) Augmenting barcodes with secondary encoding for anti-counterfeiting
CN113570387A (en) Artwork tracing method based on block chain and electronic equipment
CN110503592B (en) Two-dimensional code anti-counterfeiting method and system based on digital watermark
US20100201114A1 (en) Page mark-up using printed dot barcodes
CN115171138A (en) Method, system and equipment for detecting image text of identity card
US8038073B2 (en) Tamper detection of documents using encoded dots
CN104094285B (en) Verified using the evidence obtaining of the forensic mark in halftoning
Tkachenko et al. Sensitivity of different correlation measures to print-and-scan process
CN114330621B (en) Two-dimensional code anti-counterfeiting method, device and storage medium based on identification information
CN114862646B (en) Watermark embedding and extracting method and system for vector tile anti-splicing
Gomez‐Krämer Verifying document integrity
Hu et al. Learning-based image steganography and watermarking: A survey
US9036913B2 (en) Secured identification medium and method for securing such a medium
Rani et al. A Brief Review on Existing Techniques for Detecting Digital Image Forgery
CN117436907B (en) Anti-fake information tracing method based on combination of mobile phone scanning dot matrix code and digital watermark
Wang et al. Anti-counterfeiting textured pattern
US11872832B2 (en) Texture-based authentication of digital identity documents

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: 20190604