opencv里的,这个运行都没问题但就是一运行直接就退出了,也不报错啊不知道为什么orz
#include"cv.h"#include"highgui.h"intg_slider_position=0;CvCapture*g_capture=NULL;void...
#include"cv.h"
#include"highgui.h"
int g_slider_position=0;
CvCapture*g_capture=NULL;
void onTrackbarSlide(int pos)
{
cvSetCaptureProperty(
g_capture,
CV_CAP_PROP_POS_FRAMES,
pos
);
}
int main(int argc,char**argv)
{
cvNamedWindow("Example3",CV_WINDOW_AUTOSIZE);
g_capture=cvCreateFileCapture("pp.avi");
int frames=(int) cvGetCaptureProperty
(
g_capture,
CV_CAP_PROP_FRAME_COUNT
);
if(frames!=0)
{
cvCreateTrackbar(
"Position",
"Example3",
&g_slider_position,
frames,
onTrackbarSlide);
}
IplImage*frame;
return(0);
}
求问! 展开
#include"highgui.h"
int g_slider_position=0;
CvCapture*g_capture=NULL;
void onTrackbarSlide(int pos)
{
cvSetCaptureProperty(
g_capture,
CV_CAP_PROP_POS_FRAMES,
pos
);
}
int main(int argc,char**argv)
{
cvNamedWindow("Example3",CV_WINDOW_AUTOSIZE);
g_capture=cvCreateFileCapture("pp.avi");
int frames=(int) cvGetCaptureProperty
(
g_capture,
CV_CAP_PROP_FRAME_COUNT
);
if(frames!=0)
{
cvCreateTrackbar(
"Position",
"Example3",
&g_slider_position,
frames,
onTrackbarSlide);
}
IplImage*frame;
return(0);
}
求问! 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询