How to repair the vertical lines ?
Mostra commenti meno recenti
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 Commenti
Image Analyst
il 19 Apr 2022
Modificato: Image Analyst
il 19 Apr 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
il 20 Apr 2022
Risposta accettata
Più risposte (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 Commento
Dynamic
il 20 Apr 2022
Categorie
Scopri di più su Image Preview and Device Configuration in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!







