Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] image_processing: Simplify, Always invert the image
Removed the unnecessary if-else block and moved the np.invert() call to the beginning of the function to avoid inverting the image twice if process_background is True. Changed the function always to invert the image if process_background is False. This makes the function more efficient because it avoids the need to perform the inversion and thresholding separately.
- Loading branch information