GitHub PullRequestReviewCommentEvent at 2014-03-18 20:23:08
Repository: scikit-image
Actor: stefanv
Payload: {"comment":{"url":"https://api.github.com/repos/scikit-image/scikit-image/pulls/comments/10723675","id":10723675,"diff_hunk":"@@ -0,0 +1,123 @@\n+\"\"\"\n+==============\n+Shape Contexts\n+==============\n+\n+The Shape Context descriptor was introduced by Serge Belongie and Jitendra\n+Malik.\n+\n+The Shape Context descriptor caputures the coarse distribution of the rest\n+of the shape with respect to a given point on the shape.\n+It is the log-polar histogram of points on the shape relative\n+to the given point. It uses bins that are uniform in log-polar space\n+to make the descriptor more sensitive to positions of nearby sample points than\n+to those of points farther away.\n+Corresponding points on two similar shapes will have similar shape contexts.\n+Finding correspondences between two shapes is equivalent to finding for each\n+point on one shape the sample point on the other shape that has the most\n+similar shape context, which can be solved as an optimal assignment problem.\n+\n+This examples is an illustration to show that corresponding points on two\n+similar shapes have similar shape contexts Point 1 and Point 2 annotated on\n+shapes are corresponding points. Their shape contexts will be similar, whereas\n+the shape context of Point 3 will be quite different from those of Point 1 and Point 2.\n+\n+See their paper_ for further details.\n+\n+.. _paper: http://www.eecs.berkeley.edu/Research/Projects/CS/vision/shape/belongie-pami02.pdf\n+\n+\"\"\"\n+import matplotlib.pyplot as plt\n+from skimage import img_as_float\n+from skimage.feature import descriptor_shapecontext\n+from skimage.filter import canny\n+from skimage.transform import resize\n+from skimage.io import imread\n+from skimage.data import data_dir\n+\n+\n+fig = plt.figure(figsize=(10, 10))\n+\n+img1 = imread(data_dir+'/first_9.png')","path":"doc/examples/plot_shapecontexts.py","position":41,"original_position":41,"commit_id":"27f750b454f86b80d3304db0eeb9f91880621fc3","original_commit_id":"27f750b454f86b80d3304db0eeb9f91880621fc3","user":{"login":"stefanv","id":45071,"avatar_url":"https://avatars.githubusercontent.com/u/45071?","gravatar_id":"b30b909765488cf4cf9de4a496f9a408","url":"https://api.github.com/users/stefanv","html_url":"https://github.com/stefanv","followers_url":"https://api.github.com/users/stefanv/followers","following_url":"https://api.github.com/users/stefanv/following{/other_user}","gists_url":"https://api.github.com/users/stefanv/gists{/gist_id}","starred_url":"https://api.github.com/users/stefanv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefanv/subscriptions","organizations_url":"https://api.github.com/users/stefanv/orgs","repos_url":"https://api.github.com/users/stefanv/repos","events_url":"https://api.github.com/users/stefanv/events{/privacy}","received_events_url":"https://api.github.com/users/stefanv/received_events","type":"User","site_admin":false},"body":"PEP8","created_at":"2014-03-18T20:23:08Z","updated_at":"2014-03-18T20:23:08Z","html_url":"https://github.com/scikit-image/scikit-image/pull/921#discussion_r10723675","pull_request_url":"https://api.github.com/repos/scikit-image/scikit-image/pulls/921","_links":{"self":{"href":"https://api.github.com/repos/scikit-image/scikit-image/pulls/comments/10723675"},"html":{"href":"https://github.com/scikit-image/scikit-image/pull/921#discussion_r10723675"},"pull_request":{"href":"https://api.github.com/repos/scikit-image/scikit-image/pulls/921"}}}}