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

    %opening
    f_close = closing_reconstruction(f,radius,iter);

    %closing
    f_reconstruct = opening_reconstruction(f_close,radius,iter);

    figure;
    imshow(f_reconstruct);