function  [pixOut,ctrlOut] = BilatFilt(pixIn,ctrlIn)
%bilatFilt 
% Filters one pixel according to the default spatial and intensity standard
% deviation, 0.5.
% pixIn and pixOut are scalar intensity values.
% ctrlIn and ctrlOut are structures that contain control signals associated
% with the pixel.
% You can generate HDL code from this function.

  persistent filt2d;
  if isempty(filt2d)
    filt2d = visionhdl.BilateralFilter(...
      'CoefficientsDataType','Custom',...
      'CustomCoefficientsDataType',numerictype(0,18,17));
 
  end    
 [pixOut,ctrlOut] = filt2d(pixIn,ctrlIn);
end
