GithubHelp home page GithubHelp logo

Comments (42)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
It's essentially a rolling median of the last 4 images. You'll see a big jump 
to the peak value when the heart beats.

Original comment by [email protected] on 21 May 2012 at 10:58

  • Added labels: Type-Other
  • Removed labels: Type-Defect

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
and why did you choose the last 4 images ? if i make it six for example what 
would be the influence on changing number of images?

Original comment by [email protected] on 12 Jun 2012 at 1:07

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
Nothing scientific about the number 4, it seemed to work best in my testing. 
The larger the number the.more likely you'll include both peak and trough of 
the heart beat in the average which is not desirable.

Original comment by [email protected] on 8 Jul 2012 at 1:51

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
Issue 3 has been merged into this issue.

Original comment by [email protected] on 8 Jul 2012 at 1:52

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
Can you give me more information about the algorithm that u use in it ?
cause i want to make a graduation project like a ( heart monitor )

Original comment by [email protected] on 31 Aug 2012 at 4:31

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
Take a look at the code in HeartRateMonitor.java specifically the 
onPreviewFrame() method.

Original comment by [email protected] on 31 Aug 2012 at 7:05

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
Thanks alot man
i will look at the code
the algorithm  is tough...

Original comment by [email protected] on 31 Aug 2012 at 8:05

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
hmmmm
cant understand why we using that 
the array dosent have any values right !!!
int averageArrayAvg=0;
                        int averageArrayCnt=0;
                        for (int i=0; i<averageArray.length; i++) {
                                if (averageArray[i]>0) {
                                        averageArrayAvg += averageArray[i];
                                        averageArrayCnt++;
                                }
                        }

Original comment by [email protected] on 3 Oct 2012 at 10:28

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
averageArray is updated each time you go through the code keeping the 4 latest 
averages.

Initially:
averageArray[0] = 0
averageArray[1] = 0
averageArray[2] = 0
averageArray[3] = 0
averageArray[4] = 0

First time through, let's say the average is 68
averageArray[0] = 68
averageArray[1] = 0
averageArray[2] = 0
averageArray[3] = 0
averageArray[4] = 0

Second time through, let's say the average is 72
averageArray[0] = 68
averageArray[1] = 72
averageArray[2] = 0
averageArray[3] = 0
averageArray[4] = 0

Second time through, average is 65
averageArray[0] = 68
averageArray[1] = 72
averageArray[2] = 65
averageArray[3] = 0
averageArray[4] = 0

Third time through, the average is 71
averageArray[0] = 68
averageArray[1] = 72
averageArray[2] = 65
averageArray[3] = 71
averageArray[4] = 0

Fourth time through, the average is 67
averageArray[0] = 68
averageArray[1] = 72
averageArray[2] = 65
averageArray[3] = 71
averageArray[4] = 67

Fifth time through; the average is 69, so I use the zero-th index.
averageArray[0] = 69
averageArray[1] = 72
averageArray[2] = 65
averageArray[3] = 71
averageArray[4] = 67

Original comment by [email protected] on 4 Oct 2012 at 1:46

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
i  got it 
thank u so much phishman

Original comment by [email protected] on 4 Oct 2012 at 1:56

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
hi,how are you can you tell me why you are using 
greenBitmap = BitmapFactory.decodeResource(getResources(), 
R.drawable.green_icon);
        redBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.red_icon);
    green_icon and red_icon ,also can you provide me with this icon because they are not found in source code ,,all thanks to you 

Original comment by [email protected] on 9 Oct 2012 at 2:05

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
They are located in res/drawable-mdpi folder of the source code.

http://code.google.com/p/android-heart-rate-monitor/source/browse/#svn%2Ftrunk%2
Fres%2Fdrawable-mdpi

Original comment by [email protected] on 9 Oct 2012 at 2:08

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
Thanks very much,but can you tell me whats the benefits for using this images 
in app 

Original comment by [email protected] on 9 Oct 2012 at 5:52

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
They are used to visually show the user when a heart beat happens. If you run 
the App on a phone, it's the small rectangle that changes from green to red and 
vice versa.

Original comment by [email protected] on 9 Oct 2012 at 10:28

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024

Original comment by [email protected] on 28 Apr 2013 at 12:12

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
Could you please explain how you detect the beat? (Theoretical side) Thank you.

Original comment by [email protected] on 8 May 2013 at 1:15

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
Basically, you want to use the camera to with as little focus as possible. So, 
if you put your finger on the lens, it'll be confused and not be able to focus. 
Because it isn't focused you'll essentially have very coarse data picking up 
only shades of light and dark RGB. I look at the a single channel (red) and try 
to detect when it goes from light red to dark red.

