Manual correction with idPlayer

411 views
Skip to first unread message

Alfonso Pérez Escudero

unread,
Aug 1, 2016, 6:59:37 PM8/1/16
to idTracker users
This is a protocol to correct manually the identities after tracking a video.

- Track a video with idTracker.
- Open the video with idPlayer.
- Select the original version of the trajectories
- Go to a frame where an individual has a wrong identity
- Click on the individual with the wrong identity
- Type the correct identity

The individual should be now corrected. idPlayer automatically creates a new trajectories file, with the date appended. You can keep going and correct more mistakes in the video. The new trajectories are automatically saved after each correction. When you are done, simply close idPlayer.

Note that whenever you correct one frame, idPlayer automatically corrects all the frames between consecutive crossings (which may include frames in the past).

idPlayer will only create a new trajectories file if you choose the original version at the beginning. If you choose any other version, it will overwrite the corrected trajectories on the old ones. This allows you to open a file you started to correct, and keep going.

m.john...@gmail.com

unread,
Aug 2, 2016, 11:36:44 AM8/2/16
to idTracker users
Thanks!

orte...@gmail.com

unread,
Sep 9, 2016, 2:54:42 PM9/9/16
to idTracker users
How would I make a new text file of the trajectory positions for each individual from the corrected file? 

Alfonso Pérez Escudero

unread,
Sep 16, 2016, 3:20:00 PM9/16/16
to idTracker users, orte...@gmail.com
Hi! You can do it with the attached function trajectories2txt. You need Matlab to use this function (sorry about this; we did not intend the correction feature to be used outside our lab, so we did not think about this). To use this function, follow these steps:

- Save the function in a folder in your computer
- Open Matlab
- In the top bar that shows a computer path, choose the folder where you saved the function.
- Load the trajectories, by dragging the file trajectories.mat over Matlab's window
- Type the following in Matlab's command window:

trajectories2txt(trajectories,probtrajectories)

- It will execute, and will create a file called 'trajectories.txt' in the current folder (the one you entered in Matlab's top bar).

I hope this helps!
trajectories2txt.m
Message has been deleted
Message has been deleted
Message has been deleted

orte...@gmail.com

unread,
Oct 24, 2016, 1:23:55 PM10/24/16
to idTracker users

I thought it was working, but i get this consistent error of "Undefined function or variable 'probtrajectories'.

At first I thought my path was not correct for the function, but Tab autocomplete allowed me to enter the function.

The file i want to convert is named properly as well, and is loaded.

Can you help in anyway? I attached a copy of the file I need converted to .txt format as well. (I didnt rename).






On Monday, August 1, 2016 at 6:59:37 PM UTC-4, Alfonso Pérez Escudero wrote:
trajectories_20161007T123655.mat

Alfonso Pérez Escudero

unread,
Oct 24, 2016, 4:00:00 PM10/24/16
to idTracker users, orte...@gmail.com
Hi!

The problem is that correcte trajectories do not have the 'probtrajectories' part. I have updated the function trajectories2txt, so that it can work without it. The new version is attached. To use it, simply load the trajectories file, and type

trajectories2txt(trajectories)

in Matlab's command window. It will create the .txt file, with NaN's in the column that corresponded to the probabilities.

I hope this helps!
trajectories2txt.m

rothm...@gmail.com

unread,
Jun 2, 2017, 10:43:35 PM6/2/17
to idTracker/idSocial users, orte...@gmail.com
Hi,

I was using the auction to obtain the corrected files. The function works and i get a file, but when i checked it by comparing both text files in text wrangler it says both files are identical, this is not possible as i did corrected Id's and i know they have to have at least one difference. Am i doing anything wrong? Why does this happen?

Just in case I run my videos in matlab2016b, I am only tracking one fish so there is no Id probability in the original files, since it is only 1 fish. I will like to get the corrected data, as sometimes it marks the only fish as 0, so it loses the data, even do it is not a lot of times i will still like to have the more complex corrected file.

Hope you can helo me out.

Thank you.

Andrea

rothm...@gmail.com

unread,
Jun 2, 2017, 10:58:04 PM6/2/17
to idTracker/idSocial users, orte...@gmail.com, rothm...@gmail.com
Ok, I figured it out, it was some very dumb thing from my part. I was loading the wrong trajectories file. Please disregard. Sorry it has been a long long day.

Alfonso Pérez Escudero

unread,
Jun 3, 2017, 2:14:52 PM6/3/17
to idTracker/idSocial users, orte...@gmail.com, rothm...@gmail.com
Thanks for sharing this, I think many of us can empathize with you :-P

Good luck with your experiments!
Reply all
Reply to author
Forward
Message has been deleted
0 new messages