 close all
clear all
clc


% for video = 1100:10:1000000
%  vid = aviread('vid\3.avi',0+video);
% img = vid.cdata;
img=imread('..\img\vlcsnap-2010-10-10-21h09m35s62.png');
img_gray = rgb2gray(img);
[img_h img_s] = hsv_filter(img, 20, 300);
img_ke_zpracovani = img_gray.*uint8(img_s);
primky = final_function(img_ke_zpracovani);


figure(1)
imshow(img);
hold on 
plot(primky.kl.x,primky.kl.y,'r','LineWidth',2)
plot(primky.za.x,primky.za.y,'g','LineWidth',2)

figure(3)
imshow(img);
hold on
x = 90:1:250;
y1 = primky.kl.k.*x+primky.kl.q;
y2 = primky.za.k.*x+primky.za.q;

plot(y1,x,'y','LineWidth',2)
plot(y2,x,'y','LineWidth',2)

pause (0.001)
% end