{"action":"created","comment":{"url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/pulls/comments/178495551","pull_request_review_id":108556197,"id":178495551,"diff_hunk":"@@ -0,0 +1,65 @@\n+#pragma once\n+#include <opencv2/core/core.hpp>\n+#include <opencv2/highgui/highgui.hpp>\n+#include <opencv2/imgproc/imgproc.hpp>\n+\n+using namespace cv;\n+using namespace std;\n+\n+void linears(Mat source, Mat result)\n+{\n+\tfor (int i = 0; i < result.rows; ++i)\n+\t\tfor (int j = 0; j < result.cols; ++j)\n+\t\t\tresult.at<uchar>(i, j) = source.at<uchar>(i, j);\n+\tint *hist;\n+\thist = new int[256];\n+\tfor (int i = 0;i<256;i++)\n+\t{\n+\t\thist[i] = 0;\n+\t}\n+\tint min = INT_MAX;\n+\tint max = INT_MIN;\n+\n+\tfor (int i = 0; i < source.rows; i++)\n+\t{\n+\t\tfor (int j = 0; j < source.cols; j++)\n+\t\t{\n+\t\t\thist[source.at<uchar>(i, j)]++;\n+\t\t}\n+\t}\n+\tint isfirst = true;\n+\tfor (int r = 0;r < 256;r++)\n+\t{\n+\t\tif ((hist[r] > 0) && (isfirst == true))\n+\t\t{\n+\t\t\tmin = r;\n+\t\t\tisfirst = false;\n+\t\t}\n+\t\tif ((hist[r] > 0) && (r > max)) max = r;\n+\t}","path":"groups/1506-1/nikiforova_ea/1-test-version/mpilab/sol.h","position":39,"original_position":39,"commit_id":"1a317e48d49ee0a37ae28bb2e91a2550f1b48c3c","original_commit_id":"1a317e48d49ee0a37ae28bb2e91a2550f1b48c3c","user":{"login":"valentina-kustikova","id":6958019,"avatar_url":"https://avatars0.githubusercontent.com/u/6958019?v=4","gravatar_id":"","url":"https://api.github.com/users/valentina-kustikova","html_url":"https://github.com/valentina-kustikova","followers_url":"https://api.github.com/users/valentina-kustikova/followers","following_url":"https://api.github.com/users/valentina-kustikova/following{/other_user}","gists_url":"https://api.github.com/users/valentina-kustikova/gists{/gist_id}","starred_url":"https://api.github.com/users/valentina-kustikova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valentina-kustikova/subscriptions","organizations_url":"https://api.github.com/users/valentina-kustikova/orgs","repos_url":"https://api.github.com/users/valentina-kustikova/repos","events_url":"https://api.github.com/users/valentina-kustikova/events{/privacy}","received_events_url":"https://api.github.com/users/valentina-kustikova/received_events","type":"User","site_admin":false},"body":"@Alexfox22, простой вариант поиска максимума/минимума:\r\n```\r\nint i = 0;\r\nwhile (i < 256 && hist[i] == 0) i++;\r\nmin = hist[i];\r\nmax = hist[i];\r\nfor (; i < 256; i++)\r\n{\r\n    if (hist[i] > max) max = hist[i];\r\n    if (hist[i] < min) min = hist[i];\r\n}\r\n```","created_at":"2018-04-02T06:42:46Z","updated_at":"2018-04-02T06:44:30Z","html_url":"https://github.com/valentina-kustikova/parprog-2018-1/pull/11#discussion_r178495551","pull_request_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/pulls/11","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/pulls/comments/178495551"},"html":{"href":"https://github.com/valentina-kustikova/parprog-2018-1/pull/11#discussion_r178495551"},"pull_request":{"href":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/pulls/11","id":175738699,"html_url":"https://github.com/valentina-kustikova/parprog-2018-1/pull/11","diff_url":"https://github.com/valentina-kustikova/parprog-2018-1/pull/11.diff","patch_url":"https://github.com/valentina-kustikova/parprog-2018-1/pull/11.patch","issue_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/issues/11","number":11,"state":"open","locked":false,"title":"Линейная растяжка гистограммы","user":{"login":"Alexfox22","id":22337803,"avatar_url":"https://avatars2.githubusercontent.com/u/22337803?v=4","gravatar_id":"","url":"https://api.github.com/users/Alexfox22","html_url":"https://github.com/Alexfox22","followers_url":"https://api.github.com/users/Alexfox22/followers","following_url":"https://api.github.com/users/Alexfox22/following{/other_user}","gists_url":"https://api.github.com/users/Alexfox22/gists{/gist_id}","starred_url":"https://api.github.com/users/Alexfox22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alexfox22/subscriptions","organizations_url":"https://api.github.com/users/Alexfox22/orgs","repos_url":"https://api.github.com/users/Alexfox22/repos","events_url":"https://api.github.com/users/Alexfox22/events{/privacy}","received_events_url":"https://api.github.com/users/Alexfox22/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-03-18T07:21:08Z","updated_at":"2018-04-02T06:44:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cbe12c5f13001a2f36c35ad47787e4662777db93","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/pulls/11/commits","review_comments_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/pulls/11/comments","review_comment_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/pulls/comments{/number}","comments_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/issues/11/comments","statuses_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/statuses/1a317e48d49ee0a37ae28bb2e91a2550f1b48c3c","head":{"label":"Alexfox22:master","ref":"master","sha":"1a317e48d49ee0a37ae28bb2e91a2550f1b48c3c","user":{"login":"Alexfox22","id":22337803,"avatar_url":"https://avatars2.githubusercontent.com/u/22337803?v=4","gravatar_id":"","url":"https://api.github.com/users/Alexfox22","html_url":"https://github.com/Alexfox22","followers_url":"https://api.github.com/users/Alexfox22/followers","following_url":"https://api.github.com/users/Alexfox22/following{/other_user}","gists_url":"https://api.github.com/users/Alexfox22/gists{/gist_id}","starred_url":"https://api.github.com/users/Alexfox22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alexfox22/subscriptions","organizations_url":"https://api.github.com/users/Alexfox22/orgs","repos_url":"https://api.github.com/users/Alexfox22/repos","events_url":"https://api.github.com/users/Alexfox22/events{/privacy}","received_events_url":"https://api.github.com/users/Alexfox22/received_events","type":"User","site_admin":false},"repo":{"id":124693551,"name":"parprog-2018-1","full_name":"Alexfox22/parprog-2018-1","owner":{"login":"Alexfox22","id":22337803,"avatar_url":"https://avatars2.githubusercontent.com/u/22337803?v=4","gravatar_id":"","url":"https://api.github.com/users/Alexfox22","html_url":"https://github.com/Alexfox22","followers_url":"https://api.github.com/users/Alexfox22/followers","following_url":"https://api.github.com/users/Alexfox22/following{/other_user}","gists_url":"https://api.github.com/users/Alexfox22/gists{/gist_id}","starred_url":"https://api.github.com/users/Alexfox22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alexfox22/subscriptions","organizations_url":"https://api.github.com/users/Alexfox22/orgs","repos_url":"https://api.github.com/users/Alexfox22/repos","events_url":"https://api.github.com/users/Alexfox22/events{/privacy}","received_events_url":"https://api.github.com/users/Alexfox22/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Alexfox22/parprog-2018-1","description":null,"fork":true,"url":"https://api.github.com/repos/Alexfox22/parprog-2018-1","forks_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/forks","keys_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/teams","hooks_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/hooks","issue_events_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/issues/events{/number}","events_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/events","assignees_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/assignees{/user}","branches_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/branches{/branch}","tags_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/tags","blobs_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/statuses/{sha}","languages_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/languages","stargazers_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/stargazers","contributors_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/contributors","subscribers_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/subscribers","subscription_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/subscription","commits_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/contents/{+path}","compare_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/merges","archive_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/downloads","issues_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/issues{/number}","pulls_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/pulls{/number}","milestones_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/milestones{/number}","notifications_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/labels{/name}","releases_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/releases{/id}","deployments_url":"https://api.github.com/repos/Alexfox22/parprog-2018-1/deployments","created_at":"2018-03-10T19:54:32Z","updated_at":"2018-03-17T20:49:35Z","pushed_at":"2018-03-17T20:49:34Z","git_url":"git://github.com/Alexfox22/parprog-2018-1.git","ssh_url":"git@github.com:Alexfox22/parprog-2018-1.git","clone_url":"https://github.com/Alexfox22/parprog-2018-1.git","svn_url":"https://github.com/Alexfox22/parprog-2018-1","homepage":null,"size":683,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"valentina-kustikova:master","ref":"master","sha":"73ef0d2ebf5f4d8bc6b228eb7b87170cc403229e","user":{"login":"valentina-kustikova","id":6958019,"avatar_url":"https://avatars0.githubusercontent.com/u/6958019?v=4","gravatar_id":"","url":"https://api.github.com/users/valentina-kustikova","html_url":"https://github.com/valentina-kustikova","followers_url":"https://api.github.com/users/valentina-kustikova/followers","following_url":"https://api.github.com/users/valentina-kustikova/following{/other_user}","gists_url":"https://api.github.com/users/valentina-kustikova/gists{/gist_id}","starred_url":"https://api.github.com/users/valentina-kustikova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valentina-kustikova/subscriptions","organizations_url":"https://api.github.com/users/valentina-kustikova/orgs","repos_url":"https://api.github.com/users/valentina-kustikova/repos","events_url":"https://api.github.com/users/valentina-kustikova/events{/privacy}","received_events_url":"https://api.github.com/users/valentina-kustikova/received_events","type":"User","site_admin":false},"repo":{"id":123935938,"name":"parprog-2018-1","full_name":"valentina-kustikova/parprog-2018-1","owner":{"login":"valentina-kustikova","id":6958019,"avatar_url":"https://avatars0.githubusercontent.com/u/6958019?v=4","gravatar_id":"","url":"https://api.github.com/users/valentina-kustikova","html_url":"https://github.com/valentina-kustikova","followers_url":"https://api.github.com/users/valentina-kustikova/followers","following_url":"https://api.github.com/users/valentina-kustikova/following{/other_user}","gists_url":"https://api.github.com/users/valentina-kustikova/gists{/gist_id}","starred_url":"https://api.github.com/users/valentina-kustikova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valentina-kustikova/subscriptions","organizations_url":"https://api.github.com/users/valentina-kustikova/orgs","repos_url":"https://api.github.com/users/valentina-kustikova/repos","events_url":"https://api.github.com/users/valentina-kustikova/events{/privacy}","received_events_url":"https://api.github.com/users/valentina-kustikova/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/valentina-kustikova/parprog-2018-1","description":null,"fork":true,"url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1","forks_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/forks","keys_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/teams","hooks_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/hooks","issue_events_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/issues/events{/number}","events_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/events","assignees_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/assignees{/user}","branches_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/branches{/branch}","tags_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/tags","blobs_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/statuses/{sha}","languages_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/languages","stargazers_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/stargazers","contributors_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/contributors","subscribers_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/subscribers","subscription_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/subscription","commits_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/contents/{+path}","compare_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/merges","archive_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/downloads","issues_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/issues{/number}","pulls_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/pulls{/number}","milestones_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/milestones{/number}","notifications_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/labels{/name}","releases_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/releases{/id}","deployments_url":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/deployments","created_at":"2018-03-05T15:02:26Z","updated_at":"2018-02-20T16:09:14Z","pushed_at":"2018-04-01T18:38:23Z","git_url":"git://github.com/valentina-kustikova/parprog-2018-1.git","ssh_url":"git@github.com:valentina-kustikova/parprog-2018-1.git","clone_url":"https://github.com/valentina-kustikova/parprog-2018-1.git","svn_url":"https://github.com/valentina-kustikova/parprog-2018-1","homepage":null,"size":5,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"archived":false,"open_issues_count":13,"license":null,"forks":14,"open_issues":13,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/pulls/11"},"html":{"href":"https://github.com/valentina-kustikova/parprog-2018-1/pull/11"},"issue":{"href":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/issues/11"},"comments":{"href":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/valentina-kustikova/parprog-2018-1/statuses/1a317e48d49ee0a37ae28bb2e91a2550f1b48c3c"}},"author_association":"NONE"}}
{"actor":{"display_login":"valentina-kustikova"}}