• Aucun résultat trouvé

University of the PhilippinesAugust 2006Diane LingrandUniversity of Nice – Sophia Antipolis, France Quantification

N/A
N/A
Protected

Academic year: 2022

Partager "University of the PhilippinesAugust 2006Diane LingrandUniversity of Nice – Sophia Antipolis, France Quantification"

Copied!
23
0
0

Texte intégral

(1)

2006

Quantification

University of the Philippines August 2006

Diane Lingrand

University of Nice – Sophia Antipolis, France

lingrand@polytech.unice.fr

http://www.polytech.unice.fr/~lingrand

(2)

2006

Quantification

• Only discrete values are available

• Usually:

– grey levels: integers from 0 to 255

– color components: integers from 0 to 255

= 256 different values

(3)

2006

Information coding

• 1 bit values can be 0 or 1 : 2 different values (=21)

• 2 bits: 00, 01, 10, 11: 4 different values (=22)

• 3 bits: 000, 001, 010, 011, 100, 101, 110, 111:

8 different values (=23)

• ....

• 1 byte = 8 bits: 256 = 28 different values

to store integers from 0 to 255, we need 1 byte

• ...

• n bits: 2n different values

(4)

2006

Reducing the number of bits used ...

• ... will reduce the number of colors.

• How to choose the colors ?

255 255

0 f

g

(5)

2006 5

Principle

• decision level : di

• reconstruction level : rj

d0 d1 d2

dn­1 dn

min(f)=m r0 r1 rn­1 max(f)=M

di di+1 ri

f g

ri

if f(x,y) ∈ [di ; di+1[ then g(x,y)=ri

(6)

2006 6

Quantification error

• we want to minimize error between f and g

• values of g : samples of a random process with probability density p(f)

• hypothesis : probability density of each quantification level is constant : p(r

i

)

H

(7)

2006

Consequences of hypothesis

• Then :

H

and finally :

(8)

2006 8

How to decide the reconstruction levels ?

• we want to minimize error E with respect to ri – determination of ri

then :

(9)

2006 9

How to decide the reconstruction levels ?

with

[Panter et Dite]

(10)

2006 10

Uniform probability density :

• constant length quantification intervals

• centered quantification levels

0 255

255

k*

256/2n

(11)

2006 11

General case

• Hypothesis is not verified

• Recursive formulae

• Tables for uniform probability densities, gaussian, ...

H

(12)

2006 12

Grey levels quantification

• number of quantification levels: 2n where n is the number of bits

• 8 bits : 256 grey levels

• human visual capacity : 10 to 15 absolute grey levels. Many more in relative.

2 bits

1 bit 3 bits

(13)

2006 13

Colors quantification

• considering the components separately – number of bits may differ

• RGB seems to be the more appropriate

• ex: SVGA :

– (R, G, B) = (5 bits, 5 bits, 5 bits)

• on your computer ?

(14)

2006 14

8 bits , 256 grey levels

16 777 216 colors

(15)

2006 15

7 bits : 128 grey levels

2 097 142 colors

(16)

2006 16

6 bits : 64 grey levels

262 144 colors

(17)

2006 17

5 bits : 32 grey levels

37 768 colors

(18)

2006 18

4 bits : 16 grey levels

4 096 colors

(19)

2006 19

3 bits : 8 grey levels

512 colors

(20)

2006 20

2 bits : 4 grey levels

64 colors

(21)

2006 21

1 bit : 2 grey levels

8 colors

(22)

2006 22

4 bits.  logarithmic quantification

example : 

255 * log(x/10+1)/log(26.5)

(23)

2006

Bibliography

•“Digital Image Processing" par W. K. Pratt, John Wiley & Sons, inc., Third Edition, 2001

•"Digital Image Processing" par Gonzalez et Woods, Prentice Hall, Second Edition, 2002

•http://www.dai.ed.ac.uk/HIPR2/

•Books available on the web

http://homepages.inf.ed.ac.uk/rbf/CVonline/books.htm

•Computer Vision Online

http://www.dai.ed.ac.uk/CVonline/transf.htm

•Vetterli's talks (wavelets, ..)

http://lcavwww.epfl.ch/~vetterli/talks/index.html

Références

Documents relatifs

7 avec la méthode compterPairs qui renvoie le nombre d’entiers pairs contenu dans le fichier

Université de Nice-Sophia Antipolis POLYTECH.

Question sur 1 pt : Il faut d’abord compiler le programme Java en Java Byte Code à l’aide de la commande javac, puis on exécute le .class qui contient la méthode main à l’aide

On souhaite écrire une petite application graphique qui permet à l’utilisateur de dessiner deux points dans un carré, de les relier par une droite et d’afficher la distance entre

Écrivez la fonction lireReel qui lit sur l’entrée standard caractère à caractère (à l’aide de la fonction getchar() , à l’exclusion de toute autre fonction), un réel (positif

Au lieu de retirer, à chaque itération, 1 diviseur au dividende et d’incrémenter de 1 le quotient, le diviseur est multiplié successivement par 2 pour trouver son plus grand

qui prend en paramètre une chaîne de caractères, et qui remplace chaque chiffre par le caractère ’_’ dans celle-ci.. La fonction renvoie un pointeur sur le 1er caractère de

Il est nécessaire d’écrire un destructeur pour libérer explicitement la mémoire occupée par le tableau et les 3 points du triangle