diff --git a/Classes/Reconstruction.cpp b/Classes/Reconstruction.cpp index 69b1854..b67aeae 100644 --- a/Classes/Reconstruction.cpp +++ b/Classes/Reconstruction.cpp @@ -115,6 +115,10 @@ void Reconstruction::on_pushButton_clicked() void Reconstruction::on_pushButton_2_clicked() { + if (device->getHasCamera()) + { + liveViewTimer = startTimer(100); + } ui.stackedWidget->setCurrentIndex(1); } @@ -155,17 +159,17 @@ void pp_callback(const visualization::AreaPickingEvent& event, void* args) std::stringstream ss; std::string cloudName; pclData->setNum(); - ss <> cloudName; cloudName += "_cloudName"; pclData->getViewer()->addPointCloud(clicked_points_3d, red, cloudName); - pclData->getViewer()->setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 10, cloudName); + pclData->getViewer()-> + setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 10, cloudName); // pclData->getViewer()->updatePointCloud(clicked_points_3d,"cloudName"); pclData->setIndices(indices); pclData->getUI().qvtkWidget->SetRenderWindow(pclData->getViewer()->getRenderWindow()); pclData->getUI().qvtkWidget->update(); - } void Reconstruction::setCloud() @@ -197,20 +201,21 @@ void Reconstruction::updateQVTK(PointCloud cloud, QColor color) auto pclData = PointCloudData::getInstance(); pclData->setCloud(cloud); pclData->getViewer()->getCameraParameters(camera); - cout<getViewer(); } else { boost::shared_ptr viewerArg(new visualization::PCLVisualizer("3D Viewer")); - viewer=viewerArg; + viewer = viewerArg; viewer->setBackgroundColor(0.458, 0.529, 0.844); auto pclData = PointCloudData::getInstance(cloud); pclData->setViewer(viewer); pclData->setUI(ui); } - double size=1; + double size = 1; viewer->getPointCloudRenderingProperties(visualization::PCL_VISUALIZER_POINT_SIZE, size, "cloud"); viewer->removeAllPointClouds(); // viewer->setPointCloudRenderingProperties(visualization::PCL_VISUALIZER_POINT_SIZE, 1, "cloud"); @@ -410,9 +415,13 @@ void Reconstruction::timerEvent(QTimerEvent* event) // correct size only if label has no borders/frame! auto w = ui.label_11->width(); auto h = ui.label_11->height(); - auto pixmap = QPixmap::fromImage(qimage); ui.label_11->setPixmap(pixmap.scaled(w, h, Qt::KeepAspectRatio)); + + w = ui.label_21->width(); + h = ui.label_21->height(); + pixmap = QPixmap::fromImage(qimage); + ui.label_21->setPixmap(pixmap.scaled(w, h, Qt::KeepAspectRatio)); } void Reconstruction::setDirModel(const QString& dirname) @@ -556,6 +565,8 @@ void Reconstruction::on_pushButton_4_clicked() ui.lineEdit->setText(fileName); + // 投影结构光图案 + device->getProjector()->displayPattern(44); // todo 接着进行投影操作 } @@ -563,6 +574,7 @@ void Reconstruction::on_pushButton_4_clicked() void Reconstruction::on_pushButton_9_clicked() { // todo 相机拍照 + killTimer(liveViewTimer); auto frame = device->getCamera()->getFrame(); auto frameCV = cvtools::camFrame2Mat(frame); // cvtColor(frameCV, frameCV, cv::COLOR_BGR2GRAY); diff --git a/x64/Debug/Reconstruction.exe b/x64/Debug/Reconstruction.exe index e9b6387..5ae4022 100644 Binary files a/x64/Debug/Reconstruction.exe and b/x64/Debug/Reconstruction.exe differ diff --git a/x64/Debug/Reconstruction.ilk b/x64/Debug/Reconstruction.ilk index 9a4993a..b52b83f 100644 Binary files a/x64/Debug/Reconstruction.ilk and b/x64/Debug/Reconstruction.ilk differ diff --git a/x64/Debug/Reconstruction.log b/x64/Debug/Reconstruction.log index 64dcae1..59244f7 100644 --- a/x64/Debug/Reconstruction.log +++ b/x64/Debug/Reconstruction.log @@ -38,5 +38,5 @@ D:\BJTU\Reconstruction\Lib\FlyCapture2\include\Utilities.h(1,1): warning C4819: D:\BJTU\Reconstruction\Lib\FlyCapture2\include\AVIRecorder.h(1,1): warning C4819: 璇ユ枃浠跺寘鍚笉鑳藉湪褰撳墠浠g爜椤(936)涓〃绀虹殑瀛楃銆傝灏嗚鏂囦欢淇濆瓨涓 Unicode 鏍煎紡浠ラ槻姝㈡暟鎹涪澶 D:\BJTU\Reconstruction\Lib\FlyCapture2\include\TopologyNode.h(1,1): warning C4819: 璇ユ枃浠跺寘鍚笉鑳藉湪褰撳墠浠g爜椤(936)涓〃绀虹殑瀛楃銆傝灏嗚鏂囦欢淇濆瓨涓 Unicode 鏍煎紡浠ラ槻姝㈡暟鎹涪澶 D:\BJTU\Reconstruction\Lib\FlyCapture2\include\ImageStatistics.h(1,1): warning C4819: 璇ユ枃浠跺寘鍚笉鑳藉湪褰撳墠浠g爜椤(936)涓〃绀虹殑瀛楃銆傝灏嗚鏂囦欢淇濆瓨涓 Unicode 鏍煎紡浠ラ槻姝㈡暟鎹涪澶 -D:\BJTU\Reconstruction\Classes\Reconstruction.cpp(146,43): warning C4806: 鈥==鈥: 涓嶅畨鍏ㄦ搷浣: 浠庣被鍨嬧渂ool鈥濇彁鍗囧埌绫诲瀷鈥渋nt鈥濈殑鍊间笉鑳界瓑浜庣粰瀹氱殑甯搁噺 +D:\BJTU\Reconstruction\Classes\Reconstruction.cpp(150,43): warning C4806: 鈥==鈥: 涓嶅畨鍏ㄦ搷浣: 浠庣被鍨嬧渂ool鈥濇彁鍗囧埌绫诲瀷鈥渋nt鈥濈殑鍊间笉鑳界瓑浜庣粰瀹氱殑甯搁噺 Reconstruction.vcxproj -> D:\BJTU\Reconstruction\x64\Debug\Reconstruction.exe diff --git a/x64/Debug/Reconstruction.obj b/x64/Debug/Reconstruction.obj index a08354f..df67960 100644 Binary files a/x64/Debug/Reconstruction.obj and b/x64/Debug/Reconstruction.obj differ diff --git a/x64/Debug/Reconstruction.pdb b/x64/Debug/Reconstruction.pdb index caaff01..f60c6a7 100644 Binary files a/x64/Debug/Reconstruction.pdb and b/x64/Debug/Reconstruction.pdb differ diff --git a/x64/Debug/Reconstruction.tlog/Reconstruction.write.1u.tlog b/x64/Debug/Reconstruction.tlog/Reconstruction.write.1u.tlog index 8e47fea..907d26f 100644 Binary files a/x64/Debug/Reconstruction.tlog/Reconstruction.write.1u.tlog and b/x64/Debug/Reconstruction.tlog/Reconstruction.write.1u.tlog differ diff --git a/x64/Debug/Reconstruction.tlog/link.read.1.tlog b/x64/Debug/Reconstruction.tlog/link.read.1.tlog index 24e04b2..3191614 100644 Binary files a/x64/Debug/Reconstruction.tlog/link.read.1.tlog and b/x64/Debug/Reconstruction.tlog/link.read.1.tlog differ diff --git a/x64/Debug/qmake/qtvars_x64_Debug.props b/x64/Debug/qmake/qtvars_x64_Debug.props index 0dcc3b4..63d43df 100644 --- a/x64/Debug/qmake/qtvars_x64_Debug.props +++ b/x64/Debug/qmake/qtvars_x64_Debug.props @@ -4,6 +4,31 @@ D:\Qt\5.12.3\msvc2017_64\include;D:\Qt\5.12.3\msvc2017_64\include\QtWidgets;D:\Qt\5.12.3\msvc2017_64\include\QtGui;D:\Qt\5.12.3\msvc2017_64\include\QtANGLE;D:\Qt\5.12.3\msvc2017_64\include\QtCore;C:\VulkanSDK\1.0.51.0\include;D:\Qt\5.12.3\msvc2017_64\mkspecs\win32-msvc D:\Qt\5.12.3\msvc2017_64\lib\Qt5Widgetsd.lib;D:\Qt\5.12.3\msvc2017_64\lib\Qt5Guid.lib;D:\Qt\5.12.3\msvc2017_64\lib\Qt5Cored.lib;D:\Qt\5.12.3\msvc2017_64\lib\qtmaind.lib;shell32.lib D:\Qt\5.12.3\msvc2017_64\lib;C:\openssl\lib;C:\Utils\my_sql\mysql-5.6.11-winx64\lib;C:\Utils\postgresql\pgsql\lib + +D:/Qt/5.12.3/msvc2017_64 +D:/Qt/5.12.3/msvc2017_64 +D:/Qt/5.12.3/msvc2017_64 +D:/Qt/Docs/Qt-5.12.3 +D:/Qt/5.12.3/msvc2017_64/include +D:/Qt/5.12.3/msvc2017_64/lib +D:/Qt/5.12.3/msvc2017_64/bin +D:/Qt/5.12.3/msvc2017_64/bin +D:/Qt/5.12.3/msvc2017_64/tests +D:/Qt/5.12.3/msvc2017_64/plugins +D:/Qt/5.12.3/msvc2017_64/imports +D:/Qt/5.12.3/msvc2017_64/qml +D:/Qt/5.12.3/msvc2017_64/translations + +D:/Qt/Examples/Qt-5.12.3 +D:/Qt/Examples/Qt-5.12.3 +D:/Qt/5.12.3/msvc2017_64 +D:/Qt/5.12.3/msvc2017_64 +D:/Qt/5.12.3/msvc2017_64/bin +D:/Qt/5.12.3/msvc2017_64/lib +win32-msvc +win32-msvc +3.1 +5.12.3 $(Qt_INCLUDEPATH_);x64\Debug\moc\Classes;x64\Debug\uic\UI DEFINES=/-D(\w+)/$1/;INCLUDEPATH=INCPATH/-I(\x22[^\x22]+\x22|[^\s]+)/$1/;LIBS=/(?:\/LIBPATH:(?:\x22[^\x22]+\x22|[^\s]+))|(\x22[^\x22]+\x22|[^\s]+)/$1/;LIBPATH=LIBS/\/LIBPATH:(\x22[^\x22]+\x22|[^\s]+)/$1/ + >DEFINES=/-D([^\s=]+(=(\x22(\\\\|\\\x22|[^\x22])*\x22|\S+))?)/$1/;INCLUDEPATH=INCPATH/-I(\x22[^\x22]+\x22|[^\s]+)/$1/;LIBS=/(?:\/LIBPATH:(?:\x22[^\x22]+\x22|[^\s]+))|(\x22[^\x22]+\x22|[^\s]+)/$1/;LIBPATH=LIBS/\/LIBPATH:(\x22[^\x22]+\x22|[^\s]+)/$1/ debug + 5.12.3 + 5 + 12 + 3 diff --git a/x64/Debug/vc142.pdb b/x64/Debug/vc142.pdb index b2c59cb..bfbc146 100644 Binary files a/x64/Debug/vc142.pdb and b/x64/Debug/vc142.pdb differ