Machine Vision, Part 3: Install Arducam IMX477 Camera

I purchased an Arducam IMX477.

  1. The ribbon cable attaches with the bare contacts facing towards the board.
  2. Make note of your kernel version:
    $ uname -a
    

    Mine is currently

    Linux nvidia 4.9.140-tegra #1 SMP PREEMPT Thu Jun 25 21:22:12 PDT 2020 aarch64 aarch64 aarch64 GNU/Linux
  3. Download the driver .deb files from here. The kernel version of the drivers had better match the kernel version of your OS.
  4. Install them:
    $ sudo apt-get install --reinstall ./nvidia-l4t-kernel_4.9.140-tegra-32.4.3-20200625213407_arm64.deb
    $ sudo apt-get install --reinstall ./nvidia-l4t-kernel-dtbs_4.9.140-tegra-32.4.3-20200625213407_arm64.deb
  5. Enable the dtb changes by modifying the /boot/extlinux/extlinux.conf file:
    $ sudo echo "FDT /boot/dtb/tegra194-p3668-all-p3509-0000.dtb" | sudo tee -a /boot/extlinux/extlinux.conf
    
  6. Reboot
  7. Upon reboot, your video camera should appear in the /dev folder:
    $ ls /dev/video*
    

    Result:

    /dev/video0
    
  8. Install some video utilities so we can really test it:
    sudo apt-get install v4l-utils
    
  9. Now we can display the available video formats:
    v4l2-ctl --list-formats-ext
    

    Result:

    ioctl: VIDIOC_ENUM_FMT
    	Index       : 0
    	Type        : Video Capture
    	Pixel Format: 'RG10'
    	Name        : 10-bit Bayer RGRG/GBGB
    		Size: Discrete 4032x3040
    			Interval: Discrete 0.033s (30.000 fps)
    		Size: Discrete 1920x1080
    			Interval: Discrete 0.017s (60.000 fps)
    
  10. Arducam has a test program you can build here — hand-patching python is required to get it to work! Instead, let’s get OpenCV up and running.
  11. Never could get any test of the camera (to display an image) to work.