A Color Balancing Algorithm for Cameras - Stacks

Post on 18-Dec-2021

2 views 0 download

Transcript of A Color Balancing Algorithm for Cameras - Stacks

A Color Balancing Algorithm for CamerasA Color Balancing Algorithm for CamerasNoy CohenNoy Cohen

Department of Electrical Engineering, Stanford University

Background and Motivation Color Balancing in CamerasBackground and Motivation Color Balancing in Cameras

� The human visual system is largely color Color Balancing as Part of Color Balancing Algorithm Description� The human visual system is largely color

constant, however cameras are not

Color Balancing as Part of

the Camera’s ISP Pipeline� Two main correction methods

Γ RR' 00

Color Balancing Algorithm Description

Isolate pixel

candidates for gray

Extract unique

colors

Max/min

constraints

Luminance-

weighted

average

ΓΓΓ

ΓΓΓ

ΓΓΓ

=

Γ

Γ

Γ

=

B

G

R

B

G

R

B

G

R

B

G

R

BBBGBR

GBGGGR

RBRGRR

B

G

R

'

'

'

'

'

'

00

00

00 average

∑=

=K

1i

iiRGR

� Digital cameras use fast color balancing

� Demosaicing a non-balanced image

is sub-optimal

White illumination Blue illumination [0.4 0.6 1]

=

=

=

=

K

1i

ii

K

1i

2

i

1i

BGB

GG

[ ] [ ][ ]

BGRbgr =

� Digital cameras use fast color balancing

algorithms to estimate illumination

� Image segmentation, feature detection and � Proposed color balancing

140

140

140

140

140

140

140

140

140

140

80

80

80

80

80

80

80

80

80

80

80

80

80

80

80

56

84

56

84

56

56

84

56

84

56

48

80

48

80

48

48

80

48

80

48

48

80

48

80

48

Histogram of unique RGBs

� Parameterize

ellipsoid

[ ]{ }1102

2≤+∈= bApp Kε

[ ] [ ][ ]BGR

BGRbgr =

� Image segmentation, feature detection and

object recognition can benefit from

improved color accuracy

� Proposed color balancing

RAW

Processing

Blocks

Diagonal

Color

CorrectionSensor

Demosaicing

Linear

Color

Correction

RGB

Processing

Blocks

Illumination

Estimation

Neutral � Find A, b

� Extract points

[ ]{ }1102

≤+∈= bAppε

N1i 1subject to

detlogminimize

2

1

K=≤+

bAp

A

i

Related Work Experimental Results

improved color accuracy

Related Work Experimental Results� J. Van de Weijer, T. Gevers and A. Gijsenji, “Edge-Based Color Constancy,”

IEEE Trans. on Image Proc., vol. 16, no. 9, September 2007Mean Median Max Std Input image Ground truth Gray world

IEEE Trans. on Image Proc., vol. 16, no. 9, September 2007

� F. Ciurea and B. Funt, “A Large Image Database for Color Constancy

Research,” Proceedings of the IS&T Eleventh Color Imaging Conference,

pp. 160-164, Scottsdale, November 2003

Gray-world 7.3° 6.28° 42.63° 4.68°

Max-RGB 7.86° 6.22° 27.41° 6.69°

Shades of 6.67° 5.83° 35.66° 4.52°pp. 160-164, Scottsdale, November 2003

� G. Finlayson and E. Trezzi, “Shades of gray and colour constancy,” Proc.

IS&T/SID Twelfth Color Imaging Conference, pg. 37, 2004

� G. Finlayson, S. Hordley, and P. Hubel, “Color by correlation: A simple,

Shades of

gray

6.67° 5.83° 35.66° 4.52°

Gray-edge 6.27° 5.32° 34.02° 4.44°

Max-edge 8.39° 6.72° 36.32° 6.24° ⋅ll

Max-RGB Shades of gray Gray-edge

unifying framework for color constancy,” IEEE Trans. Pattern Anal. Machine

Intell., vol. 23, pp. 1209–1221, 2001

Finlayson et al, 2001Van de Weijer et al, 2007Ciurea et al, 2003

Max-edge 8.39° 6.72° 36.32° 6.24°

Color by

correlation

10.24° 7.86° 38.87° 9.03°

Proposed 5.5° 4.47° 30.51° 4.02°

⋅=

gt

gt1-

ll

llcosE

Finlayson et al, 2001Van de Weijer et al, 2007Ciurea et al, 2003 Proposed 5.5° 4.47° 30.51° 4.02°

� Improved performance Max-edge Color by correlation Proposed

� Complexity O(n)

� Average runtime 0.4 [ms]� Average runtime 0.4 [ms]