From d5fb47ba1e9f8a0c540ce81036058ce76acec6ed Mon Sep 17 00:00:00 2001 From: Christoph Steindl Date: Wed, 7 Apr 2021 11:58:26 +0200 Subject: [PATCH] Add example for continuous images in manifest --- Image_Stitching_IIIF.ipynb | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/Image_Stitching_IIIF.ipynb b/Image_Stitching_IIIF.ipynb index 4c27bce..c519293 100644 --- a/Image_Stitching_IIIF.ipynb +++ b/Image_Stitching_IIIF.ipynb @@ -102,6 +102,37 @@ "cv.imwrite('stitching/imgs_out/iiif_09_14.jpg', stitched_image)\n", "display(Image(filename='stitching/imgs_out/iiif_09_14.jpg', width=2000))" ] + }, + { + "source": [ + "# Beispiel mit fortlaufenden Bildern eines Manifests" + ], + "cell_type": "markdown", + "metadata": {} + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "imgs = [i for i in e.get_images()]\n", + "\n", + "for i in range(5, len(imgs)):\n", + " try:\n", + " stitched_image = e.stitch_images([i, i+1], quality=25)\n", + " cv.imwrite(f\"stitching/imgs_out/iiif_{i}_{i+1}.jpg\", stitched_image)\n", + " except:\n", + " print(f\"No match found for images {i} and {i+1}\")\n", + " continue" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ] } \ No newline at end of file -- GitLab