Detecting a stain

asked 2013-09-25 13:50:45 -0600

updated 2013-09-26 07:27:30 -0600

Hello.

I'm trying to detect a stain in an image. The original image has a marble background and the stain its almost the same color, sometimes the stain is darker and sometimes brighter than the marble background. See some examples:

http://upload.wikimedia.org/wikipedia/commons/f/f3/SierraXenolith.JPG http://us.123rf.com/400wm/400/400/losalex/losalex0711/losalex071100030/2057779-marble-structure-a-stain-a-strip-stone.jpg http://image2.yell.ru/responses/5/7/1/r_670743_pr8rse37rffkijk9skb7.jpg https://lh3.googleusercontent.com/-48VlxENbnkY/SjXKwlNTtyI/AAAAAAAABGs/fFIwLb21bu8/s640/Texture%20-%20Granite.JPG http://us.123rf.com/400wm/400/400/lobanov/lobanov1108/lobanov110800013/10391208-a-texture-of-marble-with-rust-stains.jpg

I would like to know if there is a function that can detect such stain. The difficulty is distinguish the stain from the marble texture background. Can somebody help me?

Thanks.

Rafhael

edit retag flag offensive close merge delete

Comments

Can you please post some example images?

GilLevi gravatar imageGilLevi ( 2013-09-26 06:50:19 -0600 )edit

Seems like color base segmentation can do the trick. Have you tried it?

GilLevi gravatar imageGilLevi ( 2013-09-26 12:14:46 -0600 )edit

I haven't done yet. Do you know which function I use to do it?

rafhael.andrade gravatar imagerafhael.andrade ( 2013-09-26 12:35:01 -0600 )edit

No, actually, I'm not that familiar with the practicalities of openCV.

GilLevi gravatar imageGilLevi ( 2013-09-26 13:18:34 -0600 )edit