Giter Club home page Giter Club logo

imgprep's Introduction

imgprep

PLAESE NOTE: Development of this project is currently not active.

A small script to prepare the images of my microscopy for analysis.

Reasoning for the script

Many microscopy softwares can't crop images with the standard software. Neither can they put an automatic scale into the image by itself. When processing a huge amount of images, it can be tedious to edit every image by hand. Tis small python-script tries to do that automatically. Another benefit is learning the python image processing libraries their basic uses.

The script always treats one sample at a time. Multiple images can be associated to one sample. Draw red squares around your images beforehand. The software will recognize the square and crop the image to it. Also provide a csv file providing the magnification data (e.g. 63x magnification = 0.135mm screen width). The program will read it and use it to automatically add a scale to your images.

Please report any bugs / concerns / improvements.

Script-Progress

  • Initialization
    • Load the all images of the same object
    • Meta-data
      • Read image names and file-extensions
      • Read the magnification(x20 or x63) from the file-name
  • Alteration
    • Cropping
      • Recognize the red square around the object
        • Recognize a square of any color
      • Crop the image to the ROI
        • Crop to the insides of the square
        • Crop to squares with borders of variable width
    • Image-Arrangement
    • Scale-Bars
      • Calculate individual scale-bars for every sub-image
      • Calculate positions for scale-bars
      • Insert scale-bars
  • Saving
    • Saving the edited images
    • Save the finished arrangement of sample images into one file (.png)

TODO Priorities

  1. Revise code to shorten it and make it more intuitive
  • Rewrite saving methods (export saving from alignment method into regular saving)
  1. Remove white borders from matplotlib figures (add_scale and align methods)
  2. Change all hard-coding to be more flexible
  • Magnification table
  • Red square -> any square

imgprep's People

Contributors

dbxnr avatar erickenjilee avatar nagracks avatar nhoeche avatar

Watchers

 avatar  avatar

imgprep's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.