soft-matter/trackpy

Locate only within specific ROI

Closed this issue · 2 comments

Hi,

It would be really useful to have an optional Polygon input to the function trackpy.locate, so that the particles are only localized within a certain ROI. Right now, I am localizing all the particles in the image and then filtering them using shapely and geopandas libraries, but this takes a lot of processing time.

If something like already exists or there is a better alternative, please let me know.

Thanks,

Pablo.

Thanks @nkeim.

I am just masking the image before and multiplying the image stack by the mask when imputing into batch locate:
tp.batch(frames*mask, ...)

It works.