Hi everyone,
There's a MATLAB function called 'wiener2' that filters a 2D image and also estimates the additive noise power, which is kind of a signal-to-noise ratio. Does anyone in this list know if there is an ImageJ (or even a Java) implementation of this filter and that also gives that sort of estimation? Thank you all very much. []s -- Anderson Vinícius Alves Ferreira Intern at Lafarge Centre de Recherche 95 rue du Montmurier - 38291 St Quentin-Fallavier - France On 5 July 2010 13:35, Gluender <[hidden email]> wrote: > Bonjour, > > I agree with Joachim Wesner's statement but maybe the background of the > original question is of some importance... > > In certain situations approximations, e.g. > > S + N / N > > may be of some help. See for instance: > > <http://www.gluender.de/Writings/WritingsTexts/HardText.html#Gl-1980-1> > > > Hi there, >> >> Sorry but measuring the SNR of a single image without reference or any >> a-priori-knowledge is simply mathematically IMPOSSIBLE! >> >> How do you tell what is true data, what is noise? The human vision system >> might imply that it is still possible, but this relies on >> implicit assumptions about object structure and spatial frequency spectrum >> of the "true" data. >> >> Mit freundlichen Grüßen / Best regards >> >> Joachim Wesner >> Projektleiter Optik Technologiesysteme >> >> Leica Microsystems CMS GmbH | GmbH mit Sitz in Wetzlar | Amtsgericht >> Wetzlar HRB 2432 >> Geschäftsführer: Dr. Stefan Traeger | Dr. David Roy Martyr | Colin Davis >> www.leica-microsystems.com >> >> --------------------- >> >> Hi, >> >> Is there any ImageJ plugin to calculate the Signal-to-Noise Ratio of a >> single image without a reference image? >> >> I've seen some plugins that calculate the SNR of images but in all of them >> reference images are necessary. >> >> Thank you. >> >> []s >> -- >> Anderson Vinícius Alves Ferreira >> Intern at Lafarge Centre de Recherche >> 95 rue du Montmurier - 38291 St Quentin-Fallavier - France >> > > Best > -- > > Herbie > > ------------------------ > <http://www.gluender.de> > |
Bonjour!
>Hi everyone, > >There's a MATLAB function called 'wiener2' that filters a 2D image and also >estimates the additive noise power, which is kind of a signal-to-noise >ratio. As you may have seen from the paper that I've recommended earlier (see below) this task is ill-posed. Of course, there are cases, i.e. images, for which sufficient estimates of the signal-to-noise ratio are possible. However, in order to construct a true Wiener-filter you need to know much more details than the simple signal-to-noise ratio. Simply spoken, you need to know it as a function of the spatial frequency. Getting estimates of this function is much more involved if it is at all possible. The approach taken in my paper is very simple, but for the described purpose it was sufficient. In the very case one can only speak of a very coarse approximation of a Wiener-filter because it was a low-pass with signal-dependent cut-off frequency. The cut-off frequency was set to the spatial frequency where the S + N was _approximately_ equal to N. Both S + N and N can sometimes be extracted from appropriate image regions... >Does anyone in this list know if there is an ImageJ (or even a Java) >implementation of this filter and that also gives that sort of estimation? I don't know of such an attempt... I should be very careful with software that promises to do the job and without exact knowledge of how the signal-to-noise estimates are determined. >Thank you all very much. > >[]s >-- >Anderson Vinícius Alves Ferreira >Intern at Lafarge Centre de Recherche >95 rue du Montmurier - 38291 St Quentin-Fallavier - France Best Herbie ================================= >On 5 July 2010 13:35, Gluender <[hidden email]> wrote: > >> Bonjour, >> >> I agree with Joachim Wesner's statement but maybe the background of the >> original question is of some importance... >> >> In certain situations approximations, e.g. >> >> S + N / N >> >> may be of some help. See for instance: >> >> <http://www.gluender.de/Writings/WritingsTexts/HardText.html#Gl-1980-1> >> >> >> Hi there, >>> >>> Sorry but measuring the SNR of a single image without reference or any >>> a-priori-knowledge is simply mathematically IMPOSSIBLE! >>> >>> How do you tell what is true data, what is noise? The human vision system >>> might imply that it is still possible, but this relies on >>> implicit assumptions about object structure and spatial frequency spectrum >>> of the "true" data. >>> >>> Mit freundlichen Grüßen / Best regards >>> >>> Joachim Wesner >>> Projektleiter Optik Technologiesysteme >>> >>> Leica Microsystems CMS GmbH | GmbH mit Sitz in Wetzlar | Amtsgericht >>> Wetzlar HRB 2432 >>> Geschäftsführer: Dr. Stefan Traeger | Dr. David Roy Martyr | Colin Davis >>> www.leica-microsystems.com >>> >>> --------------------- >>> >>> Hi, >>> >>> Is there any ImageJ plugin to calculate the Signal-to-Noise Ratio of a >>> single image without a reference image? >>> >>> I've seen some plugins that calculate the SNR of images but in all of them >>> reference images are necessary. >>> >>> Thank you. >>> >>> []s >>> -- >>> Anderson Vinícius Alves Ferreira >>> Intern at Lafarge Centre de Recherche >>> 95 rue du Montmurier - 38291 St Quentin-Fallavier - France >>> >> >> Best >> -- >> >> Herbie >> >> ------------------------ >> <http://www.gluender.de> >> |
In reply to this post by Anderson Vinícius
Hallo,
Testing the wiener2 MATLAB function with a few images of the domain that I'm working with, I've seen it returns good results if I compare its results to what I can see with my eyes. I mean, in most cases the images with more noise - considering my visual analysis - are the images that return the biggest values for the power noise estimation according to the wiener2 function. Anyway, considering your paper, would be there any Image plugIn or software I could test your method? Thank you very much. []s -- Anderson Vinícius Alves Ferreira Intern at Lafarge Centre de Recherche 95 rue du Montmurier - 38291 St Quentin-Fallavier - France On 30 August 2010 20:34, Gluender <[hidden email]> wrote: > Bonjour! > > > Hi everyone, >> >> There's a MATLAB function called 'wiener2' that filters a 2D image and >> also >> estimates the additive noise power, which is kind of a signal-to-noise >> ratio. >> > > As you may have seen from the paper that I've recommended earlier (see > below) this task is ill-posed. Of course, there are cases, i.e. images, for > which sufficient estimates of the signal-to-noise ratio are possible. > However, in order to construct a true Wiener-filter you need to know much > more details than the simple signal-to-noise ratio. Simply spoken, you need > to know it as a function of the spatial frequency. Getting estimates of this > function is much more involved if it is at all possible. > > The approach taken in my paper is very simple, but for the described > purpose it was sufficient. In the very case one can only speak of a very > coarse approximation of a Wiener-filter because it was a low-pass with > signal-dependent cut-off frequency. The cut-off frequency was set to the > spatial frequency where the S + N was _approximately_ equal to N. Both S + N > and N can sometimes be extracted from appropriate image regions... > > > Does anyone in this list know if there is an ImageJ (or even a Java) >> implementation of this filter and that also gives that sort of estimation? >> > > I don't know of such an attempt... > I should be very careful with software that promises to do the job and > without exact knowledge of how the signal-to-noise estimates are determined. > > > Thank you all very much. >> >> []s >> -- >> Anderson Vinícius Alves Ferreira >> Intern at Lafarge Centre de Recherche >> 95 rue du Montmurier - 38291 St Quentin-Fallavier - France >> > > Best > > Herbie > > ================================= > > > On 5 July 2010 13:35, Gluender <[hidden email]> wrote: >> >> Bonjour, >>> >>> I agree with Joachim Wesner's statement but maybe the background of the >>> original question is of some importance... >>> >>> In certain situations approximations, e.g. >>> >>> S + N / N >>> >>> may be of some help. See for instance: >>> >>> <http://www.gluender.de/Writings/WritingsTexts/HardText.html#Gl-1980-1> >>> >>> >>> Hi there, >>> >>>> >>>> Sorry but measuring the SNR of a single image without reference or any >>>> a-priori-knowledge is simply mathematically IMPOSSIBLE! >>>> >>>> How do you tell what is true data, what is noise? The human vision >>>> system >>>> might imply that it is still possible, but this relies on >>>> implicit assumptions about object structure and spatial frequency >>>> spectrum >>>> of the "true" data. >>>> >>>> Mit freundlichen Grüßen / Best regards >>>> >>>> Joachim Wesner >>>> Projektleiter Optik Technologiesysteme >>>> >>>> Leica Microsystems CMS GmbH | GmbH mit Sitz in Wetzlar | Amtsgericht >>>> Wetzlar HRB 2432 >>>> Geschäftsführer: Dr. Stefan Traeger | Dr. David Roy Martyr | Colin >>>> Davis >>>> www.leica-microsystems.com >>>> >>>> --------------------- >>>> >>>> Hi, >>>> >>>> Is there any ImageJ plugin to calculate the Signal-to-Noise Ratio of a >>>> single image without a reference image? >>>> >>>> I've seen some plugins that calculate the SNR of images but in all of >>>> them >>>> reference images are necessary. >>>> >>>> Thank you. >>>> >>>> []s >>>> -- >>>> Anderson Vinícius Alves Ferreira >>>> Intern at Lafarge Centre de Recherche >>>> 95 rue du Montmurier - 38291 St Quentin-Fallavier - France >>>> >>>> >>> Best >>> -- >>> >>> Herbie >>> >>> ------------------------ >>> <http://www.gluender.de> >>> >>> -- Anderson Vinícius Alves Ferreira Bacharelado em Ciência da Computação / UFPB Génie Informatique / INSA de Lyon |
Good day,
well it's nice that you are satisfied with the MATLAB approach however I was more concerned with problems associated with scientific image restoration. Wiener or Wiener-corrected filters are also called optimum (linear) filters which means that they do the best job concerning noise reduction _and_ signal conservation that is possible with linear filtering for a given image with additive noise. However, to construct Wiener filters, data is needed that in general isn't available, namely the power spectrum of the signal and that of the noise. While the latter in many cases can quite well be estimated, the estimation of the former poses considerable problems. Now, if you have only moderate to bad estimates of the power spectra the resulting Wiener filter won't be optimum and even worse, it will, at least to a certain extent, damage the signal content more than necessary. Of course, the same holds for the much more simplistic approach described in our paper. But as you may have recognized, we actually didn't really perform the filtering because it was clear from the noise-analysis alone that any filtering is worthless for our task: Even a perfect Wiener filter had cut-off the spectral components of the signal that we were interested in. In other words, the noise was much too high for our purpose. If you are happy with "cosmetic" noise removal to make images look better with respect to visual inspection, then you needn't use Wiener filters and you may also be happy with our crude approach of (essentially) low-pass filtering with the cut-off frequency at S + N approximately equal N. The very paper describes how the S + N and N can be estimated, i.e. it remains only to decide what kind of filter slope or filter characteristic is best. It isn't difficult to perform these steps with ImageJ. I only fear that the selection of a proper area for the estimation of the noise power spectrum must be performed manually. You must construct the closed line(s) defined by S + N approximately equal N. Then, you fill the thus defined area(s) where S + N > N with zeros (black). Finally, you can filter this binary image with an appropriate low-pass, e.g. of a Gaussian characteristic. That's it, you've got your filter-function for noise removal that is to be applied to the complex spectrum of your image. Finally, please note that this approach definitely doesn't result in a Wiener filter and that it may only be regraded as a zero-order approximation... Best Herbie ============================= >Hallo, > >Testing the wiener2 MATLAB function with a few images of the domain that I'm >working with, I've seen it returns good results if I compare its results to >what I can see with my eyes. I mean, in most cases the images with more >noise - considering my visual analysis - are the images that return the >biggest values for the power noise estimation according to the wiener2 >function. > >Anyway, considering your paper, would be there any Image plugIn or software >I could test your method? > >Thank you very much. > >[]s >-- >Anderson Vinícius Alves Ferreira >Intern at Lafarge Centre de Recherche >95 rue du Montmurier - 38291 St Quentin-Fallavier - France > > >On 30 August 2010 20:34, Gluender <[hidden email]> wrote: > >> Bonjour! >> >> >> Hi everyone, >>> >>> There's a MATLAB function called 'wiener2' that filters a 2D image and >>> also >>> estimates the additive noise power, which is kind of a signal-to-noise >>> ratio. >>> >> >> As you may have seen from the paper that I've recommended earlier (see >> below) this task is ill-posed. Of course, there are cases, i.e. images, for >> which sufficient estimates of the signal-to-noise ratio are possible. >> However, in order to construct a true Wiener-filter you need to know much >> more details than the simple signal-to-noise ratio. Simply spoken, you need >> to know it as a function of the spatial frequency. Getting estimates of this >> function is much more involved if it is at all possible. > > >> The approach taken in my paper is very simple, but for the described >> purpose it was sufficient. In the very case one can only speak of a very >> coarse approximation of a Wiener-filter because it was a low-pass with >> signal-dependent cut-off frequency. The cut-off frequency was set to the >> spatial frequency where the S + N was _approximately_ equal to N. Both S + N >> and N can sometimes be extracted from appropriate image regions... >> >> >> Does anyone in this list know if there is an ImageJ (or even a Java) >>> implementation of this filter and that also gives that sort of estimation? >>> >> >> I don't know of such an attempt... >> I should be very careful with software that promises to do the job and >> without exact knowledge of how the signal-to-noise estimates are determined. >> >> >> Thank you all very much. >>> >>> []s >>> -- >>> Anderson Vinícius Alves Ferreira >>> Intern at Lafarge Centre de Recherche >>> 95 rue du Montmurier - 38291 St Quentin-Fallavier - France >>> >> >> Best >> >> Herbie >> >> ================================= >> >> >> On 5 July 2010 13:35, Gluender <[hidden email]> wrote: >>> >>> Bonjour, >>>> >>>> I agree with Joachim Wesner's statement but maybe the background of the >>>> original question is of some importance... >>>> >>>> In certain situations approximations, e.g. >>>> >>>> S + N / N >>>> >>>> may be of some help. See for instance: >>>> >>>> <http://www.gluender.de/Writings/WritingsTexts/HardText.html#Gl-1980-1> >>>> >>>> >>>> Hi there, >>>> >>>>> >>>>> Sorry but measuring the SNR of a single image without reference or any >>>>> a-priori-knowledge is simply mathematically IMPOSSIBLE! >>>>> >>>>> How do you tell what is true data, what is noise? The human vision >>>>> system >>>>> might imply that it is still possible, but this relies on >>>>> implicit assumptions about object structure and spatial frequency >>>>> spectrum >>>>> of the "true" data. >>>>> >>>>> Mit freundlichen Grüßen / Best regards >>>>> >>>>> Joachim Wesner >>>>> Projektleiter Optik Technologiesysteme >>>>> >>>>> Leica Microsystems CMS GmbH | GmbH mit Sitz in Wetzlar | Amtsgericht >>>>> Wetzlar HRB 2432 >>>>> Geschäftsführer: Dr. Stefan Traeger | Dr. David Roy Martyr | Colin >>>>> Davis >>>>> www.leica-microsystems.com >>>>> >>>>> --------------------- >>>>> >>>>> Hi, >>>>> >>>>> Is there any ImageJ plugin to calculate the Signal-to-Noise Ratio of a >>>>> single image without a reference image? >>>>> >>>>> I've seen some plugins that calculate the SNR of images but in all of >>>>> them >>>>> reference images are necessary. >>>>> >>>>> Thank you. >>>>> >>>>> []s >>>>> -- >>>>> Anderson Vinícius Alves Ferreira >>>>> Intern at Lafarge Centre de Recherche >>>>> 95 rue du Montmurier - 38291 St Quentin-Fallavier - France >>>>> >>>>> >>>> Best >>>> -- >>>> >>>> Herbie >>>> >>>> ------------------------ >>>> <http://www.gluender.de> >>>> >>>> > > >-- >Anderson Vinícius Alves Ferreira >Bacharelado em Ciência da Computação / UFPB >Génie Informatique / INSA de Lyon |
In reply to this post by Anderson Vinícius
Hi,
I was hoping to first import a .mov format movie into ImageJ and then invert the color so that what appears white is now dark against a light background. Any thoughts are much appreciated! Best, Zach Freyberg |
On Aug 31, 2010, at 7:52 PM, Zach Freyberg wrote:
> Hi, > I was hoping to first import a .mov format movie into ImageJ and then invert > the color so that what appears white is now dark against a light background. > Any thoughts are much appreciated! Open the movie by dragging and dropping it onto the "ImageJ" window, invert it using Edit>Invert, then save it using File>Save As>QuickTime Movie. If this causes a memory overflow then open the movie as a virtual stack and invert it using Process>Batch>Virtual Stack. In the dialog box, specify an empty output folder, select "Invert" from the "Add Macro Code" drop down menu and click "Process". This will create a new virtual stack that can be saved in QuickTime or AVI format. To read and write QuickTime, Windows users must install the QuickTime plugins at http://rsb.info.nih.gov/ij/plugins/movie-opener.html -wayne |
Free forum by Nabble | Edit this page |