The present invention relates to a process for predicting and characterizing visibility of artifacts associated watermarks using a baseline luminance fidelity model and a blockiness fidelity model.
Watermark embedding in a video stream is often required to be not noticeable, but at times introduces visible artifacts. Therefore, a need exists to develop an objective visibility measurement that can identify the changes that will introduce visible artifacts so that watermarks that cause these changes can be avoided.
A method comprises providing potential watermarks to apply to video, determining based on luminance whether the potential watermarks are visible or objectionable, determining based on blockiness whether the watermarks are visible or objectionable, and applying watermarks which have been determined to not be visible to a human observer. The video is divided into frames and the frames are divided into blocks. The luminance values and blockiness values are determined for the blocks to which a proposed watermark is directly applied. Additionally, propagation paths can be constructed for changes associated with the watermarks such that the luminance values and blockiness values are determined only for blocks in the propagation path. The propagation path can apply to a current frame due to both intra-prediction or inter-prediction. The propagation path can provide changes in the luminance values for blocks to which the watermarks are directly applied and can provide changes for blocks indirectly changed. The method can further collect absolute luminance changes for each macroblock within changed blocks and can compare the maximum absolute luminance change in a changed block to a threshold luminance level for visibility or objectionability.
Additionally, a video system comprises a processor adapted to collect a plurality of potential watermarks to video, a luminance calculator adapted to calculate a change in luminance to the video associated with the application of the potential watermarks, a blockiness calculator adapted to calculate blockiness of the video associated with the application of the potential watermarks, and a list collector adapted to collect watermarks that do not exceed threshold luminance and blockiness values. The system can be a video encoder, a decoder, a post-processor processing output from a decoder, a pre-processor providing input to an encoder, or the like, wherein the threshold luminance and blockiness values are levels below which the changes to luminance and the blockiness are not perceptible to a human viewer.
The invention will now be described by way of example with reference to accompanying drawings.
The invention provides a means for predicting the visibility of artifacts associated with prospective watermarks. The means for predicting visibility are measurements based on luminance fidelity model and a blockiness fidelity model. With these measurements, prospective watermarks which would produce objectionable visible artifacts can be avoided and watermarks which do not produce objectionable or visible artifacts can be employed.
It is important to point out that the invention is particularly useful to H.264/AVC video watermarking or any video encoding in which many blocking artifacts can be introduced by the embedding due to the motion vector change in inter-prediction and reference pixel change in intra-prediction. To avoid these blocking artifacts, a blockiness fidelity measure has been developed and is described in detail later in this specification.
Furthermore, the invention is intended to include modifying a CABAC-encoded H.264/AVC stream and for generating a list of CABAC (Context-based Adaptive Binary Arithmetic Coding)/AVC (Advanced Video Coding) compliant changes. In one embodiment, each entry in the resulting list identifies a specific syntax element, its original value, and a candidate alternative value. A syntax element that appears in this list is considered a changeable syntax element and can appear in the list more than once, each time with a different candidate alternative value.
A subset of the entries in this list can be selected and used for watermarking. An embodiment of the invention distinguishes changes that will introduce visible artifacts and those that will not and accordingly label the changes as visible or invisible, respectively, such that the classification is similar to one preformed by a human observer. Hence, those changes that will introduce visible artifacts can be removed from consideration, thereby leaving a subset of candidate alternative values that can be used to implement an invisible watermark.
The luminance fidelity model is herein referred to as the baseline fidelity model. As a first approximation, a change will be classified visible if it results in a large absolute change of the luminance values in the block directly affected by the change.
In the baseline fidelity model, a visibility measure is compared with a threshold. Consider first, a visibility measure for a single 16×16 macroblock. The visibility measure is the sum of the absolute luminance change within the block. This visibility measure, denoted AbsDiffj for macroblock j, is formulated as
where xorg(i) is the luminance of pixel i in macroblock j of the original, unmarked picture and xmarked(i) is the luminance of the same pixel in the watermarked version of the macroblock. For a threshold, h, the changes in block j are classified visible if AbsDiffj≧h, and they are classified invisible if AbsDiffj<h. The changes classified as visible can be removed from the embedding list to avoid visual artifacts in the watermarked content. It is important to point out that a lower threshold h will help filter out more visible artifacts. However, it may also filter out many invisible watermarks leading to fewer changeable blocks for embedding. On the other hand, higher threshold can provide more changeable blocks but at the risk of introducing visual artifacts. The threshold can be adjusted to achieve the desired tradeoff.
In H.264/AVC video coding, a change of a block may propagate to other blocks due to intra-prediction and inter-prediction. Thus, in addition to the block directly affected by a change, there may be a number of blocks indirectly affected. These blocks affected by the change are collectively called propagation path or propagation map. A propagation path is described as how a single change propagates within the same frame.
Propagation mapping capabilities can be integrated in H.264 decoders. As such, propagations maps can be generated which can describe how a single change will propagate through space. An algorithm builds a propagation map to track the affected blocks and their changes. Propagation mapping is useful in many aspects. It can be used to examine the visual distortion resulting from a change. It can be used to avoid (1) changes that may result in overlapping propagation maps, (2) changes that may fall in the propagation path of a previous change or (3) multiple changes that combine such that a third block is affected by both. Propagation maps can be used to improve the detection region when these changes are employed for watermarking.
With digital watermarking being an application that modifies an H.264/AVC encoded video, it is herein recognized that some changes can unexpectedly propagate to other areas of the picture or frame. If a map indicates all of the areas to which a change will propagate, the fidelity assessment can be applied to all of those areas. An additional concern in watermarking is that one may want to make multiple changes in a slice of a block. In watermarking it is important to know what effect a change will have on the decoded imagery and often this is expressed as a change from the unmarked version of the content. However, if a previous change has already propagated to the current region and another change is made, the resulting decoded imagery may include the effects of both changes. If the first change is known, then the result can be predicted, but one may not know a priori whether or not the first change will be employed. If a map were constructed indicating all of the areas to which a change will propagate, then one can avoid making other changes inside of that propagation path. A combination of these two problems can also occur. If a region of a picture is modified indirectly, because a change in a different region has propagated to the current region, the current region can be examined in an assessment of the fidelity impact of that change. However, it is possible that there are multiple changes, all of which can propagate into the current region. If maps of the propagation paths of all the changes are available, one can identify the regions of overlapping propagation and can consider all combinations of impacts.
a) shows an example propagation map. This propagation map 400 is associated with one block 410 whose motion vector has been directly changed. The other blocks 420 in the figure are blocks that will be indirectly changed due to propagation. When a block changes, either due to a direct modification or because it falls in the propagation path of another change, the change has the potential to further propagate to its neighbors.
The invention is intended to include the feature of propagation mapping being integrated into an H.264 decoder in the context of watermarking system in which a previous step has created a list of potential modifications, wherein each potential modification consists of a block identifier, an indication of which motion vector can be modified, and the alternative value for that motion vector. Note that, at this point, there can be a number of potential modifications for a single block. In a later step, the list of potential modifications can preferably be pruned so that no block has more than one modification.
The propagation map P can be represented as a linked list, which, as a whole, will identify the macroblocks/partitions affected by the potential modification. As the decoder processes the macroblocks of B slices (in raster scan order), one can keep adding affected macroblocks/partitions to the corresponding linked lists.
A preferred detailed integrated algorithm will now be described, which is the integration of propagation mapping with an AVC decoder. Given a list of potential modifications in a B-slice containing l entries, each corresponding to a modifiable motion vector with one alternative, l linked lists can be constructed and each list can be initialized to contain one node, the potential modification itself. The sample data structure of the node p is shown in Table 1, which contains the location information of the macroblock/partition, original and new motion vector information.
Since the process of propagation map building can be integrated into the AVC decoder, most of this information can be directly obtained from the decoder. Other information can be added based on the application of the propagation map.
Now with an understanding of the building of a propagation map, a situation in which a change does not introduce a visible artifact in the block directly affected can be considered, but, as the changes propagate to other blocks, an artifact can be introduced in one of the blocks along the propagation path. Thus, in at least one example, it is important to consider all blocks on the propagation path, not just the block directly affected, when classifying a change.
The luminance visibility measure is easily extended to account for artifacts introduced into the propagation path of a proposed change. To do this, the visibility measure is calculated for every macroblock in the propagation path of a proposed change and a visible measure is derived from all of these. One example of a visibility measure for a propagation path is the worst case (maximum) value. This measure can be denoted MaxAbsDiffk for proposed change k and is formulated as
The advantages of this fidelity model are that the fidelity score is easy to calculate and does not introduce much computational cost.
The baseline fidelity model works well, but there are classes of changes that introduce visible artifacts without introducing large luminance changes. The baseline model is limited to finding only those artifacts that are due to large luminance changes.
A second class of artifacts that can be seen by the H.264/AVC watermarking can be blocking artifacts.
A blocking artifact is visible when the pixel values on the edges of a block are correlated with the adjacent pixel values on the corresponding edges of the adjacent blocks in the original picture, but become significantly uncorrelated with those adjacent pixels in the watermarked picture. In this case, a viewer can perceive the edges of the block. When this artifact occurs on all four edges of a block, the artifact appears as an erroneous block of data and is thus called a blocking artifact. The blockiness fidelity model incorporates a blockiness measure in addition to the luminance measure. Changes that cause a high blockiness measurement value or blockiness score are labeled as visible. In other words, the blockiness measure is how blocky the content becomes after certain processing (e.g. compression, watermarking) compared with the original content. If the original content is smooth and the generated content is blocky, then this particular operation will receive a high blockiness score. If the original content is blocky and the processed content is also blocky, then this particular operation will receive low blockiness score. In other words, the blockiness score measures how much blocky artifacts introduced by the processing. By compare the blockiness score with a threshold, the blocks with visible artifacts can be indentified and can be removed, accordingly. The blockiness measure is performed block by block. As shown in Error! Reference source not found.6, for each n×n block A, one can calculate its blocky metric BM and block gradient metric BGM to obtain its final blockiness score. To calculate the BM, one first calculates the blocky metric for each pixel as follows. A metric pi can be for horizontal edge pixel i=2, . . . , n−1, wherein
qi=(B bottom edge pixel i−A top edge pixel i);
if |qi
else
pi=>B bottom edge pixel i and A top edge pixel i.
A metric pi can be for vertical edge pixel i=2, . . . , n−1, wherein
qi=(D right edge pixel i−A left edge pixel i);
if |qi
else
pi=>D right edge pixel i and A left edge pixel i.
A metric p can be for diagonal corner pixel, wherein
q=(C lower right corner pixel−A upper left pixel);
if |q_ori|<|q_processed| && |q_processed |−|q_ori |<64
else
p=>C lower right corner pixel and A upper left pixel.
A metric p can be for off-diagonal corner pixel:
q=(D upper right corner pixel−B lower left pixel);
if |q_ori|<|q_processed| && |q_processed|−|q_ori|<64
else
p=>D upper right corner pixel and B lower left pixel.
BGM is calculated by taking the average of the horizontal and vertical maximum gradient among original block and processed block. For pixels in one block xij, i=1, . . . , n, j=1, . . . , n,
Finally, the blockiness score for each n×n block is obtained as max(0, BM−BGM).
Since the BD+/AVC watermark is embedded macroblock by macroblock, a natural thinking would be to calculate the blockiness score using 16 as block size. However, the blocks on the propagation map of the change may not necessarily be 16×16. Due to the inter and intra prediction mode, the block size can be 16×8, 8×16, 8×8, and 4×4. If one uses a large n, e.g. 16, as the block size, then the macroblocks where only one of the 8×8 or 4×4 sub-blocks is changed may end up having a low blockiness score even though the changed sub-block is quite blocky. Therefore, the smallest possible block size, 4×4 should be used to calculate the blockiness score and then to sum them to obtain the final score for each 16×16 macroblock. Note that using a smaller block size to calculate the blockiness score has the same computational complexity as the large block size.
By summing the blockiness score of 4×4 sub-blocks to obtain the final score of the macroblock, one takes into account the area of the blocky artifacts. If, for example, all the 16 4×4 blocks have non-zero blockiness score, it means the entire 16×16 macroblock has s blocky artifact and may be more visible than the case where only one sub-block having non-zero score. Alternatively, the highest score from the 16 sub-blocks as the final score for the macroblock can be selected.
This blockiness measure can be applied to any rectangular, or at least piecewise linear, closed region such as a typical block. There are many ways that this can be used in various implementations. Since the BD+/AVC watermark is embedded macroblock by macroblock, a reasonable way would be to calculate the blockiness score using 16×16 as the block size. However, the blocks on the propagation path of the change are not necessarily 16×16. Depending on the inter- and intra-prediction modes, the block size can be 16×8, 8×16, 8×8, or 4×4. If one uses a large block size, e.g. 16, then the macroblocks where only one of the 8×8 or 4×4 sub-blocks is changed may end up having a low blockiness score even though the changed sub-block is quite blocky.
At least one disclosed implementation uses the smallest possible block size, 4×4, to calculate the blockiness score, and then add up the scores from the 16 adjacent 4×4 blocks to obtain the final score for each 16×16 macroblock. Note that using a smaller block size to calculate the blockiness score has the same computational complexity as the large block size.
By summing up the blockiness score of 4×4 sub-blocks to obtain the final score of the macroblock, one takes into account the area of the blocky artifacts. If, for example, each of the 16 4×4 blocks has a non-zero blockiness score, it means the entire 16×16 macroblock has blocking artifacts which may be more visible than the case where only one sub-block has a non-zero score. An alternative embodiment is to select the highest score from the 16 sub-blocks as the final score for the macroblock. By doing that, one focuses on the 4×4 block with the highest blockiness score, which most likely will cause visual artifact.
Similar to the baseline mode, the visibility measure is used to account for artifacts introduced along the propagation path of a proposed change. The blockiness score is calculated for every macroblock in the propagation path of a proposed change and the maximum value is used. This measure is denoted as MaxBlkk for proposed change k and is formulated as
where Blkj is the blockiness score for block j. Here MaxBlkk is compared with the blockiness threshold to determine if the proposed change k could introduce visible artifacts.
Several of the implementations and features described in this application may be used in the context of the H.264/MPEG-4 AVC (AVC) standard. However, these implementations and features may be used in the context of another standard (existing or future), or in a context that does not involve a standard.
The embodiments described herein may be implemented in, for example, a method or process, an apparatus, a software program, a datastream, or a signal. Even if only discussed in the context of a single form of implementation such as a method, the implementation or features discussed may also be implemented in other forms such as an apparatus or program. An apparatus may be implemented in, for example, appropriate hardware, software, and firmware. The methods may be implemented in, for example, an apparatus such as, for example, a computer or other processing device. Additionally, the methods may be implemented by instructions being performed by a processing device or other apparatus, and such instructions may be stored on a computer readable medium such as, for example, a CD, or other computer readable storage device, or an integrated circuit. Further, a computer readable medium may store the data values produced by an implementation.
As should be evident to one of skill in the art, implementations may also produce a signal formatted to carry information that may be, for example, stored or transmitted. The information may include, for example, instructions for performing a method, or data produced by one of the described implementations. For example, a signal may be formatted to carry a watermarked stream, an unwatermarked stream, a fidelity measure, or other watermarking information.
While embodiments throughout the specification have focused on changes to video that are introduced to watermarking, this invention includes the application of the various combinations of features to proposed changes to video that are not necessarily watermarks.
Additionally, in some case the metrics and methods disclosed herein can be used to keep or select watermarks or changes because they will be visible to a human observer.
Additionally, many embodiments may be implemented in one or more of an encoder, a decoder, a post-processor processing output from a decoder, or a pre-processor providing input to an encoder. Further, other implementations are contemplated by this disclosure. For example, additional implementations may be created by combining, deleting, modifying, or supplementing various features of the disclosed implementations.
This patent application claims the benefit of and priority to U.S. Provisional Patent Application No. 61/189,586, filed Aug. 20, 2008, and titled “BLOCKINESS AND FIDELITY”. The provisional application is expressly incorporated herein by reference in its entirety for all purposes.
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/US2009/004752 | 8/20/2009 | WO | 00 | 2/15/2011 |
Number | Date | Country | |
---|---|---|---|
61189586 | Aug 2008 | US |