Original comment by [email protected] on 9 May 2013 at 12:02

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
I can't understand the image processing steps. could you please explain that 
for me?

Original comment by [email protected] on 8 Jun 2013 at 10:43

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
I was wondering how can I extract the green values instead of the red values. 
In some papers that I have been reading, they say that the green values have 
less noise than any other color. Thus, I would like to give it a shot with the 
green color. 

In the "imageProcessing.java", in the decodeYUV420SPtoRedSum() method, there is 
this line of code:
                int red = (pixel >> 16) & 0xff;
I suppose this extracts the red value.
How can I extract the green value?

Original comment by [email protected] on 12 Jun 2013 at 6:21

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
You can try:
int green = (pixel >>  8) & 0xff;

Original comment by [email protected] on 16 Jun 2013 at 2:39

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
How can I detect whether the user's finger is placed on the camera or not? Can 
I somehow know that? FOr example, if the average of the red pixels are not 
greater than a specific number-threshold, then it means that the user's finger 
is not placed on the camera... Is it possible to do something like that or is 
there any easiest way? 
It would be a good addition to the project if we can do that.

Original comment by [email protected] on 1 Jul 2013 at 3:59

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
For anyone interested, I figured out how to detect whether the user has his 
finger placed on the camera or not. 
In the imageProcessing.java, in the decodeYUV420SPtoRedAvg() method, we 
calculate the average value of the pixels of the red color. DOing a small 
experiment, I found out that when the user has his finger placed on the camera 
lens, the average has a value of >200 . In other case, the average value is 
<200.  thus, in the HeartRateActivity you can add an if statement after the 
call of the decodeYUV420SPtoRedAvg(), to find wether the value returned is >200 
or < 199. You can use this to display an alert box or something similar to 
guide the user to place his finger on the camera lens.

Original comment by [email protected] on 7 Jul 2013 at 4:54

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
[deleted comment]

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
[deleted comment]

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
Hi , I have seen that the app works fine if the surrounding light is good , but 
in dim light it does not give correct output like other leading apps. 

Original comment by [email protected] on 29 Aug 2013 at 1:26

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
[deleted comment]

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
[deleted comment]

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
[deleted comment]

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
[deleted comment]

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
[deleted comment]

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
[deleted comment]

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
[deleted comment]

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
[deleted comment]

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
Can i make an Windows Phone 8.1 app of it?

Original comment by [email protected] on 9 Oct 2014 at 3:08

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
I couldnt understand the concept of Image Processing used here.?
What is YUV420SP..? Is  it a video format.?

Original comment by [email protected] on 7 Jan 2015 at 2:25

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
Suppose  an averageArray value is getting and like you said it's 69 or maybe 
any value.... It's for 10s .? Is it.? How we can convert it into minute.? Beats 
per minute

Original comment by [email protected] on 7 Jan 2015 at 3:35

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
[deleted comment]

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
Hi phishman, your application is working fine but can you please change 
algorithm, which can be like Heart rate(Google Play Store link : 
https://play.google.com/store/apps/details?id=si.modula.android.instantheartrate
). Your application retrieving each heart rate value every 10 seconds but Heart 
rate application is calculating average heart rate value with in 10 seconds. 
thanks in advance.

Original comment by [email protected] on 25 Jan 2015 at 6:27

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
nayaka.ravikumar,

The code is completely open sourced, feel free to fork the code and change
the algorithm to be whatever you'd like.

On Sun, Jan 25, 2015 at 1:27 PM, <[email protected]>
wrote:

Original comment by [email protected] on 28 Jan 2015 at 12:46

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
anish.vilayil.s,

It's a simple change; look at like 172 here.. the reference to 10 is the
signal.
https://code.google.com/p/android-heart-rate-monitor/source/browse/src/com/jweth
erell/heart_rate_monitor/HeartRateMonitor.java#172

On Tue, Jan 6, 2015 at 10:35 PM, <[email protected]>
wrote:

Original comment by [email protected] on 28 Jan 2015 at 12:49

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
Hello,
how to pick beatsAvg value and send it to dialog or fragment?, i've tried to 
call a dialog at the bottom of conditional field in if(totalTimeInSecs>=10) {}, 
but still no luck, 

Original comment by [email protected] on 22 Feb 2015 at 4:37

from android-heart-rate-monitor.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
can you send the algorithm for calcualating heart rate?

Original comment by [email protected] on 6 Apr 2015 at 9:26

from android-heart-rate-monitor.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.