remove salt and pepper from an image then convert to binary
2 ビュー (過去 30 日間)
古いコメントを表示
How can I convert the first image to the second image? I used the code below but it didn't help, and I didn't convert it to binary because it makes it look worse due to the salt and pepper. Also, using medfilt2 making my image blurry.
RGB = imread('center.png');
imshow(RGB);
I=im2gray(RGB);
k=medfilt2(I,[22,22]);
imshow(k)
0 件のコメント
回答 (1 件)
Image Analyst
2022 年 9 月 17 日
See my attached demos. You might be able to adapt them.
But you don't have what is called classical salt and pepper noise. I suggest you call adapthisteq then threshold to get blobs brighter and darker than the mean gray level. You also need to fix your horrible lighting situation. Try to avoid the reflection of the overhead light. If you can't arrange the geometry, then use polarizers.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!