Subversion Repositories seema-scanner

Rev

Rev 155 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 jakw 1
%CAMERA Matlab wrapper class for the Camera C++ class.
2
% Gives low level access to custom industrial cameras by wrapping their
3
% API. Currently libdc1394 IIDC and IDS Imaging uEye are implemented.
4
%
154 jakw 5
% Jakob Wilm, DTU 2015
1 jakw 6
 
7
classdef Camera < handle
8
    properties (SetAccess = private, Hidden = true)
9
        objectHandle; % Handle to the underlying C++ class instance
10
    end
11
    methods (Static = true)
12
        function varargout = GetInterfaceCameraList
13
            [varargout{1:nargout}] = CameraMex('GetInterfaceCameraList');
14
        end
15
    end
16
    methods
17
        % Constructor - Create a new C++ class instance 
18
        function this = Camera(interfaceNum, cameraNum)
19
            this.objectHandle = CameraMex('NewCamera', interfaceNum, cameraNum);
20
        end
21
 
22
        % Destructor - Destroy the C++ class instance
23
        function delete(this)
24
            CameraMex('delete', this.objectHandle);
25
        end
28 jakw 26
 
27
        % startCapture
28
        function startCapture(this)
29
            CameraMex('startCapture', this.objectHandle);
30
        end
31
 
32
        % stopCapture
33
        function stopCapture(this)
34
            CameraMex('stopCapture', this.objectHandle);
35
        end
36
 
37
        % trigger
38
        function trigger(this)
39
            CameraMex('trigger', this.objectHandle);
40
        end
1 jakw 41
 
28 jakw 42
        % getFrame
43
        function varargout = getFrame(this)
44
            frame = CameraMex('getFrame', this.objectHandle);
45
            [varargout{1:nargout}] = permute(frame,[3 2 1]);
1 jakw 46
        end
157 jakw 47
 
48
		% getCameraSettings
49
        function varargout = getCameraSettings(this)
50
            [varargout{1:nargout}] = CameraMex('getCameraSettings', this.objectHandle);
51
        end
52
 
53
        % setCameraSettings
155 jakw 54
        function setCameraSettings(this, gain, shutter)
55
            CameraMex('setCameraSettings', this.objectHandle, gain, shutter);
154 jakw 56
        end
1 jakw 57
 
58
    end
59
end