{"action":"created","issue":{"url":"https://api.github.com/repos/opencv/opencv/issues/7018","repository_url":"https://api.github.com/repos/opencv/opencv","labels_url":"https://api.github.com/repos/opencv/opencv/issues/7018/labels{/name}","comments_url":"https://api.github.com/repos/opencv/opencv/issues/7018/comments","events_url":"https://api.github.com/repos/opencv/opencv/issues/7018/events","html_url":"https://github.com/opencv/opencv/pull/7018","id":168547529,"number":7018,"title":"Add pinhole camera model illustration in the calib3d documentation.","user":{"login":"catree","id":8229425,"avatar_url":"https://avatars.githubusercontent.com/u/8229425?v=3","gravatar_id":"","url":"https://api.github.com/users/catree","html_url":"https://github.com/catree","followers_url":"https://api.github.com/users/catree/followers","following_url":"https://api.github.com/users/catree/following{/other_user}","gists_url":"https://api.github.com/users/catree/gists{/gist_id}","starred_url":"https://api.github.com/users/catree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/catree/subscriptions","organizations_url":"https://api.github.com/users/catree/orgs","repos_url":"https://api.github.com/users/catree/repos","events_url":"https://api.github.com/users/catree/events{/privacy}","received_events_url":"https://api.github.com/users/catree/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/opencv/opencv/labels/port/backport%20done","name":"port/backport done","color":"bfe5bf"}],"state":"closed","locked":false,"assignee":{"login":"alalek","id":4981219,"avatar_url":"https://avatars.githubusercontent.com/u/4981219?v=3","gravatar_id":"","url":"https://api.github.com/users/alalek","html_url":"https://github.com/alalek","followers_url":"https://api.github.com/users/alalek/followers","following_url":"https://api.github.com/users/alalek/following{/other_user}","gists_url":"https://api.github.com/users/alalek/gists{/gist_id}","starred_url":"https://api.github.com/users/alalek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alalek/subscriptions","organizations_url":"https://api.github.com/users/alalek/orgs","repos_url":"https://api.github.com/users/alalek/repos","events_url":"https://api.github.com/users/alalek/events{/privacy}","received_events_url":"https://api.github.com/users/alalek/received_events","type":"User","site_admin":false},"assignees":[{"login":"alalek","id":4981219,"avatar_url":"https://avatars.githubusercontent.com/u/4981219?v=3","gravatar_id":"","url":"https://api.github.com/users/alalek","html_url":"https://github.com/alalek","followers_url":"https://api.github.com/users/alalek/followers","following_url":"https://api.github.com/users/alalek/following{/other_user}","gists_url":"https://api.github.com/users/alalek/gists{/gist_id}","starred_url":"https://api.github.com/users/alalek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alalek/subscriptions","organizations_url":"https://api.github.com/users/alalek/orgs","repos_url":"https://api.github.com/users/alalek/repos","events_url":"https://api.github.com/users/alalek/events{/privacy}","received_events_url":"https://api.github.com/users/alalek/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2016-08-01T00:40:56Z","updated_at":"2016-10-06T22:23:58Z","closed_at":"2016-08-01T13:27:47Z","pull_request":{"url":"https://api.github.com/repos/opencv/opencv/pulls/7018","html_url":"https://github.com/opencv/opencv/pull/7018","diff_url":"https://github.com/opencv/opencv/pull/7018.diff","patch_url":"https://github.com/opencv/opencv/pull/7018.patch"},"body":"<!-- Please use this line to close one or multiple issues when this pullrequest gets merged\r\nYou can add another line right under the first one:\r\nresolves #1234\r\nresolves #1235\r\n-->\r\n\r\n### This pullrequest adds\r\n\r\n<!-- Please describe what your pullrequest is changing -->\r\n\r\nan illustration of the pinhole camera model in the calib3d documentation for better understanding.\r\n\r\nPlease check if the figure is correct (notations, frames, ...).\r\n\r\nI used and modified [this](https://tex.stackexchange.com/questions/96074/more-elegant-way-to-achieve-this-same-camera-perspective-projection-model) nice latex code to generate the image. If someone knows how to modify the latex code to make the little pixel squares starting from the left edge instead of the middle? \r\n\r\n```\r\n\\documentclass[preview]{standalone}\r\n\r\n\\usepackage{tikz}\r\n\r\n\\begin{document}\r\n\\begin{tikzpicture}\r\n\r\n\\usetikzlibrary{calc}\r\n\r\n% Picture's vectors definition\r\n\\def\\xOne{1}\r\n\\def\\xTwo{0.5}\r\n\\def\\yOne{0}\r\n\\def\\yTwo{-1.3}\r\n\\def\\zOne{-1}\r\n\\def\\zTwo{0.5}\r\n\r\n% CAMERA COORDINATE SYSTEM\r\n%\\draw[thick,->] (0,0) -- (\\xOne,\\xTwo) node[anchor=north]{$x$};\r\n%\\draw[thick,->] (0,0) -- (\\yOne,\\yTwo) node[anchor=west]{$y$};\r\n%\\draw[thick,->] (0,0) -- (\\zOne,\\zTwo) node[anchor=north,yshift=-2pt,xshift=3pt]{$z$};\r\n\\draw[very thick,->] (-\\zOne/2,-\\zTwo/2) -- (-\\zOne/2+\\xOne,-\\zTwo/2+\\xTwo) node[anchor=north west, xshift=-3pt,font=\\footnotesize]{$X_c$};\r\n\\draw[very thick,->] (-\\zOne/2,-\\zTwo/2) -- (-\\zOne/2+\\yOne,-\\zTwo/2+\\yTwo) node[anchor=west,font=\\footnotesize]{$Y_c$};\r\n\\draw[very thick,->] (-\\zOne/2,-\\zTwo/2) -- (\\zOne/2,\\zTwo/2) node[anchor=north,yshift=-2pt,xshift=3pt,font=\\footnotesize]{$Z_c$};\r\n\\draw (-\\zOne/2,-\\zTwo/2) node[anchor=north west,font=\\footnotesize]{$\\mathcal{F}_c$};\r\n\r\n% CAMERA AXIS ELONGATION\r\n\\draw[very thin,solid] (-\\zOne/2-2*\\xOne,-\\zTwo/2-2*\\xTwo) -- (-\\zOne/2+2*\\xOne,-\\zTwo/2+2*\\xTwo); % x elongation\r\n\\draw[very thin,solid] (3*\\zOne,3*\\zTwo) -- (6*\\zOne,6*\\zTwo); % optical axis behind projection plane\r\n\r\n% REFERENCE LINES\r\n%\\draw[thin,dashed] (1.4*\\xOne-\\zOne/2,1.4*\\xTwo-\\zTwo/2) -- (6*\\zOne+1.4*\\xOne,6*\\zTwo+1.4*\\xTwo); % object x position\r\n\\draw[very thin,solid] (6*\\zOne-2*\\xOne,6*\\zTwo-2*\\xTwo) -- (6*\\zOne+2*\\xOne,6*\\zTwo+2*\\xTwo) node[anchor=west]{}; %object z position\r\n\r\n% WORLD OBJECT\r\n\\draw[-latex,line width=3pt,blue,line cap=round] (6*\\zOne+1.4*\\xOne,6*\\zTwo+1.4*\\xTwo) -- (6*\\zOne+1.4*\\xOne,6*\\zTwo+1.4*\\xTwo+1.1) node[anchor=south,font=\\footnotesize]{$ P = (X,Y,Z) $};\r\n\\node[circle,inner sep=0pt,minimum size=0.2cm,fill=blue] (object) at (6*\\zOne+1.4*\\xOne,6*\\zTwo+1.4*\\xTwo+1.1) {};\r\n\r\n% PROJECTION LINE BEHIND PROJECTION PLANE\r\n\\draw[thick,solid,red] (3*\\zOne+0.69*\\xOne,3*\\zTwo+0.7*\\xTwo+0.69) -- (6*\\zOne+1.4*\\xOne,6*\\zTwo+1.4*\\xTwo+1.1);\r\n\r\n%% PROJECTION PLANE\r\n\\filldraw[fill=gray!20,draw=gray!70,opacity=0.8] (3*\\zOne-1.5*\\xOne-1.5*\\yOne,3*\\zTwo-1.5*\\xTwo-1.5*\\yTwo) -- (3*\\zOne+1.5*\\xOne-1.5*\\yOne,3*\\zTwo+1.5*\\xTwo-1.5*\\yTwo) -- (3*\\zOne+1.5*\\xOne+1.5*\\yOne,3*\\zTwo+1.5*\\xTwo+1.5*\\yTwo) -- (3*\\zOne-1.5*\\xOne+1.5*\\yOne,3*\\zTwo-1.5*\\xTwo+1.5*\\yTwo) -- (3*\\zOne-1.5*\\xOne-1.5*\\yOne,3*\\zTwo-1.5*\\xTwo-1.5*\\yTwo);\r\n\r\n% PLOJECTION PLANE COORDINATE SYSTEM u,v\r\n\\draw[->,thick,olive!70!black,dashed] (3*\\zOne-1.5*\\xOne-1.5*\\yOne,3*\\zTwo-1.5*\\xTwo-1.5*\\yTwo) -- (3*\\zOne+2*\\xOne-1.5*\\yOne,3*\\zTwo+2*\\xTwo-1.5*\\yTwo)\r\n     node[anchor=north west, xshift=-3pt,font=\\footnotesize]{$u$};\r\n\\draw[->,thick,olive!70!black,dashed] (3*\\zOne-1.5*\\xOne-1.5*\\yOne,3*\\zTwo-1.5*\\xTwo-1.5*\\yTwo) -- (3*\\zOne-1.5*\\xOne-1.5*\\yOne,3*\\zTwo-1.5*\\xTwo+2*\\yTwo)\r\n     node[anchor=west,font=\\footnotesize]{$v$};\r\n\r\n% PROJECTION PLANE COORDINATE SYSTEM x,y\r\n\\draw[->,thick,cyan,dashed] (3*\\zOne-2*\\xOne,3*\\zTwo-2*\\xTwo) -- (3*\\zOne+2*\\xOne,3*\\zTwo+2*\\xTwo)\r\n     node[anchor=north west, xshift=-3pt,font=\\footnotesize]{$x$};\r\n\\draw[->,thick,cyan,dashed] (3*\\zOne-2*\\yOne,3*\\zTwo-2*\\yTwo) -- (3*\\zOne+2*\\yOne,3*\\zTwo+2*\\yTwo)\r\n     node[anchor=west,font=\\footnotesize]{$y$};\r\n\r\n% PROJECTION  OBJECT\r\n\\draw[-latex,line width=1.5pt,blue,line cap=round] (3*\\zOne+0.69*\\xOne,3*\\zTwo+0.69*\\xTwo) -- (3*\\zOne+0.69*\\xOne,3*\\zTwo+0.69*\\xTwo+0.69);\r\n\\node[circle,inner sep=0pt,minimum size=0.1cm,fill=blue] (object) at (3*\\zOne+0.69*\\xOne,3*\\zTwo+0.7*\\xTwo+0.69) {};\r\n\r\n% PIXEL OBJECT\r\n\\filldraw[red,opacity=0.6] (3*\\zOne+6*0.105*\\xOne,3*\\zTwo+0.75+6*0.105*\\xTwo) -- ++(0.105*\\xOne,0.105*\\xTwo) -- ++(0.105*\\yOne,0.105*\\yTwo) -- ++(-0.105*\\xOne,-0.105*\\xTwo) -- ++(-0.105*\\yOne,-0.105*\\yTwo);\r\n\r\n% PROJECTION LINE IN FRONT OF PROJECTION PLANE\r\n\\draw[thick,solid,red] (-\\zOne/2,-\\zTwo/2) -- (3*\\zOne+0.69*\\xOne,3*\\zTwo+0.7*\\xTwo+0.69);\r\n\r\n% OPTICAL AXIS IN FRONT OF PROJECTION PLANE\r\n\\draw[thin,solid] (0,0) -- (3*\\zOne,3*\\zTwo);\r\n\r\n% ANNOTATIONS\r\n% z = f\r\n\\draw (3*\\zOne-1*\\xOne+1.3*\\yOne,3*\\zTwo-1*\\xTwo+1.3*\\yTwo) node[gray!70,rotate=28] {$ z = f $};\r\n\r\n% (u,v)\r\n\\node[olive!70!black,anchor=west,font=\\scriptsize] at (3*\\zOne+0.69*\\xOne,3*\\zTwo+0.7*\\xTwo+0.69) {$ (u,v) $};\r\n\r\n% principal point\r\n\\draw[very thin] (3*\\zOne-0.02*\\xOne+0.02*\\yOne,3*\\zTwo-0.02*\\xTwo+0.02*\\yTwo) .. controls (3*\\zOne-0.1*\\xOne+0.3*\\yOne,3*\\zTwo-0.1*\\xTwo+0.3*\\yTwo) and (3*\\zOne-0.3*\\xOne+0.1*\\yOne,3*\\zTwo-0.3*\\xTwo+0.1*\\yTwo) ..  (3*\\zOne-0.6*\\xOne+0.4*\\yOne,3*\\zTwo-0.6*\\xTwo+0.4*\\yTwo) node[anchor=north,align=center,font=\\sffamily\\scriptsize] {principal \\\\ point \\\\ $ \\left( c_x, c_y \\right) $};\r\n\r\n% optical axis\r\n\\draw[very thin] (5.5*\\zOne-0.02*\\xOne+0.02*\\yOne,5.5*\\zTwo-0.02*\\xOne+0.02*\\yOne) .. controls (5.5*\\zOne-0.1*\\xOne+0.3*\\yOne,5.5*\\zTwo-0.1*\\xTwo+0.3*\\yTwo) and (5.5*\\zOne-0.3*\\xOne+0.1*\\yOne,5.5*\\zTwo-0.3*\\xTwo+0.1*\\yTwo) ..  (5.5*\\zOne-0.6*\\xOne+0.4*\\yOne,5.5*\\zTwo-0.6*\\xTwo+0.4*\\yTwo) node[anchor=north,align=center,font=\\sffamily\\scriptsize] {optical \\\\ axis};\r\n\r\n% PIXEL POSITION\r\n\\draw[thin,gray!70] (3*\\zOne,3*\\zTwo+0.75) -- ++(0.105*\\xOne,0.105*\\xTwo) -- ++(0.105*\\yOne,0.105*\\yTwo) -- ++(-0.105*\\xOne,-0.105*\\xTwo) -- ++(-0.105*\\yOne,-0.105*\\yTwo) -- ++(0.21*\\xOne,0.21*\\xTwo) -- ++(0.105*\\yOne,0.105*\\yTwo) -- ++(-0.105*\\xOne,-0.105*\\xTwo) -- ++(-0.105*\\yOne,-0.105*\\yTwo) -- ++(0.21*\\xOne,0.21*\\xTwo) -- ++(0.105*\\yOne,0.105*\\yTwo) -- ++(-0.105*\\xOne,-0.105*\\xTwo) -- ++(-0.105*\\yOne,-0.105*\\yTwo) -- ++(0.21*\\xOne,0.21*\\xTwo) -- ++(0.105*\\yOne,0.105*\\yTwo) -- ++(-0.105*\\xOne,-0.105*\\xTwo) -- ++(-0.105*\\yOne,-0.105*\\yTwo) -- ++(0.21*\\xOne,0.21*\\xTwo) -- ++(0.105*\\yOne,0.105*\\yTwo) -- ++(-0.105*\\xOne,-0.105*\\xTwo) -- ++(-0.105*\\yOne,-0.105*\\yTwo) -- ++(0.21*\\xOne,0.21*\\xTwo) -- ++(0.105*\\yOne,0.105*\\yTwo) -- ++(-0.105*\\xOne,-0.105*\\xTwo) -- ++(-0.105*\\yOne,-0.105*\\yTwo) -- ++(0.21*\\xOne,0.21*\\xTwo) -- ++(0.105*\\yOne,0.105*\\yTwo) -- ++(-0.105*\\xOne,-0.105*\\xTwo) -- ++(-0.21*\\yOne,-0.21*\\yTwo) -- ++(0.105*\\xOne,0.105*\\xTwo) -- ++(0.105*\\yOne,0.105*\\yTwo) -- ++(-0.105*\\xOne,-0.105*\\xTwo) -- ++(-0.21*\\yOne,-0.21*\\yTwo) -- ++(0.105*\\xOne,0.105*\\xTwo) -- ++(0.105*\\yOne,0.105*\\yTwo) -- ++(-0.105*\\xOne,-0.105*\\xTwo) -- ++(-0.21*\\yOne,-0.21*\\yTwo) -- ++(0.105*\\xOne,0.105*\\xTwo) -- ++(0.105*\\yOne,0.105*\\yTwo) -- ++(-0.105*\\xOne,-0.105*\\xTwo) -- ++(-0.21*\\yOne,-0.21*\\yTwo) -- ++(0.105*\\xOne,0.105*\\xTwo) -- ++(0.105*\\yOne,0.105*\\yTwo) -- ++(-0.105*\\xOne,-0.105*\\xTwo) -- ++(-0.21*\\yOne,-0.21*\\yTwo) -- ++(0.105*\\xOne,0.105*\\xTwo) -- ++(0.105*\\yOne,0.105*\\yTwo) -- ++(-0.105*\\xOne,-0.105*\\xTwo) -- ++(-0.21*\\yOne,-0.21*\\yTwo) -- ++(0.105*\\xOne,0.105*\\xTwo) -- ++(0.105*\\yOne,0.105*\\yTwo) -- ++(-0.105*\\xOne,-0.105*\\xTwo) -- ++(-0.21*\\yOne,-0.21*\\yTwo) -- ++(0.105*\\xOne,0.105*\\xTwo) -- ++(0.105*\\yOne,0.105*\\yTwo) -- ++(-0.105*\\xOne,-0.105*\\xTwo) -- ++(-0.21*\\yOne,-0.21*\\yTwo) -- ++(0.105*\\xOne,0.105*\\xTwo) -- ++(0.105*\\yOne,0.105*\\yTwo) -- ++(-0.105*\\xOne,-0.105*\\xTwo) -- ++(-0.19*\\yOne,-0.19*\\yTwo) -- ++(0.105*\\xOne,0.105*\\xTwo) -- ++(0.105*\\yOne,0.105*\\yTwo);\r\n\r\n\\end{tikzpicture}\r\n\\end{document}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/opencv/opencv/issues/comments/252105652","html_url":"https://github.com/opencv/opencv/pull/7018#issuecomment-252105652","issue_url":"https://api.github.com/repos/opencv/opencv/issues/7018","id":252105652,"user":{"login":"grace-","id":3575801,"avatar_url":"https://avatars.githubusercontent.com/u/3575801?v=3","gravatar_id":"","url":"https://api.github.com/users/grace-","html_url":"https://github.com/grace-","followers_url":"https://api.github.com/users/grace-/followers","following_url":"https://api.github.com/users/grace-/following{/other_user}","gists_url":"https://api.github.com/users/grace-/gists{/gist_id}","starred_url":"https://api.github.com/users/grace-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grace-/subscriptions","organizations_url":"https://api.github.com/users/grace-/orgs","repos_url":"https://api.github.com/users/grace-/repos","events_url":"https://api.github.com/users/grace-/events{/privacy}","received_events_url":"https://api.github.com/users/grace-/received_events","type":"User","site_admin":false},"created_at":"2016-10-06T22:23:58Z","updated_at":"2016-10-06T22:23:58Z","body":"Wow -- I've been looking for a drawing tool like this forever!  Thanks @catree! :art: "}}
{"actor":{"display_login":"grace-"}}