Cannot detect camera when using raspberry pi 4

I am attempting to connect my raspberry pi using a v2.1 cam to edge impulse for the purpose of image detection. When I do so I get the error

pi@raspberrypi:~ $ edge-impulse-linux
Edge Impulse Linux client v1.3.5

[SER] Using microphone hw:1,0
Failed to initialize linux tool Error: Cannot find any webcams, run this command with --disable-camera to skip selection
at /usr/lib/node_modules/edge-impulse-linux/build/cli/linux/linux.js:435:23
at processTicksAndRejections (internal/process/task_queues.js:97:5)

I have looked through several of the fourm posts and tutorials and have been unable to find a solution please help.



Hi @Maen.aa,

It sounds like your Raspberry Pi cannot communicate with the camera. I recommend checking the wiring or cable to make sure it is firmly attached to the Pi. Then, try running the command:

raspistill -o ~/Downloads/image.jpg

This should open a viewer, snap a photo, and save the image in your Downloads folder.

I am able to capture images. The problem is not the connection to the camera itself. Other ideas?

did you get the solution for this. same problem for me also

1 Like

Same issue here… only way I can capture images from my raspberry pi to the edge impulse client is through the webclient.

Hi all,

Can you provide me with the project ID and tell me what cameras you are attempting to use? Is it all the Pi Cam v2.1?

I also had a similar problem with the Pi4 and V2 Camera. If you can take images using the command “rapstill -o …” then edit the dtoverlay parameter to imx219 in /boot/config.txt . That is, dtoverlay=imx219 . This is the required value for the V2 camera module from the documentation: Raspberry Pi Documentation - Camera

Hope this helps :+1:


Yes, it works now.
Thank you!

1 Like

hello, i am new to rpi and dont understand how to actually change dtoverlay to dtoverlay=imx219. can you explain how to do so please?

dtoverlay parameter is being edited in the /boot/config.txt file. This is a configuration file used by the Raspberry Pi’s boot loader to set various parameters and options for the system.

By setting the dtoverlay parameter to “imx219”, the system is configured to use the camera module that is based on the Sony IMX219 sensor. This allows the Raspberry Pi to interface with the camera and capture images or video using the camera module.

So to solve this you must find the config.txt file in the boot folder and edit it.

Hello @marabc, if you have accessed the Raspberry Pi remotely say via SSH then you can enter the following commands, after logging in, to access the config.txt file. If you are using a GUI to access the Raspberry Pi then you can open the Terminal application and run the commands.

  1. open the config.txt file by running the following command on the Terminal or Command prompt
    sudo nano /boot/config.txt

  2. scroll down and find the line that starts with dtoverlay=

  3. edit the line to say dtoverlay=imx219

  4. Save the file and exit the file: press Ctrl+X on your keyboard and you will be asked if you want to save the file and you should press Y on your keyboard. Lastly press Enter

  5. Lastly reboot the Raspberry Pi by entering the following command:
    sudo reboot

1 Like