Extract Larger Objects from an Image

One application of TopHatTransform is to highlight objects of different sizes in an image.

    
The source image contains washers of various sizes:
In[25]:=
Click for copyable input
Smaller values will extract the smaller washers:
In[26]:=
Click for copyable input
Out[26]=
Use Manipulate to interactively set the value. Larger values for TopHatTransform will select progressively larger washers in the image:
New to Mathematica? Find your learning path »
Have a question? Ask support »