diff --git a/tutorial43_shading_correction_using_rolling_ball.py b/tutorial43_shading_correction_using_rolling_ball.py index 549bd5a..313082a 100644 --- a/tutorial43_shading_correction_using_rolling_ball.py +++ b/tutorial43_shading_correction_using_rolling_ball.py @@ -52,9 +52,9 @@ from matplotlib import pyplot as plt img = cv2.imread("images/Particle_gradient.jpg", 0) - +img_rb=img.copy() ## Copy the image to prevent modifications on the original image radius=20 -final_img, background = subtract_background_rolling_ball(img, radius, light_background=True, +final_img, background = subtract_background_rolling_ball(img_rb, radius, light_background=True, use_paraboloid=False, do_presmooth=True) @@ -64,10 +64,10 @@ clahe = cv2.createCLAHE(clipLimit=3, tileGridSize=(8,8)) clahe_img = clahe.apply(final_img) -#cv2.imshow("Original image", img) +cv2.imshow("Original image", img) cv2.imshow("Background image", background) cv2.imshow("AFter background subtraction", final_img) cv2.imshow("After CLAHE", clahe_img) cv2.waitKey(0) -cv2.destroyAllWindows() \ No newline at end of file +cv2.destroyAllWindows()