Apparatus for producing image data representing a specimen being imaged using ultrasound includes a processor and memory. The processor receives input data representing output from an ultrasound probe, and performs an iterative algorithm on the input data until a converged estimate of the mean of the distribution of the image data is reached. This estimate is used to produce output image data for display. The algorithm updates estimates for the image data, the echogenicity of the image data, and the variance of the noise of the image data. The step of updating the variance of the noise of the image data uses an update rule that assumes the noise to be varying across the image data but locally invariant for any small enough region of the image data.