Questions tagged [trackpy]

Tag for questions related to the `trackpy` software package

Trackpy is a package for finding blob-like features in video, tracking them through time, and analyzing their trajectories. It implements and extends the widely-used Crocker–Grier algorithm in Python.

There are many similar projects. (See table below.) Our implementation is distinguished by succinct and flexible usage, a thorough testing framework ensuring code stability and accuracy, scalability, and thorough documentation.

Documentation homepage

22 questions
1
vote
0 answers

Is there a way to track trajectories of moving particles in 2D?

I have been trying to find the trajectories of the particles but I'm unable to do it. There are different particles in like the 10th frame and the 20th frame. These particles are moving in and out of the frame and are of different sizes too. I tried…
1
vote
0 answers

Issue with Trackpy - InvalidIndexError when fitting EMSD to a power law from the tutorial

possibly a silly problem, but I'm stuck and I'd really appreciate someone's help. I'm trying to replicate the examples given in the walkthrough tutorial for trackpy (https://soft-matter.github.io/trackpy/dev/tutorial/walkthrough.html). I've been…
KamilFP
  • 11
  • 2
1
vote
1 answer

Trackpy tp.batch() gives generator already executing error

I am trying to track some particles in a video using trackpy. I'm following the walkthrough from the website: http://soft-matter.github.io/trackpy/v0.4.2/tutorial/walkthrough.html After processing a few frames (usually around 14 frames, sometimes…
Merijn
  • 13
  • 3
1
vote
0 answers

Pims "Unexpected Keyword Argument" and “invalid ImageJ metadata or corrupted file”

The Context: I'm trying to use the package trackpy for research. I'm on a Mac and I'm using (mostly) Spyder. I’m following the trackpy walkthrough (https://soft-matter.github.io/trackpy/v0.3.2/tutorial/walkthrough.html) and I’m trying to use it on a…
1
vote
0 answers

Using Masked Images with python trackpy

I am using trackpy to count particles. Working with full images gives satisfying results. I also have a set of images in which a region is masked (mask and masked image are available here mask+masked image). As we can see on the picture bellow,…
michltm
  • 1,399
  • 2
  • 13
  • 33
1
vote
1 answer

How to save an image in pims?

I am trying to save one frame in a video. The video was opened using pims. My script goes like this: import pims frames = pims.ND2_Reader('sample directory/file.nd2') image = frames[123] image.savefig('sample directory/file.png') Then I received an…
zxf
  • 13
  • 4
1
vote
1 answer

Trackpy DriftPredict drift parameter

DrifPredict signature is "DriftPredict(initial_guess, span)" with the comment : initial_guess : Array of length d. Otherwise assumed to be zero velocity. span : integer, default 1 Compute velocity field from the most recent span+1 frames. So…
2diabolos.com
  • 992
  • 9
  • 15
1
vote
1 answer

How to save trajectories of tracked objects with trackpy?

I am testing http://soft-matter.github.io/trackpy/stable/ You can access my image data here: http://goo.gl/fMv5oE My code for tracking objects in subsequent video images is: import matplotlib.pyplot as plt plt.rcParams['image.cmap'] = 'gray' # Set…
len
  • 749
  • 1
  • 8
  • 23
1
vote
0 answers

IPython parallel %px works but not sync_imports (engine pythonpath issue)

When I write %px import trackpy as tp and then I use map_async with a function using the tp module, it just works as expected. If I wrote intead: with client[:].sync_imports(): import trackpy as tp I got a error "NameError: name 'tp' is not…
2diabolos.com
  • 992
  • 9
  • 15
1
vote
1 answer

Combining imshow with a user input

I am trying to use trackpy (henceforth tp) for particle tracking. I have a series of images of cell samples. Naturally, there is some noise in the image. The first step in tracking is to choose, from the first image of the series, which clusters are…
tsnitz
  • 15
  • 5
0
votes
0 answers

OSError: [Errno 9] Bad file descriptor when trying to implement scientific code in Python

I'm currently trying to use the Python package trackpy and pims to track the position of certain particles in a fluid. I have .tiff files for each frame of the particle movement. import numpy as np %matplotlib inline import matplotlib as mpl import…
NikNack
  • 23
  • 5
0
votes
1 answer

getting key error on running trackpy on background subtracted video

I am new to python programing. I am using background subtraction on avi video file followed by tracking the cells in image using trackpy When i run the code it gives the error: raise KeyError(key) from err KeyError: 'frame' my code is import…
0
votes
1 answer

Dataframe line length

I have a dataframe that contains x-y coordinates for a series of objects over time. I am trying to work out the total path length of each of these objects. I know the equation to work out the length of a line it (√((x2-x1))^2+(y2-y1))) + (√((x3 -…
Rory235
  • 1
  • 3
0
votes
0 answers

PIMS unable to upload a TIFF file

I am using PIMS to import a series of TIFF images into Jupyter Notebook. I am to use the particle tracking algorithm TrackPy to analyse the images and am following a tutorial provided by the people that developed the code. When I upload the tiffs…
Rory235
  • 1
  • 3
0
votes
0 answers

Real time tracking with trackpy

I am trying to implement real time tracking with trackpy. As in grabbing feed from microscope camera and tracking. As of yet i am unable to do this in real-time. trackpy works like a charm when working over a a finite set of images or tiffstack. Any…
1
2