User avatar
HermannSW
Posts: 4520
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

HQ camera 1012x760@130fps with raspiraw

Thu Jul 22, 2021 7:43 pm

Lately I realized that HQ camera allowed only for low framerates with libcamera-vid:
"Re: How to get more than 40fps with libcamera-vid?"
viewtopic.php?f=43&t=316098&p=1891383#p1891383

Today I cloned and built these repos:
https://github.com/raspberrypi/raspiraw
https://github.com/6by9/dcraw

PATH needs to point to 3 directories:

Code: Select all

$ grep ^PATH ~/.bashrc 
PATH=/home/pi/.local/bin:$PATH:~/raspiraw:~/raspiraw/tools:~/dcraw
$

raspiraw has not seen change of 1012x760 to 1332x990 done for raspi(stll|vid) months ago.
New tool 1012x760 allows to capture 1012x760 frames with up to 130fps without frameskips:
https://gist.github.com/Hermann-SW/ef75 ... 64e06f1e02
(raspiraw argument "--fps $(($fps*6/5))" is workaround for a framerate bug in raspiraw)

Here is the capture with frameskip and delta analysis, all frame deltas in 7625±22µs range:

Code: Select all

pi@raspberrypi4B:~/raspiraw/x $ 1012x760 4000 
removing /dev/shm/out.*.raw
capturing frames for 4000ms with 130fps requested
528 frames were captured at 131fps
frame delta time[us] distribution
      1 
      1 7603
      1 7607
      3 7608
      1 7619
     15 7624
    269 7625
    221 7626
      3 7627
      1 7628
      1 7631
      1 7642
      2 7643
      1 7644
      1 7647
after skip frame indices (middle column)
0% frame skips
pi@raspberrypi4B:~/raspiraw/x $ 

I had nothing fast moving here in hospital like classical mouse trap used before, but I remembered that finger snapping is quite fast.

I created 1fps slowmo from frames 282..286:

Code: Select all

raw2ogg2anim y 282 286 1

With raspiraw/tools/gifenc.sh scaling to 1012 this gives 1012x760 animated .gif:
https://stamm-wilbrandt.de/en/forum/fin ... g.anim.gif

Scaled to 506 horizontally, file size allows to be attached:
z.anim.gif
z.anim.gif
z.anim.gif (233.76 KiB) Viewed 414 times

So while there is no fast 1332x990 libcamera-vid or raspivid possibility, raspiraw 1012x760@130fps is nice, and while not showing 100s of fps like v1 or v2 camera, getting 1012x760 is big. When back at home I will capture classical mouse trap and see the whole scene from side. This is 640x75@1007fps animation captured with v2 camera:
Image


P.S:
The animation shown above demonstrates that HQ camera raspiraw capturing has a bug bottom left ...
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://github.com/Hermann-SW/raspiraw
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 4520
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: HQ camera 1012x760@130fps with raspiraw

Mon Jul 26, 2021 8:07 pm

I did 1012x760 investigations more than a year ago:
viewtopic.php?f=43&t=109137&p=1664816#p1665535

At that time my focus was on average framerate, not on 0 frame skips.
This video was captured free running, without specifying framerate, and resulted in 165fps average framerate (200us shutter time). Played at 10fps, 16.5x slower than real:
Image
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://github.com/Hermann-SW/raspiraw
https://stamm-wilbrandt.de/en/Raspberry_camera.html

Return to “Camera board”