-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfilter.py
More file actions
28 lines (22 loc) · 687 Bytes
/
filter.py
File metadata and controls
28 lines (22 loc) · 687 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import os
import sys
class Filter(object):
def __init__(self, args):
self._getVideoInfo(args)
def _getVideoInfo(self, args):
reader = args['reader']
self.width = reader.width
self.height = reader.height
self.numFrames = reader.numFrames
self.fps = reader.fps
self.inBatchSize = 1 #-1 -> undef
self.outBatchSize = 1 #-1 -> undef
def process(self, image, frameNumber):
return image
filters = {"": Filter, "identity": Filter}
class FilterArgumentError(Exception):
def __init__(self, text):
self.text = text
self.filter = "Identity"
def __str__(self):
return self.text