LAT Hologramm-Software 2.0
Loading...
Searching...
No Matches
Webcam.m
Go to the documentation of this file.
1% @file Webcam.m
2classdef Webcam < Camera
3
5 properties
6 cam;
7 end
8
9 methods
10 function obj = Webcam()
12 webcamlist;
13 obj.cam = webcam(1);
14 obj.connected = true;
15 res = strsplit(obj.cam.Resolution,'x');
16
17 obj.pixelX = str2double(cell2mat(res(1)));
18 obj.pixelY = str2double(cell2mat(res(2)));
19 obj.exposureTime = 128;%???
20 % in mm
21 obj.pixelPitch = 1; %#nicht telezentrisch
22
23 obj.savePath = strcat(evalin('base','matlabPath'),'\data\DCIM');
24
25 end
26 function connect(obj)
27 %Verbindung wird bereits im Konstruktor aufgebaut
28
29 end
30 function disconnect(obj)
31 %METHOD1 Summary of this method goes here
32 % Detailed explanation goes here
33 obj.cam = 0;
34 end
35 function image = getImage(obj)
36 image=rgb2gray(snapshot(obj.cam));
37 end
38 end
39end
40
Definition: Camera.m:5
für Beliebige USB-Webcams Erfordert Webcam-Toolbox für MAtlab
Definition: Webcam.m:5
#define true
Definition: nuts_bolts.h:26