Ask Your Question

Clem50FFF's profile - activity

2014-06-26 03:26:24 -0600 commented question delay on video

Hi Steven,

So I change my code with that one, can you tell me if it's the good API :

include "opencv2/opencv.hpp"

using namespace cv;

int main() { VideoCapture cap("rtsp://192.168.###.###:554/ch2");

if(!cap.isOpened())  

    return -1;

namedWindow("Video",1);

for(;;)

{

    Mat frame;

    cap >> frame; 

    imshow("Video", frame);

    if(waitKey(30) >= 0) break;

}

return 0;

}

2014-06-25 03:11:53 -0600 received badge  Editor (source)
2014-06-25 02:40:56 -0600 asked a question error mpeg 4 codecs ip streaming

Hi everybody, i would like to kmown if someone known how works opencv with codec? i'm using this code see below :

int main()

{

capture = cvCaptureFromFile( "rtsp://IP/ch2" ); for(;;) { frame = cvQueryFrame( capture );

if ( !frame )

break;

if ( !original )

{

original = cvCreateImage( cvGetSize( frame ), IPL_DEPTH_8U, 3 );

cvGetSize( frame );

original->origin = frame->origin;

}

cvCopy( frame, original );

cvNamedWindow( "",CV_WINDOW_NORMAL && CV_GUI_NORMAL);

cvMoveWindow("",0,0);

cvResizeWindow("",600,600);

cvShowImage( "", original );

if ( cvWaitKey(5) == 27)

break;

}

cvDestroyAllWindows();

cvReleaseCapture( &capture );

cvReleaseImage( &original );

return 0;

}

and i get this kind of error see below :

image description

---- all error are refer to mpeg4

i tried to install some codec but without result.

the capture seems related to "opencv_ffmpeg249_64.dll" because when i cancel it from project the video result null.

my questions is:

  • to stream ip camera, opencv use her own codec or use the external component?
2014-06-24 09:18:29 -0600 commented question delay on video

here the code :

frame = cvQueryFrame( capture );

if ( !original ) { original = cvCreateImage( cvGetSize( frame ), IPL_DEPTH_8U, 3 ); cvGetSize( frame ); original->origin = frame->origin; } cvCopy( frame, original ); //cvNamedWindow( "",CV_WINDOW_NORMAL && CV_GUI_NORMAL); //cvMoveWindow("",Position_x,Position_y); //cvResizeWindow("",640,480); //cvShowImage( "", original );

but i think that the problem comes from codec because i get some errors when the video is running.

Someone know how workthe codec in Opencv?

2014-06-23 10:12:06 -0600 asked a question delay on video

hi everybody, i just tried to use the new version of openCV 2.4.9 with visual studio with both version x64 and x86 and it result that video is delayed (about 250ms - 500ms late) the problem is i don't have the problem with the version 2.2 win 32 of opencv(the video is in realtime without delayed). i wanted to try with other version (2.4.8; 2.4.7;2.4.6) and i get the same result that the 2.4.9 version. here below the computer features: proc: Intel(R) Core(TM) i7-3970X CPU Ram : 16gb SO: 64bit

do you have any idea why i have this kind of result with lastest version of opencv?