Added background thread support for image computations