Semi-automatic background detection in microscopic images