diff --git a/src/ui/Triplet/mainwindow.ui b/src/ui/Triplet/mainwindow.ui deleted file mode 100644 index 96a2ec2..0000000 --- a/src/ui/Triplet/mainwindow.ui +++ /dev/null @@ -1,71 +0,0 @@ - - - MainWindow - - - - 0 - 0 - 1280 - 768 - - - - MainWindow - - - - - - 1100 - 440 - 80 - 25 - - - - CLOSE - - - - - - 1100 - 250 - 80 - 25 - - - - PLAY - - - - - - 50 - 30 - 731 - 461 - - - - - - - - - - - 0 - 0 - 1280 - 22 - - - - - - - - diff --git a/test/TestContent.txt b/test/TestContent.txt new file mode 100644 index 0000000..5e075fe --- /dev/null +++ b/test/TestContent.txt @@ -0,0 +1,2 @@ +opencvtest.cpp is used to detect whether the virtual machine can be connected to the camera +g++ `pkg-config opencv4 --cflags` opencvtest.cpp -o example `pkg-config opencv4 --libs` diff --git a/test/open b/test/open new file mode 100755 index 0000000..c1e7131 Binary files /dev/null and b/test/open differ diff --git a/test/opencvtest.cpp b/test/opencvtest.cpp new file mode 100644 index 0000000..9184440 --- /dev/null +++ b/test/opencvtest.cpp @@ -0,0 +1,27 @@ +#include +#include +#include +using namespace cv; +int main() { + + VideoCapture cap(0); + + if (!cap.isOpened()) { + std::cout << "!!!"; + return -1; + } + Mat frame; + bool judge = true; + namedWindow("test1"); + while (judge) + { + cap >> frame; + if (frame.empty()) break; + imshow("test1", frame); + if (27 == waitKey(30)) { + break; + } + } + destroyWindow("test1"); + return 0; +}