Trackpy:如何去除不需要的颗粒

问题描述 投票:0回答:1

我有一张要检测亮点的图像。我可以根据自己想要的特征检测粒子。但是当我链接这些粒子时,我无法消除不需要的粒子。检测粒子的代码行如下。

f = tp.batch(frame_list[:],7, invert = False,
         minmass = 15, maxsize = 17, preprocess = False)

t = tp.link_df(f,3, memory =5)

存在仅在1张图像中检测到然后看不到的颗粒。我不想要它们。t变量中的第二个参数不应该做这项工作吗?即使她没有,我也可以循环并再次找到它。但这将强制执行该程序。因为我们有55万行的产量,我该如何处理?我检查了图书馆,但没有别的

python image-processing detection particles trackpy
1个回答
0
投票

我使用pd.Dataframe解决了问题。也许我是在这里写信,以防有人需要。 tp.batch函数返回一个pd数据帧。

for particle in df["particle"].unique():

       calculations...

    for i in range(len(x)-1):

       calculations...

if len(x) >= 3  :
© www.soinside.com 2019 - 2024. All rights reserved.