Skip to main content

Provides a PIL based capture interface to multi-part tiffs, allowing them to be used more easily with OpenCV. This allows you to use OpenCV’s image and video processing capabilities with tiff stacks, a video form frequently encountered in scientific video as it is lossless and supports custom metadata.

Examples

A minimal example looks like this:

import tiffcapture as tc
import matplotlib.pyplot as plt
tiff = tc.opentiff(filename)
plt.imshow(tiff.read()[1])
plt.show()
tiff.release()

More real world usage looks like this:

import tiffcapture as tc
import cv2
tiff = tc.opentiff(filename) #open img
_, first_img = tiff.retrieve()
cv2.namedWindow('video')
for img in tiff:
    tempimg = cv2.absdiff(first_img, img) # bkgnd sub
    _, tempimg = cv2.threshold(tempimg, 5, 255,
        cv2.THRESH_BINARY) # convert to binary
    cv2.imshow('video', tempimg)
    cv2.waitKey(80)
cv2.destroyWindow('video')

Metadata

Release files for TiffCapture 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for TiffCapture 0.1.6
File Size Uploaded
TiffCapture-0.1.6.tar.gz 3.9 kB Details

Release files / TiffCapture-0.1.6.tar.gz

Download URL TiffCapture-0.1.6.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d7a33097536bff6ffedb1715b6a44ca78e0df5fae8535e24ddd7e918bf948425
BLAKE2b-256 checksum
How to use checksums
1bcc0ab217237c2d195a61e42635421bd8a8c83927526b950066ac4853a79f10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.6 This release

1 release file

0.1.5

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page