Subversion Repositories seema-scanner

Rev

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

Rev Author Line No. Line
128 jakw 1
clear('all');
2
close('all');
3
clc;
4
 
5
p = Projector(1);
6
c = Camera(0,0);
174 jakw 7
 
8
c.setCameraSettings(0, 33.333);
128 jakw 9
c.startCapture;
10
 
11
response = zeros(256, 1);
12
 
255 - 13
for i=0:16:255
128 jakw 14
    display(i);
15
    I = uint8(cat(3, i, i, i));
16
    p.displayTexture(I);
17
    pause(0.12);
18
    c.trigger;
19
    f = c.getFrame;
174 jakw 20
    f2 = demosaic(f,'rggb');
242 jakw 21
    response(i+1) = mean(mean(mean(f2(800:2100, 500:2400, 1:3), 3)));
128 jakw 22
 
23
end
24
 
25
figure;
26
plot(response);