imtophat
Top-hat filtering of an image.
📝Syntax
J = imtophat(I, SE)
📥Input Arguments
Parameter Description
I Input grayscale image.
SE Structuring element structure or logical neighborhood.
📤Output Arguments
Parameter Description
J Top-hat filtered image.
📄Description

Top-hat filtering of an image.

💡Examples
Apply top-hat filtering
I=zeros(64,64); I(20:44,20:44)=0.4; I(30:34,30:34)=1;
J=imtophat(I,strel('disk',5));
figure; subplot(1,2,1); imagesc(I); g=linspace(0,1,64)'; colormap([g g g]); title('Input');
subplot(1,2,2); imagesc(J); g=linspace(0,1,64)'; colormap([g g g]); title('Top-hat');
Example illustration
🔗See Also
imbothatimopenstrel
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub