Image Preprocessing

Hugh FD Jackson edited this page Dec 19, 2017 · 2 revisions

After you've taken images of your fibre slides, they need to be preprocessed before feeding to the model.

Preprocessing steps

The preprocessing stage does three steps:

  1. re-orient the image so that it appears perfectly flat
  2. snip out the large black rectangular section
  3. convert the image to black-and-white, emphasising all pixels that are of a particular hue range - highlighting your fluorescent fibres.

Basic preprocessing

After converting your images into .tiff format:

$ source activate fluorescent-fibre-counting
$ python -m preprocess <directory containing your images> <directory you want to store preprocessed images in>

Calibrating hue ranges for your fibres

The default calibration expects green fluorescent fibres. If you have a different colour - or shade - you want to count, then use the --min-hue and --max-hue options for python -m preprocess. The hue values range from 0. to 1..

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.