フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How to convert a noisy picture to a black and white one

2 ビュー (過去 30 日間)
Carine
Carine 2014 年 3 月 12 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Dear all,
For further processing (detecting circle for example), I need to convert this kind of pictures (see below) to black and white ones. I have tried to use im2bw playing with the level but I cannot make it work properly. I have also tried to adjust contrast and brightness beforehand in imtool without success. Moreover, I would need to do this step in a (semi-)automatic way. Any hint would be warmly welcome.
I am sure I am missing something as it must be a classical problem but I am a newbie in image processing and can't find my way through...
Cheers!

回答 (2 件)

Dishant Arora
Dishant Arora 2014 年 3 月 12 日
Decide threshold from histogram manually, you'll be able to differentiate between background and foreground pixels looking at the histogram
[count , grayLevels] = imhist(imageArray)
bar(grayLevles , count) % Plots histogram , decide threshold intensity from it
grid on
bw = imageArray > threshIntesity;

Carine
Carine 2014 年 3 月 13 日
Thanks for your answer but this doesn't work as for example the black of the circle on the RHS of the picture is whiter than the white of the LHS of the picture. I am now working using adpathisteq which helps a lot, working locally.

この質問は閉じられています。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by