https://github.com/seatonullberg/grains
Metallic and ceramic grain analysis made easy.
https://github.com/seatonullberg/grains
computer-vision materials-science opencv
Last synced: about 1 year ago
JSON representation
Metallic and ceramic grain analysis made easy.
- Host: GitHub
- URL: https://github.com/seatonullberg/grains
- Owner: seatonullberg
- License: mit
- Created: 2019-02-19T05:22:30.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-20T17:10:42.000Z (about 7 years ago)
- Last Synced: 2025-04-18T05:53:40.626Z (about 1 year ago)
- Topics: computer-vision, materials-science, opencv
- Language: Python
- Homepage:
- Size: 344 KB
- Stars: 5
- Watchers: 0
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](./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= --w=
### Input Image

### Centroids Image - Default Settings

### Area Histogram - Default Settings

### 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 ]}
}