Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Turkish
  4. Opencv ile basit bir program denedim ama olmadı
QtWS25 Last Chance

Opencv ile basit bir program denedim ama olmadı

Scheduled Pinned Locked Moved Turkish
6 Posts 4 Posters 3.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    RodMckay
    wrote on last edited by
    #1

    Arkadaşlar , opencv ile resim görüntüleme ye çalıştım program çalışıyor ama resim gelmiyor bilenleriniz var mı acab çözümünü?

    1 Reply Last reply
    0
    • I Offline
      I Offline
      isgursoy
      wrote on last edited by
      #2

      Biraz daha detaya ihtiyac var.
      Ornek kodu ben de verebilirim. Ama seninkinin uzerinden gitmemiz daha cok isine yarar.

      OS X 10.9.2 / qt-mac-opensource-5.2.0-clang

      1 Reply Last reply
      0
      • R Offline
        R Offline
        RodMckay
        wrote on last edited by
        #3

        Qt 5.0.1 ve opencv 2.4.6 kullanıyorum

        .pro
        @
        #-------------------------------------------------

        Project created by QtCreator 2013-09-11T03:55:37

        #-------------------------------------------------

        QT += core

        QT -= gui

        TARGET = camera_onConsole
        CONFIG += console
        CONFIG -= app_bundle

        TEMPLATE = app

        INCLUDEPATH += D:/opencv/build/include

        LIBS += -LD:/opencv/build/x86/mingw/lib

        LIBS += -lopencv_highgui246
        -lopencv_imgproc246
        -lopencv_objdetect246
        -lopencv_core246

        SOURCES += main.cpp

        @

        main.cpp
        @
        #include <QCoreApplication>
        #include <opencv/cv.h>
        #include <opencv/cxcore.h>
        #include <opencv/highgui.h>

        int main(int argc, char *argv[])
        {
        QCoreApplication a(argc, argv);

        IplImage* img = cvLoadImage("C:/Users/Public/Pictures/Sample Pictures/Desert.jpg");
        cvNamedWindow( "Example1", CV_WINDOW_AUTOSIZE );
        cvShowImage("Example1", img);
        //cvWaitKey(0);
        cvDestroyWindow( "Example1" );
        cvReleaseImage(&img);
        
        return a.exec(&#41;;
        

        }@

        resimi göremiyorum
        bi sorum daha var
        program 0 ile sonlandı diyor bu doğru çalıştığınımı gösteriyor

        1 Reply Last reply
        0
        • I Offline
          I Offline
          isgursoy
          wrote on last edited by
          #4

          Baska bir hata ciktisi aliyormusun?
          Programin zaten gayet temel, ornek kod gibi. Hataya musait birsey goremiyorum. Topu OpenCV kurulumuna atabilirim.

          Bu kodlar;
          *) kutuphaneleri gosterebildiginde
          *) gorseli soyledigin yerde bulabilirse
          *) cvWaitkey(0) olmadikca
          istedigin gibi calismali.

          OpenCV isin icinde oldugunda bir sorun varsa ya kutuphane ya veri tipleriyle ilgilidir. Hatayi once bu ikisinde aramak lazim hep.

          0 donmesi calisma zamaninda kritik bir hata ile karsilasilmadigini gosterir.

          OS X 10.9.2 / qt-mac-opensource-5.2.0-clang

          1 Reply Last reply
          0
          • M Offline
            M Offline
            madblue
            wrote on last edited by
            #5
            //cvWaitKey(0);
            

            satırı aktifleştirip

            cvWaitKey(0);

            şeklinde yazıldığında resim görünmesi lazım.

            1 Reply Last reply
            0
            • E Offline
              E Offline
              endure
              wrote on last edited by
              #6

              bence PATH kısmına parametreleri eklemeniz gerekebilir daha yapmadıysanız eğer, opencv'nin lib ve include klasörlerini PATH kısmına ekleyip deneyebliirsiniz

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved