Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Hierarchy

  • FilterConfig

Index

Properties

blur

blur: number

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

brightness

brightness: number

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

contrast

contrast: number

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

enabled

enabled: boolean

are image filters enabled?

equalization

equalization: boolean

perform image histogram equalization

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

flip

flip: boolean

flip input as mirror image

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

hue

hue: number

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

kodachrome

kodachrome: boolean

image kodachrome colors

negative

negative: boolean

image negative

pixelate

pixelate: number

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

polaroid

polaroid: boolean

image polaroid camera effect

return

return: boolean

return processed canvas imagedata in result

saturation

saturation: number

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

sepia

sepia: boolean

image sepia colors

sharpness

sharpness: number

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

technicolor

technicolor: boolean

image technicolor colors

vintage

vintage: boolean

image vintage colors

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