This demonstrates how we can add custom analysis functions, complete with parameterisation (see the PixelflowLambda function, with the keyword argument n_terms).
In this case, I've added the Elliptic Fourier descriptor from the pyefd package.
Usage is like this:
from pixelflow.builtins.shape import efd
from pixelflow.core import pixelflow, PixelflowLambda
lambda_efd = PixelflowLambda(efd, n_terms=10)
features = pixelflow(
mask,
img,
features=("area", "perimeter", "major_axis_length", "centroid"),
custom=(lambda_efd,)
)
See #5 and #20
This demonstrates how we can add custom analysis functions, complete with parameterisation (see the
PixelflowLambda
function, with the keyword argumentn_terms
).In this case, I've added the Elliptic Fourier descriptor from the
pyefd
package.Usage is like this: