I am trying to do simple program for Rasberry Pi camera but the image is white blank when i use imagesc? How can i solve this problem?

1 vue (au cours des 30 derniers jours)

Réponses (1)

Chandu
Chandu le 16 Mar 2022
Hi,
As per my understanding, you want to read images from the camera and display the captured images but the variable “img” in “imagesc” function is not getting recognized correctly (in line 3). This issue can be resolved by assigning the “cam” variable to an available webcam. Try installing MATLAB Support Package for USB Webcams in Add-On Manager and try the following script,
cam = webcam
for i = 1:100
img=snapshot(cam)
imagesc(img)
drawnow
end
Use the command webcamlist to see all the available cameras. Refer to webcam MathWorks Documentation for future reference. Hope it helps!

Catégories

En savoir plus sur MATLAB Support Package for IP Cameras dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by