Filter löschen
Filter löschen

Connecting Arducam OV9281

2 Ansichten (letzte 30 Tage)
John
John am 26 Jul. 2022
Beantwortet: Chetan am 22 Sep. 2023
I'm connecting a pi 3 B to matlab running via wifi. I have ab Arducam OV9281 connected to the CSI port. The camera is running on my pi and verfied the device is connected to my CSI /dev/video0
I was able to stream from the camera directly from my pi terminal using yavta but I'd like to connect the camera to matlab. I can access the pi via matlab using r = raspi
DeviceAddress: '192.168.12.***'
Port: *****
BoardName: 'Raspberry Pi 3 Model B'
AvailableLEDs: {'led0'}
AvailableDigitalPins: [4,5,6,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27]
AvailableSPIChannels: {'CE0','CE1'}
AvailableI2CBuses: {'i2c-0','i2c-1'}
AvailableWebcams: {'unicam (platform:3f801000.csi)'}
I2CBusSpeed: 100000
AvailableCANInterfaces: {}
But when I try to connect using webcame or cameraboard(r), no luck. Cameraboard states "Failed to detect a Camera Board connected to the Raspberry Pi hardware"

Antworten (1)

Chetan
Chetan am 22 Sep. 2023
Hello @John,
I understand that you are experiencing difficulties when attempting to connect an external camera using the CSI port.
To help you resolve this issue, I suggest following the steps provided below:
  1. Ensure that you have enabled the legacy camera. Please note that non-legacy cameras are currently not supported.
To enable the legacy mode open Raspberry Pi terminal,
  • execute the following command:
$ sudo raspi-config
  • Go to interface options and enable Legacy camera
Refer the following MathWorks Documentation for detail
2. In addition to the webcam workflow, you can utilize Raspberry Pi system commands to capture images in MATLAB. Here are a few commands you can try:
r = raspi;% Use system commands to capture images
r.system('raspistill -o new.jpg');
% Get the captured image in MATLAB's current working directory
r.getFile('/home/pi/new.jpg');
% Read the image in MATLAB
img = imread('new.jpg');
imshow(img);
You can also refer to the following link for information on using webcams in Raspberry Pi SPKG:
I hope this helps.

Produkte


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by