Attempted to access framesbuenos(0); index must be a positive integer or logical

248 views
Skip to first unread message

Craig Sargent

unread,
Nov 20, 2015, 2:35:02 PM11/20/15
to idTracker users
Hello Fellow Users: 

I am new to idTracker. I've installed it, and tested it with the sample video of 5 zebrafish, and it works fine. Then I tried it with one of my mosquitofish videos, and got the above error message (here's a screenshot of the error message). Here is a link to a 5-minute clip of the video in question.

Can someone tell me what the error means, and what I might do to correct it? I have tried encoding the video as mp4 and avi, and also tried increasing brightness and contrast to make it more black and white. But I keep getting the same error. 

Thanks in advance for advice, and please excuse multiple messages, because I also sent a similar email to bugs.id...@gmail.com.

Cheers,

Craig

Alfonso Pérez Escudero

unread,
Nov 20, 2015, 3:29:07 PM11/20/15
to idTracker users
Hi!

This error means that idTracker cannot learn the aspect of each individual in the video. Possible causes are the following:

1) Video too short: in order to learn the aspect of each individual, idTracker needs a minimum amount of frames where all individuals are visible and moving separately. If the video is too short, it may not have enough of these frames. The adequate length of video depends on the number of individuals an how they move (you need longer videos if you have many individuals, if they cross very often, if they tend to be immobile for long periods or if they are not in view all the time). Usually we recor at least 30 minutes to be sure, but sometimes less can be enough (for example, for 5 zebrafish usually it is enough with 5 minutes of video).

2) Low quality video and/or wrong tracking parameters: idTracker needs to correctly distinguish between animals and background. And for this you need to adjust the tracking parameters until you see all animals in the displayed frame colored in green, and only the animals colored in green. Sometimes you may find that an animal is not detected, or an animal is detected as several different blobs, or that a background object is detected as an animal (is covered in green). But this should be the exception (it can happen in, say, up to 10% of the frames). Besides looking at the green pixels, you can check the correctness of the detection by looking at the "number of animals detected" in the bottom of idTracker's window. This number should match with the number of separate animals or group of animals you see in the frame. For example, if you have 5 animals and they are separated, the number should be 5. If you have 5 animals, 3 are separated and the other 2 are crossing, this number should be 4 (3 individuals + 1 pair).

3) Wrong number of individuals: There is a box where you need to enter the number of individuals. It is crucial that this number exactly matches the number of individuals in your video.

4) Animals not moving or together all the time: To learn the aspect of each individual, idTracker needs to find it in different postures. For this, the animal must move. So if some of the individuals in your video are immobile for long periods, identifications get complicated. Also, the animals must be moving separately for at least some portions of the video, the tracking will fail if they don't. For example, mice that are already familiar with the set-up tend to curl together in a corner and sleep. This is cute, but very bad news for idTracker.

In you particular case: from the clip of video you're sharing, I see a shadow in the top-left corner. That might be a problem, illumination should be as uniform as possible.

I hope this helps!

Craig Sargent

unread,
Nov 21, 2015, 12:36:51 PM11/21/15
to idTracker users
Thanks, Alfonso, and for your direct email to me from the idTrackerTeam. I tried your suggestions, and they worked! :o)

I used a small white planting tray as my arena, used 5 mosquitofish, and shot a 20 minute video. The first 5 minutes appear here. I shot the video on an AVCHD camera at 1080/60p, and encoded it as a 1080/25p mp4. I ran idTracker on a usb 3.0 solid state drive (Samsung), and it took roughly 30 minutes to analyze this video clip, with an estimated 100% accuracy in identity. Although there are shadows, they weren't a problem. 

Thanks again.

Cheers,

Craig

Alfonso Pérez Escudero

unread,
Nov 21, 2015, 12:42:17 PM11/21/15
to idTracker users
Thank you for the feedback!

The video looks quite good, so it's not surprising that idTracker performed well on that one. But please keep in mind that the 100% accuracy is only an estimate. At least for the first videos in a new setup or with a new species, it's a good idea to check visually some portion of the video to make sure that the identities are correct.
Reply all
Reply to author
Forward
0 new messages