margo icon indicating copy to clipboard operation
margo copied to clipboard

Problem with Margo CPU usage when live-tracking

Open pm4564 opened this issue 4 years ago • 1 comments

Previously, we had been using Margo without any issues. Recently however, when we try to do live tracking in Margo, our total processor utilisation across all cores hits 100% and the software fails to work properly. We don't believe it is a hardware issue. We have noticed that the issue does not happen when we are tracking from a pre-recorded video, only when live tracking.

pm4564 avatar Jul 22 '21 08:07 pm4564

I think the likely culprits here are either 1) the camera failing to initialize in MATLAB, or 2) the camera getting stuck in an infinite loop during when Margo tries to estimate the framerate of the camera. That being said, it would help to have more information to solve your issue. At exactly what step does Margo get stuck (e.g. when you first boot it up, when you start tracking, when you initialize the camera etc)? If you have Git configured on your machine, could you tell me what commit you are using (use git show to display the current commit).

  1. Run MATLAB's built-in camera configuration tool: imaqtool . Verify that you can see the camera in there, initialize it, and preview video from the device. If you can connect to the camera and preview video from there, then this is a Margo issue and not an issue with the camera or the device drivers that MATLAB is using.

  2. Older versions of Margo had a bug where the camera could sometimes get stuck in an infinite loop if the camera initialized properly but that frames sent to MATLAB contained no data. The easiest way to fix this would be to ensure you are using the most up-to-date version of the master branch. If you have Git configured on your computer, just re-pull the master branch. If not, backup your current version of Margo and re-download it as a zip file from Github. Extract it to a new location (if you go this route, you have to make sure to remove the old version of Margo from MATLAB's path to avoid conflicts).

werkhoven avatar Aug 02 '21 15:08 werkhoven