How to obtain number of cameras connected


I am using sample 13_multi_camera with a 3-camera adapter. I changed the MAX_CAMERA_NUM constant to 3. I have only 2 cameras connected from the 3 available MIPI Ports. When using cameraDevices.size(), 3 is still outputted instead of 2. Is there a way to obtain the number of connected cameras instead of the size of the adapter?


First, you can try verifying the video devices at the userscape level:


Can you provide more information about your enviroment?


Hi aphillipso,

I can confirm that in the dev directory, there are video0, video1 & video2 although only two cameras are connected. I am making use of 2 IMX477 MIPI Leopard Imaging cameras using L1-JTX1-MIPI-ADPT REV1.2 3-Camera adapter board. Currently using the ARGUS library and R32.1 Linux. I would like to obtain 2 instead of 3 which represents the number of cameras connected.

You may need to modify the imx274 probe function to check if i2c failed then don’t register the video node.
Or modify the device tree to remove the third camera module from the tegra-camera-platform.

Hi ShaneCCC,

I have tried to delete the third module in the tegra-camera-platform but it does not give me permission to delete. What should I do?

Also, how can I access the imx477 probe function?


You need to modify the device tree source code to update the dtb instead of delete it from the /proc/device-tree/tegra-camera-platform.