function [ kernel ] = KernelGaussian1deriv( scale, width )
%volam s 1 a 3
%vytvoenie Gaussianoveho jadra 1. derivacie a danej velkoti
%scale urcuje, kolko sigiem by malo jadro merat od stredu
%width urcuje sirku filtra

sigma = scale;
%width =3;

range = 1:2*width*sigma + 1; %vygeneruje maticu dlzky kernela
center = range(ceil(length(range)/2)); %ziska hodnotu stredu
kernel = (1/(sigma*sqrt(2*pi))) * exp(-((range-center).^2)/(2*sigma^2)) .* (-(range-center)/(sigma^2));

