使用大礼帽的背景校正不均匀

问题描述 投票:1回答:1

我正在尝试使用形态学礼帽操作纠正文本文档中不均匀的背景照明。enter image description here

使用高顶礼帽后,我得到的分析结果比原始图像差。

img=rgb2gray(imread("test2.png"));
se=strel("square",100);
imshow(imtophat(img,se));

enter image description here您能告诉我我在做什么错吗?

matlab image-processing image-morphology morphological-analysis mathematical-morphology
1个回答
0
投票

高帽过滤器适用于黑色背景上的浅色文本。您可以在应用大礼帽之前将图像反转,或者改用imbothat

© www.soinside.com 2019 - 2024. All rights reserved.