Image watermark based on virtual bar code embeds and detection method
Technical field
The invention belongs to view data copyright protection field, be specifically related to a kind of for based on virtual bar code image watermark embed and detection method.
Background technology
Along with the development of computer technology and internet is with universal, and multi-medium data stores and the progress of transmission technology, the transmission of digital product and share and become very easy, also the bootlegging of digital product becomes very easy, bring a series of problem about copyright thereupon.In order to protect the interests of copyright owner, in the urgent need to finding a kind of effective method to protect the intellecture property of digital product.
Digital watermark technology has occurred and flourish just from background such since the nineties.After " digital watermarking " concept that Caronni in 1993 proposes first, digital watermark technology has become the study hotspot of copyright protection technology.Copyright information can join in still image, video/audio data by it, and to the attack of disabled user, there is robustness, in other words the quality that disabled user does not destroy digital product can not be extracted or take out digital watermarking: and validated user can detect watermark information to prove the validity of copyright, and can not watermark information be destroyed.So the superiority that digital watermarking has encryption technology incomparable at protection multi-medium data copyright side mask.
Summary of the invention
The object of the invention is to according to the self-correction of bar code and position oneself performance, devise two groups of virtual bar code technical schemes of mutually intersecting, mutually confirming, the image watermark proposed based on virtual bar code embeds and detection method, achieve the positioning oneself of watermark, self-correction and full images to cover, solve the problem of conventional images watermark location and robustness.
The technical solution adopted for the present invention to solve the technical problems is:
Image watermark based on virtual bar code embeds and a detection method, comprises the following steps:
(1), the virtual bar code that has orthogonal property is designed;
(1.1), copyright information public key encryption algorithm is encrypted;
(1.2) bianry image of bar code, is generated according to the copyright information of encryption;
(1.3), bar code image spreading is added the onesize image of n level Wavelet image to having with needs;
(1.4), 90 DEG C of rotations are carried out to the bar code bianry image after expansion;
(1.5), two groups of virtual bar code images superpose, generate the virtual bar code bianry image that has orthogonal property;
(2), the embedding of virtual bar code image watermark
The embedding grammar of virtual bar code image watermark is copyright information after encryption, generates bar code, makes full use of positioning oneself and self-correction performance of bar code, improves the robustness of copyright information on image-carrier.Its concrete implementation step is as follows:
(2.1), raw image data is inputted;
(2.2), to original image carry out n level wavelet transformation, obtain HH
n, LH
n, LH
n, LL
n, according to the size of image, n span is generally selected (2<n<6).
(2.3), at LL
nsubgraph scope is selected to be less than the carrier of subgraph as embed watermark information image of watermark information image;
(2.4), the embedding formula of watermark is: C '
i=C
i(1+ α W
i), in formula, the size of α determines the intensity of watermark signal amendment picture frequency.
(2.5), the watermark embedment formula utilized in previous step, to LL
nsubgraph embeds (1) and designs and the virtual bar code binary image watermarking information generated.
(2.6), the image that inverse wavelet transform obtains being embedded with watermark information is carried out to the image-carrier of embed watermark information.
(3), the detection of virtual bar code image watermark and extraction
The detection of virtual bar code image watermark and extracting method are the inverse process of embedding grammar, just owing to there is deliberate Attack Digital Watermarking and unintentional Attack Digital Watermarking, detect and need some compensatory process with extraction, extract bar code image so that correct, its detailed process is as follows:
(3.1), input needs the view data of carrying out watermark detection;
(3.2), to original image carry out n level wavelet transformation, obtain HH
n, LH
n, LH
n, LL
n, according to the size of image, n span is generally selected (2<n<6).
(3.3), at LL
nsubgraph scope is selected to be less than the carrier of subgraph as embed watermark information image of watermark information image;
(3.4), the extraction formula of virtual bar code image is: W
i=(C '
i-C
i)/(α C
i), in formula, α C
iit is adaptive virtual bar code picture frequency strength ratio.
(3.5), to virtual bar code watermark information image carry out orthogonal separation process, overlap ratio is carried out comparatively to two width bar code images simultaneously, attacked to recombinate the bar code (Fig. 3) destroyed.
(3.6), to the bar code (Fig. 2) after restructuring use corresponding bar-code identification software to carry out bar-code identification process, obtain the watermark raw information of encryption.
(3.7) key, provided according to user is decrypted process, the copyright owner of confirmation image.
Beneficial effect of the present invention is: according to the self-correction of bar code with position oneself performance, devise two groups of virtual bar code technical schemes of mutually intersecting, mutually confirming, the image watermark proposed based on virtual bar code embeds and detection method, achieve the positioning oneself of water level, self-correction and full images to cover, solve the problem of conventional images watermark location and robustness.
The method applied in the present invention realizes effectively simple, has good resist geometric attacks performance.Effective copyright protection can be provided for the production of electrical image data, propagation and application.
Accompanying drawing explanation
Fig. 1 embeds and the system framework of detection method based on the image watermark of virtual bar code.
Fig. 2 is the bar code figure image of copyright information after encryption.
Fig. 3 be there is copyright information bar code image by lateral overlap, longitudinal stretching, expands to the watermark information image that applicable n level Wavelet image is onesize.
Fig. 4 is the copyright watermark frame after the mutually orthogonal overlap of Fig. 3.
Fig. 5 is experimental water print carrier image.
Fig. 6 is the image after adding bar code watermark information.
The copyright watermark frame that Fig. 7 extracts after Attack Digital Watermarking process.
Embodiment
Below in conjunction with accompanying drawing, the invention will be further described.
With reference to Fig. 1 ~ Fig. 6, a kind of image watermark based on virtual bar code embeds and detection method, comprises the following steps:
Wherein Fig. 1 embeds and the processing flow chart of detection method based on the image watermark of virtual bar code.
(1) Fig. 2-4 design has the virtual bar code watermark information image of orthogonal property;
(1.1), copyright information public key encryption algorithm is encrypted;
(1.2) bianry image (Fig. 2) of bar code, is generated according to the copyright information of encryption;
(1.3), bar code image spreading is added the onesize image of n level Wavelet image (Fig. 3) to having with needs;
(1.4), 90 DEG C of rotations are carried out to the bar code bianry image after expansion;
(1.5), two groups of virtual bar code images superpose, generate the virtual bar code bianry image (Fig. 4) that has orthogonal property;
(2) Fig. 5-Fig. 6 is the process that the low frequency part illustrating at n level Wavelet image utilizes weighted method embed watermark information image, and concrete grammar and the step of employing are as follows:
(2.1), raw image data (Fig. 5) is inputted;
(2.2), to original image carry out n level wavelet transformation, obtain HH
n, LH
n, LH
n, LL
n, according to the size of image, n span is generally selected (2<n<6).
(2.3), at LL
nsubgraph scope is selected to be less than the carrier of subgraph as embed watermark information image of watermark information image;
(2.4), the embedding formula of watermark is: C '
i=C
i(1+ α W
i), in formula, the size of α determines the intensity of watermark signal amendment picture frequency.
(2.5), the watermark embedment formula utilized in previous step, to LL
nsubgraph embeds (1) and designs and the virtual bar code binary image watermarking information generated.
(2.6), the image (Fig. 6) that inverse wavelet transform obtains being embedded with watermark information is carried out to the image-carrier of embed watermark information.
(3), the detection of virtual bar code image watermark and extracting method
The detection of virtual bar code image watermark and extracting method are the inverse process of embedding grammar, just owing to there is deliberate Attack Digital Watermarking and unintentional Attack Digital Watermarking, detect and need some compensatory process with extraction, extract bar code image so that correct, its detailed process is as follows:
(3.1), input needs the view data (Fig. 6) of carrying out watermark detection;
(3.2), to original image carry out n level wavelet transformation, obtain HH
n, LH
n, LH
n, LL
n, according to the size of image, n span is generally selected (2<n<6).
(3.3), at LL
nsubgraph scope is selected to be less than the carrier of subgraph as embed watermark information image of watermark information image;
(3.4), the extraction formula of virtual bar code image is: W
i=(C '
i-C
i)/(α C
i), in formula, α C
iit is adaptive virtual bar code picture frequency strength ratio.
(3.5), to virtual bar code watermark information image carry out orthogonal separation process, overlap ratio is carried out comparatively to two width bar code images simultaneously, attacked to recombinate the bar code (Fig. 3) destroyed.
(3.6), to the bar code (Fig. 2) after restructuring use corresponding bar-code identification software to carry out bar-code identification process, obtain the watermark raw information of encryption.
(3.7) key, provided according to user is decrypted process, the copyright owner of confirmation image.