Prepare bedside ultrasounds for machine learning and image interpretation. Sonocrop isolates the dynamic component of an ultrasound movie and strips away the rest.
Requires python 3.7 or higher
Install with pip: pip3 install sonocrop --upgrade
Sonocrop runs from the command line:
Automatically crop away static borders
$ sonocrop crop inputscan.mp4 out.mp4 --thresh=0.1
Blackout static pixels
$ sonocrop mask inputscan.mp4 out.mp4
Extracts the edges around an ultrasound
Returns the distance in pixels in the form: left,right,top,bottom
$ sonocrop edges inputscan.mp4
$ > 100,500,10,700
Command | Input | Output |
---|---|---|
crop | ||
mask | ||
edges | 237,717,72,518 |