rhsimplex / image-match

🎇 Quickly search over billions of images
2.94k stars 405 forks source link

Python 3.5 issue with compute_mean_level method in ImageSignature #57

Closed eggytronixx closed 7 years ago

eggytronixx commented 7 years ago

avg_grey[i, j] = np.mean(image[lower_x_lim:upper_x_lim, lower_y_lim:upper_y_lim]) # no smoothing here as in the paper

lower_x_lim, upper_x_lim, lower_y_lim, and upper_y_lim are causing the slice to through an exception in python 3.5.

Does anyone else have this issue?

rhsimplex commented 7 years ago

Could you share the image causing the issue?

kern commented 7 years ago

Error I'm seeing is TypeError: slice indices must be integers or None or have an __index__ method

eggytronixx commented 7 years ago

I believe it was a type error. I did the following to the source, and it fixed the issue. The values for lower_x_lim, upper_x_lim, lower_y_lim, and upper_y_lim should be int not float

@rhsimplex I would using the url from the demo example on the docs page

screen shot 2017-01-26 at 8 31 32 pm

rhsimplex commented 7 years ago

@eggytronixx hey thanks for the fix. I'm traveling until next week, then I can fix it. Alternatively, you can make a PR and I'll merge it immediately if the tests pass 😁

rhsimplex commented 7 years ago

Closed by #58 Thanks @eggytronixx :+1:

eggytronixx commented 7 years ago

@rhsimplex 👍🏾