It has been shown that by thresholding the image gradient at the location of shadow edges and then reintegrating, shadow-free images can be obtained. Unfortunately, the current methods are computationally expensive and also create artifacts in the reintegrated image. Our proposed method uses non-intersecting random paths (also called Hamiltonian paths) to allow for fast 1D reintegration. Because the artifacts are due to missing gradient information, we further improve the results by inpainting the detected shadow edges as to prevent the occurrence of unwanted artifacts