Learn how to install the latest version of libcamera on your Raspberry Pi and get started with computer vision projects.

This tutorial will guide you through the process of installing the latest version of libcamera on your Raspberry Pi. Libcamera is a powerful camera API that enables you to easily create computer visio …


Updated August 27, 2023

Need help with your Raspberry Pi?
Contact Me!

Do you love silly Raspberry Pi Projects?
Check out my this YouTube Channel!


This tutorial will guide you through the process of installing the latest version of libcamera on your Raspberry Pi. Libcamera is a powerful camera API that enables you to easily create computer vision applications for your Raspberry Pi.

Libcamera is an open-source camera API designed specifically for Raspberry Pi devices and allows developers to access the full potential of the Raspberry Pi’s cameras with ease. It provides a range of features including support for multiple camera interfaces, image processing functions, and hardware acceleration. Installing libcamera on your Raspberry Pi can be done in a few simple steps:

  1. Update your system: Before installing any new packages, make sure your Raspberry Pi is up-to-date by running the following commands:
sudo apt update
sudo apt upgrade
  1. Install dependencies: You will need to install some required dependencies before you can install libcamera. Run the following command:
sudo apt install -y cmake git libjpeg-dev libpng-dev libopencv-dev libv4l-dev libtbb-dev libusb-1.0-0-dev libpython3-dev python3-numpy python3-picamera python3-setuptools python3-wheel
  1. Clone the libcamera repository: Clone the libcamera git repository to your Raspberry Pi using the following command:
git clone https://github.com/raspberrypi/libcamera.git
  1. Build and install libcamera: Navigate to the cloned directory and build libcamera by running:
cd libcamera
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_VC4CL=ON -DENABLE_GLES=ON
make -j4
sudo make install

This will compile and install the latest version of libcamera on your Raspberry Pi. You can check if the installation was successful by running:

libcamera-hello --help

If everything is working correctly, you should see a list of command line options for the libcamera-hello application.

  1. Test libcamera: To test your libcamera installation, run the following command to start the libcamera-hello application:
libcamera-hello -t 0 --nopreview -o hello.jpg

This will capture a single image and save it as hello.jpg. You can view the captured image using the following command:

xdg-open hello.jpg

Now you have successfully installed libcamera on your Raspberry Pi! You are ready to start building camera applications with this powerful API. For more information, visit the official libcamera GitHub repository.