A maximum-likelihood detection scheme for rapid imaging of string-like