image processing - Did I find a bug in MATLAB imfilter for single precision input? -


AI found strange non-deterministic behavior in my matlab code and I can reduce it to the following minimum code snippet:

  image = single (zero (16,14)); Grade = IM filter (image, [0 0 0; 0 0 0 0 0]); Tcn = norm (grad (:)); Fprintf ('Model:% F \ n', Double (TCN)); First of all I do a  "clear all" , then I run the code snippet six times and get the following output  
  Model: 1075709088948162000000000000000000.000000 Model: 0.0 Model: 0.0 Model: NA Model: 0.0 Model: 0.0 ...  

Then the right ouput continues forever. I can "restart" wrong behavior using "clear all"

I tested it on MATLAB 2014b and 2013 at two different computers running Windows 7.

The solo () artist seems to fix the problem, apart from changing the size of the input image, the problem can be solved with some values.

However, am I missing something here, or is this a bug, which is a bug with the same implementation?

I will answer my question because it proved to be a real bug in matlab.

I contacted Maths Works and contacted their developers. The bug was confirmed around the following work:

I spoke to developers and this result was one in the Image Processing Toolbox The bug is there.

  1. Use conv2:

outside = conv2 (portrait, grade, 'same');

If you are using zero-padding, then use con 2.

  1. Use double precision:

outside = single (imfilter (double (image), grade) ); Close IPP:

iptsetpref ('UseIPPL',

wrong);

Note that this performance exceeding customization should be used in the image processing toolbox as several functions and as a last resort.


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -