Giter VIP home page Giter VIP logo

micromorph's Introduction

MicroMorph

MicroMorph: The Microplastic Shape and Size Analyzer

Fibers and Numbers (FAN)

FAN calculates the shape morphology and size of objects from the particle map provided by sIMPle (https://simple-plastics.eu/). It provides a graphical interface to inspect particles and their respective shape characteristics. The program calculates the following size and shape descriptors:

Size:

  • Area, perimeter, minor dimension, major dimension, perimeter, and maximum and minimum Feret diameter

Shape:

  • Convexity, convex area, solidity, equivalent circle diameter, circularity, compactness, aspect ratio, Feret ratio, fiber length, fiber curl, average fiber diameter, fiber elongation

FAN is written in C-idiomatic style C++ code with little use of C++ features (pretty much just std::vector). Any external libraries are statically linked and the only dependencies are the Microsoft runtime distributables and OpenGL libraries.

Usage

Run FAN.exe. An unfinished documentation is avaialble in the "documentation.odf" with an explanation of the most critical features.

Algorithms

FAN includes a number of algorithms to calculate the size and shape of Microplastic particles, including:

  • Contour tracer
  • Particle filling
  • Convex hull
  • Feret's diameter
  • Zhang-suen thinning
  • Skeletonazition
  • Breadth-first search, and more.

The most interesting algorithms are explained below.

Contour tracing

First, it transverses through the array row wise and assigns the first pixel it encounters as the starting pixel of the boundary (b). Then the algorithm travels through the array in the Moore Neighbourhood until the starting pixel is reached again, see Fig. 1. The algorithm ONLY works for closed boundaries!

Algorithm:

  1. Find the first non-zero pixel travelling row wise.
  2. Set that index as the starting point as S.
  3. Set the current index as p and add this to the boundary pixel list.
  4. Set the previous index visited from p as b (backtraced pixel).
  5. Go through the Moore Neighbourhood (3 * 3 pixels around p) starting from b and look for the first non-zero pixel in a clockwise rotation around p.
  6. Repeat steps 3 to 5 until p is equal to S.

Figure 1: How the algorithm transverses through the particle pixel map and the resulting pixel boundary.

micromorph's People

Contributors

rvn91 avatar

Stargazers

 avatar

Watchers

 avatar

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.