Pārlūkot izejas kodu

improve the particle search logic

gsp 7 mēneši atpakaļ
vecāks
revīzija
3206b3f8db
1 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  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);