【发布时间】:2021-09-05 09:16:33
【问题描述】:
我有一张 360x360 图像,我想删除其中的线条
它上面的部分有我正在使用 MATLAB 的周期性噪声线 我尝试了中值滤波器,但没有工作如何对此图像进行去噪和去除线条?
我试过了
%image 360x360
[rows, columns, numberOfColorChannels] = size(image);
subplot(2, 2, 1);
imshow(image,[]);
horizontalProfile = mean(image);
subplot(2, 2, [2, 4]);
plot(horizontalProfile, 'b-');
grid on;
bottomEnvelope = movmin(horizontalProfile, 10);
upperEnvelope = movmax(horizontalProfile, 10);
deltaGL = mean(upperEnvelope- bottomEnvelope)
hold on;
plot(bottomEnvelope, 'r-', 'LineWidth', 2);
plot(upperEnvelope, 'r-', 'LineWidth', 2);
% Compute midline
midline = (bottomEnvelope + upperEnvelope) / 2;
plot(midline, 'm-', 'LineWidth', 2);
columnsToDim = horizontalProfile > midline;
image(:, columnsToDim) = image(:, columnsToDim) - deltaGL;
subplot(2, 2, 3);
imshow(image, []);
但这并没有更好的工作
我已经把图片数据上传到Google Drive
【问题讨论】:
-
您不太可能得到答案的主要原因是因为您要求的是图像处理算法专业知识,而不是代码问题。但你可能很幸运,谁知道呢!
-
你会碰巧有这张图片的灰度版本吗?看起来你有一个相当嘈杂的二进制版本 - 并且可能难以清理。以我有限的经验,这是问题空间中人为的复杂性,可以通过使用管道中更高层的图像表示来简单地解决。
-
@Rohitgupta 这里是similar question,唯一的区别是那里的噪音是垂直的!
标签: matlab image-processing noise