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 to np.histogram to get the histogram data directly. Another useful function is np.bincount which gives the number of chords of each length in a format suitable for plt.plot.

Examples

Click here to view online example.