{"action":"opened","issue":{"url":"https://api.github.com/repos/Kitware/maptk/issues/75","labels_url":"https://api.github.com/repos/Kitware/maptk/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/Kitware/maptk/issues/75/comments","events_url":"https://api.github.com/repos/Kitware/maptk/issues/75/events","html_url":"https://github.com/Kitware/maptk/issues/75","id":93111313,"number":75,"title":"Segmentation fault in maptk_bundle_adjust_tracks ","user":{"login":"mleotta","id":826161,"avatar_url":"https://avatars.githubusercontent.com/u/826161?v=3","gravatar_id":"","url":"https://api.github.com/users/mleotta","html_url":"https://github.com/mleotta","followers_url":"https://api.github.com/users/mleotta/followers","following_url":"https://api.github.com/users/mleotta/following{/other_user}","gists_url":"https://api.github.com/users/mleotta/gists{/gist_id}","starred_url":"https://api.github.com/users/mleotta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mleotta/subscriptions","organizations_url":"https://api.github.com/users/mleotta/orgs","repos_url":"https://api.github.com/users/mleotta/repos","events_url":"https://api.github.com/users/mleotta/events{/privacy}","received_events_url":"https://api.github.com/users/mleotta/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-05T13:31:18Z","updated_at":"2015-07-05T13:31:18Z","closed_at":null,"body":"This issue was reported by @bigdraw on the [kwiver-users](http://public.kitware.com/pipermail/kwiver-users/2015-July/000003.html) mailing list.  This issues has been split out from issue #74\r\n\r\n------------\r\n\r\nAfter using maptk_track_features, I got a feature tracks file.\r\nAnd then I want to use maptk_bundle_adjust_tracks to take feature tracks and produces cameras and 3D points (PLY file).And I met a problem.This problem goes as follows:\r\n```\r\nstedraw@stedraw-PC:~/maptk/maptk/bin$ ./maptk_bundle_adjust_tracks -c  adjust.conf\r\nFile parsed! Contained 38 k/v entries.\r\nloading track file: ./output_tracks.txt\r\nloaded 36447 tracks\r\nfiltered down to 0 long tracks\r\ntrack filtering: 0.010000 sec CPU, 0.009851 sec wall\r\nInitializing cameras and landmarks: 0.000000 sec CPU, 0.000008 sec wall\r\nSegmentation fault (core dumped)\r\n```\r\nsolution(from Matt's letter):\r\n```\r\nIn this case the problem is likely related to the “min_track_length” parameter in the config file.  The bundle adjust tool currently filters tracks shorter than “min_track_length” before running bundle adjustment. It looks like you don’t have any tracks longer than the current value of “min_track_length”.  You could set this parameter to as low 2 to use all the relevant tracks.  Setting it to 3 might be a little more robust.  The problem with these small values is that you will generally be using a lot more data than you really need to optimize the cameras.  It’s better to use a more minimal set of good long tracks first, and then go back and triangulate additional features later if desired.\r\n\r\nThe proper setting for the “min_track_length\" parameter is very dependent on your data.  If you have a slow moving camera and/or high frame rate you may end of with very long tracks and want this value to be high.  If your scene changes more rapidly from frame to frame you need this value to be shorter.  We are working on making this smarter so that it adapts to the data.  For now, you’ll have to play with the parameter to find a value that suits your problem.\r\n\r\nThe fact that the executable seg faults when it gets 0 tracks should be considered a bug.  It should handle this case more gracefully and exit cleanly. \r\n```\r\nSo I modified my \"adjust.conf\", set the  \"min_track_length\" parameter to a lower value, and got the right output."}}