पर पढ़ नहीं सकता है। मैं उबंटू 13.04 (एसर सी 7 Chromebook पर) पर ओपनसीवी 2.4.6 का उपयोग कर रहा हूं, और मैं यह देखने के लिए एक सरल परीक्षण प्रोग्राम का उपयोग कर रहा हूं कि मेरा वेबकैम किसके साथ काम करेगा या नहीं OpenCV। यह पनीर और स्काइप के साथ ठीक काम करता है, इसलिए मुझे पता है कि वेब कैमरा स्वयं मुद्दा नहीं है।ओपनसीवी वीडियो कैप्चर मेरे वेबकैम से सभी
यहाँ मेरी कोड (जो किसी भी त्रुटि के बिना संकलित) है: यदि मैं किसी भी तर्क के बिना कार्यक्रम चलाने (के बाद से मैं इसे CV_CAP_ANY उपयोग करना चाहते हैं)
#include "opencv2/opencv.hpp"
#include <stdio.h>
#include <stdlib.h>
using namespace std;
using namespace cv;
int main(int argc, char *argv[])
{
cv::VideoCapture cap;
if(argc > 1)
{
cap.open(string(argv[1]));
}
else
{
cap.open(CV_CAP_ANY);
}
if(!cap.isOpened())
{
printf("Error: could not load a camera or video.\n");
}
Mat frame;
namedWindow("video", 1);
for(;;)
{
waitKey(20);
cap >> frame;
if(!frame.data)
{
printf("Error: no frame data.\n");
break;
}
imshow("video", frame);
}
}
, मैं
Error: could not load a camera or video.
init done
opengl support available
libpng warning: Application built with libpng-1.2.49 but running with 1.5.12
libpng warning: Application built with libpng-1.2.49 but running with 1.5.12
libpng warning: Application built with libpng-1.2.49 but running with 1.5.12
libpng warning: Application built with libpng-1.2.49 but running with 1.5.12
libpng warning: Application built with libpng-1.2.49 but running with 1.5.12
libpng warning: Application built with libpng-1.2.49 but running with 1.5.12
libpng warning: Application built with libpng-1.2.49 but running with 1.5.12
libpng warning: Application built with libpng-1.2.49 but running with 1.5.12
libpng warning: Application built with libpng-1.2.49 but running with 1.5.12
libpng warning: Application built with libpng-1.2.49 but running with 1.5.12
Error: no frame data.
अगर मैं तर्क के रूप में/dev/video0 (मेरी केवल कैमरा) निर्दिष्ट करते हैं, मैं
demux_wavpack: (open_wv_file:127) open_wv_file: non-seekable inputs aren't supported yet.
(ERROR)icvOpenAVI_XINE(): Unable to open source '/dev/video0'
init done
opengl support available
libpng warning: Application built with libpng-1.2.49 but running with 1.5.12
libpng warning: Application built with libpng-1.2.49 but running with 1.5.12
libpng warning: Application built with libpng-1.2.49 but running with 1.5.12
libpng warning: Application built with libpng-1.2.49 but running with 1.5.12
libpng warning: Application built with libpng-1.2.49 but running with 1.5.12
libpng warning: Application built with libpng-1.2.49 but running with 1.5.12
libpng warning: Application built with libpng-1.2.49 but running with 1.5.12
libpng warning: Application built with libpng-1.2.49 but running with 1.5.12
libpng warning: Application built with libpng-1.2.49 but running with 1.5.12
libpng warning: Application built with libpng-1.2.49 but running with 1.5.12
GStreamer Plugin: Embedded video playback halted; module source reported: Could not read from resource.
Error: no frame data.
मिलता है मैं करने के लिए पथ निर्दिष्ट तर्क के रूप में एक वीडियो फ़ाइल, यह वीडियो बस ठीक खेलता है।
मैं किसी भी मदद की सराहना करता हूं। अग्रिम में धन्यवाद!
वाह। इसने मुझे पिछले हफ्ते में फेंक दिया है, इसलिए मुझे खुशी है कि उन्होंने आज इसे हॉटफिक्स किया। आपको बहुत - बहुत धन्यवाद! – Jragon
आपका स्वागत है;) – Poko
मैंने अभी 2.4.6 को हटाने और 2.4.6.1 इंस्टॉल करना समाप्त कर दिया है, और मेरा कोड सही काम करता है! – Jragon