{"action":"created","comment":{"url":"https://api.github.com/repos/lybros/Appa/pulls/comments/115863904","pull_request_review_id":37441085,"id":115863904,"diff_hunk":"@@ -126,42 +125,117 @@ bool Reconstructor::ExtractFeaturesMatches(\n     ReconstructionBuilder* reconstruction_builder) {\n   theia::Timer extracting_matching_timer;\n \n-  // Enabling \"Shared Calibration\" (all images were made with the same camera).\n-  theia::CameraIntrinsicsGroupId intrinsics_group_id =\n-      theia::kInvalidCameraIntrinsicsGroupId;\n-  if (options_->shared_calibration) {\n-    intrinsics_group_id = 0;\n+  report_->using_camera_intrinsics_prior_ = false;\n+  report_->using_geodata_prior_ = false;\n+\n+  // Making decision if Prior Camera Calibration parameters are provided and\n+  // are usable.\n+  QMap<QString, CameraIntrinsicsPrior> camera_intrinsics_prior;\n+  bool shared_calibration;\n+  bool geo_data_included;\n+  bool calibration_available =\n+      storage_->GetCalibration(&camera_intrinsics_prior,\n+                               &shared_calibration, &geo_data_included);\n+  if (!calibration_available) {\n+    LOG(INFO) << \"Prior calibration is not available. Processing without it.\";\n   }\n+  LOG(INFO) << \"shared_calibration: \" << shared_calibration;\n+  LOG(INFO) << \"geo_data_included: \" << geo_data_included;\n+\n+  if (calibration_available &&\n+      (options_->use_camera_intrinsics_prior_ || options_->use_geodata_)) {\n+    // The user requested to use prior data from file and that's possible.\n+    report_->using_camera_intrinsics_prior_ = true;\n+    report_->using_geodata_prior_ = true;\n+\n+    theia::CameraIntrinsicsGroupId intrinsics_group_id =\n+        theia::kInvalidCameraIntrinsicsGroupId;\n+\n+    report_->shared_calibration_ = false;\n+\n+    if (options_->shared_calibration_) {\n+      if (shared_calibration) {\n+        LOG(INFO) << \"shared_calibration mode was requested and available.\";\n+        intrinsics_group_id = 0;\n+        report_->shared_calibration_ = true;\n+      } else {\n+        LOG(INFO) << \"Ignoring user request of shared_calibration due to \"\n+                     \"the structure of calibration file.\";\n+      }\n+    } else {\n+      if (shared_calibration) {\n+        LOG(INFO) << \"File has shared_calibration structure but user didn't \"\n+                     \"request to use the feature. Cameras will be initialized \"\n+                     \"with the same values but algorithm will not use that.\";\n+      } else {\n+        LOG(INFO) << \"Running without shared_calibration\";\n+      }\n+    }\n \n-  // Making decision if Prior Camera Calibration parameters are provided.\n-  QMap<QString, theia::CameraIntrinsicsPrior> camera_intrinsics_prior;\n-  if (options_->use_camera_intrinsics_prior &&\n-      storage_->GetCalibration(&camera_intrinsics_prior)) {\n-    report_->using_calibration_file_ = true;\n+    // Unsetting all fields set by Calibration Reader if user hasn't requested\n+    // all kinds of prior initialization.\n+\n+    // That only works for Pinhole camera for now.\n+    // TODO(uladbohdan): to refactor for general case.\n+    if (!options_->use_camera_intrinsics_prior_) {\n+      // User hasn't requested initialization of camera intrinsics.\n+      for (QMap<QString, CameraIntrinsicsPrior>::iterator it =\n+            camera_intrinsics_prior.begin();\n+           it != camera_intrinsics_prior.end(); it++) {","path":"src/reconstructor.cpp","position":87,"original_position":87,"commit_id":"355a33af565e8a761edd904e37e9702880581933","original_commit_id":"355a33af565e8a761edd904e37e9702880581933","user":{"login":"codacy-bot","id":19940114,"avatar_url":"https://avatars2.githubusercontent.com/u/19940114?v=3","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/assets/images/favicon.png) Issue found: [Prefer prefix ++/-- operators for non-primitive types.](https://www.codacy.com/app/Drapegnik/Appa/pullRequest?prid=644824)","created_at":"2017-05-10T22:03:02Z","updated_at":"2017-05-10T22:03:02Z","html_url":"https://github.com/lybros/Appa/pull/57#discussion_r115863904","pull_request_url":"https://api.github.com/repos/lybros/Appa/pulls/57","_links":{"self":{"href":"https://api.github.com/repos/lybros/Appa/pulls/comments/115863904"},"html":{"href":"https://github.com/lybros/Appa/pull/57#discussion_r115863904"},"pull_request":{"href":"https://api.github.com/repos/lybros/Appa/pulls/57"}}},"pull_request":{"url":"https://api.github.com/repos/lybros/Appa/pulls/57","id":119911212,"html_url":"https://github.com/lybros/Appa/pull/57","diff_url":"https://github.com/lybros/Appa/pull/57.diff","patch_url":"https://github.com/lybros/Appa/pull/57.patch","issue_url":"https://api.github.com/repos/lybros/Appa/issues/57","number":57,"state":"open","locked":false,"title":"Selected tracks","user":{"login":"Drapegnik","id":11758660,"avatar_url":"https://avatars0.githubusercontent.com/u/11758660?v=3","gravatar_id":"","url":"https://api.github.com/users/Drapegnik","html_url":"https://github.com/Drapegnik","followers_url":"https://api.github.com/users/Drapegnik/followers","following_url":"https://api.github.com/users/Drapegnik/following{/other_user}","gists_url":"https://api.github.com/users/Drapegnik/gists{/gist_id}","starred_url":"https://api.github.com/users/Drapegnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Drapegnik/subscriptions","organizations_url":"https://api.github.com/users/Drapegnik/orgs","repos_url":"https://api.github.com/users/Drapegnik/repos","events_url":"https://api.github.com/users/Drapegnik/events{/privacy}","received_events_url":"https://api.github.com/users/Drapegnik/received_events","type":"User","site_admin":false},"body":"* highlight tracks for selected thumbnails\r\n<img width=\"1070\" alt=\"screen shot 2017-05-10 at 18 02 08\" src=\"https://cloud.githubusercontent.com/assets/11758660/25906730/1ad09576-35ae-11e7-938c-0fd4af7d32f9.png\">\r\n\r\n","created_at":"2017-05-10T15:24:55Z","updated_at":"2017-05-10T22:03:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1d7df49a1f9c7ca229730ac0df2d18f189318a7f","assignee":null,"assignees":[],"requested_reviewers":[{"login":"UladBohdan","id":7117196,"avatar_url":"https://avatars3.githubusercontent.com/u/7117196?v=3","gravatar_id":"","url":"https://api.github.com/users/UladBohdan","html_url":"https://github.com/UladBohdan","followers_url":"https://api.github.com/users/UladBohdan/followers","following_url":"https://api.github.com/users/UladBohdan/following{/other_user}","gists_url":"https://api.github.com/users/UladBohdan/gists{/gist_id}","starred_url":"https://api.github.com/users/UladBohdan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UladBohdan/subscriptions","organizations_url":"https://api.github.com/users/UladBohdan/orgs","repos_url":"https://api.github.com/users/UladBohdan/repos","events_url":"https://api.github.com/users/UladBohdan/events{/privacy}","received_events_url":"https://api.github.com/users/UladBohdan/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/lybros/Appa/pulls/57/commits","review_comments_url":"https://api.github.com/repos/lybros/Appa/pulls/57/comments","review_comment_url":"https://api.github.com/repos/lybros/Appa/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lybros/Appa/issues/57/comments","statuses_url":"https://api.github.com/repos/lybros/Appa/statuses/355a33af565e8a761edd904e37e9702880581933","head":{"label":"lybros:selected-tracks","ref":"selected-tracks","sha":"355a33af565e8a761edd904e37e9702880581933","user":{"login":"lybros","id":23136200,"avatar_url":"https://avatars0.githubusercontent.com/u/23136200?v=3","gravatar_id":"","url":"https://api.github.com/users/lybros","html_url":"https://github.com/lybros","followers_url":"https://api.github.com/users/lybros/followers","following_url":"https://api.github.com/users/lybros/following{/other_user}","gists_url":"https://api.github.com/users/lybros/gists{/gist_id}","starred_url":"https://api.github.com/users/lybros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lybros/subscriptions","organizations_url":"https://api.github.com/users/lybros/orgs","repos_url":"https://api.github.com/users/lybros/repos","events_url":"https://api.github.com/users/lybros/events{/privacy}","received_events_url":"https://api.github.com/users/lybros/received_events","type":"Organization","site_admin":false},"repo":{"id":81757983,"name":"Appa","full_name":"lybros/Appa","owner":{"login":"lybros","id":23136200,"avatar_url":"https://avatars0.githubusercontent.com/u/23136200?v=3","gravatar_id":"","url":"https://api.github.com/users/lybros","html_url":"https://github.com/lybros","followers_url":"https://api.github.com/users/lybros/followers","following_url":"https://api.github.com/users/lybros/following{/other_user}","gists_url":"https://api.github.com/users/lybros/gists{/gist_id}","starred_url":"https://api.github.com/users/lybros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lybros/subscriptions","organizations_url":"https://api.github.com/users/lybros/orgs","repos_url":"https://api.github.com/users/lybros/repos","events_url":"https://api.github.com/users/lybros/events{/privacy}","received_events_url":"https://api.github.com/users/lybros/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lybros/Appa","description":"GUI for TheiaSfM multiview geometry and structure from motion library.","fork":false,"url":"https://api.github.com/repos/lybros/Appa","forks_url":"https://api.github.com/repos/lybros/Appa/forks","keys_url":"https://api.github.com/repos/lybros/Appa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lybros/Appa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lybros/Appa/teams","hooks_url":"https://api.github.com/repos/lybros/Appa/hooks","issue_events_url":"https://api.github.com/repos/lybros/Appa/issues/events{/number}","events_url":"https://api.github.com/repos/lybros/Appa/events","assignees_url":"https://api.github.com/repos/lybros/Appa/assignees{/user}","branches_url":"https://api.github.com/repos/lybros/Appa/branches{/branch}","tags_url":"https://api.github.com/repos/lybros/Appa/tags","blobs_url":"https://api.github.com/repos/lybros/Appa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lybros/Appa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lybros/Appa/git/refs{/sha}","trees_url":"https://api.github.com/repos/lybros/Appa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lybros/Appa/statuses/{sha}","languages_url":"https://api.github.com/repos/lybros/Appa/languages","stargazers_url":"https://api.github.com/repos/lybros/Appa/stargazers","contributors_url":"https://api.github.com/repos/lybros/Appa/contributors","subscribers_url":"https://api.github.com/repos/lybros/Appa/subscribers","subscription_url":"https://api.github.com/repos/lybros/Appa/subscription","commits_url":"https://api.github.com/repos/lybros/Appa/commits{/sha}","git_commits_url":"https://api.github.com/repos/lybros/Appa/git/commits{/sha}","comments_url":"https://api.github.com/repos/lybros/Appa/comments{/number}","issue_comment_url":"https://api.github.com/repos/lybros/Appa/issues/comments{/number}","contents_url":"https://api.github.com/repos/lybros/Appa/contents/{+path}","compare_url":"https://api.github.com/repos/lybros/Appa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lybros/Appa/merges","archive_url":"https://api.github.com/repos/lybros/Appa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lybros/Appa/downloads","issues_url":"https://api.github.com/repos/lybros/Appa/issues{/number}","pulls_url":"https://api.github.com/repos/lybros/Appa/pulls{/number}","milestones_url":"https://api.github.com/repos/lybros/Appa/milestones{/number}","notifications_url":"https://api.github.com/repos/lybros/Appa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lybros/Appa/labels{/name}","releases_url":"https://api.github.com/repos/lybros/Appa/releases{/id}","deployments_url":"https://api.github.com/repos/lybros/Appa/deployments","created_at":"2017-02-12T21:20:05Z","updated_at":"2017-04-18T17:12:17Z","pushed_at":"2017-05-10T22:00:40Z","git_url":"git://github.com/lybros/Appa.git","ssh_url":"git@github.com:lybros/Appa.git","clone_url":"https://github.com/lybros/Appa.git","svn_url":"https://github.com/lybros/Appa","homepage":"","size":515,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":17,"forks":2,"open_issues":17,"watchers":0,"default_branch":"master"}},"base":{"label":"lybros:master","ref":"master","sha":"ee5c7eb1abf2329c3a3accf5b586f8eb5c096a85","user":{"login":"lybros","id":23136200,"avatar_url":"https://avatars0.githubusercontent.com/u/23136200?v=3","gravatar_id":"","url":"https://api.github.com/users/lybros","html_url":"https://github.com/lybros","followers_url":"https://api.github.com/users/lybros/followers","following_url":"https://api.github.com/users/lybros/following{/other_user}","gists_url":"https://api.github.com/users/lybros/gists{/gist_id}","starred_url":"https://api.github.com/users/lybros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lybros/subscriptions","organizations_url":"https://api.github.com/users/lybros/orgs","repos_url":"https://api.github.com/users/lybros/repos","events_url":"https://api.github.com/users/lybros/events{/privacy}","received_events_url":"https://api.github.com/users/lybros/received_events","type":"Organization","site_admin":false},"repo":{"id":81757983,"name":"Appa","full_name":"lybros/Appa","owner":{"login":"lybros","id":23136200,"avatar_url":"https://avatars0.githubusercontent.com/u/23136200?v=3","gravatar_id":"","url":"https://api.github.com/users/lybros","html_url":"https://github.com/lybros","followers_url":"https://api.github.com/users/lybros/followers","following_url":"https://api.github.com/users/lybros/following{/other_user}","gists_url":"https://api.github.com/users/lybros/gists{/gist_id}","starred_url":"https://api.github.com/users/lybros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lybros/subscriptions","organizations_url":"https://api.github.com/users/lybros/orgs","repos_url":"https://api.github.com/users/lybros/repos","events_url":"https://api.github.com/users/lybros/events{/privacy}","received_events_url":"https://api.github.com/users/lybros/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lybros/Appa","description":"GUI for TheiaSfM multiview geometry and structure from motion library.","fork":false,"url":"https://api.github.com/repos/lybros/Appa","forks_url":"https://api.github.com/repos/lybros/Appa/forks","keys_url":"https://api.github.com/repos/lybros/Appa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lybros/Appa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lybros/Appa/teams","hooks_url":"https://api.github.com/repos/lybros/Appa/hooks","issue_events_url":"https://api.github.com/repos/lybros/Appa/issues/events{/number}","events_url":"https://api.github.com/repos/lybros/Appa/events","assignees_url":"https://api.github.com/repos/lybros/Appa/assignees{/user}","branches_url":"https://api.github.com/repos/lybros/Appa/branches{/branch}","tags_url":"https://api.github.com/repos/lybros/Appa/tags","blobs_url":"https://api.github.com/repos/lybros/Appa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lybros/Appa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lybros/Appa/git/refs{/sha}","trees_url":"https://api.github.com/repos/lybros/Appa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lybros/Appa/statuses/{sha}","languages_url":"https://api.github.com/repos/lybros/Appa/languages","stargazers_url":"https://api.github.com/repos/lybros/Appa/stargazers","contributors_url":"https://api.github.com/repos/lybros/Appa/contributors","subscribers_url":"https://api.github.com/repos/lybros/Appa/subscribers","subscription_url":"https://api.github.com/repos/lybros/Appa/subscription","commits_url":"https://api.github.com/repos/lybros/Appa/commits{/sha}","git_commits_url":"https://api.github.com/repos/lybros/Appa/git/commits{/sha}","comments_url":"https://api.github.com/repos/lybros/Appa/comments{/number}","issue_comment_url":"https://api.github.com/repos/lybros/Appa/issues/comments{/number}","contents_url":"https://api.github.com/repos/lybros/Appa/contents/{+path}","compare_url":"https://api.github.com/repos/lybros/Appa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lybros/Appa/merges","archive_url":"https://api.github.com/repos/lybros/Appa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lybros/Appa/downloads","issues_url":"https://api.github.com/repos/lybros/Appa/issues{/number}","pulls_url":"https://api.github.com/repos/lybros/Appa/pulls{/number}","milestones_url":"https://api.github.com/repos/lybros/Appa/milestones{/number}","notifications_url":"https://api.github.com/repos/lybros/Appa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lybros/Appa/labels{/name}","releases_url":"https://api.github.com/repos/lybros/Appa/releases{/id}","deployments_url":"https://api.github.com/repos/lybros/Appa/deployments","created_at":"2017-02-12T21:20:05Z","updated_at":"2017-04-18T17:12:17Z","pushed_at":"2017-05-10T22:00:40Z","git_url":"git://github.com/lybros/Appa.git","ssh_url":"git@github.com:lybros/Appa.git","clone_url":"https://github.com/lybros/Appa.git","svn_url":"https://github.com/lybros/Appa","homepage":"","size":515,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":17,"forks":2,"open_issues":17,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lybros/Appa/pulls/57"},"html":{"href":"https://github.com/lybros/Appa/pull/57"},"issue":{"href":"https://api.github.com/repos/lybros/Appa/issues/57"},"comments":{"href":"https://api.github.com/repos/lybros/Appa/issues/57/comments"},"review_comments":{"href":"https://api.github.com/repos/lybros/Appa/pulls/57/comments"},"review_comment":{"href":"https://api.github.com/repos/lybros/Appa/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lybros/Appa/pulls/57/commits"},"statuses":{"href":"https://api.github.com/repos/lybros/Appa/statuses/355a33af565e8a761edd904e37e9702880581933"}}}}
{"actor":{"display_login":"codacy-bot"}}