Ich habe vor kurzem OpenCV 2.4.2 in Ubuntu 12.04 installiert.VideoCapture funktioniert nicht in OpenCV 2.4.2
cap = VideoCapture(0)
funktioniert. aber ich kann keine Frames von einer Videoquelle aufnehmen.
cap = VideoCapture("input.avi")
img = cap.read()
gibt mir eine Anzahl mit allen Nullelementen.
ich auch ffmpeg 0,11 Neueste Schnappschuss x264, v4l-0.8.8 installiert haben (Alle sind aktuelle stabile Versionen)
cmake -D WITH_QT=ON -D WITH_FFMPEG=ON -D WITH_OPENGL=ON -D WITH_TBB=ON -D BUILD_EXAMPLES=OFF WITH_V4L=ON ..
make
sudo make install
Als ich Cmake tun, bekomme ich diese
- - Erkannte Version von GNU GCC: 46 (406)
- gefunden OpenEXR: /usr/lib/libIlmImf.so
- Looking for linux/videodev.h
- Suche nach linux/videodev.h - nicht gefunden
- Suche nach linux/videodev2.h
- Suche nach linux/videodev2.h - gefunden
- Suche nach libavformat/avformat.h
- Suche nach libavformat/avformat.h - gefunden
- Auf der Suche nach ffmpeg/avformat.h
- Suche nach ffmpeg/avformat.h - nicht
gefunden - Prüfung für Modul 'TBB'
- Paket 'TBB' nicht
gefunden und
-- Video I/O:
-- DC1394 1.x: NO
-- DC1394 2.x: YES (ver 2.2.0)
-- FFMPEG: YES
-- codec: YES (ver 54.23.100)
-- format: YES (ver 54.6.100)
-- util: YES (ver 51.54.100)
-- swscale: YES (ver 2.1.100)
-- gentoo-style: YES
-- GStreamer:
-- base: YES (ver 0.10.36)
-- app: YES (ver 0.10.36)
-- video: YES (ver 0.10.36)
-- OpenNI: NO
-- OpenNI PrimeSensor Modules: NO
-- PvAPI: NO
-- UniCap: NO
-- UniCap ucil: NO
-- V4L/V4L2: Using libv4l (ver 0.8.8)
-- XIMEA: NO
-- Xine: NO
ich für videodev.h sah, etc
- /usr/include/linux/videodev2.h existiert
- /usr/include/libavformat/avformat.h existiert
- /usr /local/include/libavformat/avformat.h existiert
Aber ich konnte nicht finden ffmpeg/avformat.h
Was ist das Problem hier?
Ich habe auch ein Problem mit Videocapture, es Abstürze beim Versuch, Video zu öffnen ... –