Video Editing?

I am using OpenCV and trying to apply a Gaussian Blur to an incoming video stream. I basically use cvQueryFrame to remove a frame, blur it and display the frame onto the screen. The thing is though, my video gets stuck on the first frame after I apply the blur....anyone know why? its basically showing one frame instead of a video. The second I remove the blur it starts outputting video again.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#include "cv.h"
#include "highgui.h"
#include "cvaux.h"

#include <iostream>
using namespace std;

int main()
{

    //declare initial data
    IplImage *grabCapture= 0; //used for inital video frame capture
    IplImage *process =0; //used for processing
    IplImage *output=0; //displays final output

    CvCapture* vidStream= cvCaptureFromCAM(0);

    cvNamedWindow ("Output", CV_WINDOW_AUTOSIZE);

    int createimage=1;

    while (1)
    {

    grabCapture= cvQueryFrame (vidStream);

    if (createimage==1)
        {
            process= cvCreateImage (cvGetSize(grabCapture), IPL_DEPTH_16U, 3);

            createimage=0;

        }

    *process=*grabCapture;
    cvSmooth (process,process,CV_GAUSSIAN,7,7); //line that makes it display frame instead of video


    cvShowImage("Output",process);

    }


    //clean up data
    cvReleaseImage (&grabCapture);
    cvReleaseImage (&process);
    cvReleaseImage (&output);
    cvReleaseCapture (&vidStream);


    return 0;

}
Normally you'd ask this kind of specific question on the forums (or newsgroup or mailing list) for the particular library you are using.

There might be someone who knows anything about OpenCV around here, but you'd probably get help faster in a more specialized forum.
Topic archived. No new replies allowed.