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");
}
yea, that'S from outdated opencv1. DO NOT USE THIS CODE (or any, that has IplImage in it)
please tell us - what are you trying to achieve ? then we can point you to a more modern sample.
Tried this still same error:
import cv2 import sys import os
cascPath = sys.argv[1]
cascPath = 'face.xml' faceCascade = cv2.CascadeClassifier(cascPath) print faceCascade video_capture = cv2.VideoCapture('http://user:[email protected]/videostream.cgi')
while True: # Capture frame-by-frame ret, frame = video_capture.read()
please, ignore that post, it's not a solution to your problem. another noob got it wrong entirely.
(python, not c++)