Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %NOTE: the package octave-image (in debian and AUR) is needed
- pkg load image
- width = 23; %anything above 16 here is big and might cause slow rendering
- height = 23;
- sigma = 2*pi; %sigma is the standard deviation (i.e. the "width" or sharpness of the blur)
- h = fspecial('gaussian', [width height], sigma)(:); %generates the gaussian matrix
- [scale, index] = max(h);
- h = h / scale; %scales the matrix so that the max element = 1
- h([index]) = []; %removes the max element (the center one)
- fprintf('blur-kern = "%d,%d,', width, height)
- for n=1:size(h,1)
- fprintf('%.8f,', h(n))
- end
- fprintf('";\n')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement