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

Wrappers for FLandmark library #9

Merged
merged 1 commit into from
Jul 21, 2014
Merged

Conversation

jpsacha
Copy link
Member

@jpsacha jpsacha commented Jul 12, 2014

Wrappers for FLandmark library. Assumes that FLandmark binaries are pre-build as described in flandmark/README.md.

Due to some branching mishap early on, this PR has also initial support for FlyCapture 2, C API only. C++ API will be in separate PR, once completed. FlyCapture 2 (C API) wrappers are tested and work fine.

I have some samples for both wrappers (FLandmak and FlyCapture 2 C API), planning to add to javacv-examples project.

@saudet
Copy link
Member

saudet commented Jul 12, 2014

Hi, thanks for the PR! Though, would it be possible to adjust the flandmark presets to do stuff locally in the cppbuild subdirectory like I've done with all the rest recently? Since it depends on OpenCV, I guess we'll need to rely on relative paths defined in the pom.xml file. BTW, you named the top-level class flandmarkLib. Is it because flandmark would cause a naming conflict somewhere?

As for the FlyCapture, have you considered replacing the "hacks" with the following?

    .put(new Info("fc2TriggerDelayInfo").cast().pointerTypes("fc2PropertyInfo"))
    .put(new Info("fc2TriggerDelay").cast().pointerTypes("fc2Property"))

I could do it myself after a merge, but since I've proposed that previously, I'm just wondering what the rationale is, thanks.

@jpsacha
Copy link
Member Author

jpsacha commented Jul 13, 2014

I adjusted code to do FLandmark stuff locally in cppbuild and renamed flabdmarkLib to flandmark.

FlyCapture is on its own branch so I did modification there (see #6).

@saudet
Copy link
Member

saudet commented Jul 13, 2014

We'll probably need to adjust that for Linux as well, but that's alright. Apart of that, I'm not entirely sure myself yet how to handle dependencies across modules. One thing for sure, instead of copying files around, we can set compiler flags in the cppbuild.sh scripts to add additional include and library paths. That's what I'm doing for Tesseract with Leptonica that I'm working on right now. As for within the .java file, I think we can avoid hard coding paths by adding something like this in the pom.xml configuration of JavaCPP file:

          <includePath>${basedir}/../leptonica/cppbuild/${platform}/include/</includePath>
          <linkPath>${basedir}/../leptonica/cppbuild/${platform}/lib/</linkPath>
          <preloadPath>${basedir}/../leptonica/cppbuild/${platform}/bin/</preloadPath>

But I'm not there yet with Tesseract, so in any case, I'll get back to you on that if you don't try it before.

@jpsacha
Copy link
Member Author

jpsacha commented Jul 15, 2014

I added a simple example of using flandmark wrapper to javacv-examples on develop branch.

@jpsacha
Copy link
Member Author

jpsacha commented Jul 17, 2014

All commits are now squashed into a single one. Only flandmark changes are in, FlyCaptyre 2 commits are excluded. Code was tested using sample code in javacv-examples, develop branch.

@saudet
Copy link
Member

saudet commented Jul 19, 2014

Ok, sounds good! Sorry for the delay in replying. I was finishing up Leptonica and Tesseract. I think the way I've done things for those two should be adopted for flandmark as well because it makes it closest to how JavaCPP would see it if it were one project as usual and without copying files, thus less likely to cause surprises, I think. Could you take the time to check this out? Thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants