Вы находитесь на странице: 1из 43

AKVIS Lab

..
2010

akvis.com

1.
Demosaicing Algorithm



()

demosaicing

1
G5 (G2 G4 G6 G8 )
2

1
1
R2 ( R1 R3 ) R4 ( R1 R7 )
2
2
1
1
B2 ( B1 B3 ) B4 ( B1 B7 )
2
2



()!

1.

E2G2 E4G4 E6G6 E8G8


G5
,
E2 E4 E6 E8

2.
( ) R/G B/G

E1
R5 G5

R
R
R
R1
E3 3 E7 7 E9 9
G1
G3
G7
G9
E1 E3 E7 E9

3.
R/G B/G G/R G/B

4.

Kimmel
(12 )

Raw-

-

( ,
, ..)

(JPG, TIF, BMP . .)

2. .
RGB.
RGB 24-
, :
, ,
.

HSL
Hue 0
360.
Saturation
0% 100%.
.

Lightness
0 100.

. .

(0,1,

SizeX 1) (0,1,

SizeY 1),

I : b3 ,
b [0,

, 255].

I ( I ).
I L( I ).

L( I )( p)

w(q, p) I (q),

w - () q p.

w( p, q) ( p q) :

I ( p q) I (q).
q


. Z-.
()

1
( FU )(k , l )
SizeX SizeY

SizeX 1 SizeY 1

U ( p )e

p x 0

p yl
p k
2 i x

SizeX SizeY

p y 0

U ( p)

SizeX 1 SizeY 1

F ( k , l )e
k 0

kp lp y
2 i x

M N

l 0

F ( U ) SizeX SizeY F ( ) F (U ).
z-

Z (U )( z1 , z2 )

SizeX 1 SizeY 1

U ( p) z z .

p x 0

p y 0

px

py

.
.
() ,
.

() ,
.

3.

I I U N ,

U ,
N .
- U.

:
- - , .
:
d2

2
1
(d )
e 2
2 d

d - , - ,

- - ,
,
- .

Box-
MN = 0. : MU = MI.

U ( p)

U (q) I (q)

,
1
1

qS ( p , r )

qS ( p , r )

qS ( p , r )

S ( p, r ) {q : p q r}
p.

qS ( p , r )

U ( p ) U ( p ), U ( p )

I (q)
.
1

qS ( p , r )

qS ( p , r )


Box-.

,
O(r2).

, O(r).
, O(1).
, O(1).

Box-

Box-, r=2

U ( p)

| p q|2
2 2

I (q)

qS ( p , r )

| p q|2

2
.
e 2

qS ( p , r )

p ( px , py ), q (qx , qy ),

| q p | ( qx px ) 2 ( q y p y ) 2 .

Box-
.

2 2 2 | |2
.
( ) e

, ,
.

, =1.8


3 2r+1


, O(r2).

,
O(r).
, O(log(r)).
,
O(1).

-:

1
e
2

t2
2 2

t
1

.
,
2
4
6

a0 a2 a4 a6

z-

F ( ) FL ( ) FR ( ),

A2
H L ( z ) GL (1 z )
,
1
2
3
b0 b1 z b2 z b3 z
A2
H R ( z ) GR ( z 1)
.
2
3
b0 b1 z b2 z b3 z
1

Vn BI n

1
1
(bV

b
V

b
V
),
U

BV

(bU
b2U n2 b3U n3 ).
1 n 1
2 n2
3 n 3
n
n
1
n 1
b0
b0

p
, U(p)

Bilateral-
Bilateral- :

U ( p)

| p q|2 | I ( p ) I ( q )|2

2 2
22

I (q )

qS ( p , r )

| p q|2 | I ( p ) I ( q )|2

2 2
22

qS ( p , r )

Bilateral

Bilateral

:
) .
) , O(r2).
Bilateral-
1)
.
2) , .
3) .
4) .

Region-
Region-
:

U ( p)

| p q|2
2 2

S ( p ,d ) S ( q ,d )

22

I (q)

qS ( p , r )

| p q|2
2 2

S ( p ,d ) S ( q ,d )

22

qS ( p , r )

S ( p, d ) S ( q, d ) I ( p u ) I ( q u ) .
2

uS ( 0,d )

!!!

Region

(TV)
U U
,
U

p
y
. x

| U ( p ) | dp min,

1
2
2
(
I
(
p
)

U
(
p
))
dp

||
| U ( p ) | dp

-
| U

( I ( p) U ( p)) 2 dp min.

(U J ) 0.


Neat Image

Neat Image

PhotoShop: Reduce Noise

Akvis.Noise Buster v. 7.0

Noise Buster

-
.
k
.

Nearest
.

.

: .
: ,

Original

Nearest

: .
:

H
(
p

q
)
U
(
q
).
h(t ) H

qS ( p ,r )
k
1, t 0.5,
: h(t )
0, t 0.5.

I ( p)


I k
U .
( X , Y ) U , ( x, y ) I ,

x
X 1,
k
y
0 y Y 1,
k

0 x

X X 1, Y Y 1.

I ( x, y ) (1 x)(1 y )U ( X , Y ) x(1 y )U ( X ,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