In [ ]:
from raspberry_pi.grain_counter import (
    GrainCounter,
    StrawCounter,
    BeanCounter,
    QuinoaCounter,
    LentilCounter,
    RockCounter,
)

In [ ]:
path = '/hackzurich2017/raw_data/dirt/20170916-112853.jpg'

In [ ]:
gc = GrainCounter()
gc.count(path)

In [ ]:
plt = gc.threshold_plot(show_markers=True, marker_size=3)
plt.show()

In [ ]:
plt = gc.image_with_markers(marker_size=3)
plt.show()

In [ ]:
sc = StrawCounter()
sc.count(path)

In [ ]:
plt = sc.threshold_plot(show_markers=True)
plt.show()

In [ ]:
plt = sc.image_with_markers()
plt.show()

In [ ]:
sc.get_coords()

In [ ]:
bc = BeanCounter()
bc.count(path)

In [ ]:
plt = bc.threshold_plot(show_markers=True, marker_size=2)
plt.show()

In [ ]:
plt = bc.threshold_plot(show_markers=True)
plt.show()

In [ ]:
plt = bc.image_with_markers()
plt.show()

In [ ]:
qc = QuinoaCounter()
qc.count(path)

In [ ]:
plt = qc.threshold_plot(show_markers=True)
plt.show()

In [ ]:
plt = qc.image_with_markers(marker_size=3)
plt.show()

In [ ]:
lc = LentilCounter()
lc.count(path)

In [ ]:
plt = lc.threshold_plot(show_markers=True)
plt.show()

In [ ]:
plt = lc.image_with_markers(marker_size=4)
plt.show()

In [ ]:
rc = RockCounter()
rc.params.minDistBetweenBlobs = 0
rc.count(path, min_area=300, min_circularity=0.1)

In [ ]:
plt = rc.threshold_plot(show_markers=True)
plt.show()

In [ ]:
plt = rc.image_with_markers()
plt.show()

In [ ]: