Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How about only using keypoints and no masking? #35

Open
stephanschulz opened this issue Mar 1, 2021 · 1 comment
Open

How about only using keypoints and no masking? #35

stephanschulz opened this issue Mar 1, 2021 · 1 comment

Comments

@stephanschulz
Copy link

In your current code:

  • you define a rectangle on the forehead.
  • Then use the 4 corners and do openCV optical flow keypoint tracking to get smoother tracking
  • use estimateAffine2D to rectify the tracked area.
  • Based on this rectangle you create a mask and analyze only the RGB image based on the mask.

What do you think how accurate the PPG analysis would be if i defined 1000 optical flow keypoints and got the mean RGB value from those 1000 pixel points?
The keypoint tracking ensures that we are reading the same skin pixels throughout consecutive frame. But i don't know if 1000 points is too low or if we need a continuous 2D space.

Thanks for your advice.

handRPPG.mov
@prouast
Copy link
Owner

prouast commented Mar 2, 2021

This would certainly be worth exploring and I'd be interested to hear whether it works.

What I can add:

  • The reason to use a continuous area of skin pixels is that the average cancels out random fluctuations in individual pixels
  • I am using the rectangle on the forehead because the signal is present, and it is straightforward to hardcode based on the face detection coordinates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants