How to remove folds in grid coating - these feature high grey scale values

An example tiff image is attached. Some of the grids I see feature folds in the coating. These create problems in particle counting in that the folds also feature a grey scale value similar to the particles. These are always light background dark ROI images. Plot Profile readily shows the issue to be resolved but, I do not know how to approach it. The irregular shape the folds acquire add to the challenge. The particles often gather in or near these folds so, if I could determine a means to handle this situation it would be useful. Even if this became a partial solution.

Please advise.

Thresholded_FoldedCoating.tif (4.3 MB)

Hello RVC,
Have you tried Edit > Invert to switch the light and dark areas? Worth a try.


I looked into this but, chose to reduce the area of the parent TIFF image in makeRectangle() to avoid working with these folds. With numerous images to examine this still gave me sufficient particles for a distribution.