Raspberry Pi camera - how to set shutter speed with cameraboard object

4 次查看(过去 30 天)
How can I set the shutter speed/exposure time using a raspi cameraboard object? I'm looking for the equivalent of
raspistill -ss 20000, for example (set shutter speed to 20 ms)
rpi = raspi(); cam = cameraboard(rpi); cam.ShutterSpeed = 20000; % example of what I'd like to do

回答(2 个)

Gotcha123
Gotcha123 2017-2-7
You need to modify the cameraboard.m file because in that file the command for modifiying the shutter speed exists. It looks like the developers were going to implement it but at last they did not or at least I do not know if there have been modifications to the code since last year.

Sanush
Sanush 2022-6-10
编辑:Sanush 2022-6-10
You can change shutter speed by directly writing on the pi terminal using the system function
% Read Raspberry Pi Board
rpi = raspi;
% Get image
system(rpi,'raspistill -n -ss 10 -o SS10.jpg')
system(rpi,'raspistill -n -ss 100000 -o SS100000.jpg')
% Transfer file to matlab
getFile(rpi,'/home/pi/SS10.jpg')
getFile(rpi,'/home/pi/SS100000.jpg')
@Gotcha123's method didnt work for me. The images looked the same after changing shutter speed.
You can give it a go yourself. The files you have to change are at
C:\ProgramData\MATLAB\SupportPackages\R2021b\toolbox\realtime\targets\raspi\+raspi\+internal\CameraBoard.m
C:\ProgramData\MATLAB\SupportPackages\R2021b\toolbox\realtime\targets\raspi\+raspi\+internal\+codegen\cameraboard.m

类别

Help CenterFile Exchange 中查找有关 MATLAB Support Package for Raspberry Pi Hardware 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by