GitHub PullRequestReviewCommentEvent at 2014-08-15 05:20:06
Repository: opencv_contrib
Actor: vpisarev
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/Itseez/opencv_contrib/pulls/comments/16280579","id":16280579,"diff_hunk":"@@ -0,0 +1,86 @@\n+/*M///////////////////////////////////////////////////////////////////////////////////////\n+ //\n+ //  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\n+ //\n+ //  By downloading, copying, installing or using the software you agree to this license.\n+ //  If you do not agree to this license, do not download, install,\n+ //  copy or use the software.\n+ //\n+ //\n+ //                           License Agreement\n+ //                For Open Source Computer Vision Library\n+ //\n+ // Copyright (C) 2013, OpenCV Foundation, all rights reserved.\n+ // Third party copyrights are property of their respective owners.\n+ //\n+ // Redistribution and use in source and binary forms, with or without modification,\n+ // are permitted provided that the following conditions are met:\n+ //\n+ //   * Redistribution's of source code must retain the above copyright notice,\n+ //     this list of conditions and the following disclaimer.\n+ //\n+ //   * Redistribution's in binary form must reproduce the above copyright notice,\n+ //     this list of conditions and the following disclaimer in the documentation\n+ //     and/or other materials provided with the distribution.\n+ //\n+ //   * The name of the copyright holders may not be used to endorse or promote products\n+ //     derived from this software without specific prior written permission.\n+ //\n+ // This software is provided by the copyright holders and contributors \"as is\" and\n+ // any express or implied warranties, including, but not limited to, the implied\n+ // warranties of merchantability and fitness for a particular purpose are disclaimed.\n+ // In no event shall the Intel Corporation or contributors be liable for any direct,\n+ // indirect, incidental, special, exemplary, or consequential damages\n+ // (including, but not limited to, procurement of substitute goods or services;\n+ // loss of use, data, or profits; or business interruption) however caused\n+ // and on any theory of liability, whether in contract, strict liability,\n+ // or tort (including negligence or otherwise) arising in any way out of\n+ // the use of this software, even if advised of the possibility of such damage.\n+ //\n+ //M*/\n+\n+#pragma once\n+#include \"kyheader.h\"\n+class FilterTIG\n+{\n+public:\n+    void update(CMat &w);\n+\n+    // For a W by H gradient magnitude map, find a W-7 by H-7 CV_32F matching score map\n+    cv::Mat matchTemplate(const cv::Mat &mag1u);\n+\n+    inline float dot(const int64_t tig1, const int64_t tig2, const int64_t tig4, const int64_t tig8);\n+\n+public:\n+    void reconstruct(cv::Mat &w); // For illustration purpose\n+\n+private:\n+    static const int NUM_COMP = 2; // Number of components\n+    static const int D = 64; // Dimension of TIG\n+    int64_t _bTIGs[NUM_COMP]; // Binary TIG features\n+    float _coeffs1[NUM_COMP]; // Coefficients of binary TIG features\n+\n+    // For efficiently deals with different bits in CV_8U gradient map\n+    float _coeffs2[NUM_COMP], _coeffs4[NUM_COMP], _coeffs8[NUM_COMP];\n+};\n+\n+\n+inline float FilterTIG::dot(const int64_t tig1, const int64_t tig2, const int64_t tig4, const int64_t tig8)","path":"modules/saliency/include/opencv2/saliency/FilterTIG.h","position":68,"original_position":68,"commit_id":"3eb81b726177416ec1492d21d3288754cb4e36a3","original_commit_id":"3eb81b726177416ec1492d21d3288754cb4e36a3","user":{"login":"vpisarev","id":2110786,"avatar_url":"https://avatars.githubusercontent.com/u/2110786?v=2","gravatar_id":"7208a7b88d05302093239e1bdcd0b5e7","url":"https://api.github.com/users/vpisarev","html_url":"https://github.com/vpisarev","followers_url":"https://api.github.com/users/vpisarev/followers","following_url":"https://api.github.com/users/vpisarev/following{/other_user}","gists_url":"https://api.github.com/users/vpisarev/gists{/gist_id}","starred_url":"https://api.github.com/users/vpisarev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vpisarev/subscriptions","organizations_url":"https://api.github.com/users/vpisarev/orgs","repos_url":"https://api.github.com/users/vpisarev/repos","events_url":"https://api.github.com/users/vpisarev/events{/privacy}","received_events_url":"https://api.github.com/users/vpisarev/received_events","type":"User","site_admin":false},"body":"please, move it to .cpp file. Or, if it's implementation-related header and users will basically do not need it, put this header (FilterTIG.hpp) inside src directory","created_at":"2014-08-15T05:20:06Z","updated_at":"2014-08-15T05:20:06Z","html_url":"https://github.com/Itseez/opencv_contrib/pull/39#discussion_r16280579","pull_request_url":"https://api.github.com/repos/Itseez/opencv_contrib/pulls/39","_links":{"self":{"href":"https://api.github.com/repos/Itseez/opencv_contrib/pulls/comments/16280579"},"html":{"href":"https://github.com/Itseez/opencv_contrib/pull/39#discussion_r16280579"},"pull_request":{"href":"https://api.github.com/repos/Itseez/opencv_contrib/pulls/39"}}},"pull_request":{"url":"https://api.github.com/repos/Itseez/opencv_contrib/pulls/39","id":18467802,"html_url":"https://github.com/Itseez/opencv_contrib/pull/39","diff_url":"https://github.com/Itseez/opencv_contrib/pull/39.diff","patch_url":"https://github.com/Itseez/opencv_contrib/pull/39.patch","issue_url":"https://api.github.com/repos/Itseez/opencv_contrib/issues/39","number":39,"state":"open","locked":false,"title":"Saliency module develop","user":{"login":"fpuja","id":6002900,"avatar_url":"https://avatars.githubusercontent.com/u/6002900?v=2","gravatar_id":"2bbde61cb3c0d18213e0952d32e81c36","url":"https://api.github.com/users/fpuja","html_url":"https://github.com/fpuja","followers_url":"https://api.github.com/users/fpuja/followers","following_url":"https://api.github.com/users/fpuja/following{/other_user}","gists_url":"https://api.github.com/users/fpuja/gists{/gist_id}","starred_url":"https://api.github.com/users/fpuja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fpuja/subscriptions","organizations_url":"https://api.github.com/users/fpuja/orgs","repos_url":"https://api.github.com/users/fpuja/repos","events_url":"https://api.github.com/users/fpuja/events{/privacy}","received_events_url":"https://api.github.com/users/fpuja/received_events","type":"User","site_admin":false},"body":"In this code, I have created a Saliency module. The principal purpose of this API is to give a unique interface, a unique framework for use and plug sever saliency algorithms, also with very different nature and methodology, but they share the same purpose, organizing algorithms into three main categories:\r\n\r\nStatic Saliency: algorithms belonging to this category, exploit different image features that allow to detect salient objects in a non dynamic scenarios.\r\n\r\nMotion Saliency: algorithms belonging to this category, are particularly focused to detect salient objects over time (hence also over frame), then there is a temporal component sealing cosider that allows to detect “moving” objects as salient, meaning therefore also the more general sense of detection the changes in the scene.\r\n\r\nObjectness: Objectness is usually represented as a value which reflects how likely an image window covers an object of any category. Algorithms belonging to this category, avoid making decisions early on, by proposing a small number of category-independent proposals, that are expected to cover all objects in an image. Being able to perceive objects before identifying them is closely related to bottom up visual attention (saliency).\r\n\r\nPresently, the following methods have been implemented:\r\n\r\n- Spectral Residual approach (Hou, Xiaodi, and Liqing Zhang. “Saliency detection: A spectral residual approach.” Computer Vision and Pattern Recognition, 2007. CVPR‘07. IEEE Conference on. IEEE, 2007.) for Static Saliency category.\r\n\r\n- Binarized normed gradients algorithm (Cheng, Ming-Ming, et al. “BING: Binarized normed gradients for objectness estimation at 300fps.” IEEE CVPR. 2014.) for Objectness category.\r\n\r\n- Bin Wang Apr 2014 (B. Wang and P. Dudek \"A Fast Self-tuning Background Subtraction Algorithm\", in proc of IEEE Workshop on Change Detection, 2014) for Motion Saliency category.\r\n\r\n ","created_at":"2014-07-16T13:34:34Z","updated_at":"2014-08-15T05:20:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c0eba6492ef07132c80070bdb660109a6dfadec1","assignee":{"login":"vpisarev","id":2110786,"avatar_url":"https://avatars.githubusercontent.com/u/2110786?v=2","gravatar_id":"7208a7b88d05302093239e1bdcd0b5e7","url":"https://api.github.com/users/vpisarev","html_url":"https://github.com/vpisarev","followers_url":"https://api.github.com/users/vpisarev/followers","following_url":"https://api.github.com/users/vpisarev/following{/other_user}","gists_url":"https://api.github.com/users/vpisarev/gists{/gist_id}","starred_url":"https://api.github.com/users/vpisarev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vpisarev/subscriptions","organizations_url":"https://api.github.com/users/vpisarev/orgs","repos_url":"https://api.github.com/users/vpisarev/repos","events_url":"https://api.github.com/users/vpisarev/events{/privacy}","received_events_url":"https://api.github.com/users/vpisarev/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/Itseez/opencv_contrib/pulls/39/commits","review_comments_url":"https://api.github.com/repos/Itseez/opencv_contrib/pulls/39/comments","review_comment_url":"https://api.github.com/repos/Itseez/opencv_contrib/pulls/comments/{number}","comments_url":"https://api.github.com/repos/Itseez/opencv_contrib/issues/39/comments","statuses_url":"https://api.github.com/repos/Itseez/opencv_contrib/statuses/3eb81b726177416ec1492d21d3288754cb4e36a3","head":{"label":"fpuja:saliencyModuleDevelop","ref":"saliencyModuleDevelop","sha":"3eb81b726177416ec1492d21d3288754cb4e36a3","user":{"login":"fpuja","id":6002900,"avatar_url":"https://avatars.githubusercontent.com/u/6002900?v=2","gravatar_id":"2bbde61cb3c0d18213e0952d32e81c36","url":"https://api.github.com/users/fpuja","html_url":"https://github.com/fpuja","followers_url":"https://api.github.com/users/fpuja/followers","following_url":"https://api.github.com/users/fpuja/following{/other_user}","gists_url":"https://api.github.com/users/fpuja/gists{/gist_id}","starred_url":"https://api.github.com/users/fpuja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fpuja/subscriptions","organizations_url":"https://api.github.com/users/fpuja/orgs","repos_url":"https://api.github.com/users/fpuja/repos","events_url":"https://api.github.com/users/fpuja/events{/privacy}","received_events_url":"https://api.github.com/users/fpuja/received_events","type":"User","site_admin":false},"repo":{"id":19946061,"name":"opencv_contrib","full_name":"fpuja/opencv_contrib","owner":{"login":"fpuja","id":6002900,"avatar_url":"https://avatars.githubusercontent.com/u/6002900?v=2","gravatar_id":"2bbde61cb3c0d18213e0952d32e81c36","url":"https://api.github.com/users/fpuja","html_url":"https://github.com/fpuja","followers_url":"https://api.github.com/users/fpuja/followers","following_url":"https://api.github.com/users/fpuja/following{/other_user}","gists_url":"https://api.github.com/users/fpuja/gists{/gist_id}","starred_url":"https://api.github.com/users/fpuja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fpuja/subscriptions","organizations_url":"https://api.github.com/users/fpuja/orgs","repos_url":"https://api.github.com/users/fpuja/repos","events_url":"https://api.github.com/users/fpuja/events{/privacy}","received_events_url":"https://api.github.com/users/fpuja/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fpuja/opencv_contrib","description":"Repository for OpenCV's extra modules","fork":true,"url":"https://api.github.com/repos/fpuja/opencv_contrib","forks_url":"https://api.github.com/repos/fpuja/opencv_contrib/forks","keys_url":"https://api.github.com/repos/fpuja/opencv_contrib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fpuja/opencv_contrib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fpuja/opencv_contrib/teams","hooks_url":"https://api.github.com/repos/fpuja/opencv_contrib/hooks","issue_events_url":"https://api.github.com/repos/fpuja/opencv_contrib/issues/events{/number}","events_url":"https://api.github.com/repos/fpuja/opencv_contrib/events","assignees_url":"https://api.github.com/repos/fpuja/opencv_contrib/assignees{/user}","branches_url":"https://api.github.com/repos/fpuja/opencv_contrib/branches{/branch}","tags_url":"https://api.github.com/repos/fpuja/opencv_contrib/tags","blobs_url":"https://api.github.com/repos/fpuja/opencv_contrib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fpuja/opencv_contrib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fpuja/opencv_contrib/git/refs{/sha}","trees_url":"https://api.github.com/repos/fpuja/opencv_contrib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fpuja/opencv_contrib/statuses/{sha}","languages_url":"https://api.github.com/repos/fpuja/opencv_contrib/languages","stargazers_url":"https://api.github.com/repos/fpuja/opencv_contrib/stargazers","contributors_url":"https://api.github.com/repos/fpuja/opencv_contrib/contributors","subscribers_url":"https://api.github.com/repos/fpuja/opencv_contrib/subscribers","subscription_url":"https://api.github.com/repos/fpuja/opencv_contrib/subscription","commits_url":"https://api.github.com/repos/fpuja/opencv_contrib/commits{/sha}","git_commits_url":"https://api.github.com/repos/fpuja/opencv_contrib/git/commits{/sha}","comments_url":"https://api.github.com/repos/fpuja/opencv_contrib/comments{/number}","issue_comment_url":"https://api.github.com/repos/fpuja/opencv_contrib/issues/comments/{number}","contents_url":"https://api.github.com/repos/fpuja/opencv_contrib/contents/{+path}","compare_url":"https://api.github.com/repos/fpuja/opencv_contrib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fpuja/opencv_contrib/merges","archive_url":"https://api.github.com/repos/fpuja/opencv_contrib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fpuja/opencv_contrib/downloads","issues_url":"https://api.github.com/repos/fpuja/opencv_contrib/issues{/number}","pulls_url":"https://api.github.com/repos/fpuja/opencv_contrib/pulls{/number}","milestones_url":"https://api.github.com/repos/fpuja/opencv_contrib/milestones{/number}","notifications_url":"https://api.github.com/repos/fpuja/opencv_contrib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fpuja/opencv_contrib/labels{/name}","releases_url":"https://api.github.com/repos/fpuja/opencv_contrib/releases{/id}","created_at":"2014-05-19T14:59:20Z","updated_at":"2014-07-15T05:04:45Z","pushed_at":"2014-08-13T14:41:02Z","git_url":"git://github.com/fpuja/opencv_contrib.git","ssh_url":"git@github.com:fpuja/opencv_contrib.git","clone_url":"https://github.com/fpuja/opencv_contrib.git","svn_url":"https://github.com/fpuja/opencv_contrib","homepage":null,"size":3216,"stargazers_count":4,"watchers_count":4,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":4,"mirror_url":null,"open_issues_count":0,"forks":4,"open_issues":0,"watchers":4,"default_branch":"master"}},"base":{"label":"Itseez:master","ref":"master","sha":"eafd7a18d8d23375ba013a469dbcda96d89e4ab0","user":{"login":"Itseez","id":1786446,"avatar_url":"https://avatars.githubusercontent.com/u/1786446?v=2","gravatar_id":"52a9e25d70220a4655783af1fc5f118f","url":"https://api.github.com/users/Itseez","html_url":"https://github.com/Itseez","followers_url":"https://api.github.com/users/Itseez/followers","following_url":"https://api.github.com/users/Itseez/following{/other_user}","gists_url":"https://api.github.com/users/Itseez/gists{/gist_id}","starred_url":"https://api.github.com/users/Itseez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Itseez/subscriptions","organizations_url":"https://api.github.com/users/Itseez/orgs","repos_url":"https://api.github.com/users/Itseez/repos","events_url":"https://api.github.com/users/Itseez/events{/privacy}","received_events_url":"https://api.github.com/users/Itseez/received_events","type":"Organization","site_admin":false},"repo":{"id":12756992,"name":"opencv_contrib","full_name":"Itseez/opencv_contrib","owner":{"login":"Itseez","id":1786446,"avatar_url":"https://avatars.githubusercontent.com/u/1786446?v=2","gravatar_id":"52a9e25d70220a4655783af1fc5f118f","url":"https://api.github.com/users/Itseez","html_url":"https://github.com/Itseez","followers_url":"https://api.github.com/users/Itseez/followers","following_url":"https://api.github.com/users/Itseez/following{/other_user}","gists_url":"https://api.github.com/users/Itseez/gists{/gist_id}","starred_url":"https://api.github.com/users/Itseez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Itseez/subscriptions","organizations_url":"https://api.github.com/users/Itseez/orgs","repos_url":"https://api.github.com/users/Itseez/repos","events_url":"https://api.github.com/users/Itseez/events{/privacy}","received_events_url":"https://api.github.com/users/Itseez/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Itseez/opencv_contrib","description":"Repository for OpenCV's extra modules","fork":false,"url":"https://api.github.com/repos/Itseez/opencv_contrib","forks_url":"https://api.github.com/repos/Itseez/opencv_contrib/forks","keys_url":"https://api.github.com/repos/Itseez/opencv_contrib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Itseez/opencv_contrib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Itseez/opencv_contrib/teams","hooks_url":"https://api.github.com/repos/Itseez/opencv_contrib/hooks","issue_events_url":"https://api.github.com/repos/Itseez/opencv_contrib/issues/events{/number}","events_url":"https://api.github.com/repos/Itseez/opencv_contrib/events","assignees_url":"https://api.github.com/repos/Itseez/opencv_contrib/assignees{/user}","branches_url":"https://api.github.com/repos/Itseez/opencv_contrib/branches{/branch}","tags_url":"https://api.github.com/repos/Itseez/opencv_contrib/tags","blobs_url":"https://api.github.com/repos/Itseez/opencv_contrib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Itseez/opencv_contrib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Itseez/opencv_contrib/git/refs{/sha}","trees_url":"https://api.github.com/repos/Itseez/opencv_contrib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Itseez/opencv_contrib/statuses/{sha}","languages_url":"https://api.github.com/repos/Itseez/opencv_contrib/languages","stargazers_url":"https://api.github.com/repos/Itseez/opencv_contrib/stargazers","contributors_url":"https://api.github.com/repos/Itseez/opencv_contrib/contributors","subscribers_url":"https://api.github.com/repos/Itseez/opencv_contrib/subscribers","subscription_url":"https://api.github.com/repos/Itseez/opencv_contrib/subscription","commits_url":"https://api.github.com/repos/Itseez/opencv_contrib/commits{/sha}","git_commits_url":"https://api.github.com/repos/Itseez/opencv_contrib/git/commits{/sha}","comments_url":"https://api.github.com/repos/Itseez/opencv_contrib/comments{/number}","issue_comment_url":"https://api.github.com/repos/Itseez/opencv_contrib/issues/comments/{number}","contents_url":"https://api.github.com/repos/Itseez/opencv_contrib/contents/{+path}","compare_url":"https://api.github.com/repos/Itseez/opencv_contrib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Itseez/opencv_contrib/merges","archive_url":"https://api.github.com/repos/Itseez/opencv_contrib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Itseez/opencv_contrib/downloads","issues_url":"https://api.github.com/repos/Itseez/opencv_contrib/issues{/number}","pulls_url":"https://api.github.com/repos/Itseez/opencv_contrib/pulls{/number}","milestones_url":"https://api.github.com/repos/Itseez/opencv_contrib/milestones{/number}","notifications_url":"https://api.github.com/repos/Itseez/opencv_contrib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Itseez/opencv_contrib/labels{/name}","releases_url":"https://api.github.com/repos/Itseez/opencv_contrib/releases{/id}","created_at":"2013-09-11T13:28:04Z","updated_at":"2014-08-14T16:46:45Z","pushed_at":"2014-08-14T09:51:13Z","git_url":"git://github.com/Itseez/opencv_contrib.git","ssh_url":"git@github.com:Itseez/opencv_contrib.git","clone_url":"https://github.com/Itseez/opencv_contrib.git","svn_url":"https://github.com/Itseez/opencv_contrib","homepage":null,"size":62804,"stargazers_count":26,"watchers_count":26,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"forks_count":55,"mirror_url":null,"open_issues_count":10,"forks":55,"open_issues":10,"watchers":26,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Itseez/opencv_contrib/pulls/39"},"html":{"href":"https://github.com/Itseez/opencv_contrib/pull/39"},"issue":{"href":"https://api.github.com/repos/Itseez/opencv_contrib/issues/39"},"comments":{"href":"https://api.github.com/repos/Itseez/opencv_contrib/issues/39/comments"},"review_comments":{"href":"https://api.github.com/repos/Itseez/opencv_contrib/pulls/39/comments"},"review_comment":{"href":"https://api.github.com/repos/Itseez/opencv_contrib/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/Itseez/opencv_contrib/pulls/39/commits"},"statuses":{"href":"https://api.github.com/repos/Itseez/opencv_contrib/statuses/3eb81b726177416ec1492d21d3288754cb4e36a3"}}}}