Matlab cannot connect to the raspberry cameraboard

5 visualizaciones (últimos 30 días)
Wilson
Wilson el 20 de En. de 2025
Respondida: Harsh el 18 de Ag. de 2025
Hi i'm trying to use my raspberry and the camera to do data acquisition and control with matlab but after the connection to the raspberry, matlab is not connecting to the camera. it's for a project and without that i can't do anything.
This is the error i receive with this both lines :
i've tried each and the result was the same.
cam = cameraboard(mypi, 'Resolution', '1280x720');
cam = mypi.cameraboard;
Warning: Response size for request ID 0xF150 is expected as 4 but received as 0.
> In matlabshared.ioclient/IOProtocol/isReservedRequestID
In matlabshared.ioclient/IOProtocol/getDataDecodePacketExternal
In matlabshared.ioclient/IOProtocol/processBufferedData
In matlabshared.ioclient/IOProtocol/fetchDataPtForUniqueIdFromTransportLayer
In matlabshared.ioclient/IOProtocol/commandResponse
In matlabshared.ioclient/IOProtocol/rawReadInternal
In matlabshared.ioclient/IOProtocol/processCommandQueue
In matlabshared.ioclient/IOProtocol/rawRead
In raspi.internal/LibCamera/open (line 725)
In raspi.internal/LibCamera (line 158)
In raspi.internal/RaspiBase/cameraboard (line 309)
In raspi.internal/RaspiHWSDKController/processInternal (line 1775)
In raspi.internal/RaspiHWSDKController/cameraboard (line 694)
In raspi/cameraboard (line 855)
Cannot connect to the Camera Board.
Caused by:
Index exceeds the number of array elements. Index must not exceed 1.
  4 comentarios
Eduardo
Eduardo el 17 de Mayo de 2025
Same problem, Rasberry Pi5 has support for camera???
Adrian
Adrian el 13 de Ag. de 2025
Same Problem. Any solutions found ?

Iniciar sesión para comentar.

Respuestas (1)

Harsh
Harsh el 18 de Ag. de 2025
I have encountered a similar issue before, and I recommend using only the Raspberry Pi operating systems listed on the following page:
From what I can gather from the comments is that you are using a 64-bit OS, but MATLAB R2024a only supports 32-bit operating systems. I suggest flashing your Raspberry Pi with a fresh 32-bit OS. Once you have installed the new OS, you can clean the existing MATLAB installation on your Raspberry Pi by running these commands in the terminal:
$ sudo pkill mwUnifiedSrvr
$ sudo rm -rf /opt/MATLAB
After this, you can proceed with creating a new "raspi" object and the "cameraboard" command should run fine. If you still encounter issues, I recommend contacting MathWorks Technical Support. You can create a support ticket using the following link:
I hope this helps, thanks!

Categorías

Más información sobre Raspberry Pi Hardware en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by