On scanning linear barcodes from out-of-focus blurred images: a spatial domain dynamic template matching approach