Popular Posts

Tuesday, October 4, 2011

Research by Dr. Moustafa Youssef

Today I had the opportunity to attend a session given by Dr. Moustafa Youssef on his research. The key point in his talk was about detecting the presence of humans inside a wireless network area by detecting variations in the wireless signal strength (Received Signal Strength Indicator, RSSI) at the receiver side. Dr. Moustafa introduced his Horus system based on this concept! Imagine the scenario in which your home wireless network acts as an intrusion detection system while you are sleeping at night. Dr. Moustafa and his group developed an all-software solution that provides this functionality by utilizing the hardware of the deployed wireless network and your laptop! If you are really interested, you can watch his Google Tech Talk here. The same concept is eventually being applied in hospital settings as well as discussed in this paper.

Monday, October 3, 2011

The Adaptive Noise Canceller as a High-Pass Filter

In 1975 Widrow et. al. introduced a scientific paper about Adaptive Noise Cancellers (ANCs). Since then, ANCs have been used extensively in different applications. This article is about the use of an ANC as a simple, yet powerful, high-pass filter.



As shown in the figure, a reference DC signal x(n)=1 is fed to a single-coefficient ANC. The noise estimate y(n) is the multiplication of the DC signal x(n) times the single coefficient, or weight, w(n). The noise estimate is then subtracted from the input signal d(n) to obtain a noise-free sample e(n) which can be considered the output of the ANC. e(n) is also fed back into the Least Mean Squares (LMS) Algorithm block, which calculates a new value for the weight w(n+1) based on the correlation between the reference signal x(n) and the error signal e(n) using the equation
w(n+1) = w(n) + mu * e(n) * x(n)
where mu is the adaptation step, usually a very small factor in the order of 0.01.

Widrow et. al. proved in their 1975 paper that this structure is equivalent to a high-pass filter with a corner frequency determined by mu.

The ANC is indeed a very simple, yet powerful, structure that has many applications in different disciplines. Recently, I've used the ANC as proposed by Widrow et. al. with some modifications for adaptive cancellation of power-line interference signals from the electrocardiogram (ECG), as shown in this paper.

Sunday, June 12, 2011

Physiological Signals Datasets

In this post I will be gathering some links about the physiological signals datasets that are publicly available on the web. This post will be updated from time to time!

Physiobank
One of the largest platforms that makes it easy to contribute physiological signals is the PhysioBank platform. Following are some of the interesting datasets available under PhysioBank. The easiest way to access these datasets is through the PhysioBank ATM web interface.

ANSI/AAMI EC13 Test Waveforms
The ANSI/AAMI EC13 standard for electrocardiographic monitors specifies those test signals for evaluating the performance of the electrocardiographic monitors.


Multi-Parameter Databases
Those databases include different physiological signals typical of a patient monitoring device, such as ECG, Respiration, Continuous Blood Pressure, Plethysmogram, ... etc.

An important subset of those databases are the Polysmnographic databases useful for sleep staging. Physionank contains the MIT-BIH Polysomnographic Database, the Sleep-EDF Database, the Sleep Heart Health Study Polysomnography Database, and St. Vincent's University Hospital / University College Dublin Sleep Apnea Database.


MIT-BIH Arrhythmia Database
The most famous ECG arrhythmia database!

Wednesday, May 11, 2011

Worker Threads!

Many times you need to call a function/method that does some really heavy work. However, you don't want this function call to block your main application. You want to maintain a responsive GUI, for example!

This famous problem has a solution using multi-threading. From my background in the C++ Qt framework, I know the basic principles involved. And there is a very famous Qt example that explains how this "Worker Thread" solution can be implemented: The Madelbrot Example

Today I wanted to solve the same problem but in the C# (.Net Framework) context. Fortunately, the MSDN had a similar example that illustrates the solution to this problem, making use of the BackgroundWorker class:
http://msdn.microsoft.com/en-us/library/hybbz6ke.aspx

Reading and Writing .Net Applications Settings

Sometimes you have to deal with the .Net framework in a way or another. I was forced to use a .Net C# closed-source library. And that library was automatically reading file paths from ConfigurationManager.AppSettings[]. So, I needed a way to read and modify those settings. Fortunately, this post saved my life!

To read:
string value = ConfigurationManager.AppSettings["oldPlace"];


To modify/write:
System.Configuration.Configuration config =ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);

config.AppSettings.Settings["oldPlace"].Value = "3";
config.Save(ConfigurationSaveMode.Modified);
ConfigurationManager.RefreshSection("appSettings");


More information can be retrieved from the MSDN:
http://msdn.microsoft.com/en-us/library/system.configuration.configurationmanager.appsettings.aspx

Sunday, May 8, 2011

Precision and Recall

One of the most important metrics used in evaluating the performance of binary classifiers is the Precision-Recall curve.

From Wikipedia:

It is possible to interpret precision and recall not as ratios but as probabilities:
* Precision is the probability that a (randomly selected) retrieved document is relevant.
* Recall is the probability that a (randomly selected) relevant document is retrieved in a search.




This page contains some illustrations to better understand the definitions of Precision and Recall:
http://newadonis.creighton.edu/hsl/searching/Recall-Precision.html

Also, this paper relates Precision-Recall curves to the Receiver Operator Characteristic curves:
http://www.biostat.wisc.edu/~page/rocpr.pdf

Finally, this page is further explaining the concepts and elaborating on the F-measure metric that tries to combine Precision and Recall into one measure:
http://streamhacker.com/2010/05/17/text-classification-sentiment-analysis-precision-recall/

Thursday, May 5, 2011

Splitting a video into frames using ffmpeg

I needed a quick way to split a video sequence into its individual frames and save those frames as images. FFmpeg seemed like a good handy solution. And the short answer is to do this:

ffmpeg -i inputfile.avi -f image2 image-%07d.png


This was a solution proposed in this thread. And for more information you can refer to the detailed documentation of FFmpeg.

PS: FFmpeg is available on Windows and you can get the installers here. If you just need the executable then download one of the static builds.