schema_version: 0.1
type: filter
identifier: rotoscoping
title: Rotoscoping
copyright: Copyright (C) 2011 Till Theato
version: 0.3
license: GPL
language: en
url: none
creator: Till Theato <root@ttill.de>
tags:
  - Video
description: Keyframable vector based rotoscoping

bugs:
  - in some cases top most row in polygon is assigned to outside

parameters:
  - identifier: mode
    title: Mode
    type: string
    description: How to visualize the area described by the spline
    readonly: no
    required: no
    default: alpha
    mutable: yes
    widget: dropdown
    values:
      - alpha
      - luma
      - rgb

  - identifier: alpha_operation
    title: Alpha Operation 
    type: string
    description: |
      How to proceed with the current alpha mask (only if mode = alpha).
      clear = existing alpha mask is overwritten
      max = maximum: existing alpha mask, mask generated by this filter
      min = minimum: existing alpha mask, mask generated by this filter
      add = existing alpha mask + generated mask
      sub = existing alpha mask - generated mask
    readonly: no
    required: no
    default: clear
    mutable: yes
    widget: dropdown
    values:
      - clear
      - max
      - min
      - add
      - sub

  - identifier: invert
    title: Invert
    type: integer
    description: use area inside of spline (0) or the outside (1)
    readonly: no
    required: no
    minimum: 0
    maximum: 1
    default: 0
    mutable: yes
    widget: checkbox

  - identifier: feather
    title: Feather
    type: integer
    description: amount of feathering (radius of "average" blur applied on mask)
    readonly: no
    required: no
    minimum: 0
    maximum: 1000 # no real limit
    default: 0
    mutable: yes
    widget: spinner

  - identifier: feather_passes
    title: Feathering passes
    type: integer
    description: number of blur (feathering) passes
    readonly: no
    required: no
    minimum: 1
    maximum: 1000 # no real limit
    default: 1
    mutable: yes
    widget: spinner

  - identifier: spline
    title: Spline
    type: string
    description: >
      The spline, a list of cubic Bézier curves, is described using JSON.
      The most basic parts are the coordinate tuples: [x, y]; x,y will be mapped from the range 0-1 to the image dimensions.
      Next layer are the Bézier points: [handle 1, point, handle 2] with handle 1, point, handle 2 being coordinate tuples
      The spline is a list of Bézier points.
      Optionally keyframes can be defined as a object of frame values, relative to the filter's in point, assigned to splines.
    readonly: no
    required: yes
    mutable: yes
