When a project was created with one videofile it is not possible to load a new video, in order to perform the analysis with the same settings as the former videofile.
Edited
Designs
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
The issue currently comes from the free in the following block, closing the new sequence directly after opening it (the rest is for context, since line numbers might change; inside Animation::openAnimationVideo).
else{// Destroy anything that was beforefree();#ifndef STEREO_DISABLEDif(mCaptureStereo){mCaptureStereo->close();deletemCaptureStereo;}#endif////mCapture = capture;// Set new video & photo labelsmStereo=false;mVideo=true;mImgSeq=false;mCameraLiveStream=false;
If we just delete the free(), we get a newly loaded sequence and delete the old trajectory. All settings (including intrinsic and extrinsic calibration) stay the same.
This seems to be the desired behaviour, since one would use this for loading different videos from the same camera, as far as I understood it, but I'd like to get that confirmed before commiting this change. (Also possible testing automated testing of this behaviour should be addressed, if possible).
This is coupled to #4 (closed) in the sense that both want to load something new into an existing PeTrack-Instance.
I propose assing two new Objects, Project and Sequence which can be assigned to a newly created Object to load in a new Project/Sequence. So the following hierarchy:
If we want to load a new sequence, we just assign the newly created sequence to mSequence, this deletes everything old related to that sequence and replaces it. Same thing for whole projects and mProject. One can use static-members for thing that should persist through one run of PeTrack, like which directory to open, when I press Ctrl+O.
When we add something, we just need to make it the member of the correct Object and default-construct it to its default value and we're done.
This does need data out of control, since this is a part of Petrack and cannot be easily moved into Project. So to accomplish this design, we first need a more MVC-like implementation of the GUI. This has already been started at #123, but would be needed for Calibration and Tracking as well.