This document proposes a semi-fragile watermarking method for image authentication using local binary patterns (LBP). It first describes how LBP works by comparing pixel values in a neighborhood to a central pixel and encoding the results as a binary number. It then explains how the proposed method embeds a watermark by modifying this binary number based on a watermark bit and extracting the watermark by recalculating the binary number. Specifically, it selects the pixel with the minimum magnitude difference to slightly modify in order to embed the watermark with minimal image quality impact. The watermark can then be extracted to detect any tampering of pixels in the local neighborhood. This semi-fragile watermarking using LBP has applications in image
2. LOCAL BINARY PATTERN
Local binary patterns (LBP) is a type of visual
descriptor used for classification in computer vision.
LBP is the particular case of the Texture Spectrum
model proposed in 1990.
LBP was first described in 1994. It has since been
found to be a powerful feature for texture
classification.
We convert Bitmap image into Gray level image
and apply LBP
3.
4. LOCAL BINARY PATTERN
LBP indicating local contrast in neighborhood
Gc = gray level of center pixel c in P neighborhood
Gp = Gray level of neighboring pixels p
S(x) is referred as sign function
Binary Threshold function:
0 1 0
1 Gc 0
0 0 1
5. LOCAL BINARY PATTERN
1- Divide the examined window into cells (e.g. 3x3 pixels for
each cell).
2- For each pixel in a cell, compare the pixel to each of its 8
neighbors (on its left-top, left-middle, left-bottom, right-top,
etc.). Follow the pixels along a circle, i.e. clockwise or
counter-clockwise.
3- Where the center pixel's value is greater than the
neighbor's value, write "1". Otherwise, write "0". This gives an
8-digit binary number (which is usually converted to decimal
for convenience).
4- Compute the histogram, over the cell, of the frequency of
each "number" occurring (i.e., each combination of which
pixels are smaller and which are greater than the center).
5- Optionally normalize the histogram.
6- Concatenate (normalized) histograms of all cells. This gives
the feature vector for the window
6. Component-
wise
multiplication
COMPUTATION OF LOCAL BINARY PATTERN
1 2 4
12
8
8
64 32 16
0 2 0
12
8
? 0
0 0 16
0 1 0
1 Gc 0
0 0 1
3 7 2
8 4 1
2 3 5
∑ 146
Neighborhood
of a gray-scale
image
Binary code for > Gc
Representatio
n
Sum
LBP
Example of how the LBP operator works
top
8. WATERMARK EMBEDING
Defination on a(P,R) local region
Let gc is gray level of cnter pixel, gp is gray level of
neighbouring pixel.
The equation are as under:
9. WATERMARKING EMBEDING
Here we devide the region in three part
gp is vector composed of P pixel and R radius.
mp is magnitude obtained from between the p pixel
and center pixel gc
sp is sign vector from the difference
10. SPATIAL WATERMARKING ON LBP OPERATOR
Here a(P,R) = a(8,1) local region is given
g8 is pixel vector
m8 is magnitude vector
s8 is sign vector
11. Here Boolean function is is applied on binary sign
vector part Sp.
Here two type of Boolean function is defined as
Eq 6 Exor is used.
12.
13. WATERMARK EMBEDING
We embed the watermarks by changing the value
of f(sp) in a local region. The value of f(sp)is
changed by altering the bits in sp.
These changes are reflected by modification of
pixels in the spatial local region.
For instance, when using Boolean function f⊕(sp) in
a (P, R) neighborhood, we select a pixel with the
minimal magnitude in mp to alter for embedding the
watermark, so that the quality of the original image
block will be affected the least. In other words, we
keep the value of f⊕(sp) to be consistent with the
corresponding bit of watermarks.
15. WATERMARK EMBEDING STEP
In Short
If (f⊕(𝐬 𝐩)== w)
we do nothing to the pixels in the neighborhood
Else {𝐦𝐢=min(𝐦 𝐩)
if (𝐬 𝐩==1)
𝐠𝐢 = (𝐠𝐢 − 𝑚𝑖) × (1 − 𝛽)
if (𝐬 𝐩==0)
𝐠𝐢 = (𝐠𝐢 + 𝑚𝑖) × (1 + 𝛽)}
end
16. 3 7 2
8 4 1
2 3 5
1 3 2
4 Mp 3
2 1 1
0 0 0
1 Sp 0
0 0 0
F ⊕(Sp)=0 ⊕ 0 ⊕ 0 ⊕ 0 ⊕ 0 ⊕ 0 ⊕ 0 ⊕ 1 = 1
F (Sp)=Bool(1(Sp) – 0(Sp) ) > N
Here 1(Sp) =1 & 0(Sp) =7, N = 8-1=7
F(Sp) = 0
Now W=1 & β =0.08
Compare F ⊕(Sp) & w
Here F ⊕(Sp) =0 & w=1
m1 = 3 & s1 = 0
m1= (g1+m1) x (1+0.08) =(5+1)x(1.08)=6.48
19. USAGES
Tamper Detection
Image authentication
Used to detect malignant transformations
Protect the integrity and authenticity of the digital
images