# Summary

grains is a software package for the tens of tech savy metallurgists and ceramists out there who are tired of counting grains by hand. The goal of this project is to accelerate the process of grain analysis by applying modern computer vision algorithms. This package does not yet have a stable release. 

# Example

This example showcases the basic functionality of the grains software library. Please note that the scale in this example is ARBITRARY as I have not yet found adequate validation images. Refer to the [examples](./examples) directory for the simple source code used to generate these results. 

### Input Image

<img src=./examples/test_grains.jpg width=300>

### Centroids Image - Default Settings

<img src=./examples/test_grains.centroids.png width=300>

### Area Histogram - Default Settings

<img src=./examples/test_grains.histogram.png width=450>

### 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~~

- Validate performance against relevant literature

- Wrap functionality into a simple CLI

- Package for pip install
