Browse Source

improve the particle search logic

gsp 7 months ago
parent
commit
3206b3f8db
1 changed files with 3 additions and 1 deletions
  1. 3 1
      OTSCPP/OTSImagePro/OTSImageProcess.cpp

+ 3 - 1
OTSCPP/OTSImagePro/OTSImageProcess.cpp

@@ -186,7 +186,9 @@ namespace OTSIMGPROC
 						}
 					}
 				}
-				if (eigenPixelNum > 5)
+				double r = m_imageProcessParam->GetIncArea().GetStart() / 2;
+				double minPartArea = 3.14159 * r * r;
+				if (eigenPixelNum* a_pixelSize*a_pixelSize > minPartArea)
 				{
 					BYTE nAveGray = (BYTE)(nPixelAll / nPixelNum);
 					pParticle->SetAveGray(nAveGray);