Skip to content

Instantly share code, notes, and snippets.

View beniroquai's full-sized avatar

Benedict Diederich beniroquai

  • IPHT Leibniz Institute of Photonic Technology's
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<docs lang="markdown">
[TODO: write documentation for this plugin.]
</docs>
<config lang="json">
{
"name": "UC2-Streamer",
"type": "window",
"tags": [],
"ui": "",
from __future__ import print_function
import PIL.Image
import PIL.ExifTags
import sys
import os
def formatted_exif_data(image):
"""Retrieve an image's EXIF data and return as a dictionary with string keys"""
# with thanks to https://stackoverflow.com/questions/4764932/in-python-how-do-i-read-the-exif-data-for-an-image
exif_data = {}
import os
import re
import tifffile
# adjust to dataset:
input_dir = "PATH_TO_TIFFS"
pixel_size = 0.225
maximum_shift_microns = 50