Skip to main content

Python Image Displacement Identification.

Project description

pyidi

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

See the documentation for pyIDI.

BASIC USAGE:

Create an instance:

v = 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
v.set_points(points=p)

The method of identification has to be specified:

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

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

displacements = v.get_displacements()

Multiprocessing can also be used by passing the processes argument:

displacements = v.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.

Source Distribution

pyidi-0.24.tar.gz (30.2 kB view hashes)

Uploaded Source

Built Distribution

pyidi-0.24-py3-none-any.whl (42.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page