Author Topic: Custom frame rates  (Read 2316 times)

mathewrynes

  • Newbie
  • *
  • Karma: +0/-0
    • View Profile
Custom frame rates
« on: January 18, 2019, 05:16:58 PM »
Hello everyone,

Is it possible to edit the source code to use custom frame rates? We would like to try running the CMOS at 45 fps. If so, which files should we be looking at?

Also, when running at 60 fps recording, We get a large variation in the frame rate and higher frame loss than at lower frame rates. Is there any way to solve this that is not hardware related (new CMOS/DAQ, writing to SATA III or higher speed SSD etc.)?

Thanks!

Daniel Aharoni

  • Administrator
  • Full Member
  • *****
  • Karma: +15/-0
    • View Profile
Re: Custom frame rates
« Reply #1 on: January 20, 2019, 05:33:34 AM »
Hi mathewrynes,
Yes you can modify the source code to get custom frame rates. In order to do this you will need to add a 45FPS option in the frame rate drop down list as well as edit the Miniscope DAQ firmware running on the Miniscope DAQ PCB. Just search for 'FPS', 'framerate' and 'frame rate' to locate relevant portions of the code. You will also need to read the CMOS imaging sensor data sheet to calculate the correct register values to achieve 45FPS.

When running at 60FPS, where do you see the large variations in frame rate? Is it in the numbers displayed in the Miniscope DAQ software or is in the timestamps in timestamps.dat? The CPU timer we use to calculate instantaneous frame rate and inter frame interval has a couple millisecond variability which could cause the calculated frame rate to bounce around a bit. Also try grabbing the newest version of the Miniscope DAQ software which might help.

Lastly, if you are seeing a significant increase in dropped frames then there is likely no non-hardware related solution.