Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Udayraj123
GitHub Repository: Udayraj123/OMRChecker
Path: blob/master/src/processors/interfaces/ImagePreprocessor.py
214 views
1
# Use all imports relative to root directory
2
from src.processors.manager import Processor
3
4
5
class ImagePreprocessor(Processor):
6
"""Base class for an extension that applies some preprocessing to the input image"""
7
8
def __init__(self, *args, **kwargs):
9
super().__init__(*args, **kwargs)
10
11
def apply_filter(self, image, filename):
12
"""Apply filter to the image and returns modified image"""
13
raise NotImplementedError
14
15
@staticmethod
16
def exclude_files():
17
"""Returns a list of file paths that should be excluded from processing"""
18
return []
19
20