RobotKomar2.pdf:
[makomar.git] / Calibration.m
blob30900bbae90b5ef5003e7490de7c2b788fc18cd9
1 classdef Calibration < handle
2     %CALIBRATION Rezim kalibrace.
3     
4     properties (Constant)
5         
6     end
7     
8     properties (GetAccess = 'private', SetAccess = 'private')
9         Cam; % odkaz na objekt kamery
10         CamDr; % odkaz na objekt ridici jednotky
11         Detect; % odkaz na objekt detekce komara
12         Trans; % odkaz na objekt transformaci souradnic
13         Pred; % odkaz na objekt predikce pohybu komara
14         Regul; % odkaz na objekt regulatoru
15     end
16     
17     methods (Access = private)
18         
19         function [shot] = initComponents(obj)
20             obj.Cam.start(1);
21             for i = 1:10
22                 obj.Cam.getImg();
23             end
24             shot = obj.Cam.getImg();
25             imshow(shot)
26             obj.Cam.delete();
27             obj.Detect.initDetector(shot);
28         end
29         
30     end
31     
32     methods
33         %% Konstruktor objektu rezimu kalibrace
34         function obj = Calibration(Camera, CamDriver, Detector, Transform)
35             obj.Cam = Camera;
36             obj.CamDr = CamDriver;
37             obj.Detect = Detector;
38             obj.Trans = Transform;
39             obj.Pred = Predictor;
40             obj.Regul = Regulator;
41         end
42         %% Metody
43         
44         function [shot] = start(obj)
45             [shot] = obj.initComponents();
46         end
47         
48     end
49 end