Hallo, ich hoffe ihr könnt mir helfen.
Ich arbeite mit C++Builder 10.2 und möchte gern OpenCV nutzen.
Ich schaffe es einfach nicht das in einem simplen code zu integrieren.
Könnt ihr mir bitte helfen?
Zu meiner herangehensweise:
1. Neues Projekt (VCL-Formularanwendung) erstellt.
2. die Verzeichnisse opencv und opencv2 ins Projektverzeichnis kopiert.
3. Mein Code:
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
4. Bekomme folgende Fehlermeldung:
[bcc32 Fehler] Unit1.cpp(6): E2209 include-Datei 'opencv\opencv.hpp' kann nicht geöffnet werden
Warum findet er diese Datei nicht?
Ich arbeite mit C++Builder 10.2 und möchte gern OpenCV nutzen.
Ich schaffe es einfach nicht das in einem simplen code zu integrieren.
Könnt ihr mir bitte helfen?
Zu meiner herangehensweise:
1. Neues Projekt (VCL-Formularanwendung) erstellt.
2. die Verzeichnisse opencv und opencv2 ins Projektverzeichnis kopiert.
3. Mein Code:
//---------------------------------------------------------------------------
C++:
#include <opencv/opencv.hpp>
using namespace std;
int ShowStreamFromCam(int deviceid ,char *windowname ,double width ,double height ,double fps)
{
CvCapture* capture = NULL;
IplImage* frame = NULL;
char c=0;
capture = cvCaptureFromCAM(deviceid);
if(!capture) {
printf("Could not initialize capturing...\n");
return 1;
}
// Wait until the camera is initialized
Sleep(3000);
// Set video options
cvSetCaptureProperty(capture ,CV_CAP_PROP_FRAME_WIDTH , width);
cvSetCaptureProperty(capture ,CV_CAP_PROP_FRAME_HEIGHT , height);
cvSetCaptureProperty(capture ,CV_CAP_PROP_FPS , fps);
// Set windowname
cvNamedWindow(windowname, 0);
for(;;) {
frame = cvQueryFrame(capture);
if(frame != NULL) {
cvShowImage(windowname, frame);
} else {
printf("QueryFrame failed !");
}
c = cvWaitKey(10);
if(c == 27)
break;
}
cvReleaseCapture(&capture);
cvDestroyWindow(windowname);
return 0;
}
4. Bekomme folgende Fehlermeldung:
[bcc32 Fehler] Unit1.cpp(6): E2209 include-Datei 'opencv\opencv.hpp' kann nicht geöffnet werden
Warum findet er diese Datei nicht?