Browse Source

adjust the RemoveDuplicateOverlapParticles algorithm

GSP 4 months ago
parent
commit
7f57b8d266
1 changed files with 2 additions and 2 deletions
  1. 2 2
      OTSIncAMeasureApp/0-OTSModel/OTSDataType/COTSField.cs

+ 2 - 2
OTSIncAMeasureApp/0-OTSModel/OTSDataType/COTSField.cs

@@ -619,10 +619,10 @@ namespace OTSDataType
                         p1.GetOTSRect(ref p1left, ref p1top, ref p1right, ref p1bottom);
                         COTSRect p1rec = new COTSRect(p1left, p1top, p1right, p1bottom);
                         PointF p1Center = p1rec.GetCenterPoint();
-                        if (Math.Abs(pcenter.X - p1Center.X) < 2 * overlap && Math.Abs(pcenter.Y - p1Center.Y) < 2 * overlap)
+                        if (Math.Abs(pcenter.X - p1Center.X) < 1 * overlap && Math.Abs(pcenter.Y - p1Center.Y) < 1 * overlap)
                         {
                             var sim = p.CalculateSimilarity(p1);
-                            if (sim > 0.95)
+                            if (sim > 0.90)
                             {
                                 log.Warn("remove down side duplicate particle,similarity:" + sim.ToString("F3"));
                                 log.Warn("P1:" + p.GetImgPortraitString());