Open nedimmuzoglu opened 3 years ago
varargin is an input variable in a function definition statement that enables the function to accept any number of input arguments. so the function can accept AGCWD(input_image) or AGCWD(input_image, weighting_parameter)
function enhanced_image = AGCWD(input_image,varargin) %AGCWD implemenation code for Efficient contrast enhancement Using %adaptive gamma correction with weighting distribution %implementation of image contrast enhancment method in paper:https://ieeexplore.ieee.org/document/6336819/ %-------------------------------------------------------------------------- % Inputs: % input_image: can be either gray image or colorful image % parameter : (optional) weighting parameter for the histogram % can be [0,1]. Default is 0.5 % weighting_parameter=0.5; if(length(varargin)==1) weighting_parameter=varargin{1};
Dear Sir, Can you please explain , what is varargin for AGCWD input? is it optional? Can we use AGCWD(input_image,varargin) , without varargin like AGCWD(input_image)