DIRECTSHOW_QEDIT_INCLUDE_DIR:PATH="C:/Program Files/Microsoft Platform SDK for Windows Server 2003 R2/Include" DIRECTSHOW_STRMIIDS_LIBRARY:PATH="C:/Program Files (x86)/Windows Kits/8.1/Lib/winv6.3/um/x64/strmiids.lib"
auto undistortedLeds = undistortLeds(foundLeds, m_camParams);
for (size_t sensor = 0; sensor < m_identifiers.size(); sensor++) {
osvrPose3SetIdentity(&m_pose); auto ledsMeasurements = undistortedLeds; { auto &myLeds = m_led_groups[sensor]; auto led = begin(myLeds); auto e = end(myLeds); while (led != end(myLeds)) { led->resetUsed(); auto threshold = m_params.blobMoveThreshold * led->getMeasurement().diameter; auto nearest = led->nearest(ledsMeasurements, threshold); // 找最近的 if (nearest == end(ledsMeasurements)) { // We have no blob corresponding to this LED, so we need // to delete this LED. led = myLeds.erase(led); } else { // Update the values in this LED and then go on to the // next one. Remove this blob from the list of potential matches. // 因為已經這個 blob 是哪個 LED, 所以從 ledsMeasurements 裡移除這個 LED led->addMeasurement(*nearest, m_params.blobsKeepIdentity); ledsMeasurements.erase(nearest); ++led; } } // while
for (auto &remainingLed : ledsMeasurements) { myLeds.emplace_back(m_identifiers[sensor].get(), remainingLed); } }
Q. 遇到 windres.exe: unknown option -- W 編譯錯誤怎辦? A. cmake 取消勾選 ENABLE_PRECOMPILED_HEADERS
Q. 遇到 modules/videoio/src/cap_dshow.cpp error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope 編譯錯誤怎辦? A. 編輯 opencv-3.3.1/modules/videoio/src/cap_dshow.cpp 在 #include "DShow.h" 前面加入 #define NO_DSHOW_STRSAFE 定義