Adjust shell analysis thresholds for better balance
- Remove tolerance mechanism for strict occlusion detection - Adjust visibility thresholds to balance shell preservation and internal deletion: - MIN_VISIBILITY_RATIO: 0.05 → 0.04 (4% visibility required) - MIN_VOTES: 2 → 2 (maintain 2 votes minimum) - HIGH_VISIBILITY_THRESHOLD: 0.25 → 0.20 (20% for KEEP) - MEDIUM_VISIBILITY_THRESHOLD: 0.08 → 0.06 (6-20% for REVIEW) - Add Chinese comments for all shell analysis constants
This commit is contained in:
parent
82c643153f
commit
1a561f0b5c
@ -30,12 +30,12 @@
|
||||
#include <vector>
|
||||
|
||||
// Shell Analysis Algorithm Constants
|
||||
const int SHELL_ANALYSIS_NUM_DIRECTIONS = 96;
|
||||
const double SHELL_ANALYSIS_MIN_VISIBILITY_RATIO = 0.05;
|
||||
const int SHELL_ANALYSIS_MIN_VOTES = 2;
|
||||
const double SHELL_ANALYSIS_HIGH_VISIBILITY_THRESHOLD = 0.25;
|
||||
const double SHELL_ANALYSIS_MEDIUM_VISIBILITY_THRESHOLD = 0.08;
|
||||
const double SHELL_ANALYSIS_OCCLUSION_TOLERANCE = 0.5;
|
||||
const int SHELL_ANALYSIS_NUM_DIRECTIONS = 96; // 多方向投影采样数量
|
||||
const double SHELL_ANALYSIS_MIN_VISIBILITY_RATIO = 0.04; // 最小可见率:4%方向可见即为外壳候选
|
||||
const int SHELL_ANALYSIS_MIN_VOTES = 2; // 最少得票数:至少2个方向可见
|
||||
const double SHELL_ANALYSIS_HIGH_VISIBILITY_THRESHOLD = 0.20; // 高可见度阈值:20%以上强制保留
|
||||
const double SHELL_ANALYSIS_MEDIUM_VISIBILITY_THRESHOLD = 0.06; // 中等可见度阈值:6-20%需要审查
|
||||
const double SHELL_ANALYSIS_OCCLUSION_TOLERANCE = 0.5; // 遮挡容差(当前未使用)
|
||||
#include <limits>
|
||||
#include <map>
|
||||
#include <unordered_map>
|
||||
@ -2831,8 +2831,8 @@ CreoManager::ProjectionAnalysisData CreoManager::PerformMultiDirectionalProjecti
|
||||
double occlusionBoundary = -std::numeric_limits<double>::max();
|
||||
|
||||
for (const auto& proj : projections) {
|
||||
// If component's nearest point is beyond occlusion boundary (with tolerance), it's visible
|
||||
if (proj.minProj > occlusionBoundary - SHELL_ANALYSIS_OCCLUSION_TOLERANCE) {
|
||||
// Strict occlusion: component visible only if completely unoccluded
|
||||
if (proj.minProj > occlusionBoundary) {
|
||||
result.visibilityVotes[proj.featureId]++;
|
||||
// Update occlusion boundary to this component's farthest point
|
||||
occlusionBoundary = std::max(occlusionBoundary, proj.maxProj);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user