# Interface FilterConfig

Run input through image filters before inference

- available only in Browser environments
- image filters run with near-zero latency as they are executed on the GPU using WebGL

interface FilterConfig {
autoBrightness : boolean;
blur : number;
brightness : number;
contrast : number;
enabled : boolean;
equalization : boolean;
flip : boolean;
height : number;
hue : number;
kodachrome : boolean;
negative : boolean;
pixelate : number;
polaroid : boolean;
return : boolean;
saturation : number;
sepia : boolean;
sharpness : number;
technicolor : boolean;
vintage : boolean;
width : number;
}

- Defined in src/config.ts:175

##### Index

### Properties

autoBrightness
blur
brightness
contrast
enabled
equalization
flip
height
hue
kodachrome
negative
pixelate
polaroid
return
saturation
sepia
sharpness
technicolor
vintage
width

## Properties

### autoBrightness

autoBrightness: boolean

apply auto-brighness

- Defined in src/config.ts:199

### blur

blur: number

range: 0 (no blur) to N (blur radius in pixels)

- Defined in src/config.ts:207

### brightness

brightness: number

range: -1 (darken) to 1 (lighten)

- Defined in src/config.ts:201

### contrast

contrast: number

range: -1 (reduce contrast) to 1 (increase contrast)

- Defined in src/config.ts:203

### enabled

enabled: boolean

are image filters enabled?

- Defined in src/config.ts:177

### equalization

equalization: boolean

perform image histogram equalization

- equalization is performed on input as a whole and detected face before its passed for further analysis

- Defined in src/config.ts:181

### flip

flip: boolean

flip input as mirror image

- Defined in src/config.ts:197

### height

height: number

resize input height

- if both width and height are set to 0, there is no resizing
- if just one is set, second one is scaled automatically
- if both are set, values are used as-is

- Defined in src/config.ts:193

### hue

hue: number

range: 0 (no change) to 360 (hue rotation in degrees)

- Defined in src/config.ts:211

### kodachrome

kodachrome: boolean

image kodachrome colors

- Defined in src/config.ts:219

### negative

negative: boolean

image negative

- Defined in src/config.ts:213

### pixelate

pixelate: number

range: 0 (no pixelate) to N (number of pixels to pixelate)

- Defined in src/config.ts:225

### polaroid

polaroid: boolean

image polaroid camera effect

- Defined in src/config.ts:223

### return

return: boolean

return processed canvas imagedata in result

- Defined in src/config.ts:195

### saturation

saturation: number

range: -1 (reduce saturation) to 1 (increase saturation)

- Defined in src/config.ts:209

### sepia

sepia: boolean

image sepia colors

- Defined in src/config.ts:215

### sharpness

sharpness: number

range: 0 (no sharpening) to 1 (maximum sharpening)

- Defined in src/config.ts:205

### technicolor

technicolor: boolean

image technicolor colors

- Defined in src/config.ts:221

### vintage

vintage: boolean

image vintage colors

- Defined in src/config.ts:217

### width

width: number

resize input width

- if both width and height are set to 0, there is no resizing
- if just one is set, second one is scaled automatically
- if both are set, values are used as-is

- Defined in src/config.ts:187