mardi 15 avril 2025

Motiongrams

A few years ago, I discovered the work of Alexander Refsum Jensenius (https://www.uio.no/ritmo/english/people/management/alexanje/) and really appreciated his work on motiongrams. In my memory, the code was written with Processing (https://processing.org). 

As you know, at R2P2 we make extensive use of video motion analysis to create algorithms for screening babies for motor disorders, using sophisticated neural networks.

But sometimes a simple actimetric analysis is all that's needed, and that's where motiongrams come into their own, because they're so easy to use. 

A few days ago, I resumed the analysis of films of premature babies that we had collected in various Parisian university hospitals (thanks to them). The videos were acquired with a GoPro camera with an FPS of 120 frames by second.

The code is very simple and can be used with Red and redCV or Rebol 3 and OpenCV.

The first step is to define a ROI in the first image. This prevents the movement of the caregivers from adding noise to the image. 



Once this has been done, we proceed to analyze the video. The simple idea is to have two images at T and T+1. Then, a simple difference between the two images lets us know if there has been any movement.



As a precaution, I add a binary filter to remove the background noise present in the image. Then simply average the binary image to obtain a direct assessment of the rate of movement.







Aucun commentaire:

Enregistrer un commentaire