Giter VIP home page Giter VIP logo

particle-size-distribution-counter's Introduction

Particle-Size-Distribution-Counter

We developed the Nanoparticle Size Distribution Counter software. This tool is designed to simplify and expedite the analysis of multiple types of photos like Transmission Electron Microscopy (TEM) graphs, microscopy graphs ect., enabling researchers to obtain accurate and comprehensive statistical information about particle size distributions within a given sample.

Description

Our software uses Electron as the frontend frame and Python as the backend language. Its mechanism is based on OpenCV, including image processing algorithms and statistical modeling techniques. The main code can be divided by 4 steps:

  1. Extract a plotting scale from the scaled image (make sure the color is white).
  2. Balance the image's lightness for more accurate recognition.
  3. Apply algorithms for the image adjustment.
  4. Draw the coutours of the nanoparticles and collect the diameters

It is important to note that the accuracy of the results depends on the quality of the input graph. Therefore, it is recommended to ensure high-resolution and well-defined images for optimal analysis. Additionally, users have the option to customize various parameters.

Furthermore, when the object is very large (just one in the image), we can accurately measure its diameter (the scale should be black though). This code is Diameter-Measurement.py, simple but useful. And you can just enter the folder's name, this program will automatically process every image and export the data to output.xlsx

Installation

  • Install npm Download npm

  • Open cmd in the root dir:

    npm install electron

    npm install echart

    npm run start

    Relevant Doc: Building your First App

  • Packages for Python:

    import cv2

    import numpy

    import os

    import math

    import matplotlib.pyplot

    import sys

Usage

  1. Generate a TEM graph with a white plotting scale
example image
  1. After entering the app, you can choose the file's path and enter the min-radius, max-radius, scale and width of the distribution bars in the scale's unit. Then Click to process image!
example image
  1. Then the app will generate an image with nanoparticles contoured with green color and circled with red color.

    example image
    And it will generate a bar graph, providing users with a clear and intuitive visualization of the particle size distribution.
    example image

Contributing

This code is open to contributions.

Authors and acknowledgment

The inspiration of this script came from Shouyi Hu, and Haotian Shen brought it into codes.

particle-size-distribution-counter's People

Contributors

tesla-sht 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.