osama-raddad/encog-java

Arithmetical Exception while downsampling images (70% fails, 30% works)

Opened this issue · 0 comments

What steps will reproduce the problem?

It happens but not in all scenarios

1. When an image is passed and it is expected to be downsample:
i.e.

In Java: 

final ImageMLData input = new ImageMLData(bufferedImage);
input.downsample(this.downsample, false, 
this.downsampleHeight,this.downsampleWidth, 1, -1);

What is the expected output? What do you see instead?
The program to continue without issues.

What version of the product are you using? On what operating system?
3.1 and 3.2

Please provide any additional information below.


java.lang.ArithmeticException: / by zero
    at org.encog.util.downsample.RGBDownsample.downSampleRegion(RGBDownsample.java:184)
    at org.encog.util.downsample.SimpleIntensityDownsample.downSample(SimpleIntensityDownsample.java:74)
    at org.encog.platformspecific.j2se.data.image.ImageMLData.downsample(ImageMLData.java:89)

Just an example, I am sending an image that fails (Arrow.jpg) and another that 
works (ArrowLeft.jpg)



Original issue reported on code.google.com by ggh1...@gmail.com on 21 Oct 2013 at 9:20

Attachments: