Closed GoogleCodeExporter closed 8 years ago
I have narrowed down the problem to NOT being dependent on image size, but
rather on the image itself. If you run the Imagestatistics on the attached
image, then open the image and save it without modification (using Gimp or the
like), you will get different values for the mean and stdDev with the re-saved
image. Both images should be identical, so not sure why values are not the same.
Using another program, such as Matlab, both images will return the same
statistical values.
Perhaps there is something in the .bmp file format that is causing a change in
the statistics calculation using AForge? Something other than actual pixel data
that gets changed when re-saved?
Original comment by carrasm...@gmail.com
on 18 Jul 2011 at 6:15
> Perhaps there is something in the .bmp file format that is causing a change
in the statistics calculation using AForge?
AForge does not care about the file format at all. File is opened using
standard .NET's method. AForge just works with bitmap class.
Original comment by andrew.k...@gmail.com
on 18 Jul 2011 at 7:40
Tested the image and the re-saving idea using GIMP. Yes, mean and std.dev. are
different if we apply ImageStatistics to original image or the re-saved image.
However, I am not convinced that there is bug in the way image statistics is
calculated (or maybe not convinced yet) …
Here is the thing. You say that mean value must be 45.298 and std.dev. must be
9.3673. If we apply image statistics to the re-saved image, then we get exactly
the same values. Which means the calculations itself are correct.
The fact is that mean and std.dev. are not correct for the original image does
not mean there is a problem in AForge.NET's calculations. As an example,
AForge.NET does not care about things like palette - when calculating
statistics it only cares about pixel values. I am not saying this a cause of
the problem. I just want to say there may be something wrong with the original
image itself.
Original comment by andrew.k...@gmail.com
on 13 Sep 2011 at 8:09
Original issue reported on code.google.com by
carrasm...@gmail.com
on 18 Jul 2011 at 5:26Attachments: