Matlab cannot connect to the raspberry cameraboard
10 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Harsh
2025-8-18,5:33
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!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Raspberry Pi Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!