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

native lib & cascade file loading fixing and optimizing. #31

Closed
wants to merge 3 commits into from
Closed

native lib & cascade file loading fixing and optimizing. #31

wants to merge 3 commits into from

Conversation

P0ulp
Copy link
Contributor

@P0ulp P0ulp commented Jul 21, 2013

No description provided.

P0ulp added 2 commits July 17, 2013 20:31
… integration in eclipse

> I noticed that the 32bit version didn’t work on macos : i refactored
the native lib forlder to have a macos64 and a windows32 as inticated
in the processing wiki.
> I noticed that the macos export didn’t work due to the loading of
native lib : i made a dynamic loading of this lib for macos64 and
windows32 so the export work great now for both os, and the use of your
librarie is easier in eclipse. (my code i based on the same system of
the video librarie from Andrés Colubri)
> I noticed that the Cascad loading didn’t work on windows, so i
updated the dynamic loading, so now it works great and the use of your
librarie is easier in eclipse. (my code i based on the same system of
the video librarie from Andrés Colubri)
@orgicus
Copy link

orgicus commented Jul 29, 2013

Just wanted to flag that there is an issue loading haar cascades on Windows 8 with 32bit Processing 2.0.

opencv.loadCascade(OpenCV.CASCADE_FRONTALFACE);

fails with

Cascade failed to load

I've also dragged the cascade xml into the sketch folder and tried:

opencv.loadCascade(dataPath("haarcascade_frontalface_alt.xml"));

but got the same message.
This is using library version 0.4 from the releases.

Great library otherwise :)

@P0ulp
Copy link
Contributor Author

P0ulp commented Jul 29, 2013

Hello orgicus !
Did you get this error with this pull request?
Just before the Console info "Cascade failed to load", you may have a "Load cascade from: " : wich path do you have after the colon ?
Thank for your help !

@orgicus
Copy link

orgicus commented Jul 30, 2013

@P0ulp

Hi. I've just used the compiled library from this repo's releases.
I'm not sure if it includes your changes.

I see nothing after the colon and there is no "Load cascade from: " message.
I did import the project in eclipse and exported a jar.
When using that version I see the full path and the problem is that the path looks valid.
If I paste the same path into my browser I can see the xml content.

Also, what's the recommended way of building the library ? I think i should do that using your repo.
The way I got it to work was to export a jar (not runnable/executable) and include everything else
in the project as a resource which ended up having quite a large filesize. I don't think that's the way to go.
What are the recommended steps ?

Thanks,
George

@P0ulp
Copy link
Contributor Author

P0ulp commented Jul 30, 2013

Hi,

I guess you get the original by atduskgreg version, because my pull request is not yet accepted.

So you can maybe get the version i Forked here : https://github.com/P0ulp/opencv-processing and get a compiled version with ant in eclipse (see here : https://github.com/processing/processing-templates/wiki/Eclipse-Library-Template)

Or you can get a version that i compiled here (but this version is not yet approved by atduskgreg, this is the version in that pull request) : https://www.dropbox.com/s/2ob52svz5cmh3up/opencv_processing-6.zip

Let me know if you get better result :)

@P0ulp
Copy link
Contributor Author

P0ulp commented Jul 30, 2013

Just one information, for an exemple usage of this lib in eclipse, you can have a look here : https://github.com/P0ulp/testProcessingVideoOpenCV

@atduskgreg
Copy link
Owner

Apologies for being slow merging this. I've reviewed it and it looks great but I've been traveling and haven't had the time to complete the merge. It'll go in today.

@orgicus
Copy link

orgicus commented Jul 30, 2013

I can confirm's @P0ulp's fix is working :)
Nice one!

@gl2748
Copy link

gl2748 commented Jul 30, 2013

I cannot get it to work. I'm really a novice with Github and much else,
George if you could post instructions for applying P0ulp's fix it would be
much appreciated...

On 30 July 2013 11:38, George Profenza notifications@github.com wrote:

I can confirm's @P0ulp https://github.com/P0ulp's fix is working :)
Nice one!


Reply to this email directly or view it on GitHubhttps://github.com//pull/31#issuecomment-21799943
.

@orgicus
Copy link

orgicus commented Jul 30, 2013

@gl2748 Easiest option for now is to use the dropbox link provided above. On the long run though you want to setup ant on your machine and follow these instructions: https://github.com/processing/processing-templates/wiki/Eclipse-Library-Template
Sorry I can't give you more details at the moment.

@atduskgreg
Copy link
Owner

@P0ulp I just pulled down this branch and it doesn't build for me. Here's the error:

BUILD FAILED
/Users/greg/Documents/code/eclipse/OpenCV For Processing/resources/build.xml:107: The following error occurred while executing this line:
/Users/greg/Documents/code/eclipse/OpenCV For Processing/resources/build.xml:141 /Users/greg/Documents/eclipse/processing-libraries does not exist.

Sounds like maybe you re-organized the eclipse project in some way? Is there something you forgot to checkin or some change to the Eclipse project settings that doesn't end up in the .project file or something?

@P0ulp
Copy link
Contributor Author

P0ulp commented Jul 31, 2013

@atduskgreg i guess it's an issue related to the Buildpath for processing core lib, i changed this in the buildpath ... sorry for that.
The issue come from the .classpath file (line 5), so do you want i made a new commit to update the buildpath with only users libraries or do you prefer a commit with the "add external jar" solution ?

@atduskgreg
Copy link
Owner

That makes sense. Yeah will you make a new commit with that change? Thanks!

@P0ulp
Copy link
Contributor Author

P0ulp commented Jul 31, 2013

@atduskgreg So i updated the Building path to use only user libraries, i think it's easier like that.
But in fact, this was not related to the original issue you encountered : the issue is from the resources/build.properties file, when building with ant, you need to update the line 41 in this file to reach your processing core.jar folder. I hope this is clear, and i hope i'm not saying bullshit this time :)
Thanks !

atduskgreg added a commit that referenced this pull request Aug 1, 2013
@atduskgreg
Copy link
Owner

Merged circa 5dafc9c. Released in 0.4.1. Thanks!

@atduskgreg atduskgreg closed this Aug 1, 2013
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.

4 participants