Hello, Michael.
I have implemented my own non-adaptive nonlinear (robust) filtering
algorithm as a plugin.
I use some noise-free images (such as "Barbara", "Lena" and artificial RSA
(radio) images). I use the ImageJ command "Process - Noise" and simulate
salt and pepper and Gaussian noise with different variance. I found the
plugin for Poisson noise. But I can only calculate the total difference
between the pure test image and the image obtained after the denoising
algorithm. I use the commands "Process - Image Calculator" and "Analyze -
Measure". I mean is it possible by means of ImageJ to calculate PSNR? Maybe
there is a plugin for this?
Thanks.
With best regards, Nataliya


пн, 31 бер. 2025 р. о 11:19 Michael Schmid <[email protected]> пише:

> Dear Natalya,
>
> for calculating the signal-to-noise ratio, you need to know the "ground
> truth", i.e., what the image would be without noise.
> There are essentially two approaches for this:
>
> (1) Take a noise free image and add synthetic noise (preferably, with
> the same characteristics as the noise of real images; for photos with
> digital sensors the noise should be shot noise (Poisson statistics) +
> readout noise (roughly Gaussian) + dark current variations (best taken
> from a dark field with the same sensor).
>
> (2) As a reference image, you can use the average of many images of the
> same object (of course, without any lateral displacements due to
> vibrations, etc.). By averaging, much of the noise will cancel out. If
> dark current plays a role, you should subtract an average many dark
> fields. Best do these operations in 32-bit mode, since it may result in
> slightly negative values in low-intensity regions.
> When subtracting this low-noise result from the noisy single exposure,
> not that there will be a (roughly) constant offset, which should be
> removed before evaluating the noise.
>
> [A dark field is a photo with no light intensity reaching the sensor,
> but the same exposure time. You can use a black lens cap.]
>
>
> Best,
>
> Michael
> ________________________________________________________________
> On 29.03.25 16:46, Наталія Тулякова wrote:
> > Hi, Michael.
> >
> > Thank you very much for the answer.
> >
> > I have developed nonlinear filtering algorithms and implemented them as
> > plugins, taking one of the freely available plugins described in the
> > package ImageJ as a prototype. I want to compare the filter de-noising
> > efficiency for some of the test 2D gray-scale images. But I can only
> > calculate the difference between the test and filtered images using Image
> > Calculator, and to obtain the total mean value (Analyze - Measure). Is it
> > possible to obtain the filter efficiency estimation, for example, by
> means
> > of “Peak Signal-to-Noise Ratio”, using ImageJ program?
> >
> > Yours  sincerely,    Nataliya
> >
> > вт, 25 бер. 2025 р. о 13:30 Michael Schmid <[email protected]>
> пише:
> >
> >> Hi Nataliya,
> >>
> >> both, Median and Median 3D use a circular support (circular Kernel).
> >> I noticed that Median 3D (and the other 3D filters) use a slightly
> >> different definition of the radius.
> >> For the 3D filters, sometimes one needs to add a small number like 0.5
> >> to the radius of the 2D filters.
> >> For a 2D image (no stack), Median 3D with radius=2.5 in x&y and the
> >> "usual" (2D) Median with radius=2 do exactly the same (except near the
> >> edges, see below).
> >> At some radius values. the behavior is the same for the 2D and 3D
> >> filters (e.g. radius=10.5 and 14.5), so there is no simple rule.
> >> I think that eventually the 3D filters should be modified to use the
> >> same definition of the radius as the 2D filters, the one also used for
> >> Process>Filters>Show circular masks.
> >>
> >> The remaining difference is the handling of the edge pixels.
> >> The 3D filters consider the out-of image pixels as nonexistent. Thus,
> >> when calculating the median near the edge, the 3D median uses fewer
> >> pixels. The 2D filters (the "usual" Median, Mean, etc.) assume that the
> >> out-of-image pixels are the same as the nearest edge pixel, and the
> >> mean, median, etc. is always calculated over the same number of pixels
> >> (except for float images with NaN = Not a Number).
> >> The latter convention (assuming repeated edge pixels) is the usual
> >> convention in ImageJ, also for Gaussian Blur, and the Process>Binary
> >> functions.
> >>
> >> Hope this helps,
> >>
> >> Michael
> >> ________________________________________________________________
> >>
> >>
> >> On 22.03.25 12:32, Наталія Тулякова wrote:
> >>> Dear colleagues.
> >>> I am interested in filtering 2D images. The ImageJ program has two
> median
> >>> filters in the "Process-Filters" menu item. I have not found any
> >>> documentation explaining how "Median 3D" works. Median 3D provides
> better
> >>> results than Median. What is the difference between them for 2D image
> >>> processing? Does "Median 3D" use a square window while "Median" uses a
> >>> circular window?
> >>>
> >>> With best regards,    Nataliya
> >>>
> >>> --
> >>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> >>
> >> --
> >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> >>
> >
> > --
> > ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

Reply via email to