Skip to main content

Correct scan drift distortion

Project description

Scan distortion correction

This package corrects scan distortion by using orthogonal pairs.

This is the Python translation from the code of Colin Ophus. The MATLAB code can be found here. It can also be found here. The implementation is based on his paper.

The translation from MATLAB to Python is finished, all SPmerge01linear, SPmerge02 and SPmerge03 are availabe to use. The usage is pretty much the same with MATLAB (see example.py or example.ipynb). The detail of the usage can be found in the original README or the original repository.

The MATLAB-to-Python translation provides a convenient interface where MATLAB is not available or Python is the preferred language in your analysis pipeline. The initial translation focuses on consistency between the MATLAB and Python version, after ensure the correctness then more changes will be made. A certain degree of parallelism is introduced in the Python version.

The tests compare output from Python to MATLAB version at different breakpoints, the MATLAB version comparing is in matlab_modified. Some modifications are made during the translation, mainly to address floating-point errors.

Installation

To install via pip:

pip install scanning_drift_corr

To install locally in editable mode, clone the repository and in the root directory run

pip install -e .

Usage

After installing, you can try to run example.py. This script illustrates basic usage of the Python interface.

A Jupyter notebook example.ipynb is also available.

TODO

  • refactoring of the codes (currently everything flying around)
  • handle rectangular image

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

scanning_drift_corr-1.0.0.tar.gz (36.0 kB view hashes)

Uploaded Source

Built Distribution

scanning_drift_corr-1.0.0-py3-none-any.whl (5.8 MB 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