Ask Your Question

kishan's profile - activity

2017-05-15 11:16:58 -0600 received badge  Popular Question (source)
2014-09-10 01:52:54 -0600 commented question opencv video capturing and saving using webcam using intel galileo

how to find which codecs are already installed in my system?

2014-09-09 03:43:05 -0600 commented question opencv video capturing and saving using webcam using intel galileo

I have tried it but it is not showing me list of codec

2014-09-09 02:11:26 -0600 commented question opencv video capturing and saving using webcam using intel galileo

Now I came out of the rock.. now you give me solution

2014-09-09 02:07:05 -0600 commented question opencv video capturing and saving using webcam using intel galileo

above is my c++ program it gives me an error as shown below

============================================

root@clanton:/kishan# ./v++ VIDIOC_QUERYMENU: Invalid argument VIDIOC_QUERYMENU: Invalid argument VIDIOC_QUERYMENU: Invalid argument VIDIOC_QUERYMENU: Invalid argument VIDIOC_QUERYMENU: Invalid argument VIDIOC_QUERYMENU: Invalid argument VIDIOC_QUERYMENU: Invalid argument Errroooooooorrrrrrr root@clanton:/kishan# ls

==================================================

2014-09-09 02:05:35 -0600 commented question opencv video capturing and saving using webcam using intel galileo

include "opencv2/opencv.hpp"

include <iostream>

using namespace std; using namespace cv;

int main() { int i=0;

VideoCapture vcap(0);
  if(!vcap.isOpened()){
         cout &lt;&lt; "Error opening video stream or file" &lt;&lt; endl;
         return -1;
  }

int frame_width= vcap.get(CV_CAP_PROP_FRAME_WIDTH); int frame_height= vcap.get(CV_CAP_PROP_FRAME_HEIGHT); VideoWriter video("out.avi",CV_FOURCC('M','J','P','G'),10, Size(frame_width,frame_height),true);

if(!video.isOpened()) { cout << "Errroooooooorrrrrrr" << endl;

}

while(1){

   Mat frame;
   vcap &gt;&gt; frame;
   video.write(frame);
   if(i==20)
   {
       char c = (char)waitKey(33);
       break;
   }
   else
       i++;
}

return 0; }

2014-09-09 00:33:14 -0600 asked a question opencv video capturing and saving using webcam using intel galileo

hello all,

I am working on intel galileo. Now, I want to capture video from webcam and I want to save it using opencv in my board.

but I am facing error in this task,

my code

#include <highgui.h>  
#include "opencv2/highgui/highgui.hpp"  
#include <cv.h>  
#include <time.h>  
#include <stdio.h>  
#include <unistd.h>  
int main(int argc, char** argv)   
{  
    int i=0,j=0;  

         CvCapture* capture = cvCaptureFromCAM(0);  

    cvSetCaptureProperty(capture, CV_CAP_PROP_FRAME_WIDTH, 320);  
    cvSetCaptureProperty(capture, CV_CAP_PROP_FRAME_HEIGHT, 240);  

    CvSize size = cvSize((int)cvGetCaptureProperty( capture,CV_CAP_PROP_FRAME_WIDTH),(int)cvGetCaptureProperty( capture,CV_CAP_PROP_FRAME_HEIGHT));  

    IplImage* frame = cvQueryFrame( capture );  

    CvVideoWriter *writer = cvCreateVideoWriter( "video.avi" ,CV_FOURCC('M','J','P','G'), 10 ,size, 1);  
    if(!writer)  
        printf("errorrrrrrrrrrrrrrrrrrrrrr\n");  

         while(1)  
         {      
            frame = cvQueryFrame(capture);  
        if(!frame) break;  
        j = cvWriteFrame(writer, frame);  
        printf("writer = %d\n",j);  
        if(i==10)  
        {  
            cvReleaseCapture(&capture);  
            break;  
        }  
        else  
        i++;  
        }  

}

I have attached my c code for video capturing and saving using opencv

I have shown output of this this below

================================================================

root@clanton:/# ./video

VIDIOC_QUERYMENU: Invalid argument

VIDIOC_QUERYMENU: Invalid argument

VIDIOC_QUERYMENU: Invalid argument

VIDIOC_QUERYMENU: Invalid argument

VIDIOC_QUERYMENU: Invalid argument

VIDIOC_QUERYMENU: Invalid argument

VIDIOC_QUERYMENU: Invalid argument

VIDIOC_QUERYMENU: Invalid argument

VIDIOC_QUERYMENU: Invalid argument

VIDIOC_QUERYMENU: Invalid argument

VIDIOC_QUERYMENU: Invalid argument

VIDIOC_QUERYMENU: Invalid argument

VIDIOC_QUERYMENU: Invalid argument

VIDIOC_QUERYMENU: Invalid argument

errorrrrrrrrrrrrrrrrrrrrrr

writer = 0

writer = 0

writer = 0

writer = 0

writer = 0

writer = 0

writer = 0

writer = 0

writer = 0

writer = 0

root@clanton:/#

================================================================

here my cvCreateVideoWriter function fails each and every time

I have tried many things but not able to solve this error

please give me some solution

Thanx in advance