Non Local Means filter crash

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Non Local Means filter crash

Sidnei Paciornik
Dear Colleagues,
I have this strange behavior with the Non Local Means filter, used within the
macro below:
makeRectangle(1, 1, 835, 1025); run(“Crop”); run(“Duplicate...”, “title=Background”); run(“Mean...”, “radius=50”); imageCalculator(“Subtract create 32-bit”, “HAADF-08.jpg”,”Background”); selectWindow(“Result of HAADF-08.jpg”); rename(“Back_Corrected”); run(“8-bit”); run(“Duplicate...”, “title=BackCorrected_NLM”); run(“Non-local Means Denoising”, “sigma=15 smoothing_factor=1 auto”); run(“Duplicate...”, “title=BC_NLM_CLAHE”); run(“Enhance Local Contrast (CLAHE)“, “blocksize=257 histogram=256 maximum=3
mask=*None*”); run(“Set Scale...”, “distance=239 known=50 pixel=1 unit=nm”);
The filter crashes with “java.lang.ArrayIndexOutOfBoundsException” if I make a
rectangular selection and crop the image at the beginning.
The filter behaves normally if I don´t make a ROI.
It must be trivial but I just don´t get it. Any suggestions?
Thank you!
Prof. Sidnei Paciornik Grupo de Análise de Imagens e Microscopia Digital
DEQM - Departamento de Engenharia Química e de Materiais
PUC-Rio

Rua Marquês de São Vicente 225
Prédio Leme, Sala 501L
Gávea - Rio de Janeiro - RJ
22451-900 - Brasil
tel: (55) (21)3527-1243

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Non Local Means filter crash

jumpfunky
Dear Sidnei,

I can't reproduce the error at my side. Could send me your image that I
can try to reproduce and fix?

Kind Regards,
Thorsten Wagner

Am Mittwoch, den 09.12.2015, 16:30 +0000 schrieb Sidnei Paciornik:

> Dear Colleagues,
> I have this strange behavior with the Non Local Means filter, used
> within the
> macro below:
> makeRectangle(1, 1, 835, 1025); run(“Crop”); run(“Duplicate...”,
> “title=Background”); run(“Mean...”, “radius=50”);
> imageCalculator(“Subtract create 32-bit”, “HAADF-
> 08.jpg”,”Background”); selectWindow(“Result of HAADF-08.jpg”);
> rename(“Back_Corrected”); run(“8-bit”); run(“Duplicate...”,
> “title=BackCorrected_NLM”); run(“Non-local Means Denoising”,
> “sigma=15 smoothing_factor=1 auto”); run(“Duplicate...”,
> “title=BC_NLM_CLAHE”); run(“Enhance Local Contrast (CLAHE)“,
> “blocksize=257 histogram=256 maximum=3
> mask=*None*”); run(“Set Scale...”, “distance=239 known=50 pixel=1
> unit=nm”);
> The filter crashes with “java.lang.ArrayIndexOutOfBoundsException” if
> I make a
> rectangular selection and crop the image at the beginning.
> The filter behaves normally if I don´t make a ROI.
> It must be trivial but I just don´t get it. Any suggestions?
> Thank you!
> Prof. Sidnei Paciornik Grupo de Análise de Imagens e Microscopia
> Digital
> DEQM - Departamento de Engenharia Química e de Materiais
> PUC-Rio
>
> Rua Marquês de São Vicente 225
> Prédio Leme, Sala 501L
> Gávea - Rio de Janeiro - RJ
> 22451-900 - Brasil
> tel: (55) (21)3527-1243
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Non Local Means filter crash

Bill Christens-Barry-2
In reply to this post by Sidnei Paciornik
Sidnei,

I tried using the Non Local Means Filter on an image here. I can reproduce the error for an image that is somewhat larger than 1000 pixels on a side, but I did not get an error when I cropped it to a smaller size. I didn't have time to check the maximum size that would work. This was using MacOS 10.7.5, Java 1.6, ImageJ 1.50f15. Perhaps you could try using a width and height less than 1024 and checking if the issue goes away.

Bill Christens-Barry

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Non Local Means filter crash

jumpfunky
I'm able to reproduce. My colleague pascal behnel will fix it as soon
as possible. I've opened an issue as well:
https://github.com/thorstenwagner/ij-nl-means/issues/1

Cheers,
Thorsten

Am Mittwoch, den 09.12.2015, 14:33 -0500 schrieb Bill Christens-Barry:

> Sidnei,
>
> I tried using the Non Local Means Filter on an image here. I can
> reproduce the error for an image that is somewhat larger than 1000
> pixels on a side, but I did not get an error when I cropped it to a
> smaller size. I didn't have time to check the maximum size that would
> work. This was using MacOS 10.7.5, Java 1.6, ImageJ 1.50f15. Perhaps
> you could try using a width and height less than 1024 and checking if
> the issue goes away.
>
> Bill Christens-Barry
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Non Local Means filter crash

jumpfunky
Fixed in the latest release!

My colleague pascal does an amazingly fast job.



Am Mittwoch, den 09.12.2015, 22:30 +0100 schrieb Thorsten Wagner:

> I'm able to reproduce. My colleague pascal behnel will fix it as soon
> as possible. I've opened an issue as well:
> https://github.com/thorstenwagner/ij-nl-means/issues/1
>
> Cheers,
> Thorsten
>
> Am Mittwoch, den 09.12.2015, 14:33 -0500 schrieb Bill Christens-
> Barry:
> > Sidnei,
> >
> > I tried using the Non Local Means Filter on an image here. I can
> > reproduce the error for an image that is somewhat larger than 1000
> > pixels on a side, but I did not get an error when I cropped it to a
> > smaller size. I didn't have time to check the maximum size that
> > would
> > work. This was using MacOS 10.7.5, Java 1.6, ImageJ 1.50f15.
> > Perhaps
> > you could try using a width and height less than 1024 and checking
> > if
> > the issue goes away.
> >
> > Bill Christens-Barry
> >
> > --
> > 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