Parallelalized transformed distance computation using opencv wrapper.