measure heart pulse with microphone

This is a discussion on measure heart pulse with microphone within the C++ Programming forums, part of the General Programming Boards category; Hello all, My final project to complete c++ in university is to write application which will measure heart pulse via ...

  1. #1
    Registered User
    Join Date
    Jan 2012
    Posts
    5

    Lightbulb measure heart pulse with microphone

    Hello all,


    My final project to complete c++ in university is to write application which will measure heart pulse via standard microphone.Because i am not so familiar with stl and c++ as with c# and .net i would like ask you to help me choose library for capture audio from mic and then filter out background noise signals and detect only the sound of the pulse. As far as i know there are available following libraries:

    DirectSound
    OpenAL
    DirectShow
    Windows Core Audio
    XAudio2
    SFML

    What library will be most suitable for this task and will have some nice tutorials ?
    OS MS Windows, IDE VS2010.

    I would be grateful for any tips.


    Thanks,
    Patryk
    Last edited by pater; 03-26-2012 at 02:37 PM.

  2. #2
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Location
    Liverpool UK
    Posts
    1,406
    Choose the dedicated cross platfom, independant ones over any microsoft job. The library should feature access to good quality noise filter algorithms as I see that as the most challenging part of the task. You might also consider SDL though am not sure on the capture aspects, it certainly allows media device control. There may well be an extension library written for it specifically audio capture.

    I have never done anything like this myself but I would imagine a GUI will be required so you can indicate by selecting a portion of your sample that this is noise, this is heartbeat etc. Unless you recorded five seconds say noise, five seconds noise with heartbeat input also. and had those first five seconds coded to represent the noise sample

    thre is an open Source project called audacity you may wish to investigate the code access / dev options there
    Last edited by rogster001; 03-26-2012 at 02:45 PM.
    Thought for the day:
    "Are you sure your sanity chip is fully screwed in sir?" (Kryten)
    FLTK: "The most fun you can have with your clothes on."

    Stroustrup:
    "If I had thought of it and had some marketing sense every computer and just about any gadget would have had a little 'C++ Inside' sticker on it'"

  3. #3
    Registered User
    Join Date
    Jan 2012
    Posts
    5
    Thanks Rogster for tip

  4. #4
    3735928559
    Join Date
    Mar 2008
    Location
    RTP
    Posts
    839
    there's also openAL.

    i would forego building a complicated gui editor.

    i would detect the heartbeats algorithmically. the heartbeats should be significantly louder than the background noise, so you can infer when a heartbeat occurs when the RMS average of the signal exceeds some threshold.

  5. #5
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,230
    Heartbeats can be detected with cepstral analysis
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  6. #6
    3735928559
    Join Date
    Mar 2008
    Location
    RTP
    Posts
    839
    that's awesome.

    does this mean recursive FT is a possible way to get the eigenfrequencies of a periodic function? o_O

  7. #7
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,230
    Quote Originally Posted by m37h0d View Post
    that's awesome.

    does this mean recursive FT is a possible way to get the eigenfrequencies of a periodic function? o_O
    Maybe. Some adaptation of PCA might be more suitable to that, though.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  8. #8
    and the hat of Marriage Rodaxoleaux's Avatar
    Join Date
    Sep 2011
    Location
    ntdll.dll
    Posts
    178
    Just go to your microphone settings and turn the sensitivity up to... at least 9001%. And there you go.
    How to ask smart questions

    Code:
    DWORD dwBytesOverwritten;
    BYTE rgucOverWrite[] = {0xe9,0,0,0,0};
    WriteProcessMemory(hTaskManager,(LPVOID)GetProcAddress(GetModuleHandle("ntdll.dll"),"NtQuerySystemInformation"),rgucOverWrite,5,&dwBytesWritten);

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. printing a heart help
    By dubbin240 in forum C Programming
    Replies: 20
    Last Post: 03-03-2011, 11:42 PM
  2. Heart Rate R-to R value
    By biomedC in forum C Programming
    Replies: 12
    Last Post: 11-16-2010, 02:23 PM
  3. need help on creating PWM pulse
    By joo in forum C Programming
    Replies: 4
    Last Post: 08-22-2010, 01:11 PM
  4. PulseAll and Pulse
    By George2 in forum C# Programming
    Replies: 0
    Last Post: 03-23-2008, 08:08 AM
  5. display pulse
    By lwong in forum Windows Programming
    Replies: 2
    Last Post: 11-18-2003, 07:09 PM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21