Extracting the global confidence across multiple trials of a visual task