def testTrailFinder(xScale, yScale): for i in range(0, 10): trail = GT.generateTrailVertical(np.random.random() * xScale, np.random.random(), np.random.random(), np.random.random(), 50 * np.random.random(), xScale, yScale) imgNoTrail = RT.findRemoveTrail(trail, trail, 200, False, True, True, True, False, False)
def removeTrailVertical(imgNoBackground, img, showProgress, x, trailSize): if showProgress: print("Fitting curve brightness...") b1, b2, b3, sDev = TF.findFitVertical(imgNoBackground, x, trailSize) if showProgress: print("Brightness fitted\n") print("Removing trail...") print(sDev) trail = GT.generateTrailVertical(x, b1, b2, b3, sDev, img.shape[1], img.shape[0]) if showProgress: print("Trail removed!") return img - trail