Ask Your Question

Revision history [back]

this code giving me error of c1083 cannot open source file cv.h ...iam using open cv 2.4.8

#include<iostream>

include "opencv2\highgui\highgui.hpp"

include "opencv\cv.hpp"

include "opencv\cv.h"

using namespace std; using namespace cv; CvCapture* g_capture=NULL; int g_postion=0; void ontrackbar(int pos) { cvSetCaptureProperty(g_capture,CV_CAP_PROP_POS_FRAMES,pos);

}

int main() { char str[100]; cin>>str; namedWindow("goku",CV_WINDOW_FREERATIO); g_capture=cvCreateFileCapture(str); int frames=(int)cvGetCaptureProperty(g_capture,CV_CAP_PROP_FRAME_COUNT); if(frames) { cvCreateTrackbar("position",str,&g_postion,frames,ontrackbar);

  }
  IplImage* frame;
  while(1)
  {
      frame=cvQueryFrame(g_capture);
      if(!frame)break;
      cvShowImage("goku",frame);
      char c=waitKey(17);
      if(c==27)break;
  }
  cvReleaseImage(&frame);
  destroyWindow("goku");

}