sunyinhui / jopensurf

Automatically exported from code.google.com/p/jopensurf
Other
0 stars 0 forks source link

Index out of bound exception occured when new SURF object is created with BufferedImage with alpha channel as a parameter. #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
================================================
1. Create a new surf object: new Surf(bi); Where bi is a buffered image with 
alpha channel

What is the expected output? What do you see instead?
================================================
Array index out of bound exception occurred.

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

Please provide any additional information below.
================================================
To fix the issue file IntegralImage.java on line 96 must be changed:

int[] pixel = new int[3];  => int[] pixel = new int[4];

Cause there is 4 possible colour channels in BufferedImage in general case.

Original issue reported on code.google.com by sergei.n...@gmail.com on 5 Dec 2010 at 10:14

GoogleCodeExporter commented 9 years ago
I was able to reproduce this error using the attached image, so I updated 
IntegralImage.java as per your suggestion, thanks for catching this!

Original comment by jojopot...@gmail.com on 6 Dec 2010 at 4:24

Attachments:

GoogleCodeExporter commented 9 years ago
Thank you!

Original comment by sergei.n...@gmail.com on 6 Dec 2010 at 4:33

GoogleCodeExporter commented 9 years ago
Sure thing, let me know if anything else comes up :)

Original comment by jojopot...@gmail.com on 6 Dec 2010 at 4:37