Metadata-Version: 2.1
Name: PyFibreBundle
Version: 1.1.0
Summary: Image processing of images acquired through fibre imaging bundle, including core removal, mosaicing and super-resolution..
Author-email: Michael Hughes <m.r.hughes@kent.ac.uk>
License: MIT License
        
        Copyright (c) [2022] [Michael Hughes]
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Homepage, https://github.com/MikeHughesKent/PyFibreBundle/
Keywords: fibre,fiber,bundle,endomicroscopy,endoscopic microscopy,imaging
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy (>=1.22)
Requires-Dist: opencv-python (>=4.5)
Requires-Dist: Pillow (>=9)
Requires-Dist: scipy (>=1.7)
Provides-Extra: dev
Requires-Dist: matplotlib ; extra == 'dev'
Requires-Dist: numba ; extra == 'dev'

# PyFibreBundle
PyFibreBundle is a Python package for processing of images captured through optical fibre bundles. 
It is developed mainly by [Mike Hughes](https://research.kent.ac.uk/applied-optics/hughes) 
at the [Applied Optics Group](https://research.kent.ac.uk/applied-optics/), School of Physics and Astronomy, University of Kent. 
Bug reports, contributions and pull requests are welcome.

Full documentation is available [here](http://PyFibreBundle.readthedocs.io) and a summary of the current functionality is below.

The package was originally developed mostly for applications in endoscopic microscopy, including fluorescence endomicroscopy and 
holographic endomicroscopy, but there are also potential applications in endoscopy. 
The package is under active development, with stable releases published periodically.

The latest stable release can also be installed via pip:

```
pip install PyFibreBundle 
```

The package is designed to be fast enough for use in imaging GUIs as well as for offline research - frame rates of over 100 fps can be achieved on mid-level hardware, including core removal and mosaicing. The Numba just-in-time compiler is used to accelerate key portions of code (particularly triangular linear interpolation) and OpenCV is used for fast mosaicing. If the Numba package is not installed then PyFibreBundle falls back on Python interpreted code.

## Capabilities

### Core Functions  
* Locate bundle in image.
* Crop image to only show bundle.
* Mask areas outside of bundle.
* Gaussian spatial filtering to remove core pattern.
* Determine core spacing.
* Define and apply custom edge filter to remove core pattern.
* Find locations of all cores in bundle.
* Core removal using triangular linear interpolation following Delaunay triangulation. 

### Mosaicing
* Detect image to image shift using normalised cross correlation.
* Insert image into mosaic either using dead-leaf or alpha blending.
* Expand or scroll mosaic when the edge of the mosaic image is reached.

### Super Resolution
* Combine multiple shifted images to improve resolution.

Read the [full documentation](http://PyFibreBundle.readthedocs.io) for more details.

## Requirements

Required Packages:

* Numpy
* OpenCV
* Pillow
* Scipy

Optional Packages:

* Numba (for faster linear interpolation)
* Matplotlib (to run examples and tests)

## Acknowlegements
Cheng Yong Xin, Joseph, who contributed to triangular linear interpolation; Callum McCall who contributed to the super resolution component, Petros Giataganas who developed some of the Matlab code that parts of this library were ported from. 

Funding from EPSRC (Ultrathin fluorescence microscope in a needle, EP/R019274/1), Royal Society (Ultrathin Inline Holographic Microscopy) and University of Kent.
