Skip to content

Update Core Addon : ofxOpenCv #18

Closed

Description

@bakercp

Need static libs for linuxarm6vl
http://raspberrypi.stackexchange.com/questions/409/can-i-use-opencv
http://eduardofv.com/read_post/185-Installing-OpenCV-on-the-Raspberry-Pi
http://eduardofv.com/read_post/192-OpenCV-on-the-Raspberry-Pi-with-Arch-Linux-ARM
etc

If you take this on, please clearly document your build procedure and post it on this wiki for future reference.

Activity

  1. jvcleave commented on Nov 21, 2012

    @jvcleave
    Member

    Is this something we should just use the ones available from apt-get?

  2. jvcleave commented on Nov 25, 2012

    @jvcleave
    Member

    there are libs in /addons/ofxOpenCv/libs/opencv/lib/linuxarmv6l - know where these came from?

  3. danzeeeman commented on Nov 25, 2012

    @danzeeeman

    You can check the git blame?
    On Nov 25, 2012 5:51 PM, "Jason Van Cleave" notifications@github.com
    wrote:

    there are lib in /addons/ofxOpenCv/libs/opencv/lib/linuxarmv6l - know
    where these came from?

    —
    Reply to this email directly or view it on GitHubhttps://github.com//issues/18#issuecomment-10699902.

  4. bakercp commented on Dec 6, 2012

    @bakercp
    MemberAuthor

    btw, those libs are gone now and were dummies put there to test the new makefile's libsorder.make support.

    Right now, this is pending a good way to allow addons to optionally link to native libs. This might happen via the addons.make file, or another file.

  5. jvcleave commented on Dec 7, 2012

    @jvcleave
    Member

    Good news!
    If you run
    sudo apt-get install libopencv-dev
    it will install all the necessary opencv static libs into /usr/lib with the exception of libopencv_haartraining_engine.a

    you can then

    mkdir /home/pi/openFrameworks/addons/ofxOpenCv/libs/opencv/lib/linuxarmv6l
    cd /usr/lib/
    cp libopencv*.a /home/pi/openFrameworks/addons/ofxOpenCv/libs/opencv/lib/linuxarmv6l/
    

    I then copied libsorder.make from
    addons/ofxOpenCv/libs/opencv/lib/linux64
    to
    addons/ofxOpenCvopencv/lib/linuxarmv6l
    and removed the line
    libopencv_haartraining_engine.a

    Simple test
    http://i.imgur.com/f99wV.jpg
    Thresholding
    http://i.imgur.com/llG3U.jpg
    Random Threshold (about 30 fps)
    https://vimeo.com/55077432

    Contourfinder works:
    http://i.imgur.com/A0eE7.jpg

    https://gist.github.com/4231042

  6. bakercp commented on Dec 7, 2012

    @bakercp
    MemberAuthor

    Very nice! Given that it is already there, it seems that compiling for the platform from scratch isn't impossible. Definitely a job for someone with distcc running though. Are we currently using the haar training engine at all? I know we're using face recognition? If not, it seems like we should figure out a solution for addons that allows us to link to static or shared system libs without copying. It's still on the todo list ...

  7. jvcleave commented on Dec 7, 2012

    @jvcleave
    Member

    yeah - I would have just linked it but I am waiting for the new Make system to settle to figure out where the best place is to do it.

    I am not sure if ofxCvHaarFinder.h requires libopencv_haartraining_engine.a . I am going to run a few common things through the addon to see if anything is broken

  8. arturoc commented on Dec 7, 2012

    @arturoc

    yes i think we should solve the inclusion of pkg-config libraries and headers for addons, that way we can use this without copying the libraries.

    there's actually several opencv packages:

    libopencv-calib3d2.3 libopencv-features2d2.3 libopencv-highgui-dev libopencv-objdetect2.3
    libopencv-calib3d-dev libopencv-features2d-dev libopencv-imgproc2.3 libopencv-objdetect-dev
    libopencv-contrib2.3 libopencv-flann2.3 libopencv-imgproc-dev libopencv-video2.3
    libopencv-contrib-dev libopencv-flann-dev libopencv-legacy2.3 libopencv-video-dev
    libopencv-core2.3 libopencv-gpu2.3 libopencv-legacy-dev
    libopencv-core-dev libopencv-gpu-dev libopencv-ml2.3
    libopencv-dev libopencv-highgui2.3 libopencv-ml-dev

    surely haartraining is in on of those

  9. jvcleave commented on Dec 7, 2012

    @jvcleave
    Member

    it looks like I have all of those packages installed :/

    pi@raspberrypi ~/openFrameworks/examples $ dpkg --get-selections | grep cv
    gpicview                    install
    libcv-dev                   install
    libcvaux-dev                    install
    libopencv-calib3d-dev               install
    libopencv-calib3d2.3                install
    libopencv-contrib-dev               install
    libopencv-contrib2.3                install
    libopencv-core-dev              install
    libopencv-core2.3               install
    libopencv-dev                   install
    libopencv-features2d-dev            install
    libopencv-features2d2.3             install
    libopencv-flann-dev             install
    libopencv-flann2.3              install
    libopencv-gpu-dev               install
    libopencv-gpu2.3                install
    libopencv-highgui-dev               install
    libopencv-highgui2.3                install
    libopencv-imgproc-dev               install
    libopencv-imgproc2.3                install
    libopencv-legacy-dev                install
    libopencv-legacy2.3             install
    libopencv-ml-dev                install
    libopencv-ml2.3                 install
    libopencv-objdetect-dev             install
    libopencv-objdetect2.3              install
    libopencv-video-dev             install
    libopencv-video2.3              install
  10. jvcleave commented on Dec 8, 2012

    @jvcleave
    Member

    It took 141 seconds but surprisingly ofxCvHaarFinder still works without the training engine lib.

    findHaarObjects.jpg
    http://i.imgur.com/VCYJT.jpg

    edit: got it to 65 seconds by doing it in setup (was previously doing it with a delay in update)

  11. bakercp commented on Dec 8, 2012

    @bakercp
    MemberAuthor

    Very cool. I'm thinking the haar training engine is for creating your own haar training data sets (i.e. creating the frontal, profile, etc xml data).

  12. Meach commented on Dec 12, 2012

    @Meach

    I haven't checked ofxCvHaarFinder but I confirm that with jvcleave instruction, the example works on the pandaboard as well. Great!

  13. jvcleave commented on Dec 12, 2012

    @jvcleave
    Member

    This line in config.make will allow you to compile without copying the libs
    PROJECT_LDFLAGS=-Wl,-rpath=./libs $(shell pkg-config opencv --libs 2> /dev/null)

  14. bakercp commented on Dec 20, 2012

    @bakercp
    MemberAuthor

    For the moment (until we figure out a smart addons system that can pull from system libs), I copied the static libs into the repo. All examples are now working out of the box (although the haar finder example still takes a while!).

    Closed with a85f9bc

  15. kalwalt commented on Dec 24, 2012

    @kalwalt

    hi @bakercp @arturoc and all ,the example ofxOpenCv in PandaboardES build succesfully but in Liveo video mode i have only a black window. I'm using the develop-raspberrypi branch.
    i will try disabling some ofxopencv draw to see if it is a memory issue.

  16. kalwalt commented on Jan 5, 2013

    @kalwalt

    @bakercp @arturoc we can close this issue. i tested ofxopenCV with latest develop-raspberrypi and it's fine . Also i have linuxarmv7l libs here: https://github.com/kalwalt/openFrameworks/tree/feature-openCv-linuxarmv7l i'm going to open a pull request for this.

  17. bakercp commented on Jan 5, 2013

    @bakercp
    MemberAuthor

    done!

  18. added a commit that references this issue on Jun 16, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions