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

Android specific opencv helper #12

Closed
lu-zero opened this issue Jul 30, 2014 · 11 comments
Closed

Android specific opencv helper #12

lu-zero opened this issue Jul 30, 2014 · 11 comments

Comments

@lu-zero
Copy link
Contributor

lu-zero commented Jul 30, 2014

The current code works in android but since some optional parts use awt and that triggers lots of misleading warnings and the debugger is set on hold for each awt import.

Probably would be possible either replace the helper with a version w/out the awt code or replace such code with android-specific one (Rect vs Rectangle and such).

@saudet
Copy link
Member

saudet commented Jul 30, 2014

Would you have more concrete proposals? There is no such thing as a preprocessor in Java.

@lu-zero
Copy link
Contributor Author

lu-zero commented Jul 30, 2014

The simplest way is to add to the build system either the awt_helper or the
android_helper depending on the target and inherit from a common_helper
with the shared part.

On Wed, Jul 30, 2014 at 3:25 PM, Samuel Audet notifications@github.com
wrote:

Would you have more concrete proposals? There is no such thing as a
preprocessor in Java.


Reply to this email directly or view it on GitHub
#12 (comment)
.

@saudet
Copy link
Member

saudet commented Jul 30, 2014

Could you explain more concretely what is it you are proposing? Would we have like opencv-common.jar and mutually exclusive opencv-awt_helper.jar and opencv-android_helper.jar? How would that work with Maven?

@lu-zero
Copy link
Contributor Author

lu-zero commented Jul 30, 2014

Something along the lines of

<excludes>
   <exclude>**/android*.java</exclude>
</excludes>

and

<excludes>
   <exclude>**/awt*.java</exclude>
</excludes>

@saudet
Copy link
Member

saudet commented Jul 30, 2014

I meant, what are we going to do with the generated artifacts on the repository? I guess we could create submodules, so what directory structure do you propose to put the pom.xml files in? javacpp-presets/opencv/android_helper and javacpp-presets/opencv/awt_helper? Please be more specific, thank you

@lu-zero
Copy link
Contributor Author

lu-zero commented Jul 30, 2014

probably we can have a pattern like javacpp-presets/{library}/resource/{platform}/code

@saudet
Copy link
Member

saudet commented Jul 31, 2014

Resources cannot be Java code. That must go in the java subdirectory.

Anyway, creating submodules just for that isn't worth the trouble. I should have created that as a utility class from the start. This way, in Java SE we use the AWT class, and not on Android, so we don't get warnings or errors. Tell you what, if you come up with equivalent code for Android, we'll break backward compatibility and put the AWT code in its own utility class, because it's a feature people have been wanting for years:
https://code.google.com/p/javacv/issues/detail?id=67
https://code.google.com/p/javacv/issues/detail?id=68
Breaking compatibility for a feature that everyone wants is worth it I think. :)

@lu-zero
Copy link
Contributor Author

lu-zero commented Aug 3, 2014

I do agree!

@saudet
Copy link
Member

saudet commented Mar 22, 2015

Hi, it's been a while, but I've finally figured out something nice. Let me know what you think of the latest changes in these commits: 0574e66
bytedeco/javacv@7ee75f8
Thanks!!

@lu-zero
Copy link
Contributor Author

lu-zero commented Mar 22, 2015

I had been horribly busy as well =/ I'll try to check if the people using JavaCV can update to this version and try. Thanks a lot!

@saudet
Copy link
Member

saudet commented Apr 11, 2015

Changes included in the -0.11 release. Check out the details here: http://bytedeco.org/news/2015/04/04/javacv-frame-converters/ Let me know when you have some free time to work on something, thanks!

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