%img: image file name
%radius: size of the structuring element
%iter: number of reconstruction iteration
function f_reconstruct = open_close_reconstruction(img,radius,iter)
    %original image
    f = imread(img);
    f = double(f(:,:,1))/255.0;
    figure;
    imshow(f);

    %opening
    f_open = opening_reconstruction(f,radius,iter);

    %closing
    f_reconstruct = closing_reconstruction(f_open,radius,iter);

    figure;
    imshow(f_reconstruct);