Wednesday, 19 March 2014

OpenCV 2.4.7 installation on ubuntu.

 http://opencv.org/downloads.html(You can download the newest version of opencv)

To install OpenCV using the terminal on Ubuntu, you will need some dependencies packages first

$ su -

if your password is not validated then use the command

$ sudo -s

before installing any software its preferred to update using apt-get.


# apt-get update

dependencies packages for OpenCV are like


# apt-get install build-essential libavformat-dev x264 v4l-utils ffmpeg libcv2.3 libcvaux2.3 libhighgui2.3 python-opencv opencv-doc libcv-dev libcvaux-dev libhighgui-dev libgtk2.0-dev libjpeg-dev libtiff4-dev libjasper-dev libopenexr-dev cmake python-dev python-numpy python-tk libtbb-dev libeigen2-dev yasm libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev libx264-dev libqt4-dev libqt4-opengl-dev sphinx-common texlive-latex-extra libv4l-dev libdc1394-22-dev libavcodec-dev libavformat-dev libswscale-dev

OpenCV should be installed in the given path of the  Directory


Download Opencv and untar the package we downloaded


$ wget http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.7/opencv-2.4.7.tar.gz/download
$ tar -xzvf opencv-2.4.7.tar.gz
$ cd opencv-2.4.7

Now you will need root privileges to compile and install opencv

# mkdir build
# cd build
# cmake -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON ..
# make
# make install

You may also want to compile and view examples,to view that and to practice you can refer in the path
 /usr/share/doc/opencv-doc/examples .

so now you can work with opencv ;)

Sound Source Localization engineering project

Abstract
The purpose of this project will be to create an auditory system analogous to a pair of
human ears.
In animal auditory systems, the method of determining the location of a sound source
is the Interaural Time Difference (ITD) cue in the auditory cortex of the brain. The ITD
is the time difference between the arrival of the signal at the first ear, and the arrival of
the signal at the second ear. Consequently, this results in an Interaural Phase Difference
(IPD) between the signals at each ear. Assuming the origin of the sound is a point source,
the intensity at some distance R from the source can be determined as
I =
P
πR2
where clearly, we can see that,
I ∝
1
πR2
Since the microphones will be at different radial distances from the sound source, there
should then be distinct level differences between both signals. For this particular project,
the operation of the device can be described as sound source localization. This shall be
accomplished by an arrangement of two microphones placed equal distances from a pivot
point rotated by a servo motor, which we can refer to as the origin. A sound source, placed
some distance in front of the device, will emit a continuous audio signal that can be picked
up by the microphones. When the audio signals reaches a predetermined trigger voltage
(b/w 2.5-5V) at either microphone, then data accumulation begins for both microphone
channels simultaneously. To ensure a precise output we require the time between the
collection of each data point to be sufficiently small (∼10 s). This will allow for more
reliable waveform analysis, thus, more accurately pinpointing the extrema of each input
signal. If we consider the microphone array as the x-axis then the phase shift determined
from the waveforms corresponds to the angular rotation from the positive y-axis, also known
as the azimuth. We then rotate the microphone array through this azimuth; thus orienting
the device to the sound source. Problem we encountered included low and high frequency
input signal noise, Input signal noise was dealt with by restricting the range of frequencies
available for analysis,achieved by implementing the appropriate bandpass filter. Writing
the appropriate algorithm for analyzing input data also proved to be trouble. The actual
device as proposed was not realistic and in its place, a simpler high frequency tracking
device was created, making small adjustments based on comparison of 2 averaged data
samples.



flowchart


hardware



software