How to repair the vertical lines ?
Mostrar comentarios más antiguos
Hi, I have some grayscale images with some white vertical line. I wanted to rid them. I don't know which method exactly work for it. Previously I have applied Savitzky-Golay filter with vertical median filter. However, it provide a low quality image at the end of the process. Please help me for doing it.
Please find the attached for an sample image
2 comentarios
Image Analyst
el 19 de Abr. de 2022
Editada: Image Analyst
el 19 de Abr. de 2022
Exactly what does "rid" mean to you?
- Do you want to delete those columns, which would make the image narrower?
- Do you want to set columns with lines in them to black or some other intensity?
- Do you want to fill in the stripes with values from each side of the stripe?
What gives rise to the line? Why are most stripes brighter in the bottom of the image than the top of the image?
Dynamic
el 20 de Abr. de 2022
Respuesta aceptada
Más respuestas (1)
yes,sir,may be use image pixel peaks to find line,such as
img = imread('https://ww2.mathworks.cn/matlabcentral/answers/uploaded_files/966550/test.png');
rs = sum(img);
rs = smooth(rs, 5);
ind = find(rs>max(rs)*0.8);
rs2 = zeros(size(rs));
rs2(ind) = rs(ind);
[pks,locs] = findpeaks(rs2);
figure; plot(rs);
hold on;
plot(ind, rs(ind),'r.')
plot(locs, pks, 'go');
figure; imshow(img, []);
hold on;
for i = 1 : length(locs)
plot([locs(i) locs(i)], [1 size(img,1)], 'r-', 'LineWidth', 2);
end
1 comentario
Dynamic
el 20 de Abr. de 2022
Categorías
Más información sobre Image Preview and Device Configuration en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!







