Page 3 of 3 FirstFirst 123
Results 41 to 48 of 48

Thread: OpenCV integration

  1. #41
    Join Date
    Oct 2010
    Posts
    19
    Qt products
    Qt4

    Default Re: OpenCV integration

    i'll try to update drivers and rebuild opencv


    Added after 19 minutes:


    I think i find some problem. When i was trying to install camdrivers - for acer crystal eye - i can't, because in compiling i take error - http://www.linuxtv.org/ driver don't know my linux-distro - Linux Mint,based od ubuntu. so maybe without this driver opecv can't find cameras...
    Last edited by core_st; 30th July 2011 at 00:16.

  2. #42
    Join Date
    Feb 2011
    Posts
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: OpenCV integration

    Although this is pretty old I have some suggestions for using OpenCV with Qt. First of all get rid of this old c style code you are using.

    Since OpenCV2 there's a new interface for c++ code. You should use cv::Mat and Videocapture and so on. You can use the cv::Mat constructor like cv::Mat(IplImage) for direct converion. The new Interface is fully compatible.

    This will not solve your problems for sure, but it's a good start to get an up to date and clean code base first before trying to fix things.

    Always use cmake for building OpenCV from source. This saves you a lot of trouble.

    If your OpenCV Setup ist correct, check out my Tutorial on this and tell me what you think please, cuz it's my first.

    I explain how to setup a Qt Project with OpenCV 2.3 in Mac OSX, Unix and Windows.

    I don't use any cvNamedWindow or QLabel for output of the frames because it sucks and it's slow.

    Instead I use a custom Widget which inherits from QtGLWidget. It renders the OpenCV Output using OpenGL 2D-Texture Mapping and handles dynamic resizing in the GUI and everything.

    Check it out here (http://br1ckb0x.fancy-bits.net/blog/?p=736) and don't forget to post any problems or suggestions. I hope it will help you guys.

  3. #43
    Join Date
    Oct 2010
    Posts
    19
    Qt products
    Qt4

    Default Re: OpenCV integration

    Can you post some working code with qt and opencv2 ?

  4. #44
    Join Date
    Oct 2010
    Posts
    19
    Qt products
    Qt4

    Default Re: OpenCV integration

    I installed Gentoo for my laptop, install qt, opencv. trying to run this program and get "assertion failed". Again...Check my camera:

    core@localhost ~ $ v4l-info

    ### v4l2 device info [/dev/video0] ###
    general info
    VIDIOC_QUERYCAP
    driver : "uvcvideo"
    card : "CNF7017"
    bus_info : "usb-0000:00:1a.7-6"
    version : 1.1.0
    capabilities : 0x4000001 [VIDEO_CAPTURE,STREAMING]

    standards

    inputs
    VIDIOC_ENUMINPUT(0)
    index : 0
    name : "Camera 1"
    type : CAMERA
    audioset : 0
    tuner : 0
    std : 0x0 []
    status : 0x0 []

    video capture
    VIDIOC_ENUM_FMT(0,VIDEO_CAPTURE)
    index : 0
    type : VIDEO_CAPTURE
    flags : 0
    description : "YUV 4:2:2 (YUYV)"
    pixelformat : 0x56595559 [YUYV]
    VIDIOC_G_FMT(VIDEO_CAPTURE)
    type : VIDEO_CAPTURE
    fmt.pix.width : 640
    fmt.pix.height : 480
    fmt.pix.pixelformat : 0x56595559 [YUYV]
    fmt.pix.field : NONE
    fmt.pix.bytesperline : 1280
    fmt.pix.sizeimage : 614400
    fmt.pix.colorspace : SRGB
    fmt.pix.priv : 0

    controls
    VIDIOC_QUERYCTRL(BASE+0)
    id : 9963776
    type : INTEGER
    name : "Brightness"
    minimum : -64
    maximum : 64
    step : 1
    default_value : 0
    flags : 0
    VIDIOC_QUERYCTRL(BASE+1)
    id : 9963777
    type : INTEGER
    name : "Contrast"
    minimum : 0
    maximum : 95
    step : 1
    default_value : 0
    flags : 0
    VIDIOC_QUERYCTRL(BASE+2)
    id : 9963778
    type : INTEGER
    name : "Saturation"
    minimum : 0
    maximum : 128
    step : 1
    default_value : 75
    flags : 0
    VIDIOC_QUERYCTRL(BASE+3)
    id : 9963779
    type : INTEGER
    name : "Hue"
    minimum : -40
    maximum : 40
    step : 1
    default_value : 4
    flags : 0
    So what's wrong?

  5. #45
    Join Date
    Dec 2011
    Posts
    33
    Thanks
    56
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: OpenCV integration

    how to display multi camera opencv in QLabel QT.
    Plz help
    Nguyá»…n LÆ°u VÅ© - Http://nguyenluuvu.com

  6. #46
    Join Date
    Jan 2013
    Posts
    2
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: OpenCV integration

    I edit QtOpenCV project example.I built on PC and for KIT ARM is OK.When I copy file to KIT,telnet to KIT and run with the same error.
    Qt Code:
    1. [root@FriendlyARM /myApp]# chmod a+rwx QtOpenCV
    2. [root@FriendlyARM /myApp]# ./QtOpenCV -qws
    3. QtOpenCV: main.cpp:13: int main(int, char**): Assertion `camera' failed.
    4. Aborted
    To copy to clipboard, switch view to plain text mode 
    ======================================
    main.cpp
    Qt Code:
    1. #include <opencv/cv.h>
    2. #include <opencv/highgui.h>
    3. #include <stdio.h>
    4. #include <assert.h>
    5. #include <QApplication>
    6. #include <QWidget>
    7. #include <QVBoxLayout>
    8. #include "QOpenCVWidget.h"
    9. #include "MyCameraWindow.h"
    10.  
    11. int main(int argc, char **argv) {
    12. CvCapture * camera = cvCaptureFromCAM(-1);
    13. assert(camera);
    14. IplImage * image=cvQueryFrame(camera);
    15. assert(image);
    16.  
    17. printf("Image depth=%i\n", image->depth);
    18. printf("Image nChannels=%i\n", image->nChannels);
    19.  
    20. QApplication app(argc, argv);
    21. MyCameraWindow *mainWin = new MyCameraWindow(camera);
    22. mainWin->setWindowTitle("OpenCV --> QtImage");
    23. mainWin->show();
    24. int retval = app.exec();
    25.  
    26. cvReleaseCapture(&camera);
    27.  
    28. return retval;
    29. }
    To copy to clipboard, switch view to plain text mode 
    ==================================================
    Can everybody help me run App use Opencv on KIT ARM
    Thanks

    I too try cvCreateCameraCapture() function but same this error!

  7. #47
    Join Date
    Jan 2013
    Posts
    2
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: OpenCV integration

    Anybody help?

  8. #48
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: OpenCV integration

    What exactly do you expect us to do? Your program fails on some OpenCV call.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 8
    Last Post: 18th March 2011, 12:27
  2. Replies: 7
    Last Post: 22nd December 2010, 09:13
  3. Qt4 integration with VS2008 Express how-to interest?
    By thomaspu in forum Qt Programming
    Replies: 11
    Last Post: 21st May 2008, 13:53
  4. How to open two cameras with opencv?
    By alphaboy in forum General Programming
    Replies: 2
    Last Post: 21st December 2007, 11:58
  5. VS Integration plugins not visible
    By kemp in forum Qt Tools
    Replies: 1
    Last Post: 11th August 2006, 23:22

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.