function [H]=filterDP(obr, priemer)
% [H]=filterDP(obr, priemer)
% 
% Inputs:
%       obr - obraz pre filtraciu, sluzi na zistenie rozmerov obrazu
%       priemer - priemer priepustneho pasma v px
%
% Outputs: 
%       H - prenosova funkcia idealneho dolnopriepustneho filtra  
%
% Comments:
%       
%
% Author: Branko Babusiak, 2011
%
% See also: imshow, imagesc, image


sirka=size(obr,2);
vyska=size(obr,1);
X = ones(vyska,1)*[-1*(vyska/2):(vyska/2)-1]; Y = [-1*(sirka/2):(sirka/2)-1]'*ones(1,sirka);
Z = X.^2 + Y.^2;

d=(sirka-priemer)+1;
pol=round(sirka/2);
prvok=Z(pol,round(d/2));
image_filt = zeros([vyska sirka]);
%image(find(Z <= (sirka/polomer.r)^2)) = 1;
image_filt(find(Z <= prvok)) = 1;

H=image_filt;