chord_counts

chord_counts(im)[source]

Finds the length of each chord in the supplied image and returns a list of their individual sizes

Parameters

im (ND-array) – 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.