<?php require __DIR__ . '/../vendor/autoload.php'; use Cvuorinen\Raspicam\Raspistill; $camera = new Raspistill(); // Take picture with default configurations $camera->takePicture('pic1.jpg'); // Configure camera with fluent interface $camera->flip()->brightness(65)->contrast(45)->raw(true)->exposure(Raspistill::EXPOSURE_BACKLIGHT)->effect(Raspistill::EFFECT_FILM)->ISO(600)->whiteBalance(Raspistill::WHITE_BALANCE_FLUORESCENT)->quality(50)->shutterSpeed(0.75)->timeout(1); $camera->takePicture('pic2.jpg'); // Configure camera with a constructor parameter array $camera2 = new Raspistill(['timeout' => 2.5, 'raw' => true, 'rotate' => 90, 'width' => 640, 'height' => 480, 'exposure' => Raspistill::EXPOSURE_NIGHT, 'sharpness' => 85]); $camera2->takePicture('pic3.jpg');
<?php require __DIR__ . '/../vendor/autoload.php'; use Cvuorinen\Raspicam\Raspistill; $camera = new Raspistill(); $camera->flip()->exposure(Raspistill::EXPOSURE_BACKLIGHT)->ISO(600)->quality(50); // Note you should specify %04d at the point in the filename where you want a frame count number to appear. // e.g. 'image%04d.jpg' will save files with names image0001.jpg, image0002.jpg, image003.jpg etc. // take picture every ten seconds for two minutes $camera->startTimelapse('image%04d.jpg', 10, 120); // Timelapse: take picture every five minutes for 24 hours $camera->startTimelapse('timelapse%04d.jpg', 5, 1440, Raspistill::TIMEUNIT_MINUTE); // Burst: take pictures as fast as possible (~ 30ms interval) for three seconds $camera->startTimelapse('burst%04d.jpg', 0, 3);
public function testLinkLatestThrowsExceptionOnEmptyFilename() { $this->setExpectedException('InvalidArgumentException'); $this->camera->linkLatest(''); }