-
Notifications
You must be signed in to change notification settings - Fork 53
Description
Component
DIPimage (DIPlib 3.0.0 release, https://github.com/DIPlib/diplib/releases/tag/3.0.0), compiled from source
Describe the bug
I am testing some Matlab code for Fourier Ring Correlation, but when attempting to use the noise function with 'poisson' as noise_type on a simple test image, Matlab itself crashes. Guassian does seem to work, so it seems to be a specific problem with poisson. When the function is executed, Matlab freezes and a Microsoft Visual C++ Runtime Library error window pops up, describing some additional details. It seems like an invalid mean is passed to the random poisson function. See the image below.
The buttons are not clickable as Matlab crashes and exits after a few seconds.
To Reproduce
- Create a simple test image
a = (yy('corner'))*sin((xx('corner'))^2/300); - Run the poisson noise function on it
a1 = noise(a,'poisson',1); %shotnoise 1
I also tested this by importing a TIFF image, which fails in the same way.
System information:
- What OS do you have? Windows 10
- If DIPimage, what version of MATLAB do you have? MATLAB Version: 9.10.0.1739362 (R2021a) Update 5
- If compiled from sources, what compiler and version did you use? I used CMake 3.21.2 with Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29915 for x64 (Microsoft Visual Studio 16 2019)
