Skip to content

seatonullberg/grains

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grains

Summary

grains is a software package for tech savvy metallurgists and ceramists who are tired of counting grains by hand. The software reports information related to the size distribution of grains in a micrograph in both text and graphical formats. The goal of this project is to automate the process of grain analysis by applying modern computer vision algorithms.

Installation

grains can be installed easily through the terminal via:

$ pip install grains

To install grains from source for development:

$ git clone https://github.com/seatonullberg/grains.git
$ cd grains
$ pip install -r requirements.txt
$ pip install -e .

Usage

The following example showcases the basic functionality of grains as a software library. Please note that the image scale in this example is arbitrary as I have not yet found adequate validation data. Refer to the examples directory for the simple source code used to generate these results.

If you are more interested in using grains as a CLI, the results of this example can be replicated with the following command.

$ grains --h=<image height> --w=<image width> <path/to/image>

Input Image

alt text

Centroids Image - Default Settings

alt text

Area Histogram - Default Settings

alt text

Text Summarization - Default Settings

Automatically Generated by grains

Input filename: test_grains.jpg
Number of grains: 40
Grain area mean: 1631.55 um^2
Grain area variance: 1527136.86 um^2
Grain area standard deviation: 1235.77 um^2

Roadmap

  • Grain counter with OpenCV

  • Size distribution analysis

  • Calculate average grain size in accordance with ASTM E112

  • Wrap functionality into a simple CLI

  • Package for pip install

  • Validate performance and construct test cases

  • Make official release on Github

Citation

If you use this software in a publication please cite me using the following BibTeX format.

@Misc{,
    author = {R. Seaton Ullberg},
    title = {{grains}: Automatic Grain Analysis Tool},
    year = {2019--},
    url = "https://github.com/seatonullberg/grains",
    note = {[Online; accessed <today>]}
}

About

Metallic and ceramic grain analysis made easy.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages