Escolar Documentos
Profissional Documentos
Cultura Documentos
This work is licensed under the Creative Commons Attribution-Noncommercial 2.5 License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc/2.5/ or send a letter to Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA.
Pixelization
Pixelization
or to clean up an image.
19 October 2011 1999-2011 by Richard Alan Peters II 3
high-res image
pixelated
quantized
19 October 2011
row index
high-res image
pixelated
quantized
19 October 2011
Pixelization
I ( r , c)
high-res image
I P (r , c)
1 (r+1)D-1 (c+1)D-1 I DS (r , c) = 2 I (r , c); I P = I DS D D r=rD c=cD (upsampled)
1999-2011 by Richard Alan Peters II
pixelated image
19 October 2011
Pixelization
I ( r , c)
high-res image
I P (r , c)
1 (r+1)D-1 (c+1)D-1 I DS (r , c) = 2 I (r , c); I P = I DS D D r=rD c=cD (upsampled)
1999-2011 by Richard Alan Peters II
pixelated image
19 October 2011
Pixelization
I ( r , c)
high-res image
I P (r , c)
1 (r+1)D-1 (c+1)D-1 I DS (r , c) = 2 I (r , c); I P = I DS D D r=rD c=cD (upsampled)
1999-2011 by Richard Alan Peters II
pixelated image
19 October 2011
Pixelization
I ( r , c)
high-res image
I P (r , c)
1 (r+1)D-1 (c+1)D-1 I DS (r , c) = 2 I (r , c); I P = I DS D D r=rD c=cD (upsampled)
1999-2011 by Richard Alan Peters II
pixelated image
19 October 2011
where
{rs, rs + 1, , (r + 1) s 1}, NI (r , c ) = ( , ) . { ( ) } cs, cs + 1, , c + 1 s 1 Notation: r & c are indices in the downsampled image. IDS = I s
rs & cs are indices in the original image.
10
where
r & c are indices in the downsampled image. rs & cs are indices in the upsampled image.
11
Pixelization
8 of 8: 256x256
19 October 2011
12
Pixelization
7 of 8: 128x128
19 October 2011
13
Pixelization
6 of 8: 64x64
19 October 2011
14
Pixelization
5 of 8: 32x32
19 October 2011
15
Pixelization
4 of 8: 16x16
19 October 2011
16
Pixelization
3 of 8: 8x8
19 October 2011
17
Pixelization
2 of 8: 4x4
19 October 2011
18
Pixelization
1 of 8: 2x2
19 October 2011
19
Pixelization
original image
19 October 2011
20
Pixelization by Factor 32
Cross-fade 1/5
19 October 2011
21
Pixelization by Factor 32
Cross-fade 2/5
19 October 2011
22
Pixelization by Factor 32
Cross-fade 3/5
19 October 2011
23
Pixelization by Factor 32
Cross-fade 4/5
19 October 2011
24
Pixelization by Factor 32
Cross-fade 5/5
19 October 2011
25
Pixelization by Factor 32
original image
19 October 2011
26
Quantization
16 million colors
19 October 2011
16 colors
27
Quantization
6 bits 64 levels
5 bits 32 levels
4 bits 16 levels
19 October 2011
3 bits 8 levels
2 bits 4 levels
1 bit 2 levels
28
Intensity Quantization
19 October 2011
29
Intensity Quantization
Usually with 2-bit quantization, the output intensities are mapped to {0,85,170,255}, and with with 1-bit quantization, the output intensities are taken to be {0,255}.
19 October 2011
30
a. original
19 October 2011
b. contrast enh.
b. dark enhanced
b. bright enh.
31
a. original
19 October 2011
b. contrast enh.
b. dark enhanced
b. bright enh.
32
d. bright enh.
d. bright enh.
c. dark enh.
c. dark enh.
b. contrast enh.
b. contrast enh.
a. original
a. original
19 October 2011
33
19 October 2011
34
enhanced 8-bit
19 October 2011
enhanced 16-bit
35
enhanced 16-bit
19 October 2011
enhanced 8-bit
36
8-bit enhanced
original
19 October 2011
37
19 October 2011
38
If an image is quantized, say from 8 bits to 6 bits and redisplayed it can be all but impossible to tell the difference visually between the two.
19 October 2011 1999-2011 by Richard Alan Peters II 39
If an image is quantized, say from 8 bits to 6 bits and redisplayed it can be all but impossible to tell the difference visually between the two.
19 October 2011 1999-2011 by Richard Alan Peters II 40
With simple image analysis, it is easy to tell the difference: The histograms of the two versions indicate which is which. If the 6-bit version is displayed as an 8-bit image it has only pixels with values 0, 4, 8, , 252.
19 October 2011 1999-2011 by Richard Alan Peters II 41
That other information could be a message, perhaps encrypted, or even another image.
Image 1 R-Shift 2 L-Shift 2
logical
OR
Image 2 R-Shift 6
b = 0 or 1
always 0
This introduces the possibility of encoding other information in the low-order bits.
19 October 2011
Image Out
The second image is invisible because the value of each pixel is between 0 and 3. For any given pixel, its value is added to the to the collocated pixel in the first image that has a value from the set {0, 4, 8, , 252}. The 2nd image is noise on the 1st.
19 October 2011 1999-2011 by Richard Alan Peters II 43
L-Shift 6
?
To recover the second image (which is 2 bits per pixel per band) simply left shift the combined image by 6 bits.
19 October 2011 1999-2011 by Richard Alan Peters II
44
image
L-Shift 6
To recover the second image (which is 2 bits per pixel per band) simply left shift the combined image by 6 bits.
19 October 2011 1999-2011 by Richard Alan Peters II 45
Image 2 R-Shift 4
Image Out
19 October 2011
46
Original Image
19 October 2011
47
19 October 2011
48
19 October 2011
49
Phototographer Unknown
19 October 2011
50
Quant(q)
19 October 2011
53
8 bits
19 October 2011
4 bits
1999-2011 by Richard Alan Peters II
4 bits + noise
54
8 bits
19 October 2011
3 bits
1999-2011 by Richard Alan Peters II
3 bits + noise
55
8 bits
19 October 2011
2 bits
1999-2011 by Richard Alan Peters II
2 bits + noise
56
8 bits
19 October 2011
1 bit
1999-2011 by Richard Alan Peters II
1 bit + noise
57