Opencv SAMPLES not working on Ubuntu

asked 2015-11-25 03:37:21 -0600

updated 2015-11-25 03:53:42 -0600

I am writing this command on my Ubuntu 14.04 terminal

./cpp-example-facedetect lena.jpg

for obtaining the samples of Opencv but i am getting these errors. This program demonstrates the cascade recognizer. Now you can use Haar or LBP features. This classifier can recognize many kinds of rigid objects, once the appropriate classifier is trained. It's most known use is for faces.

Usage:

./facedetect [--cascade=<cascade_path> this is the primary trained classifier such as frontal face]
   [--nested-cascade[=nested_cascade_path this an optional secondary classifier such as eyes]]
   [--scale=<image scale greater or equal to 1, try 1.3 for example>]
   [--try-flip]
   [filename|camera_index]

see facedetect.cmd for one call:

./facedetect --cascade="../../data/haarcascades/haarcascade_frontalface_alt.xml" --nested-cascade="../../data/haarcascades/haarcascade_eye.xml" --scale=1.3

During execution:

Hit any key to quit.
Using OpenCV version 3.0.0-alpha
   Processing 1 lena.jpg
   Processing 2
   Failed to load OpenCL runtime
   init done 
   opengl support available 
   In capture ...


OpenCV Error: Unspecified error (GStreamer: unable to start pipeline
) in icvStartPipeline, file /home/ashish/opencv_alpha/opencv-3.0.0-alpha/modules/videoio/src/cap_gstreamer.cpp, line 399
terminate called after throwing an instance of 'cv::Exception'
  what():  /home/ashish/opencv_alpha/opencv-3.0.0-alpha/modules/videoio/src/cap_gstreamer.cpp:399: error: (-2) GStreamer: unable to start pipeline
 in function icvStartPipeline

Aborted (core dumped)

Please provide any solution for this, i am using Opencv 3.0.0 alpha version.

edit retag flag offensive close merge delete

Comments

o_o serious editing needed ...

StevenPuttemans gravatar imageStevenPuttemans ( 2015-11-25 03:49:57 -0600 )edit

And to add to your error

  1. Avoid using alpha version, go for master branch from github
  2. Your camera capture interface is not working, so the sample will not work either
StevenPuttemans gravatar imageStevenPuttemans ( 2015-11-25 04:07:06 -0600 )edit
1

imho, the whole thing boils down to : it does not like your camera.

berak gravatar imageberak ( 2015-11-25 04:25:27 -0600 )edit