Note
Click here to download the full example code
Geometric Operations#
Sound events are naturally spatial object defined by their location in both time and frequency. The soundevent's geometry module provides tools to manipulate the geometry of the sound events, facilitating the analysis of acoustic data.
Usage details
To use the soundevent.geometry
module you need to install some
additional dependencies. You can do this by running the following
command:
Understanding Geometric Operations#
Geometric operations provide essential tools to conduct sound event analysis:
- Buffering: Expand sound event boundaries, accommodating uncertainties inherent in annotations.
- Clipping: Remove unwanted sections.
- Spatial Relationships: Determine overlaps, containment, and distances between sound events, aiding in comparative analysis.
Here we will explore the geometric operations that can be applied to sound events and how they can be used to analyze and compare sound events.
from soundevent import data, geometry
geom = data.Polygon(coordinates=[[[1, 2], [4, 3], [5, 6], [1, 2]]])
geom
Datasets#
Total running time of the script: ( 0 minutes 0.328 seconds) Estimated memory usage: 27 MB
Download Python source code: 4_geometric_operations.py