From 9663cec12d4d760b4740c20f228de4977da2c1c3 Mon Sep 17 00:00:00 2001 From: Matthias Bisping Date: Sun, 3 Apr 2022 01:54:51 +0200 Subject: [PATCH] coordinate transformer wip --- image_prediction/transformer/transformers/__init__.py | 0 .../transformer/transformers/coordinate/__init__.py | 0 .../transformer/transformers/coordinate/fpdf.py | 8 ++++++++ 3 files changed, 8 insertions(+) create mode 100644 image_prediction/transformer/transformers/__init__.py create mode 100644 image_prediction/transformer/transformers/coordinate/__init__.py create mode 100644 image_prediction/transformer/transformers/coordinate/fpdf.py diff --git a/image_prediction/transformer/transformers/__init__.py b/image_prediction/transformer/transformers/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/image_prediction/transformer/transformers/coordinate/__init__.py b/image_prediction/transformer/transformers/coordinate/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/image_prediction/transformer/transformers/coordinate/fpdf.py b/image_prediction/transformer/transformers/coordinate/fpdf.py new file mode 100644 index 0000000..64a13ff --- /dev/null +++ b/image_prediction/transformer/transformers/coordinate/fpdf.py @@ -0,0 +1,8 @@ +from image_prediction.transformer.transformer import Transformer + + +class FPDFCoordinateTransformer(Transformer): + + def transform(self, metadata: dict): + """FPDF uses top left corner as origin; we take this as the reference coordinate system.""" + return metadata