Git Product home page Git Product logo

tiffcapture's Introduction

tiffcapture

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')

tiffcapture's People

Contributors

cdw avatar

Stargazers

Daniel Nilsson avatar Griff avatar Joe Hu  avatar Marcel Goldschen-Ohm avatar Daniel Maturana avatar

Watchers

 avatar James Cloos avatar Linus Schumacher avatar Marcel Goldschen-Ohm avatar

tiffcapture's Issues

ImportError: cannot import name 'opentiff'

line 4, in
from tiffcapture import opentiff
ImportError: cannot import name 'opentiff'

I'm facing this error while trying to execute the example on the site. Please help me out!

Can you please update the PYPI version?

Hello cdw,

I noticed that your nice library is only 0.1.3 on pypi even when it's listed as 0.1.4. That version was working well with python3 but your current 0.1.5 version does. Would you mind updating your library on PyPI to 0.1.5 too? Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.