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 image watermark embedding and detection method based on virtual bar code.
Background technology
Along with the development of computer technology and internet with popularize, and the progress of multi-medium data storage and transmission technology, the transmission of digital product and share and to become very easy, also the bootlegging of digital product becomes very easy, brought the problems of a series of relevant copyrights thereupon.In order to protect copyright owner's interests, protect the intellecture property of digital product in the urgent need to finding a kind of effective method.
Digital watermark technology has occurred under such background since the nineties just and is flourish.After " digital watermarking " concept that Caronni in 1993 proposes first, digital watermark technology has become the study hotspot of copyright protection technology.It can join copyright information in still image, the video/audio data, and disabled user's attack had robustness, digital watermarking can not be extracted or take out to disabled user's quality of not destroying digital product in other words: and validated user can detect the validity that watermark information proves copyright, and can not destroy watermark information.So digital watermarking has the incomparable superiority of encryption technology 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, two groups of virtual bar code technical schemes of mutually intersecting, mutually confirming have been designed, proposed to embed and detection method based on the image watermark of virtual bar code, realized that the positioning oneself of watermark, self-correction and full images cover, and solve the problem of conventional images watermark location and robustness.
The technical solution adopted for the present invention to solve the technical problems is:
A kind of image watermark based on virtual bar code embeds and detection method, may further comprise the steps:
(1), virtual bar code with orthogonal property of design;
(1.1), copyright information is encrypted processing with public key encryption algorithm;
(1.2), generate the bianry image of bar code according to the copyright information of encrypting;
(1.3), the bar code image spreading is added the onesize image of n level Wavelet image to having with needs;
(1.4), the bar code bianry image after the expansion is carried out 90 ℃ of rotations;
(1.5), two groups of virtual bar code images are superposeed, generate a virtual bar code bianry image with orthogonal property;
(2), the embedding of virtual bar code image watermark
The embedding grammar of virtual bar code image watermark be copyright information after encryption, generate bar code, take full advantage of positioning oneself and the self-correction performance of bar code, improve the robustness of copyright information on image-carrier.Its concrete implementation step is as follows:
(2.1), input raw image data;
(2.2), original image is carried out n level wavelet transformation, obtain HH
n, LH
n, LH
n, LL
n, according to the size of image, the n span is generally selected (2<n<6).
(2.3), at LL
nSelect the subgraph scope less than the subgraph of the watermark information image carrier as the embed watermark information image;
(2.4), the embedding formula of watermark is: C '
i=C
i(1+ α W
i), in the formula, the size of α has determined the intensity of watermark signal modification picture frequency.
(2.5), utilize the watermark embedding formula in the previous step, to LL
nThe virtual bar code binary image watermarking information that subgraph embeds (1) design and generates.
(2.6), the image-carrier of embed watermark information is carried out the image that inverse wavelet transform obtains being embedded with 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 have deliberate Attack Digital Watermarking and unintentional Attack Digital Watermarking, detecting with extraction to have some compensatory processing, in order to correctly extract the bar code image, its detailed process is as follows:
(3.1), input need to be carried out the view data of watermark detection;
(3.2), original image is carried out n level wavelet transformation, obtain HH
n, LH
n, LH
n, LL
n, according to the size of image, the n span is generally selected (2<n<6).
(3.3), at LL
nSelect the subgraph scope less than the subgraph of the watermark information image carrier as the embed watermark information image;
(3.4), the extraction formula of virtual bar code image is: W
i=(C '
i-C
i)/(α C
i), in the formula, α C
iIt is adaptive virtual bar code picture frequency strength ratio.
(3.5), virtual bar code watermark information image is carried out the quadrature separating treatment, simultaneously two width of cloth bar code images are carried out overlap ratio, attacked the bar code (Fig. 3) that destroys with restructuring.
(3.6), using corresponding bar-code identification software to carry out bar-code identification to the bar code (Fig. 2) after the restructuring processes, obtains the watermark raw information of encryption.
(3.7), the key that provides of User is decrypted processing, confirms the copyright owner of image.
Beneficial effect of the present invention is: according to the self-correction of bar code with position oneself performance, two groups of virtual bar code technical schemes of mutually intersecting, mutually confirming have been designed, proposed to embed and detection method based on the image watermark of virtual bar code, realized that the positioning oneself of water level, self-correction and full images cover, and have solved 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.Can provide effective copyright protection for production, propagation and the application of electronic image data.
Description of drawings
Fig. 1 is based on the image watermark embedding of virtual bar code and the system framework of detection method.
Fig. 2 is the bar code figure image of copyright information after encryption.
Fig. 3 has the bar code image of copyright information by lateral overlap, and longitudinal stretching expands to the suitable onesize watermark information image of n level Wavelet image.
Fig. 4 is the copyright watermark information image behind Fig. 3 mutually orthogonal overlapping.
Fig. 5 is experimental water seal carrier image.
Fig. 6 is the image behind the adding bar code watermark information.
The copyright watermark information image that Fig. 7 extracts after Attack Digital Watermarking is processed.
Embodiment
The invention will be further described below in conjunction with accompanying drawing.
With reference to Fig. 1 ~ Fig. 6, a kind of image watermark based on virtual bar code embeds and detection method, may further comprise the steps:
Wherein Fig. 1 is based on the image watermark embedding of virtual bar code and the processing flow chart of detection method.
(1) Fig. 2-4 design has the virtual bar code watermark information image of orthogonal property;
(1.1), copyright information is encrypted processing with public key encryption algorithm;
(1.2), generate the bianry image (Fig. 2) of bar code according to the copyright information of encrypting;
(1.3), the bar code image spreading is added the n onesize image of level Wavelet image (Fig. 3) to having with needs;
(1.4), the bar code bianry image after the expansion is carried out 90 ℃ of rotations;
(1.5), two groups of virtual bar code images are superposeed, generate a virtual bar code bianry image (Fig. 4) with orthogonal property;
(2) Fig. 5-Fig. 6 illustrates the process of utilizing weighted method embed watermark information image in the low frequency part of n level Wavelet image, and concrete grammar and the step of employing are as follows:
(2.1), input raw image data (Fig. 5);
(2.2), original image is carried out n level wavelet transformation, obtain HH
n, LH
n, LH
n, LL
n, according to the size of image, the n span is generally selected (2<n<6).
(2.3), at LL
nSelect the subgraph scope less than the subgraph of the watermark information image carrier as the embed watermark information image;
(2.4), the embedding formula of watermark is: C '
i=C
i(1+ α W
i), in the formula, the size of α has determined the intensity of watermark signal modification picture frequency.
(2.5), utilize the watermark embedding formula in the previous step, to LL
nThe virtual bar code binary image watermarking information that subgraph embeds (1) design and generates.
(2.6), the image-carrier of embed watermark information carried out the image (Fig. 6) that inverse wavelet transform obtains being embedded with 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 have deliberate Attack Digital Watermarking and unintentional Attack Digital Watermarking, detecting with extraction to have some compensatory processing, in order to correctly extract the bar code image, its detailed process is as follows:
(3.1), input need to be carried out the view data (Fig. 6) of watermark detection;
(3.2), original image is carried out n level wavelet transformation, obtain HH
n, LH
n, LH
n, LL
n, according to the size of image, the n span is generally selected (2<n<6).
(3.3), at LL
nSelect the subgraph scope less than the subgraph of the watermark information image carrier as the embed watermark information image;
(3.4), the extraction formula of virtual bar code image is: W
i=(C '
i-C
i)/(α C
i), in the formula, α C
iIt is adaptive virtual bar code picture frequency strength ratio.
(3.5), virtual bar code watermark information image is carried out the quadrature separating treatment, simultaneously two width of cloth bar code images are carried out overlap ratio, attacked the bar code (Fig. 3) that destroys with restructuring.
(3.6), using corresponding bar-code identification software to carry out bar-code identification to the bar code (Fig. 2) after the restructuring processes, obtains the watermark raw information of encryption.
(3.7), the key that provides of User is decrypted processing, confirms the copyright owner of image.