Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use the img_hash module with JavaCV #933

Closed
anatolyra opened this issue Mar 7, 2018 · 12 comments
Closed

How to use the img_hash module with JavaCV #933

anatolyra opened this issue Mar 7, 2018 · 12 comments

Comments

@anatolyra
Copy link

anatolyra commented Mar 7, 2018

I'm trying to generate a phash for an image. Unless I'm missing something, the img_hash module is not integrated into the JavaCV lib. Is there a way of doing that?

Thanks!

@saudet
Copy link
Member

saudet commented Mar 8, 2018

Marking as duplicate of bytedeco/javacpp-presets#319

Contributions welcome!

@saudet saudet closed this as completed Mar 8, 2018
@saudet
Copy link
Member

saudet commented Mar 10, 2018

I've just added it in commit bytedeco/javacpp-presets@fdc7008
Please try it out with the snapshots: http://bytedeco.org/builds/

@anatolyra
Copy link
Author

anatolyra commented Mar 14, 2018

The snapshot works great, thank you!

When is it going to be released?

@saudet
Copy link
Member

saudet commented Mar 14, 2018 via email

@anatolyra
Copy link
Author

Having issues with the snapshot repo (it seems to be flakey). Is there an ETA on the release?

@saudet
Copy link
Member

saudet commented Mar 20, 2018

Did something break with the latest binaries?

@anatolyra
Copy link
Author

anatolyra commented Mar 20, 2018 via email

@saudet
Copy link
Member

saudet commented Mar 31, 2018

Released! Enjoy

@anatolyra
Copy link
Author

Hey,

It seems I'm getting this error now:
java.lang.OutOfMemoryError: Cannot allocate new BytePointer(62063): totalBytes = 16, physicalBytes = 1G(Cannot allocate new BytePointer(62063): totalBytes = 16, physicalBytes = 1G)
at org.bytedeco.javacpp.BytePointer.(BytePointer.java:106)
at org.bytedeco.javacpp.BytePointer.(BytePointer.java:71)

Caused by:java.lang.OutOfMemoryError: Physical memory usage is too high: physicalBytes = 1G > maxPhysicalBytes = 989M(Physical memory usage is too high: physicalBytes = 1G > maxPhysicalBytes = 989M)
at org.bytedeco.javacpp.Pointer.deallocator(Pointer.java:576)
at org.bytedeco.javacpp.Pointer.init(Pointer.java:121)
at org.bytedeco.javacpp.BytePointer.allocateArray(BytePointer.java:-2)
at org.bytedeco.javacpp.BytePointer.(BytePointer.java:98)

I'm not sure if I got that with the snapshot. Are you familiar with this type of error?

@saudet
Copy link
Member

saudet commented Apr 3, 2018

Just increase the java -Xmx option, it will take care of that.

@anatolyra
Copy link
Author

anatolyra commented Apr 3, 2018 via email

@saudet
Copy link
Member

saudet commented Apr 3, 2018

As much as it needs, probably not 1 GB per image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants