Relate identities across different videos

726 views
Skip to first unread message

Alfonso Pérez Escudero

unread,
Sep 7, 2017, 3:20:10 PM9/7/17
to idtrack...@googlegroups.com
If you have recorded several videos with the same individuals and you want to know who is who in each video, you can do it using the attached software (idMatcher---you can use either the compiled version idMatcher.exe (which you can download here), or run the idMatcher.m (attached to this post) from Matlab).

The executable idMatcher.exe was compiled with an older version of Matlab than idTracker.exe, so you will also need to install the older version of the Matlab Compiler Runtime.

To use it:

Execute idMatcher.

Add the videos one by one, by selecting the file called datosegm.mat for each video.

To relate identities of different videos, all of them must be recorded in identical conditions (camera position, lightning, etc.) and the tracking parameters must also be identical. Therefore, the program will issue a warning if it detects different tracking parameters in the videos. There are four types of warnings: Different number of individuals, different threshold, different reslution and different area for intensity normalization. The two first ones are critical, the program will either crash or give wrong relations if these parameters change from video to video. The other two are less critical: idTracker normalizes each frame with the average intensity of the region you select. So if this region is different in different videos, the normalization will be different and the aspect of the animals changes. So if the videos have very different regions, it will not work. But if the regions are almost the same, it may work in spite of the warning.

When you have added all the videos, press start. It may take several hours to complete. When it finishes, it will show a picture with a lot of matrices. Ideally, all these matrices should be diagonal. If there are red crosses on some matrices, it means that the probability of having wrong relations for these videos is too high.

The program uses the redundancy among all the videos to increase the certainty of identifications. So the more videos you add, the better.

After the program finishes, you should find files called trajectories_sorted with the rest of the output of idTracker for each video. They contain the trajectories, but sorted so that the first fish is the same in all videos, and so on.
idMatcher.m
Message has been deleted

cc...@cornell.edu

unread,
Sep 25, 2017, 7:00:34 PM9/25/17
to idTracker/idSocial users
Hi Alfonso,

Great software, thank you so much for providing it for free!

When attempting to run the idMatcher.m file directly from the matlab editor, the idMatcher GUI pops up just fine, but when I click the "Add Video" button I get the following error in the matlab command window:

Undefined function or variable 'ultimodir'.

Error in idMatcher>addvideo (line 30)
directorio=ultimodir;

Error in idMatcher>@(uno,dos)addvideo(uno,dos,h) (line 13)
set(h.push_addvideo,'Callback',@(uno,dos) addvideo(uno,dos,h))
 
Error while evaluating UIControl Callback.


Additionally, when trying to run the idMatcher.exe program, I can add multiple videos using the idMatcher GUI, but when I hit the "Start" button I get a windows error sound, and the attached file is created in the folder containing idMatcher.exe.

Any help on this would be greatly appreciated! I am running long videos of mice over multiple days across light and dark periods, so having idMatcher capability is crucial. 

Thank you!

Caleb
idMatcher_backup20170925T185443.mat

Alfonso Pérez Escudero

unread,
Sep 25, 2017, 8:28:06 PM9/25/17
to idTracker/idSocial users
Sorry about this. I did not realize that idMatcher also uses another function called ultimodir.m. I attach this function, along with a version of idMatcher that does not need it.

al.
idMatcher.m
ultimodir.m
Reply all
Reply to author
Forward
0 new messages