diff --git a/README.md b/README.md index f17e1f4524731e73b488cd89c6d6141b095e21f3..27091c63ea7e37a45a2dae7a51c4360111b2283f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ # iiif-image-manipulation Provide tools for colorization of black & white images and stitching of scanned -images of large maps in a IIIF setup. \ No newline at end of file +images of large maps in a IIIF setup. diff --git a/iiif_tools.py b/iiif_tools.py new file mode 100644 index 0000000000000000000000000000000000000000..306bf1c9ad599fbbc6c181aadcd23a265f2f029f --- /dev/null +++ b/iiif_tools.py @@ -0,0 +1,41 @@ +import cv2 +import numpy as np +import requests +from abc import ABC, abstractmethod + + +class IIIFAbstractManifest(ABC): + """ + An abstract class for handling IIIF manifests for further processing. + """ + def __init__(self, manifest_url): + self.manifest_url = manifest_url + super().__init__() + + @abstractmethod + def _load_single_image(self): + pass + + @abstractmethod + def _load_multiple_images(self): + pass + + @abstractmethod + def get_image(self): + pass + + @abstractmethod + def get_images(self): + pass + + @abstractmethod + def get_image_range(self): + pass + + +class IIIFColorizer(IIIFAbstractManifest): + pass + + +class IIIFImageStitcher(IIIFAbstractManifest): + pass diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..732cf12fa75a2765162e2f077d02e83e9a4cf243 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +opencv-python +numpy +requests \ No newline at end of file