|
ANY-maze Help > The ANY-maze reference > The Tests page > Running tests > After testing > Re-tracking from a test's video Re-tracking from a test's video
IntroductionIn some circumstances you may wish to re-track a test from the video of the test which was recorded when you originally performed the test. A classic situation in which this is helpful, is if you performed a test with the Animal colour set to 'darker' when really the animal was 'lighter' than the background. In this case the tracking will have been completely wrong, but simply correcting the animal colour and then re-tracking the test from its video will resolve the problem.
How to re-track a testThere are two ways to re-track a test:
Starting the test at a different time in the test's videoTests are always re-tracked from the same video as was used/recorded when the original test was performed. And ANY-maze will automatically start the test, and usually end it, at the same times in the video as it started/ended when it was originally performed. However, you may wish to start the test at some other point in the video, indeed this might be the whole reason why you want to re-track the test. You can do this by setting up the test to be re-tracked, as per the instructions above, and then clicking the little arrow next to the IMPORTANT: If you do this then ANY-maze will act in the same way as it would have if you had chosen to re-perform the test - see the above section describing the differences between re-tracking and re-performing a test. Changing your mindHaving specified that you want to re-track a test you can still change your mind. Either select Un-mark test to be re-tracked from the test's video from the Testing status menu, or return to the Test details report and select the Note that once you actually have re-tracked the test then you can't do this anymore. The results of a re-tracked test replace the original TRACKING resultsWhen you re-track a test the tracking related results of the re-tracked test replace the results of the original test, however input/output results are retained (unless you chose to start the test at a different time in the test's video). Note that there is then no way to recover the original results should you change your mind, although this is only the case after the test has actually been re-tracked - until then you can simply cancel the request to re-track the test, as described in the section above. Until it is re-tracked the test continues to have its original resultsWhen you specify that a test is to be re-tracked, ANY-maze simply notes your request and schedules the re-tracking of the test as the next thing to do. However, until the test is actually re-tracked the results of the original test are still valid and will be shown in all relevant reports. The differences between re-tracking and re-performing a testYou may be wondering what the difference is between re-tracking a test from a test's video and re-performing a test. Although these options sound quite similar, there are some important differences:
Re-tracking a test from the test's video
Re-performing a test
That said there are legitimate reasons for doing it, for example, you started the test without intending to (perhaps the animal wasn't even in the apparatus) - if the results of this erroneous test were saved, then re-performing the test (with the animal now in the apparatus) would be an entirely appropriate thing to do.
Why you can't re-track a test that was paused when originally performedIt is not possible to re-track a test that was paused at any point during its original performance. The reason for this restriction is that while the test was paused, the video recording of the test continued. As a result, re-tracking the test from the video would include both the paused and unpaused parts, leading to the following issues:
The solution is to re-perform the test instead, although before doing so, I recommend you review the section above about the differences between re-tracking and re-performing a test. If you do re-perform the test, then you will be able to choose whether to manually pause the test at the same times as it was paused in the original. Doing so will mean you are (more or less) re-tracking the same behaviour as the original test. On the other hand, not doing so will mean the re-performed test includes the periods when the original test was paused - which may be the whole reason why you want to re-perform the test in the first place. Why the tracking and input/output results of a re-tracked test may not align perfectlyWhen you re-track a test which includes input/output, ANY-maze retains the input/output results from the original test and merges them with the tracking results from the re-tracked test. For example, imagine you ran a test in which the animal pressed a lever at time 10s and you then chose to re-track this test. When you re-track, all the original tracking data is discarded (assumedly it is erroneous in some way and that's why you are re-tracking it) and just the I/O results are retained - these is then merged in with the re-tracked data. So in our example, we might have detected that the animal was at a position of 100,100 at time 9.9s and at a position of 110,110 at time 10.1s (these values are all a bit unrealistic, but at convenient for this discussion). We already know that the animal pressed the lever at time 10s, so we should end up with results like this:
And this is exactly what we will get, provided the original test and the re-tracking test begin at exactly the same time. Now, as you probably already know, video cameras generate a certain number of images (usually called frames) per second, often 30; so we might receive one frame at time 100.000s and the next one at time 100.033s. But a test can start at any time, so it might be that a test begins at 100.020s, i.e. between the two frames - this means that the first frame in the test will arrive 0.013s after the test began. This is all relevant because it means that: a) When we ran our original, the time 10s into the test (when the lever was pressed) was 10s after the test began (nothing too unexpected about that!); b) The recording of the video of the test will have stored a video frame at time 0.013s (being the first frame received after the test, and therefore the video, started). When we re-track, we do so from the video recording, so the test will start with the first frame in the video and this will be considered to be time 0s in the re-tracked test. If you think about this, you'll realise that this means that the re-tracked results will all be 0.013s (13ms) offset from the original test's results and this means that when the input/output results and the re-tracked tracking results are merged together they will be 13ms out of alignment. In fact this problem only arises in the following specific situation (in all other cases there either won't be any misalignment, or ANY-maze is able to calculate what it is and compensate for it when it merges the re-tracked results with the original results).
In all other cases there will be no issues at all. But even when this misalignment could occur it will be no worse than a single frame time (typically 33ms) and on average it will be half of that. This means that in the majority of cases the problem either won't exist, or it will be unlikely to have a significant effect on your results.
© Copyright 2003-2026 Stoelting Co. All rights reserved ANY-maze help topic T1381 |