From 201046a8b83f34ea099a11043ade28d8457d7af9 Mon Sep 17 00:00:00 2001 From: mrDarker <mr.darker@163.com> Date: 星期六, 02 八月 2025 10:47:04 +0800 Subject: [PATCH] 1. 添加计算时间戳宏 2. 重写切割两片玻璃函数 3. 添加分组过滤干扰点的函数 --- SourceCode/Bond/SGMeasurement/SGMeasurementDlg.h | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff --git a/SourceCode/Bond/SGMeasurement/SGMeasurementDlg.h b/SourceCode/Bond/SGMeasurement/SGMeasurementDlg.h index 3b8748c..53293f7 100644 --- a/SourceCode/Bond/SGMeasurement/SGMeasurementDlg.h +++ b/SourceCode/Bond/SGMeasurement/SGMeasurementDlg.h @@ -3,6 +3,7 @@ // #pragma once +#include <map> #include <vector> #include <numeric> #include <algorithm> @@ -145,14 +146,25 @@ * @param fJumpThreshold 璺冲彉闃堝�硷紝鐢ㄤ簬妫�娴嬫暟鎹殑鏄庢樉鏂偣銆� * @param nWindow 璺冲彉鍒ゆ柇鐨勫墠鍚庣獥鍙e搴︺�� * @param nValleyMargin valley 鐐逛箣鍚庡灏戜釜鐐逛綔涓哄疄闄呭垏鍓茬偣銆� - * @param nMinGlass1Count 绗竴娈垫渶灏戞湁鏁堢偣鏁伴檺鍒躲�� + * @param nMinGlass1Count 鏈�灏戞湁鏁堢偣鏁伴檺鍒躲�� * * @return true 琛ㄧず鍒囧壊鎴愬姛锛宖alse 琛ㄧず澶辫触锛堜緥濡傛暟鎹笉瓒虫垨鏃犳槑鏄捐烦鍙橈級銆� */ bool SplitGlassSegments(int nOutNo, const std::vector<float>& validData, std::vector<float>& vecGlass1, std::vector<float>& vecGlass2, - float fJumpThreshold = 1.0f, int nWindow = 3, int nValleyMargin = 0, - int nMinGlass1Count = 10); + float fJumpThreshold = 0.2f, int nWindow = 3, int nValleyMargin = 0, + int nMinGlassCount = 10); + + /** + * @brief 瀵规暟鎹寜鏁存暟閮ㄥ垎杩涜鍒嗙粍锛屼繚鐣欐暟鎹噺鏈�澶氱殑涓�缁勶紙鎺掗櫎寮傚父/骞叉壈锛夈�� + * + * @param nOutNo 杈撳嚭閫氶亾缂栧彿锛岀敤浜庢棩蹇楄褰曘�� + * @param vecInput 鍘熷娴偣鏁版嵁锛堝凡瑁佸壀鏃犳晥鍊硷級銆� + * @param vecOutput 杈撳嚭琚繚鐣欑殑涓昏鍒嗙粍鏁版嵁锛堟渶澶氱殑閭g粍锛夈�� + * + * @return true 琛ㄧず鎴愬姛杩囨护鍑轰富鍒嗙粍锛宖alse 琛ㄧず鎵�鏈夋暟鎹兘琚繃婊ゆ垨涓虹┖銆� + */ + bool FilterDominantGroup(int nOutNo, const std::vector<float>& vecInput, std::vector<float>& vecOutput); /** * @brief 浠庤緭鍏ユ暟鎹腑鎻愬彇涓�涓浐瀹氶暱搴︾殑绋冲畾鍖洪棿銆� -- Gitblit v1.9.3