Bonjour,

Je suis en train de travailler sous Qt et l'integration d'OpenCV. Je voudrais intégrer un flux video.

Voici mon .pro sous Qt:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#-------------------------------------------------
#
# Project created by QtCreator 2013-01-12T11:04:26
#
#-------------------------------------------------
 
QT       += core gui
 
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
 
TARGET = sans_titre
TEMPLATE = app
 
 
SOURCES += main.cpp\
        mainwindow.cpp
 
HEADERS  += mainwindow.h
#HEADERS += C:/OpenCV-2.3.0/include/opencv
#HEADERS += C:/OpenCV-2.3.0/modules/core/include/
 
FORMS    += mainwindow.ui*
 
QT += opengl
 
INCLUDEPATH += \
C:/OpenCV-2.3.0/build\bin \
C:/OpenCV-2.3.0/include \
C:/OpenCV-2.3.0/include/opencv \
C:/OpenCV-2.3.0/include/opencv2 \
C:/OpenCV-2.3.0/modules/core/include \
C:/OpenCV-2.3.0/modules/flann/include \
C:/OpenCV-2.3.0/modules/highgui/include \
C:/OpenCV-2.3.0/modules/imgproc/include \
C:/OpenCV-2.3.0/modules/legacy/include \
C:/OpenCV-2.3.0/modules/ml/include \
C:/OpenCV-2.3.0/modules/video/include \
C:/OpenCV-2.3.0/modules/features2d/include \
C:/OpenCV-2.3.0/modules/calib3d/include \
C:/OpenCV-2.3.0/modules/objdetect/include \
C:/OpenCV-2.3.0/modules/contrib/include
 
 
 
LIBS += -L C:/OpenCV-2.3.0/build/lib
LIBS += -l opencv_calib3d230.dll
LIBS += -l opencv_contrib230.dll
LIBS += -l opencv_core230.dll
LIBS += -l opencv_features2d230.dll
LIBS += -l opencv_flann230.dll
LIBS += -l opencv_gpu230.dll
LIBS += -l opencv_highgui230.dll
LIBS += -l opencv_imgproc230.dll
LIBS += -l opencv_legacy230.dll
LIBS += -l opencv_ml230.dll
LIBS += -l opencv_objdetect230.dll
LIBS += -l opencv_video230.dll
LIBS += -l opencv_ffmpeg.dll
La compilation se passe bien visiblement, pas d'erreur, a part des warning sur des données non utilisé que j'ai créé. Par contre lorsque je lance le programme, il me lance une fenêtre avec :
"the application has requested the runtime to terminate it in an unusual way"
et ça quitte le programme.
Dans la fenêtre de compile j'ai ça:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
 
Release\release\sans_titre.exe...Invalid parameter passed to C runtime function.
Invalid parameter passed to C runtime function.
warning: Error opening file (../../modules/highgui/src/cap_ffmpeg_impl.hpp:477)
OpenCV Error: Assertion failed (video) in MainWindow, file ..\sans_titre\mainwindow.cpp, line 21
terminate called after throwing an instance of 'cv::Exception'
  what():  ..\sans_titre\mainwindow.cpp:21: error: (-215) video in function MainWindow
 
C:\Users\darty\Desktop\Développement\Qt\test2\sans_titre-build-Qt_4_8_4_4_8_4-Release\release\sans_titre.exe a quitté avec le code 3
Quelqu'un aurait une idée de la source du problème?
D'avance merci.