chord_counts#
- chord_counts(im)[source]#
Find the length of each chord in the supplied image
- Parameters:
im (ndarray) – An image containing chords drawn in the void space.
- Returns:
result – A 1D array with one element for each chord, containing its length.
- Return type:
1D-array
Notes
The returned array can be passed to
plt.hist
to plot the histogram, or tonp.histogram
to get the histogram data directly. Another useful function isnp.bincount
which gives the number of chords of each length in a format suitable forplt.plot
.Examples
Click here to view online example.