This is the source code repository for the project "Sound Visualization with an Acoustic Camera", my Mechanical Engineering undergraduate thesis at USFQ (Ecuador).
The thesis explains the process of building an acoustic camera, from the design of the microphone array to the integration of the required software layers.
A National Instruments data acquisition card and LabView were used to record the signals of an array of 16 condenser microphones simultaneously, while the open source library Acoular was used to process the signals, applying beamforming techniques.
The result was a prototype of an acoustic camera capable of distinguishing and characterizing static sound sources in a frequency range from 2.8 kHz up to 6 kHz.
-
The acoular library (version 19)
Make sure you go through their
Installation
andGetting Started
sections to verify your installation is correct.After going through the installation described here, you should be able to open the Anaconda prompt, type
python
to open the python interpreter, paste the following commands:import acoular acoular.demo.acoular_demo.run()
and you should get this result:
- LabView 2017 SP1
- Note: uncheck the VI Package Manager 2017 option. You will be installing the latest version directly from their website, which works better.
- VI Package Manager (VIPM)
- Note: after installing, hit the button that looks like a "refresh" icon to update the package repository so VIPM will work correctly.
It is recommended to install these packages with VIPM, in this exact order:
At this point, your installed package listing should contain at least all these:
These ones are installed from outside VIPM:
- HDFView to inspect HDF5 files of your audio recordings and their metadata.
-
Note: If the program fails to launch, try the solution mentioned here.
To make the HDFViewApp-3.1.2 work on Windows 10 (64 bits), they ask you to download and paste the
hdfview.bat
file here:Then the app can be opened by double clicking on that
hdfview.bat
file.
-
To test your environment, an example measurement is provided. This includes an image and a white-noise recording in an hdf5 file.
-
Open the project
development_version/Beamforming_0_0_1.lvproj
. In there open the VI calledBeamformerGUI_GivenFreqs.vi
and execute it. -
Switch from the
Measurement
tab to theProcessing
tab.-
The Python server should be started in the background, give it some time. When the VI is ready to perform an analysis, it looks like this:
-
By default, the VI already searches for the microphone geometry file
16_mics_geom.xml
in thedevelopment_version/xml
folder. If you ever need to include another microphone geometry file, that is the place to add it. -
For the
Audio Data File (HDF5)
option, make sure it points to:development_version/experiments/example_1.h5
(should be done by default too, but please double check).
-
Tip: read the Final Report for information about best-performing parameters.
-
In the
Measurements
tab, you can use thePreview Signals
button to check the status of the microphones: -
Select the camera device.
-
Focus the camera to the desired object/scenario to analyze.
-
Select the data directory.
-
Input a name for the experiment (will be used both for the audio recording and the image).
-
Input the distance in [m] from the array to the sound source.
-
Input a sampling time and a sampling frequency.
- Note: Take into account that the hardware has its sampling rate limitations. Also, theoretically the sampling frequency has to be at least twice the maximum frequency in the signal you wish to analyze (see Nyquist Theorem / Recommended Video).
-
Click record and wait.
-
After recording, the GUI should look like this:
-
Switch to the
Processing
tab. It will already be pointing to the newly created data file. There you canInspect
the signal orRun Analysis
immediately, like in the previous section. -
The
Lower
andHigher
parameters determine the beggining and start of the frequency range to be taken into account for the actual acoustic map.
-
The VI measurement feature cannot be performed without the Data Acquisition board already connected and configured.
-
There might be setup and or additional driver installation required when connecting the Data Acquisition board.
Locate this section of the
BeamformerGUI_GivenFreqs.vi
block diagram and open theDAQ Assistant
to configure your hardware: -
The calibration file location is currently
/development_version/xml/ECM8000_07_09_19_01.xml
and this is hard-coded in thedevelopment_version/py/beamforming.py
file. Take this into account if you need to provide a different file. -
Take note of the
Acoular Cache Path
in theMeasurement
tab. Acoular saves previous results there to optimize performance but you might need to manually clear the contents of that folder if you want to analyze new measurements with a same filename you used previously.