Page 1 of 1

Filtering bright points

Posted: 2010-03-17T07:34:43-07:00
by arysar
Hi

I am trying to use imagemagick to filter brigth points generated by strong ilumination over a irregular surfaces, like this image (the image is inverted)

https://docs.google.com/leaf?id=0BzexxH ... OTg2&hl=en

I tryed to use the statsfilts scrip with parameter -s 12

The result is better but some points (the bigger ones) are not corrected

https://docs.google.com/leaf?id=0BzexxH ... YTlh&hl=en

is there any way to eliminate these?

Thanks

A.

Re: Filtering bright points

Posted: 2010-03-17T09:18:59-07:00
by snibgo
The links don't work. Perhaps you didn't tell GoogleDocs that anyone could have access.

Re: Filtering bright points

Posted: 2010-03-18T04:48:30-07:00
by arysar
Ok, now the links should work.

Re: Filtering bright points

Posted: 2010-03-18T09:41:59-07:00
by fmw42
Not sure exactly what you want to do with the bright spots when you say filter them?

#this makes the bright spots black (Make the thresh value smaller to remove more)

thresh=85
convert a2bio.tif \( +clone -threshold ${thresh}% -negate -write a2bio_tmp.png \) \
-compose multiply -composite a2bio_t85.tif

# This is a variation that can set the bright spots to whatever graylevel you want.

thresh=85
color="gray"
convert a2bio.tif \( +clone -threshold ${thresh}% -negate \) \
-alpha off -compose copy_opacity -composite -compose over \
-background $color -flatten a2bio_t85_gray.tif


#this is a median filter that replaces each value with the median of its neighbors (Make the median value larger to filter more)

convert a2bio.tif -median 1 a2bio_med1.tif

#this is similar to the median filter. it is my script, isonoise, it does a median where it is bright and leaves the image alone where not. The threshold determines where to do the median or not.

isonoise -r 1 -t 10 a2bio.tif a2bio_iso_r1_t10.tif


Other types of filtering are possible if you can explain a bit more what you would like to happen

Re: Filtering bright points

Posted: 2010-03-18T12:22:10-07:00
by arysar
The idea is that these are reflections so this points should be dark (or bright in the inverted images) but I don't know which graylevel they should be.

Well I am experimenting whit your suggestions, thank you very much!