Skip to main content

Python Image Displacement Identification.

Project description

pyidi

Image-based Displacement Identification (IDI) implementation in python.

See the documentation for pyIDI.

Use Napari UI for quick displacement identification:

BASIC USAGE:

Create an instance:

video = pyidi.pyIDI(cih_file='video.cih')

Currently the pyIDI method works with Photron .cih and .cihx files, however, numpy.ndarray can also be passed as cih_file argument. If an array is passed, it must have a shape of: (n time points, image height, image width).

Set the points where displacements will be determined:

p = np.array([[0, 1], [1, 1], [2, 1]]) # example of points
video.set_points(points=p)

Or use point selection UI to set individual points or grid inside selected area. For more information about UI see documentation. Launch viewer with:

video.gui()

The method of identification has to be specified:

video.set_method(method='sof', **method_kwargs)

After points are set, displacements can be calculated (using method, set in set_method):

displacements = video.get_displacements()

Multiprocessing can also be used by passing the processes argument:

displacements = video.get_displacements(processes=4)

DEVELOPER GUIDELINES:

  • Add _name_of_method.py with class that inherits after IDIMethods
  • This class must have methods:
    • calculate_displacements with attribute displacements
    • get_points (static method - sets attribute video.points)
  • In pyIDI add a new method of identification in avaliable_methods dictionary.

DOI Build Status

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pyidi, version 0.25
Filename, size File type Python version Upload date Hashes
Filename, size pyidi-0.25-py3-none-any.whl (48.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size pyidi-0.25.tar.gz (35.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page