Ask Your Question

marcin's profile - activity

2019-09-16 09:11:10 -0500 received badge  Popular Question (source)
2016-11-22 01:21:50 -0500 commented question VideoCapture problem in opencv 2.4.11, Ubuntu 14.04, eclipse mars

I removed 2.4.11 and installed 2.4.8 from synaptic, now everything works fine.

2016-11-21 08:46:37 -0500 received badge  Editor (source)
2016-11-21 08:45:48 -0500 asked a question VideoCapture problem in opencv 2.4.11, Ubuntu 14.04, eclipse mars

Hi,

I downloaded opencv 2.4.11 and the linker can not find some functions (VideoCapture, namedWindow, ...): /test/gstreamer2opencv/Debug/../gstreamer2opencv.cpp:160: undefined reference to `cv::VideoCapture::VideoCapture(cv::String const&)'

/test/gstreamer2opencv/Debug/../gstreamer2opencv.cpp:167: undefined reference to `cv::namedWindow(cv::String const&, int)'

/test/gstreamer2opencv/Debug/../gstreamer2opencv.cpp:171: undefined reference to `cv::VideoCapture::read(cv::_OutputArray const&)'

/test/gstreamer2opencv/Debug/../gstreamer2opencv.cpp:174: undefined reference to `cv::imshow(cv::String const&, cv::_InputArray const&)'

I am linking core and highgui libs. grep finds lines with those functions in libhighgui.so, so I do not understand what is going on. If I remove highgui lib I get even more reference errors, so my paths seem to be correct, too. Anyone have an idea what could be the problem?

2016-08-24 02:38:11 -0500 commented answer reading frames from mjpeg stream gstreamer, c++

I have red it should work beginning with opencv 3.0, see:

http://stackoverflow.com/questions/37...

and:

http://stackoverflow.com/questions/23...

But if I really can not do it in this way, than how can I read images from a video stream using opencv?

2016-08-23 08:53:37 -0500 asked a question reading frames from mjpeg stream gstreamer, c++

Hello,

I wrote a simple app which should read frames from mjpeg stream gstreamer. It works if I use gst-launch-1.0, but it does not work in opencv 3.1.0 in c++. Here are the details: This client-server combination works:

Server: gst-launch-1.0 -v v4l2src device=/dev/video0 ! "video/x-raw, width=640,height=480" ! jpegenc ! rtpjpegpay ! udpsink host=127.0.0.1 port=1111

Client: gst-launch-1.0 -v udpsrc port=1111 ! "application/x-rtp, payload=127" ! rtpjpegdepay ! jpegdec ! xvimagesink sync=false

However if I try to implement client in c++ using opencv:

cv::VideoCapture capture("udpsrc port=1111 ! application/x-rtp,payload=127 ! rtpjpegdepay ! jpegdec ! appsink");

It gives me the following error:

GStreamer Plugin: Embedded video playback halted; module udpsrc0 reported: Internal data flow error. OpenCV Error: Unspecified error (GStreamer: unable to start pipeline ) in cvCaptureFromCAM_GStreamer, file /home/marcin/dev/3rdparty/opencv-3.1.0/modules/videoio/src/cap_gstreamer.cpp, line 818 terminate called after throwing an instance of 'cv::Exception' what(): /home/marcin/dev/3rdparty/opencv-3.1.0/modules/videoio/src/cap_gstreamer.cpp:818: error: (-2) GStreamer: unable to start pipeline in function cvCaptureFromCAM_GStreamer

What is wrong in my code?