


function final_m_smap = Motion_Smap(previous_frame, current_frame)

    disp('estimate the optical flow...')
    uv = estimate_flow_interface(previous_frame, current_frame, 'classic+nl-fast');
    disp('calculate the motion contrast')
    m_smap = motion_contrast(uv);
    m_smap = mat2gray(m_smap);
    final_m_smap = 0.2*log(1 + m_smap) + 0.09;
    final_m_smap = mat2gray(final_m_smap);
end