摘要:int main() { VideoCapture cap(0); if (!cap.isOpened()) { return -1; } while (1) { Mat frame; cap >> frame; if (frame.empty()) break; imshow("Frame", f
阅读全文
摘要:一、QImage转cv::Mat QPixmap pixmap = currentImage->pixmap(); QImage image = pixmap.toImage(); //QImage image("d:/dev/test.jpg"); image = image.convertToF
阅读全文
摘要:// 初始化图片文件对话框static void initializeImageFileDialog(QFileDialog &dialog, QFileDialog::AcceptMode acceptMode){ static bool firstDialog = true; //设置文件对话框
阅读全文
摘要:// 打开图片文件void MainWindow::openImage(){ QFileDialog dialog(this); dialog.setWindowTitle("Open Image"); dialog.setFileMode(QFileDialog::ExistingFile); d
阅读全文