Jetson Nano: Dual RPi Camera and faster frame rates

Preamble

Notes taken from Jetson Nano B01 – Dual RPi Cameras + how to get faster frame rates, by JetsonHacks

Carrier board B01 has two camera slots

Use RPi Camera v2.1, the RPi Camera v1 doesn’t work

git clone https://github.com/JetsonHacksNano/CSI-Camera

To test

gst-launch-1.0 nvarguscamerasrc sensor_id=0 ! nvoverlaysink

Change sensor_id to 0 or 1

The camera modes (sensor modes) are output by this command (from jetson nano raspberry pi camera not working):

GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3280 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 3280 x 1848 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

Install numpy

  • apt-get install python3-pip
  • pip3 install cython
  • pip3 install numpy

Even identical cameras have colour variation

Time 6:50

gstreamer

  • width, height
  • framerate
  • sensormode: see the saved modes in text file
  • appsink tells that an application is accessing the gstreamer pipeline.

 

Looking at simple_camera.py

9:20 – Processor yield is waitKey()

Instrumenting

Time 11:48

wrapper class that times functions

Proves framerates too high causes lag, change to 30 and it works correctly – fro single camera

Dual Cam

Time 16:00

FPS

18:47

Make the display size a divisor of the camera size. That is to say, if camera is 1280×720 and display is 960, then slow frame rate. Make display 640×360 for faster framerate.

change frame rate to 60

change waitkey from 20 to 5

face detect

27:40

slow:  around 4-5 fps

1ms to read camera

169 ms to detect face

camera mode: 3280×2464

di9splay 820×616

framerate 21

Faster

29:33

display640x4360

sensor mode 720

framerate 30

waitkey 20-> 5

gives 9-13 fps

Smallest image possible

31:50

higher framerate

display320x180

gives 30 fps

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s