Dear,
I am looking for a way to resample an image which has a certain degree of image speckle. I want to resample and take the average pixel value of the resampled region, not taken into account the min and max value of that region. Another solution would be to make an histogram of all pixel values in the resampled region and before taking the average, cut of those values which are within sigma (st dev) or 2*sigma from the average.
Is this possible with the available filters, or are these all spatial filters?
best
Dries
Resampling filter omitting min and max values
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Resampling filter omitting min and max values
Please upload an example image to some place like dropbox.com and put the URL here. Then explain what you mean by resampled region? Are you cropping some region and then resizing it or resizing/resampling the whole image? Why not remove the speckle first? Also identify what version of IM and what platform you are using.
Re: Resampling filter omitting min and max values
Hi!
Thanks for the reply.. I played a little bit around and found that convert -mean-shift function did exactly what I needed. Picture before and after is available at https://drive.google.com/folderview?id= ... sp=sharing
Used function (from Python):
convert='c:\\ImageMagick-6.9.0-Q8\\convert.exe'
for x in range(1, 10):
procent=x*10
output=output_shift+'_'+str(procent)+'.jpg'
os.system(convert+ ' -mean-shift 30x30+'+str(procent)+'% ' + inputfile + " " + output)
cheers!
Dries
Thanks for the reply.. I played a little bit around and found that convert -mean-shift function did exactly what I needed. Picture before and after is available at https://drive.google.com/folderview?id= ... sp=sharing
Used function (from Python):
convert='c:\\ImageMagick-6.9.0-Q8\\convert.exe'
for x in range(1, 10):
procent=x*10
output=output_shift+'_'+str(procent)+'.jpg'
os.system(convert+ ' -mean-shift 30x30+'+str(procent)+'% ' + inputfile + " " + output)
cheers!
Dries