×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    Registered User
    Join Date
    Jun 2010
    Posts
    36

    no element "faceblur"', even though I did install libcv4

    Thanks, Daniil for having ported OpenCV. This is for sure one of the most useful packages for the device.

    Just one question, though: Does anyone have an idea why the following pipeline (based on http://vimeo.com/6866036) doesn't work:
    gst-launch v4l2camsrc device=/dev/video0 ! video/x-raw-yuv,width=480,height=272 ! videorate ! capsfilter caps="video/x-raw-yuv,width=480,height=272,framerate=(fraction)12/1" ! queue ! ffmpegcolorspace ! faceblur ! ffmpegcolorspace ! xvimagesink

    It gives me 'WARNING: erroneus pipeline: no element "faceblur"', even though I did install libcv4 and most other OpenCV packages.

    Best regards,
    Dorfmeister

  2. #2
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: How to use OpenCV for Maemo5 app?

    Quote Originally Posted by Dorfmeister View Post
    It gives me 'WARNING: erroneus pipeline: no element "faceblur"', even though I did install libcv4 and most other OpenCV packages.
    As far as I can tell from the package content
    http://packages.debian.org/source/sid/opencv
    there is no binary package, which installs any kind of gstreamer plugins.
    Last edited by divanov; 2010-06-10 at 18:43. Reason: fixing a typo

  3. #3
    Nokia Developer Moderator
    Join Date
    Mar 2009
    Posts
    1,024

    Re: no element "faceblur"', even though I did install libcv4

    Hi Dorfmeister,
    faceblur is part of the gst-opencv package. AFAIK It's currently not available in any Maemo repos.
    Anyway the code is available in github and it contains a debian/ dir too.
    If you are lucky you should not have any problem to build it in scratchbox.

    Code is here: http://github.com/Elleo/gst-opencv

  4. #4
    Registered User
    Join Date
    Jun 2010
    Posts
    36

    Re: Use Gstreamer + Opencv

    Hi,

    this is related to my previous question, I think: AFAIK gst-opencv (http://github.com/Elleo/gst-opencv) is the way to go. I haven't had time to try to port it, yet, but I would also be highly interested in having this package, since it would allow me to try opencv directly with gst-launch (which is a mighty tool). We could be barefaced and ask the maintainer of opencv whether he could include the gst-opencv package as well due to its importance of gstreamer to Maemo. I would REALLY appreciate that. The other variant would be to use OpenCV to retrieve the image. I tried that (http://discussion.forum.nokia.com/fo...-in-Qt-example) by simply porting (http://qt-apps.org/content/show.php/...?content=89995) - basically creating a .pro file and recompiling, but the performance was much worse than using GStreamer directly. I didn't fully understand why the performance was worse and haven't solved the issue, though.

    I'm very busy right now, but if all else fails, I could try to port it myself next week. Furthermore, I'm obviously no expert in this, so I would appreciate it if someone with deeper insight could share his knowledge on the matter as well.


    Best regards,
    Dorfmeister

    EDIT/PS:
    OK, I tried
    Code:
    git clone git://github.com/Elleo/gst-opencv.git
    /scratchbox/login
    ./autogen
    Then I removed all -Werror flags and did
    Code:
    make
    which seems to have worked out just fine. As previously stated, I unfortunately won't have time to look into it right now, but with this you can probably do what you intended to.

    Oh, and you're right: The code you quoted is the one, which gets the camera image. I tapped into this part as well, even though the OpenGL stuff is obviously overlayed in other parts (where FPS is drawn).

    EDIT/PPS:
    I tried building the .deb package for you.
    fakeroot apt-get install automake autoconf debhelper libtool

    Since I still got:
    Code:
    dpkg-buildpackage: source package is gst-opencv
    dpkg-buildpackage: source version is 0.1+git20100301ubuntu2
    dpkg-buildpackage: source changed by Mike Sheldon <mike@mikeasoft.com>
    dpkg-buildpackage: host architecture armel
    dpkg-buildpackage: source version without epoch 0.1+git20100301ubuntu2
    : Using Scratchbox tools to satisfy builddeps
    : Scratchbox has unsatisfying version: debhelper 5.0.42
    dpkg-checkbuilddeps: Unmet build dependencies: debhelper (>= 7)
    dpkg-buildpackage: Build dependencies/conflicts unsatisfied; aborting.
    dpkg-buildpackage: (Use -d flag to override.)
    I removed (>=7) from debhelper entry in debian/control. But I still get no .deb file:

    Code:
    [sbox-FREMANTLE_ARMEL: ~/OwnProjects/gst-launch/gst-opencv] > dpkg-buildpackage -rfakeroot
    dpkg-buildpackage: source package is gst-opencv
    dpkg-buildpackage: source version is 0.1+git20100301ubuntu2
    dpkg-buildpackage: source changed by Mike Sheldon <mike@mikeasoft.com>
    dpkg-buildpackage: host architecture armel
    dpkg-buildpackage: source version without epoch 0.1+git20100301ubuntu2
    : Using Scratchbox tools to satisfy builddeps
     fakeroot debian/rules clean
    dh_testdir
    dh_testroot
    rm -f build-stamp configure-stamp
    # Add here commands to clean up after the build process.
    #/scratchbox/tools/bin/make clean
    dh_clean 
    dh_clean: Sorry, but 5 is the highest compatibility level supported by this debhelper.
    make: *** [clean] Error 1
    Why?! Does anybody have any suggestions? Can I somehow easily install debhelper 7.0 or do I have to download and build it manually? How do I compile and install a package manually in scratchbox? From what I read I have to install packages in scratchbox in ARMEL and(!) x86 separately. If I build it in ARMEL, however, I build it for ARMEL, even though I'm on x86. How can I upgrade debhelper? (Probably trivial, but I already spent too much time on this - there are excercises and exams I have to prepare for.) Shouldn't be too difficult to get it working now, I hope. If anyone succeeds, please post the last steps. Thank you.
    Last edited by Dorfmeister; 2010-06-16 at 06:05.

  5. #5
    Nokia Developer Moderator
    Join Date
    Mar 2009
    Posts
    1,024

    Re: Use Gstreamer + Opencv

    Quote Originally Posted by Dorfmeister View Post
    Hi,

    this is related to my previous question, I think: AFAIK gst-opencv (http://github.com/Elleo/gst-opencv) is the way to go. I haven't had time to try to port it, yet, but I would also be highly interested in having this package, since it would allow me to try opencv directly with gst-launch (which is a mighty tool). We could be barefaced and ask the maintainer of opencv whether he could include the gst-opencv package as well due to its importance of gstreamer to Maemo. I would REALLY appreciate that. The other variant would be to use OpenCV to retrieve the image. I tried that (http://discussion.forum.nokia.com/fo...-in-Qt-example) by simply porting (http://qt-apps.org/content/show.php/...?content=89995) - basically creating a .pro file and recompiling, but the performance was much worse than using GStreamer directly. I didn't fully understand why the performance was worse and haven't solved the issue, though.

    I'm very busy right now, but if all else fails, I could try to port it myself next week. Furthermore, I'm obviously no expert in this, so I would appreciate it if someone with deeper insight could share his knowledge on the matter as well.


    Best regards,
    Dorfmeister

    EDIT/PS:
    OK, I tried
    Code:
    git clone git://github.com/Elleo/gst-opencv.git
    /scratchbox/login
    ./autogen
    Then I removed all -Werror flags and did
    Code:
    make
    which seems to have worked out just fine. As previously stated, I unfortunately won't have time to look into it right now, but with this you can probably do what you intended to.

    Oh, and you're right: The code you quoted is the one, which gets the camera image. I tapped into this part as well, even though the OpenGL stuff is obviously overlayed in other parts (where FPS is drawn).

    EDIT/PPS:
    I tried building the .deb package for you.
    fakeroot apt-get install automake autoconf debhelper libtool

    Since I still got:
    Code:
    dpkg-buildpackage: source package is gst-opencv
    dpkg-buildpackage: source version is 0.1+git20100301ubuntu2
    dpkg-buildpackage: source changed by Mike Sheldon <mike@mikeasoft.com>
    dpkg-buildpackage: host architecture armel
    dpkg-buildpackage: source version without epoch 0.1+git20100301ubuntu2
    : Using Scratchbox tools to satisfy builddeps
    : Scratchbox has unsatisfying version: debhelper 5.0.42
    dpkg-checkbuilddeps: Unmet build dependencies: debhelper (>= 7)
    dpkg-buildpackage: Build dependencies/conflicts unsatisfied; aborting.
    dpkg-buildpackage: (Use -d flag to override.)
    I removed (>=7) from debhelper entry in debian/control. But I still get no .deb file:

    Code:
    [sbox-FREMANTLE_ARMEL: ~/OwnProjects/gst-launch/gst-opencv] > dpkg-buildpackage -rfakeroot
    dpkg-buildpackage: source package is gst-opencv
    dpkg-buildpackage: source version is 0.1+git20100301ubuntu2
    dpkg-buildpackage: source changed by Mike Sheldon <mike@mikeasoft.com>
    dpkg-buildpackage: host architecture armel
    dpkg-buildpackage: source version without epoch 0.1+git20100301ubuntu2
    : Using Scratchbox tools to satisfy builddeps
     fakeroot debian/rules clean
    dh_testdir
    dh_testroot
    rm -f build-stamp configure-stamp
    # Add here commands to clean up after the build process.
    #/scratchbox/tools/bin/make clean
    dh_clean 
    dh_clean: Sorry, but 5 is the highest compatibility level supported by this debhelper.
    make: *** [clean] Error 1
    Why?! Does anybody have any suggestions? Can I somehow easily install debhelper 7.0 or do I have to download and build it manually? How do I compile and install a package manually in scratchbox? From what I read I have to install packages in scratchbox in ARMEL and(!) x86 separately. If I build it in ARMEL, however, I build it for ARMEL, even though I'm on x86. How can I upgrade debhelper? (Probably trivial, but I already spent too much time on this - there are excercises and exams I have to prepare for.) Shouldn't be too difficult to get it working now, I hope. If anyone succeeds, please post the last steps. Thank you.
    If you replace dh_clean with rm files_you_have_to_remove_to_clean_the_source_tree it should work.
    You don't need to port debhelper 7 to Maemo.
    If you have still problems, fill free to ask..

  6. #6
    Registered User
    Join Date
    Jun 2010
    Posts
    36

    Re: no element "faceblur"', even though I did install libcv4

    Thanks for the suggestion, but I fear that won't help: If you replace dh_clean, it will fail with the same error in dh_prep, if you replace or comment this, it will fail with dh_installdirs, then with dh_installchangelogs, dh_installdocs, dh_installexamples and so on. Obviously, they didn't require debhelper >=7 for nothing. Could anybody tell me how to install an actual debhelper manually for my scratchbox ARMEL target?

    The first step
    Code:
    git clone git://git.debian.org/debhelper/debhelper.git
    is not a problem, but how do I deploy it in my scratchbox ARMEL target without messing anything up?

    Thanks in advance.
    Last edited by Dorfmeister; 2010-06-16 at 13:19.

  7. #7
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: no element "faceblur"', even though I did install libcv4

    There is no problem with debhelper. I will publish package to extras-devel if you can wait until EET evening.

  8. #8
    Nokia Developer Moderator
    Join Date
    Mar 2009
    Posts
    1,024

    Re: no element "faceblur"', even though I did install libcv4

    If you are not interested to publish that package to extras you can get dh7 from here: http://www.maemory.com/N900/README.txt

  9. #9
    Nokia Developer Moderator
    Join Date
    Mar 2009
    Posts
    1,024

    Re: no element "faceblur"', even though I did install libcv4

    Quote Originally Posted by divanov View Post
    There is no problem with debhelper. I will publish package to extras-devel if you can wait until EET evening.
    It's not allowed to upload packages to extras-devel which have the same name of the Nokia ones. If you want you have to change the name.

  10. #10
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: no element "faceblur"', even though I did install libcv4

    Quote Originally Posted by gnuton View Post
    It's not allowed to upload packages to extras-devel which have the same name of the Nokia ones. If you want you have to change the name.
    FYI, there is no gst-opencv in repositories at the moment.

  11. #11
    Registered User
    Join Date
    Jun 2010
    Posts
    36

    Re: no element "faceblur"', even though I did install libcv4

    How often have you saved my life, Daniil? Thank you.

    For the record: I tried installing debhelper7 from the repository (even removed the old debhelper), put the old rules back in as well as the requirement in control (debhelper7 (>=7)) but still got this output including the same error:
    Code:
    [sbox-FREMANTLE_ARMEL: ~] > fakeroot apt-get install debhelper7
    Reading package lists... Done
    Building dependency tree... Done
    The following extra packages will be installed:
      bsdmainutils bsdutils groff-base man-db
    Suggested packages:
      wamerican wordlist whois vacation dh-make groff less
    The following NEW packages will be installed:
      bsdmainutils bsdutils debhelper7 groff-base man-db
    0 upgraded, 5 newly installed, 0 to remove and 43 not upgraded.
    Need to get 2675kB of archives.
    After unpacking 7361kB of additional disk space will be used.
    Do you want to continue [Y/n]? y
    WARNING: The following packages cannot be authenticated!
      bsdutils bsdmainutils groff-base man-db debhelper7
    Install these packages without verification [y/N]? y
    Get:1 http://repository.maemo.org fremantle/sdk/free bsdutils 1:2.13.1.1-1maemo3+0m5 [62.6kB]
    Get:2 http://repository.maemo.org fremantle/sdk/free bsdmainutils 6.1.10+0m5 [176kB]
    Get:3 http://repository.maemo.org fremantle/sdk/free groff-base 1.18.1.1-11osso3 [829kB]
    Get:4 http://repository.maemo.org fremantle/sdk/free man-db 2.5.1-3maemo1 [1017kB]
    Get:5 http://repository.maemo.org fremantle/free debhelper7 7.4.11-maemo6 [590kB]
    Fetched 2675kB in 2s (997kB/s)
    Selecting previously deselected package bsdutils.
    (Reading database ... 37631 files and directories currently installed.)
    Unpacking bsdutils (from .../bsdutils_1%3a2.13.1.1-1maemo3+0m5_armel.deb) ...
    Setting up bsdutils (2.13.1.1-1maemo3+0m5) ...
    
    Selecting previously deselected package bsdmainutils.
    (Reading database ... 37646 files and directories currently installed.)
    Unpacking bsdmainutils (from .../bsdmainutils_6.1.10+0m5_armel.deb) ...
    Selecting previously deselected package groff-base.
    Unpacking groff-base (from .../groff-base_1.18.1.1-11osso3_armel.deb) ...
    Selecting previously deselected package man-db.
    Unpacking man-db (from .../man-db_2.5.1-3maemo1_armel.deb) ...
    Selecting previously deselected package debhelper7.
    Unpacking debhelper7 (from .../debhelper7_7.4.11-maemo6_all.deb) ...
    Setting up bsdmainutils (6.1.10+0m5) ...
    
    Setting up groff-base (1.18.1.1-11osso3) ...
    
    Setting up man-db (2.5.1-3maemo1) ...
    debconf: unable to initialize frontend: Dialog
    debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 75.)
    debconf: falling back to frontend: Readline
    Building database of manual pages in the background.
    
    Setting up debhelper7 (7.4.11-maemo6) ...
    
    [sbox-FREMANTLE_ARMEL: ~] > cd OwnProjects/gst-launch/gst-opencv
    [sbox-FREMANTLE_ARMEL: ~/OwnProjects/gst-launch/gst-opencv] > dpkg-buildpackage -rfakeroot
    dpkg-buildpackage: source package is gst-opencv
    dpkg-buildpackage: source version is 0.1+git20100301ubuntu2
    dpkg-buildpackage: source changed by Mike Sheldon <mike@mikeasoft.com>
    dpkg-buildpackage: host architecture armel
    dpkg-buildpackage: source version without epoch 0.1+git20100301ubuntu2
    : Using Scratchbox tools to satisfy builddeps
     fakeroot debian/rules clean
    dh_testdir
    dh_testroot
    rm -f build-stamp configure-stamp
    # Add here commands to clean up after the build process.
    #/scratchbox/tools/bin/make clean
    dh_clean 
    dh_clean: Sorry, but 5 is the highest compatibility level supported by this debhelper.
    make: *** [clean] Error 1
    If anybody has suggestions, why I continue to fail on this - I'd be happy to learn.

  12. #12
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: no element "faceblur"', even though I did install libcv4


  13. #13
    Registered User
    Join Date
    Jun 2010
    Posts
    5

    Re: no element "faceblur"', even though I did install libcv4

    Wow, very cool to see this packaged for Maemo (I have an n900 myself), I don't have a massive amount of time to work on gst-opencv these days (although a few others have started contributing now) , but if there's anything you guys need from me just let me know.

  14. #14
    Registered User
    Join Date
    Jun 2010
    Posts
    5

    Re: no element "faceblur"', even though I did install libcv4

    I've just merged in some extra plugins that thiagoss has written which allow you to apply some basic OpenCV operations to video streams, so you might want to consider updating the package when you get a chance.

  15. #15
    Registered User
    Join Date
    Jun 2010
    Posts
    36

    Re: no element "faceblur"', even though I did install libcv4

    This is so awesome. Thank you very much. I built a cool edgedetect pipeline: gst-launch v4l2camsrc device=/dev/video0 ! video/x-raw-yuv,width=480,height=272 ! videorate ! capsfilter caps="video/x-raw-yuv,width=480,height=272,framerate=(fraction)12/1" ! queue ! ffmpegcolorspace ! edgedetect ! ffmpegcolorspace ! xvimagesink

    But if I try to modify it the way I supposed above and replace edgedetect with faceblur, it only renders one frame and spins. Any idea what's causing this? If faceblur worked as well, I'd be fully satisfied.


    Best regards,
    Dorfmeister

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 6
    Last Post: 2011-05-20, 10:43
  2. How to connect to a "Protected" Secure Element with JCOP tools?
    By herwijnen in forum Near Field Communication
    Replies: 1
    Last Post: 2009-06-29, 18:18
  3. Replies: 3
    Last Post: 2009-06-18, 21:42
  4. Replies: 0
    Last Post: 2008-02-14, 10:27
  5. Replies: 6
    Last Post: 2007-04-16, 23:33

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •