{"id":467508,"date":"2025-07-18T22:11:07","date_gmt":"2025-07-18T22:11:07","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=467508"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=467508","title":{"rendered":"<span>\u0417\u0430\u043b\u0435\u0437\u0430\u0435\u043c \u043d\u0430 \u043f\u043b\u0435\u0447\u0438 \u0433\u0438\u0433\u0430\u043d\u0442\u043e\u0432 \u2014 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f ComfyUI \u0434\u043b\u044f \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0433\u043e \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u043a\u0430\u043c\u0435\u0440\u044b \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 6dof \u0441\u0446\u0435\u043d \u0438\u0437 \u0444\u043e\u0442\u043e<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/18f\/9a6\/8b9\/18f9a68b988aa35a38c20149041fa8bf.gif\" alt=\"\u041a\u0440\u0443\u0442\u0438\u043c Fisheye \u043a\u0430\u043c\u0435\u0440\u0443 \u0432 \u0441\u0438\u043d\u0442\u0435\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043c\u0438\u0440\u0435\" title=\"\u041a\u0440\u0443\u0442\u0438\u043c Fisheye \u043a\u0430\u043c\u0435\u0440\u0443 \u0432 \u0441\u0438\u043d\u0442\u0435\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043c\u0438\u0440\u0435\" width=\"512\" height=\"512\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/18f\/9a6\/8b9\/18f9a68b988aa35a38c20149041fa8bf.gif 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/18f\/9a6\/8b9\/18f9a68b988aa35a38c20149041fa8bf.gif 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041a\u0440\u0443\u0442\u0438\u043c Fisheye \u043a\u0430\u043c\u0435\u0440\u0443 \u0432 \u0441\u0438\u043d\u0442\u0435\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043c\u0438\u0440\u0435<\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! <\/p>\n<p> \u042f \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u0441 \u0432\u0438\u0434\u0435\u043e \u0434\u043b\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0438 \u043e\u0434\u043d\u0430 \u0438\u0437\u202f\u0437\u0430\u0434\u0430\u0447, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u0441\u0451\u202f\u0435\u0449\u0451 \u043c\u0430\u044f\u0447\u0438\u0442 \u043d\u0430 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0435 \u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0443\u0439\u043c\u044b \u0443\u0441\u0438\u043b\u0438\u0439\u202f\u2014\u202f\u0443\u0434\u043e\u0431\u043d\u043e\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438\u202f\u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433 <strong>\u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0433\u043e 6Dof\u202f\u0432\u0438\u0434\u0435\u043e<\/strong>. \u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0441\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043a\u202f\u0434\u0432\u0443\u043c \u043a\u0440\u0443\u043f\u043d\u044b\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u043c.  <\/p>\n<ul>\n<li>\n<p><strong>\u041c\u043d\u043e\u0433\u043e\u043a\u0430\u043c\u0435\u0440\u043d\u0430\u044f \u0440\u0435\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f.<\/strong> \u0422\u0443\u0442 \u0436\u0438\u0432\u0443\u0442\u202fSFM, \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043c\u0435\u0448\u2011\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u044b, nerf, gaussian splatting\u202f\u2014\u202f\u0438 \u0432\u0441\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432. \u042d\u0442\u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0434\u043b\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u044b\u0445 \u0441\u0446\u0435\u043d, \u043d\u043e \u0441 \u0432\u0438\u0434\u0435\u043e \u043f\u043e\u043a\u0430 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u0438\u0435. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u0430\u043c\u0435\u0440 \u0438 \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0441\u0435\u0442\u0430\u043f\u044b \u0434\u043b\u044f \u0441\u044a\u0435\u043c\u043a\u0438<\/p>\n<\/li>\n<li>\n<p><strong>\u0427\u0438\u0441\u0442\u0430\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0432\u0438\u0434\u0435\u043e.<\/strong> \u0414\u0438\u0444\u0444\u0443\u0437\u0438\u043e\u043d\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0431\u044b\u0441\u0442\u0440\u043e \u0443\u0447\u0430\u0442\u0441\u044f \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0443. \u0421\u0432\u0435\u0436\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440\u00a0\u2014\u00a0Veo\u202f3 \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u0441\u043d\u043e\u0441\u043d\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c equirect \u0432\u0438\u0434\u0435\u043e  (<a href=\"https:\/\/www.youtube.com\/watch?v=OjaupTb7S-w\" rel=\"noopener noreferrer nofollow\">https:\/\/www.youtube.com\/watch?v=OjaupTb7S-w<\/a>) \u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u043e\u0432<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0434\u043b\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 (VR), \u0441\u043e\u0437\u0434\u0430\u0432 \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f ComfyUI, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442:<\/p>\n<ul>\n<li>\n<p>\u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438\u202f\u0432\u0438\u0434\u0435\u043e \u043c\u0435\u0436\u0434\u0443 <em>pinhole<\/em>, <em>fisheye<\/em> \u0438\u202f<em>equirectangular<\/em> \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u044f\u043c\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0438\u0442\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u0430\u0443\u0442\u043f\u0435\u0439\u043d\u0442\u0438\u0442\u044c \u043f\u0430\u043d\u043e\u0440\u0430\u043c\u044b \u0434\u043e \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0441\u0444\u0435\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043e\u0445\u0432\u0430\u0442\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0441\u0438\u043d\u0442\u0435\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0440\u0430\u043a\u0443\u0440\u0441\u044b \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u044b\u043c \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435\u043c \u043a\u0430\u043c\u0435\u0440\u044b \u0432\u00a03\u2011D\u2011\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435.<\/p>\n<\/li>\n<\/ul>\n<p>\u042f \u043f\u043e\u043a\u0430\u0436y, \u043a\u0430\u043a \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 reprojection (grid_sample + \u0442\u043e\u0447\u043a\u0438 \u043d\u0430 \u0441\u0444\u0435\u0440\u0435) \u0441 \u043a\u0430\u0440\u0442\u0430\u043c\u0438 \u043a\u0430\u0440\u0442\u0430\u043c\u0438 \u0433\u043b\u0443\u0431\u0438\u043d\u044b \u0438 \u043e\u0431\u043b\u0430\u043a\u0430\u043c\u0438 \u0442\u043e\u0447\u0435\u043a, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u044b\u0435 \u00ab\u043d\u043e\u0432\u044b\u0435 \u0432\u0438\u0434\u044b\u00bb \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c \u043f\u043e\u0434\u0445\u043e\u0434 \u0441 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0435\u0439 \u0445\u043e\u0440\u043e\u0448\u043e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c \u0441 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u043c Video Generation<\/p>\n<h2>\u0422\u0438\u043f\u044b \u043a\u0430\u043c\u0435\u0440 \u0438\u00a0\u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0439: pinhole, fisheye, equirect<\/h2>\n<h3>Pinhole (\u043a\u0430\u043c\u0435\u0440\u0430 \u043e\u0431\u0441\u043a\u0443\u0440\u0430)<\/h3>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/056\/6f9\/2c5\/0566f92c5c4a1cfb1220b2e648956ec6.png\" alt=\"\u041f\u0440\u043e\u0435\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043d\u0430 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0432 pinhole \u043a\u0430\u043c\u0435\u0440\u0435\" title=\"\u041f\u0440\u043e\u0435\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043d\u0430 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0432 pinhole \u043a\u0430\u043c\u0435\u0440\u0435\" width=\"463\" height=\"368\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/056\/6f9\/2c5\/0566f92c5c4a1cfb1220b2e648956ec6.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/056\/6f9\/2c5\/0566f92c5c4a1cfb1220b2e648956ec6.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041f\u0440\u043e\u0435\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043d\u0430 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0432 pinhole \u043a\u0430\u043c\u0435\u0440\u0435<\/figcaption><\/div>\n<\/figure>\n<p><em>d = 1\/tan(fov\/2)<\/em><br \/><em>r = x\u00b2 + y\u00b2<br \/>theta = atan2(r, d) # angle from center<br \/>phi = atan2(y, x)<br \/>Z = R  cos(theta)<br \/>X = R  sin(theta)  cos(phi)<br \/>Y = R  sin(theta) * sin(phi)<\/em><\/p>\n<p>\u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0441\u043b\u043e\u0436\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043b\u0438\u043d\u0437 \u0432 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043a\u0430\u043c\u0435\u0440\u0430\u0445, \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043a\u0430\u043c\u0435\u0440 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u044d\u0442\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u0438 \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0435 \u0434\u043b\u044f \u043d\u0430\u0441 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u0427\u0442\u043e \u0432\u0430\u0436\u043d\u043e, \u0442\u0430\u043a\u043e\u0439 \u0442\u0438\u043f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0438 \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f vision \u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439. \u042d\u0442\u043e \u0432\u0430\u0436\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0447\u0442\u043e \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u044f \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0438 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0442\u0430\u043a\u043e\u0439. \u041e\u0431\u044b\u0447\u043d\u043e FOV \u043d\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 60 \u0433\u0440\u0430\u0434\u0443\u0441\u043e\u0432, \u0438\u043d\u043e\u0433\u0434\u0430 \u0434\u043e 90. \u0415\u0441\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 &#8212; \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0432\u0438\u0434\u043d\u043e \u0438\u0441\u043a\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u043e \u043a\u0440\u0430\u044f\u043c \u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u0446\u0435\u043d\u0442\u0440\u0430. \u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441\u043f\u0440\u043e\u0435\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441 FOV \u0440\u0430\u0432\u043d\u044b\u043c \u0438\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 180 \u0433\u0440\u0430\u0434\u0443\u0441\u043e\u0432<\/p>\n<h3>Fisheye (\u0440\u044b\u0431\u0438\u0439 \u0433\u043b\u0430\u0437)  <\/h3>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3aa\/2e1\/358\/3aa2e1358af653911e27546d9f8ecb29.png\" alt=\"\u041f\u0440\u043e\u0435\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043d\u0430 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0432 fisheye \u043a\u0430\u043c\u0435\u0440\u0435\" title=\"\u041f\u0440\u043e\u0435\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043d\u0430 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0432 fisheye \u043a\u0430\u043c\u0435\u0440\u0435\" width=\"517\" height=\"338\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/3aa\/2e1\/358\/3aa2e1358af653911e27546d9f8ecb29.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3aa\/2e1\/358\/3aa2e1358af653911e27546d9f8ecb29.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041f\u0440\u043e\u0435\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043d\u0430 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0432 fisheye \u043a\u0430\u043c\u0435\u0440\u0435<\/figcaption><\/div>\n<\/figure>\n<p> \u0412 \u044d\u0442\u043e\u043c \u0442\u0438\u043f\u0435 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0438 \u0440\u0430\u0434\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0443\u0433\u043b\u0443 <\/p>\n<p><em>r = x\u00b2 + y\u00b2 <\/em><br \/><em>theta = r *(fov \/ 2) # angle from center<\/em><br \/><em>phi = atan2(y, x)<\/em><br \/><em>Z = R*cos(theta)<\/em><br \/><em>X = R*sin(theta)*cos(phi)<\/em><br \/><em>Y = R  sin(theta)  sin(phi)<\/em>  <\/p>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0434\u043e 360\u00b0 FOV, \u043d\u043e \u0438\u0441\u043a\u0430\u0436\u0430\u0435\u0442 \u043f\u0440\u044f\u043c\u044b\u0435 \u043b\u0438\u043d\u0438\u0438. \u0425\u043e\u0442\u044f \u0437\u0434\u0435\u0441\u044c \u043d\u0435\u0442 \u043c\u0430\u0442\u0435\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u0433\u043b\u0443, \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u0442\u0435\u043c \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043b\u0438\u043d\u0437\u0443 \u0447\u0442\u043e\u0431 \u043e\u043d\u0430 \u0438\u0441\u043a\u0430\u0436\u0430\u043b\u0430 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u043b\u0443\u0447\u0438 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431 r \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0438 \u0431\u044b\u043b \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u043e\u043d\u0430\u043b\u0435\u043d \u0443\u0433\u043b\u0443. \u041d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 fisheye \u043e\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043e\u0432 \u0438 \u043a\u0430\u043a \u0435\u0435 \u0443\u0447\u0435\u0441\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0442\u0443\u0442 <a href=\"http:\/\/www.paulbourke.net\/dome\/fisheyecorrect\/\" rel=\"noopener noreferrer nofollow\">http:\/\/www.paulbourke.net\/dome\/fisheyecorrect\/<\/a> . \u041d\u043e \u0442\u0430\u043a \u043a\u0430\u043a \u044f \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u0441 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u0430 \u043d\u0435 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u044f\u043c\u0438, \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0441\u0442\u0438 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043d\u0435\u0442<\/p>\n<h3>Equirectangular (\u0420\u0430\u0432\u043d\u043e\u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u0430\u044f) \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u044f<\/h3>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/986\/e23\/a27\/986e23a278ab2aa0e817c42311246622.jpeg\" width=\"500\" height=\"252\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/986\/e23\/a27\/986e23a278ab2aa0e817c42311246622.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/986\/e23\/a27\/986e23a278ab2aa0e817c42311246622.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u042d\u0442\u043e \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u0444\u0435\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 theta, phi \u043d\u0430 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a, \u043c\u043d\u043e\u0433\u0438\u043c \u0437\u043d\u0430\u043a\u043e\u043c\u043e\u0435 \u0435\u0449\u0435 \u0441 \u0443\u0440\u043e\u043a\u043e\u0432 \u0448\u043a\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0438. <\/p>\n<p><em>phi = x  (horizontal_fov \/ 2)<\/em><br \/><em>theta = y  (vertical_fov \/ 2)<\/em><br \/><em>X = R  cos(theta)  sin(phi)\/<\/em><br \/><em>Y = R  sin(theta)<\/em><br \/><em>Z = R  cos(theta) * cos(phi)<\/em>  <\/p>\n<p>\u0414\u0435-\u0444\u0430\u043a\u0442\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c \u0434\u043b\u044f \u043f\u0430\u043d\u043e\u0440\u0430\u043c (360\u00b0 \u0438 180\u00b0) \u0438 VR \u0432\u0438\u0434\u0435\u043e. \u042d\u0442\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0438 \u043d\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u0430. <\/p>\n<h2>\u0418\u0434\u0435\u044f 1. \u041f\u0438\u0448\u0435\u043c \u043f\u0435\u0440\u0435\u043f\u0440\u043e\u0435\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h2>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043e\u0442 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u043e\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0438 \u043a \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044e \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0434\u0435\u043b\u0430\u0435\u043c \u0448\u0430\u0433\u0438<\/p>\n<ol>\n<li>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u043d\u0430 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0438 \u0438\u0449\u0435\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u043d\u0430 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u043e\u0439 \u0441\u0444\u0435\u0440\u0435<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u044d\u0442\u0438\u0445 \u0442\u043e\u0447\u0435\u043a \u043d\u0430 \u0441\u0444\u0435\u0440\u0435 \u0438\u0449\u0435\u043c \u0442\u043e\u0447\u043a\u0443 \u043d\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0438. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043a\u0430\u0440\u0442\u0443 \u043e\u0442\u043a\u0443\u0434\u0430 \u0431\u0440\u0430\u0442\u044c \u0442\u043e\u0447\u043a\u0443 \u043d\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u044d\u0442\u0443 \u043a\u0430\u0440\u0442\u0443. \u041a\u043e\u0434 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"python\">def map_grid(  grid_torch: torch.Tensor,  input_projection: str,  output_projection: str,  input_horizontal_fov: float,  output_horizontal_fov: float,  rotation_matrix: torch.Tensor = None  ) -&gt; np.ndarray:  \"\"\"  Maps a 2D grid from one projection type to another. Args:     grid_torch (torch.Tensor): A 2D array of shape (height, width, 2) with x and y coordinates normalized to [-1, 1].     input_projection (str): The input projection type (\"PINHOLE\", \"FISHEYE\", \"EQUIRECTANGULAR\").     output_projection (str): The output projection type (\"PINHOLE\", \"FISHEYE\", \"EQUIRECTANGULAR\").     input_horizontal_fov (float): Horizontal field of view for the input projection in degrees.     output_horizontal_fov (float): Horizontal field of view for the output projection in degrees.     rotation_matrix (torch.Tensor, optional): A 4x4 rotation matrix. Defaults to identity matrix if not provided.  Returns:     np.ndarray: A 2D array of shape (height, width, 2) with the mapped x and y coordinates. \"\"\" with torch.no_grad():     if rotation_matrix is None:         rotation_matrix = torch.eye(4)  # Identity matrix     rotation_matrix = rotation_matrix.float().to(grid_torch.device)     # convert all floats to tensors     input_horizontal_fov = torch.tensor(input_horizontal_fov, device=grid_torch.device).float()     output_horizontal_fov = torch.tensor(output_horizontal_fov, device=grid_torch.device).float()      # Calculate vertical field of view for input and output projections     output_vertical_fov = output_horizontal_fov  # Assuming square aspect ratio     input_vertical_fov = input_horizontal_fov * (grid_torch.shape[0] \/ grid_torch.shape[1])      # Normalize the grid for vertical FOV adjustment     normalized_grid = grid_torch.clone()     normalized_grid[..., 1] *= (grid_torch.shape[0] \/ grid_torch.shape[1])      # Step 1: Map each pixel to its location on the sphere for the output projection     if output_projection == \"PINHOLE\":         D = 1.0 \/ torch.tan(torch.deg2rad(output_horizontal_fov) \/ 2)         radius_to_center = torch.sqrt(normalized_grid[..., 0]**2 + normalized_grid[..., 1]**2)         phi = torch.atan2(normalized_grid[..., 1], normalized_grid[..., 0])         theta = torch.atan2(radius_to_center, D)         x = torch.sin(theta) * torch.cos(phi)         y = torch.sin(theta) * torch.sin(phi)         z = torch.cos(theta)     elif output_projection == \"FISHEYE\":         phi = torch.atan2(normalized_grid[..., 1], normalized_grid[..., 0])         radius = torch.sqrt(normalized_grid[..., 0]**2 + normalized_grid[..., 1]**2)         theta = radius * torch.deg2rad(output_horizontal_fov) \/ 2         x = torch.sin(theta) * torch.cos(phi)         y = torch.sin(theta) * torch.sin(phi)         z = torch.cos(theta)     elif output_projection == \"EQUIRECTANGULAR\":         phi = grid_torch[..., 0] * torch.deg2rad(output_horizontal_fov) \/ 2         theta = grid_torch[..., 1] * torch.deg2rad(output_vertical_fov) \/ 2         y = torch.sin(theta)         x = torch.cos(theta) * torch.sin(phi)         z = torch.cos(theta) * torch.cos(phi)     else:         raise ValueError(f\"Unsupported output projection: {output_projection}\")      # Step 2: Apply rotation matrix for yaw and pitch     coords = torch.stack([x.flatten(), y.flatten(), z.flatten()], dim=-1)     coords_homogeneous = torch.cat([coords, torch.ones((coords.shape[0], 1), device=coords.device)], dim=-1)     coords_rotated = torch.matmul(rotation_matrix, coords_homogeneous.T).T     coords = coords_rotated[..., :3]  # Extract x, y, z after rotation      # Step 3: Map rotated points back to the input projection     if input_projection == \"PINHOLE\":         D = 1.0 \/ torch.tan(torch.deg2rad(input_horizontal_fov) \/ 2)         theta = torch.atan2(torch.sqrt(coords[..., 0]**2 + coords[..., 1]**2), coords[..., 2])         phi = torch.atan2(coords[..., 1], coords[..., 0])         radius = D * torch.tan(theta)         x = radius * torch.cos(phi)         y = radius * torch.sin(phi)         mask = coords[..., 2] &gt; 0  # Only keep points where z &gt; 0         x[~mask] = 100         y[~mask] = 100     elif input_projection == \"FISHEYE\":         theta = torch.atan2(torch.sqrt(coords[..., 0]**2 + coords[..., 1]**2), coords[..., 2])         phi = torch.atan2(coords[..., 1], coords[..., 0])         radius = theta \/ (torch.deg2rad(input_horizontal_fov) \/ 2)         x = radius * torch.cos(phi)         y = radius * torch.sin(phi)     elif input_projection == \"EQUIRECTANGULAR\":         theta = torch.asin(coords[..., 1])         phi = torch.atan2(coords[..., 0], coords[..., 2])         x = phi \/ (torch.deg2rad(input_horizontal_fov) \/ 2)         y = theta \/ (torch.deg2rad(input_vertical_fov) \/ 2)     else:         raise ValueError(f\"Unsupported input projection: {input_projection}\")      x = x.view(grid_torch.shape[0], grid_torch.shape[1])     y = y.view(grid_torch.shape[0], grid_torch.shape[1])     output_grid = torch.zeros_like(grid_torch)     output_grid[..., 0] = x     output_grid[..., 1] = y  return output_grid <\/code><\/pre>\n<p>\u041c\u043e\u0436\u043d\u043e \u043e\u0431\u0435\u0440\u043d\u0443\u0442\u044c \u043f\u0435\u0440\u0435\u043f\u0440\u043e\u0435\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 ComfyUI <a href=\"https:\/\/github.com\/Alexankharin\/camera-comfyUI\/blob\/main\/reprojection_nodes.py\" rel=\"noopener noreferrer nofollow\">node<\/a><\/p>\n<p>\u0417\u0430\u043c\u0435\u0447\u0430\u0435\u043c \u0447\u0442\u043e \u043d\u0430 \u0448\u0430\u0433\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c\u0438 XYZ \u043b\u0435\u0433\u043a\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0432\u0443\u044e\u0442 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f\u043c \u043a\u0430\u043c\u0435\u0440\u044b \u043f\u0443\u0442\u0435\u043c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u0432 \u043e\u0434\u043d\u043e\u0440\u043e\u0434\u043d\u044b\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b (\u0432\u0435\u043a\u0442\u043e\u0440 XYZ \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u043c \u0432 XYZ1) \u0438 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9C%D0%B0%D1%82%D1%80%D0%B8%D1%86%D0%B0_%D0%BF%D0%B5%D1%80%D0%B5%D1%85%D0%BE%D0%B4%D0%B0\" rel=\"noopener noreferrer nofollow\">\u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430<\/a> . \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u0435\u0437 \u0443\u0441\u0438\u043b\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0443\u0437\u0435\u043b \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u043f\u0440\u043e\u0435\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u043d\u043e \u0438 \u043f\u043e\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0438\u0445<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/833\/84c\/e4c\/83384ce4c5bf415dfef5c69341548857.png\" alt=\"\u041f\u043e\u0432\u043e\u0440\u043e\u0442 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0432 pinhole \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0438\" title=\"\u041f\u043e\u0432\u043e\u0440\u043e\u0442 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0432 pinhole \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0438\" width=\"1028\" height=\"513\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/833\/84c\/e4c\/83384ce4c5bf415dfef5c69341548857.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/833\/84c\/e4c\/83384ce4c5bf415dfef5c69341548857.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041f\u043e\u0432\u043e\u0440\u043e\u0442 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0432 pinhole \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u041c\u043e\u0436\u043d\u043e \u043f\u0440\u0438 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0435 \u0442\u0430\u043a\u0436\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043c\u0430\u0441\u043a\u0443 \u0441 \u043d\u0435\u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u043c\u0438 \u0440\u0435\u0433\u0438\u043e\u043d\u0430\u043c\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0445\u043e\u0447\u0435\u0442\u0441\u044f, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Patch-based \u043f\u043e\u0434\u0445\u043e\u0434 \u0434\u043b\u044f \u0438\u0442\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0443\u0441\u0442\u044b\u0445 \u043c\u0435\u0441\u0442 \u043f\u0440\u0438 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0435! \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<br \/>\u041f\u0440\u043e\u0435\u0446\u0438\u0440\u0443\u0435\u043c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0432 fisheye 180, \u0434\u0430\u043b\u0435\u0435 \u043f\u0430\u0442\u0447\u0430\u043c\u0438 \u043f\u043e\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0435\u0435 \u0432 Pinhole, \u0434\u0435\u043b\u0430\u0435\u043c oupainting \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e, \u043f\u0440\u043e\u0435\u0446\u0438\u0440\u0443\u0435\u043c \u043e\u0431\u0440\u0430\u0442\u043d\u043e. \u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441 Flux:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/676\/4b0\/bbb\/6764b0bbbbb8d60eb41d215f3817b5dd.png\" alt=\"\" title=\"\" width=\"952\" height=\"315\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/676\/4b0\/bbb\/6764b0bbbbb8d60eb41d215f3817b5dd.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/676\/4b0\/bbb\/6764b0bbbbb8d60eb41d215f3817b5dd.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>ComfyUI workflow \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u043b\u0435\u0436\u0430\u0442 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 <\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c25\/ca3\/53d\/c25ca353dac4b5611d39118526813b79.png\" width=\"1480\" height=\"719\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/c25\/ca3\/53d\/c25ca353dac4b5611d39118526813b79.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c25\/ca3\/53d\/c25ca353dac4b5611d39118526813b79.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0417\u0430\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u043f\u043e \u0444\u0430\u043a\u0442\u0443 \u043c\u044b \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0432 3\u0434 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u043e\u043c \u0448\u0430\u0433\u0435 \u043f\u0435\u0440\u0435\u043f\u0440\u043e\u0435\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0435\u0441\u043b\u0438 \u0431\u044b \u043c\u044b \u0437\u043d\u0430\u043b\u0438 \u043a\u0430\u0440\u0442\u0443 \u0433\u043b\u0443\u0431\u0438\u043d, \u0442\u043e \u0432\u043c\u0435\u0441\u0442\u043e \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u043e\u0439 \u0441\u0444\u0435\u0440\u044b \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0435 \u0434\u043b\u044f \u0443\u0447\u0435\u0442\u0430 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0438! \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c <a href=\"https:\/\/github.com\/DepthAnything\/Depth-Anything-V2\" rel=\"noopener noreferrer nofollow\">depth anything<\/a> \u0438 \u0432\u0441\u0435 \u043f\u043e\u043b\u0435\u0442\u0438\u0442? \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u043d\u0435\u0442.<\/p>\n<h2>\u0418\u0434\u0435\u044f\u00a02.\u00a0\u0413\u043b\u0443\u0431\u0438\u043d\u0430\u00a0\u043a\u0430\u043a\u00a0\u043f\u0430\u0442\u0447\u2011\u043everlay<\/h2>\n<p>\u0427\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u044e, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u043c\u0435\u0442\u0440\u0438\u043a\u0430 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0439 \u0434\u043e \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0443\u0442\u044c\u202f\u2014\u202f\u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u0440\u0442\u0443 \u0433\u043b\u0443\u0431\u0438\u043d\u044b, \u0430 \u043f\u043e\u0442\u043e\u043c \u0432 \u0442\u043e\u043c\u202f\u0436\u0435 \u0443\u0437\u043b\u0435 Grid\u202fSample \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u0443\u044e \u0441\u0444\u0435\u0440\u0443 \u043d\u0430 \u00ab\u0441\u043b\u043e\u0439\u00bb \u0438\u0437 \u0440\u044d\u0439\u2011depth. \u041d\u043e \u0441\u0440\u0430\u0437\u0443 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043f\u0430\u0440\u0430 \u043f\u043e\u0434\u0432\u043e\u0434\u043d\u044b\u0445 \u043a\u0430\u043c\u043d\u0435\u0439:<\/p>\n<ol start=\"0\">\n<li>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0443\u0437\u043b\u044b \u0432 ComfyUI \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0433\u043b\u0443\u0431\u0438\u043d\u043e\u0439, \u043d\u0430\u043c \u0436\u0435 \u043d\u0443\u0436\u0435\u043d MetricDepth &#8212; \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0433\u043b\u0443\u0431\u0438\u043d\u044b<\/p>\n<\/li>\n<li>\n<p><strong>Z\u2011depth\u202f\u2260\u202fR\u2011depth.<\/strong><br \/> \u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 (MiDaS, ZoeDepth, DPT) \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 <em>z\u2011depth<\/em>\u202f\u2014\u202f\u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0432\u0434\u043e\u043b\u044c \u043e\u0441\u0438 \u043a\u0430\u043c\u0435\u0440\u044b. <br \/>\u0414\u043b\u044f \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0438 \u043d\u0443\u0436\u043d\u0430 <br \/><em>ray\u2011depth<\/em>\u202f\u2014\u202f\u0434\u043b\u0438\u043d\u0430 \u043b\u0443\u0447\u0430 \u043e\u0442 \u0446\u0435\u043d\u0442\u0440\u0430 \u043a\u0430\u043c\u0435\u0440\u044b \u0434\u043e \u043f\u0438\u043a\u0441\u0435\u043b\u044f. \u0418\u0445 \u043b\u0435\u0433\u043a\u043e \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u0434\u0440\u0443\u0433 \u0432 \u0434\u0440\u0443\u0433\u0430.<\/p>\n<\/li>\n<li>\n<p>DepthAnythingV2 \u0443\u043c\u0435\u0435\u0442 \u0431\u043e\u043b\u0435\u0435\u2011\u043c\u0435\u043d\u0435\u0435 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043b\u0438\u0448\u044c \u043d\u0430 \u0443\u0433\u043b\u0435 ~90\u00b0. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c FOV \u0440\u0435\u0436\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u0442\u0430\u0439\u043b\u044b, \u043a\u0430\u0436\u0434\u0430\u044f \u0442\u0430\u0439\u043b\u0430 \u0447\u0435\u0440\u0435\u0437 DepthAnything \u2192\u00a0<code>Z\u2011to\u2011Ray<\/code> \u2192\u00a0\u0441\u0431\u043e\u0440\u043a\u0430 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 depth\u2011\u043f\u0430\u043d\u043e\u0440\u0430\u043c\u044b. \u041f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u044f \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u0447\u0435\u0442\u044b\u0440\u0435 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438: <em>override<\/em> \u0438 <em>average<\/em> \u0434\u0430\u0451\u0442 \u0440\u0435\u0437\u043a\u0438\u0435 \u0441\u0442\u0443\u043f\u0435\u043d\u0438; <em>soft\u2011blend<\/em> (\u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u0430\u0442\u0435\u043d\u0435\u043d\u0438\u0435 \u043e\u0442 \u0446\u0435\u043d\u0442\u0440\u0430 \u043a \u043a\u0440\u0430\u044f\u043c) \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0447\u0443\u0442\u044c \u043b\u0443\u0447\u0448\u0435, \u043d\u043e \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0432\u0438\u0434\u043d\u044b \u0448\u0432\u044b; \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u043e\u0434\u0438\u043b\u0441\u044f <strong>distance\u2011aware merge<\/strong>: \u0432\u0435\u0441 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0438\u043a\u0441\u0435\u043b\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0434\u043e \u043a\u0440\u0430\u044f \u043f\u0430\u0442\u0447\u0430.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/02b\/864\/57d\/02b86457d680e467bc4183934edc2bde.png\" width=\"932\" height=\"461\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/02b\/864\/57d\/02b86457d680e467bc4183934edc2bde.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/02b\/864\/57d\/02b86457d680e467bc4183934edc2bde.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0423\u0437\u043b\u044b \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0433\u043b\u0443\u0431\u0438\u043d\u044b \u0441\u043e\u0431\u0440\u0430\u043d\u044b <a href=\"https:\/\/github.com\/Alexankharin\/camera-comfyUI\/blob\/main\/metric_depth_nodes.py\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a><\/p>\n<\/li>\n<\/ol>\n<h2>\u0418\u0434\u0435\u044f\u00a03.\u00a0\u0422\u043e\u0447\u043a\u0430\u00a0\u043b\u0443\u0447\u0448\u0435\u00a0\u043f\u043e\u043b\u0438\u0433\u043e\u043d\u0430\u00a0\u2014 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 point\u00a0cloud<\/h2>\n<p>\u0421\u00a0\u043a\u0430\u0440\u0442\u043e\u0439 \u0433\u043b\u0443\u0431\u0438\u043d\u044b \u043c\u044b \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c <em>\u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u044e<\/em>. <\/p>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043a\u043e\u0434 \u043f\u0435\u0440\u0435\u043f\u0440\u043e\u0435\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0442\u043e \u043f\u043e\u0439\u043c\u0435\u043c \u0447\u0442\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u044e, \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u0433\u043b\u0443\u0431\u0438\u043d\u0430 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0430 \u043d\u0435 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e. grid_sample \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u0447\u0442\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0433\u043e \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u043a\u0430\u043c\u0435\u0440\u044b \u043f\u043e \u0441\u0446\u0435\u043d\u0435.  <\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434\u0430 grid_sample \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u0445\u043e\u0434 \u0441 \u0440\u0430\u0441\u0447\u0435\u0442\u0430\u043c\u0438 \u043e\u0442 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043a \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c\u0443, \u0430 \u043d\u0435 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442. \u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u043f\u043e\u0434\u0445\u043e\u0434\u0443 pointcloud &#8212; \u043e\u0431\u043b\u0430\u043a\u043e \u0442\u043e\u0447\u0435\u043a: \u043a\u0430\u0436\u0434\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u0445\u0440\u0430\u043d\u0438\u0442 <code>XYZ + RGBA<\/code>. \u0414\u043b\u044f \u0432\u0441\u0435\u0445 \u0442\u0440\u0451\u0445 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0439 \u0435\u0441\u0442\u044c \u043f\u0440\u044f\u043c\u044b\u0435 \u0444\u043e\u0440\u043c\u0443\u043b\u044b <code>depth \u2192 XYZ<\/code> <\/p>\n<p>Pointcloud \u0438\u0437 \u0441\u0435\u0431\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 numpy array \u0444\u043e\u0440\u043c\u044b N*6 (XYZRGB). \u0422\u0430\u043a\u0436\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f pointcloud \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f .ply &#8212; \u0434\u043e\u0431\u0430\u0432\u0438\u043c i\/o \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f numpy \u0438 ply. <\/p>\n<ul>\n<li>\n<p><strong>I\/O\u00a0\u0432\u00a0PLY.<\/strong> \u0423\u0437\u0435\u043b <code>PointCloud\u00a0Save\/Load<\/code> \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 numpy\u00a0<code>N\u00d76<\/code> \u0432\u00a0\u0444\u043e\u0440\u043c\u0430\u0442\u0435 PLY \u2014 \u043b\u044e\u0431\u043e\u0439 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0449\u0438\u043a (MeshLab, CloudCompare, Open3D) \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0431\u0435\u0437 \u043a\u043e\u043d\u0432\u0435\u0440\u0441\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p><strong>\u0420\u0435\u043d\u0434\u0435\u0440 \u043d\u0430\u00a0CUDA.<\/strong> \u0412\u043d\u0443\u0442\u0440\u0438 \u0443\u0437\u043b\u0430 <code>PointCloud\u00a0Project<\/code> \u043b\u0435\u0436\u0438\u0442 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043ec\u2011\u0440\u0435\u043d\u0434\u0435\u0440: \u043f\u0440\u043e\u0435\u0446\u0438\u0440\u0443\u0435\u043c \u043a\u0430\u0436\u0434\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u043a\u0430\u043c\u0435\u0440\u044b, \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u2011\u043f\u0438\u043a\u0441\u0435\u043b\u044c\u043d\u043e \u043f\u043e \u0433\u043b\u0443\u0431\u0438\u043d\u0435, \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u00ab\u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u0435\u00bb \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c <code>RGB \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u044e\u00a0+\u00a0\u03b1\u2011\u043c\u0430\u0441\u043a\u0443<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043e\u0432\u043e\u0440\u043e\u0442 pointcloud \u043f\u0443\u0442\u0435\u043c \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0440\u043e\u0434\u043d\u044b\u0445 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u043d\u0430 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430<\/p>\n<\/li>\n<li>\n<p><strong>\u0427\u0438\u0441\u0442\u043a\u0430.<\/strong> \u041d\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430\u0445 \u0447\u0430\u0441\u0442\u043e \u0432\u0438\u0441\u044f\u0442 \u00ab\u043e\u0434\u0438\u043d\u043e\u043a\u0438\u0435\u00bb \u0442\u043e\u0447\u043a\u0438 \u0438 \u0437\u0430\u0437\u043e\u0440\u044b. \u041f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043c\u0435\u0434\u0438\u0430\u043d\u043d\u044b\u0439 \u0444\u0438\u043b\u044c\u0442\u0440 \u043f\u043e \u0433\u043b\u0443\u0431\u0438\u043d\u0435 + \u043c\u043e\u0440\u0444\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u0435 \u043c\u0430\u0441\u043a\u0438; \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u0441\u043a\u0440\u0438\u043f\u0442 <code>cloud_<\/code><a href=\"http:\/\/clean.py\" rel=\"noopener noreferrer nofollow\"><code>clean.py<\/code><\/a>.<\/p>\n<p>\u0412\u0438\u0434\u0438\u043c \u0447\u0442\u043e \u043f\u0440\u0438 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0438 \u043a\u0430\u043c\u0435\u0440\u044b \u0438 \u043f\u0440\u043e\u0435\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0433\u043b\u0443\u0431\u0438\u043d\u0430<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/395\/e19\/9f7\/395e199f727b22b7a3418a865171b5c1.png\" width=\"1024\" height=\"1024\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/395\/e19\/9f7\/395e199f727b22b7a3418a865171b5c1.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/395\/e19\/9f7\/395e199f727b22b7a3418a865171b5c1.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<\/li>\n<\/ul>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438 \u043f\u0440\u043e\u0435\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 pointcloud \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0433\u043b\u0443\u0431\u0438\u043d\u0443.<\/p>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 <strong>\u043d\u0435 \u043c\u0435\u0448<\/strong>? \u041f\u043e\u0434\u0445\u043e\u0434 \u0441 \u043c\u0435\u0448\u0430\u043c\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0434\u043b\u044f \u0434\u0435\u0442\u0435\u043a\u0446\u0438\u0438 \u0440\u0430\u0437\u0440\u044b\u0432\u043e\u0432 \u043c\u0435\u0448\u0430 \u0438 \u043f\u043e\u043a\u0430 \u043d\u0435 \u043d\u0430\u0448\u0435\u043b \u043f\u0440\u0438\u0435\u043c\u043b\u0438\u043c\u044b\u0445 \u043f\u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0443 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e &#8212; \u0432\u0440\u043e\u0434\u0435 meta \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443 \u0434\u0435\u043b\u0430\u043b\u0438, \u043d\u043e \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e \u044d\u0442\u043e \u0432\u0441\u0435.<\/p>\n<h2>\u0418\u0434\u0435\u044f\u00a04.\u00a0\u041e\u0431\u043e\u0433\u0430\u0449\u0430\u0435\u043c \u043e\u0431\u043b\u0430\u043a\u043e \u0438\u00a0\u0434\u0432\u0438\u0433\u0430\u0435\u043c \u043a\u0430\u043c\u0435\u0440\u0443<\/h2>\n<p>\u0423\u0441\u043b\u043e\u0436\u043d\u0438\u043c workflow \u0441 \u043a\u0430\u043c\u0435\u0440\u043e\u0439<\/p>\n<ol>\n<li>\n<p><strong>RGB\u2011D\u202f\u2192\u202fPoint\u00a0Cloud<\/strong> (\u0443\u0437\u0435\u043b\u00a0<code>Depth2PC<\/code>, \u043c\u0430\u0441\u043a\u0430 = \u00ab\u043a\u0430\u043a\u0438\u0435 \u0442\u043e\u0447\u043a\u0438 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c\u00bb).<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0434\u0432\u0438\u0433\u0430\u0435\u043c\/\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043a\u0430\u043c\u0435\u0440\u0443<\/strong> (\u043c\u0430\u0442\u0440\u0438\u0446\u0430 <code>4\u00d74<\/code>, \u0442\u043e\u0442 \u0436\u0435 \u0443\u0437\u0435\u043b, \u0447\u0442\u043e \u0434\u043b\u044f Grid).<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u043e\u0435\u0446\u0438\u0440\u0443\u0435\u043c<\/strong> \u043d\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u0443\u044e \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u044e \u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>\u041c\u0430\u0441\u043a\u0430 \u2192\u00a0\u0438\u043d\u043f\u0435\u0439\u0442\u0438\u043d\u0433<\/strong> (\u043b\u044e\u0431\u0430\u044f SD\/Flux\u2011workflow).<\/p>\n<\/li>\n<li>\n<p>\u041d\u043e\u0432\u0430\u044f \u0433\u043b\u0443\u0431\u0438\u043d\u0430, \u043d\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0447\u0442\u043e\u0431 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 depth estimation \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0443\u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u0442\u043e\u0447\u043a\u0430\u0445 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u043b\u0438. \u042d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u0440\u0430\u0437\u0440\u044b\u0432\u043e\u0432<\/p>\n<\/li>\n<li>\n<p><strong>\u041d\u043e\u0432\u044b\u0435 \u043f\u0438\u043a\u0441\u0435\u043b\u0438 \u2192 \u0442\u043e\u0447\u043a\u0438 \u2192\u00a0\u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a \u043e\u0431\u043b\u0430\u043a\u0443<\/strong>.<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043d\u0430\u0434\u043e\u0435\u0441\u0442. \u041f\u043e\u0441\u043b\u0435 3\u20114 \u043a\u0440\u0443\u0433\u043e\u0432 \u0441\u0446\u0435\u043d\u0430 \u00ab\u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f\u00bb \u043f\u043e\u0447\u0442\u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e.<\/p>\n<p>\u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0432\u0441\u0435 \u044d\u0442\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u044b \u0432 \u043e\u0434\u0438\u043d \u0443\u0437\u0435\u043b PointcloudEnricher<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435, \u044f \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e \u0442\u0440\u0430\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u043a\u0430\u043a \u0441\u043f\u0438\u0441\u043e\u043a \u043c\u0430\u0442\u0440\u0438\u0446 4&#215;4 np.array.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/5bf\/91e\/e8a\/5bf91ee8a38b5db0c9c691d3db8eb48c.png\" width=\"1727\" height=\"746\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/5bf\/91e\/e8a\/5bf91ee8a38b5db0c9c691d3db8eb48c.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/5bf\/91e\/e8a\/5bf91ee8a38b5db0c9c691d3db8eb48c.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8aa\/e41\/b48\/8aae41b483fa7bc23424fba6b7f59134.gif\" alt=\"PointCloud Inpaint Video\" width=\"1024\" height=\"1024\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8aa\/e41\/b48\/8aae41b483fa7bc23424fba6b7f59134.gif 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8aa\/e41\/b48\/8aae41b483fa7bc23424fba6b7f59134.gif 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>PointCloud Inpaint Video<\/figcaption><\/div>\n<\/figure>\n<h2>\u0418\u0434\u0435\u044f 5 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0412\u0438\u0434\u0435\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 Wan \u0434\u043b\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0443\u0441\u0442\u044b\u0445 \u043c\u0435\u0441\u0442 \u043f\u0440\u0438 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0438 \u043a\u0430\u043c\u0435\u0440\u044b<\/h2>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e \u0438\u0442\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043e\u0431\u043e\u0433\u0430\u0449\u0435\u043d\u0438\u044f \u043e\u0431\u043b\u0430\u043a\u0430 \u0442\u043e\u0447\u0435\u043a \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0438\u0434\u0435\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 Wan2.1, \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043a \u0431\u0430\u0437\u043e\u0432\u044b\u043c \u0443\u0437\u043b\u0430\u043c ComfyUI. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0431\u0435\u0440\u0435\u0442\u0441\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0438 \u0433\u043b\u0430\u0434\u043a\u043e\u0441\u0442\u044c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u043e\u0442 \u0432\u0438\u0434\u0435\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u044f \u0437\u0430\u0432\u0435\u0434\u043e\u043c\u043e \u0432\u0435\u0440\u043d\u0430<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1f4\/4b2\/c7c\/1f44b2c7c94fdd121129d26f41f47e3e.gif\" width=\"512\" height=\"512\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1f4\/4b2\/c7c\/1f44b2c7c94fdd121129d26f41f47e3e.gif 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1f4\/4b2\/c7c\/1f44b2c7c94fdd121129d26f41f47e3e.gif 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h2>\u042e\u0437\u043a\u0435\u0439\u0441\u044b<\/h2>\n<ul>\n<li>\n<p><strong>VR180\/360 \u043a\u043e\u043d\u0432\u0435\u0440\u0441\u0438\u044f.<\/strong> \u0418\u0437 \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u043a\u0430\u0434\u0440\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0442\u0435\u0440\u0435\u043e\u2011\u043f\u0430\u043d\u043e\u0440\u0430\u043c\u0443 \u0438\u043b\u0438 \u043c\u043e\u043d\u043e\u043f\u0430\u043d\u043e\u0440\u0430\u043c\u0443 \u0431\u0435\u0437 \u0437\u0430\u043c\u0435\u0442\u043d\u044b\u0445 \u0448\u0432\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>Bullet\u2011time \u0432\u00a0\u043e\u0434\u0438\u043d\u043e\u0447\u043a\u0443.<\/strong> \u0421\u0442\u0430\u0432\u0438\u0442\u0435 \u043e\u0434\u043d\u0443 \u043a\u0430\u043c\u0435\u0440\u0443, \u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u043e\u0431\u043e\u0440\u043e\u0442 \u00ab\u043e\u0431\u043b\u0430\u043a\u043e\u043c\u00bb, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0435 motion\u2011blur \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>\u0422\u043e\u0447\u043d\u044b\u0439 equirect\u2011outpaint.<\/strong> \u0413\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e \u0432\u0435\u0440\u043d\u0430\u044f \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u044f \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430 + \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u00ab\u0441\u0442\u044f\u043d\u0443\u0442\u043e\u0441\u0442\u0438\u00bb \u043d\u0430 \u043f\u043e\u043b\u044e\u0441\u0430\u0445.<\/p>\n<\/li>\n<li>\n<p><strong>2d\/3d<\/strong> \u043a\u043e\u043d\u0432\u0435\u0440\u0441\u0438\u044f \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0439 \u043a\u0430\u043c\u0435\u0440\u044b \u0438 \u043b\u044e\u0431\u043e\u0433\u043e FOV<\/p>\n<\/li>\n<\/ul>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7c2\/cd3\/b5e\/7c2cd3b5e296fa28736e24e9b168b0d5.gif\" width=\"500\" height=\"500\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7c2\/cd3\/b5e\/7c2cd3b5e296fa28736e24e9b168b0d5.gif 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7c2\/cd3\/b5e\/7c2cd3b5e296fa28736e24e9b168b0d5.gif 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<blockquote>\n<p>\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439, \u0440\u0430\u0431\u043e\u0447\u0438\u0435 \u0433\u0440\u0430\u0444\u044b \u0434\u043b\u044f ComfyUI \u0438\u00a0\u043f\u043e\u043b\u043d\u044b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043e\u0447\u0438\u0441\u0442\u043a\u0438\/\u0440\u0435\u043d\u0434\u0435\u0440\u0430 \u2014 \u0432\u00a0<a href=\"https:\/\/github.com\/Alexankharin\/camera-comfyUI\" rel=\"noopener noreferrer nofollow\"><code>https:\/\/github.com\/Alexankharin\/camera-comfyUI<\/code><\/a>. Pull\u2011request\u2019\u044b \u0438\u00a0\u0438\u0434\u0435\u0438 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442\u0441\u044f!<\/p>\n<\/blockquote>\n<p>\u0427\u0442\u043e \u0434\u0430\u043b\u044c\u0448\u0435?<\/p>\n<ul>\n<li>\n<p>\u0420\u0435\u0444\u0430\u043a\u0442\u043e\u0440 \u043a\u043e\u0434\u0430 \u0438 \u0443\u0431\u0440\u0430\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0442 flux<\/p>\n<\/li>\n<li>\n<p>Gaussian\u00a0Splatting &#8212; \u043d\u0435 \u0443\u0432\u0435\u0440\u0435\u043d \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u0440\u0435\u043c\u044f \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0439\u0442\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u202f\u2014\u202fVR\u2011\u043f\u0430\u043d\u043e\u0440\u0430\u043c\u044b \u0435\u0449\u0451 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435\u00a0\u0431\u044b\u043b\u0438 \u0441\u0442\u043e\u043b\u044c \u0434\u043e\u0441\u044f\u0433\u0430\u0435\u043c\u044b!<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/912652\/\"> https:\/\/habr.com\/ru\/articles\/912652\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"\">\n<div><figcaption>\u041a\u0440\u0443\u0442\u0438\u043c Fisheye \u043a\u0430\u043c\u0435\u0440\u0443 \u0432 \u0441\u0438\u043d\u0442\u0435\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043c\u0438\u0440\u0435<\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! <\/p>\n<p> \u042f \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u0441 \u0432\u0438\u0434\u0435\u043e \u0434\u043b\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0438 \u043e\u0434\u043d\u0430 \u0438\u0437\u202f\u0437\u0430\u0434\u0430\u0447, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u0441\u0451\u202f\u0435\u0449\u0451 \u043c\u0430\u044f\u0447\u0438\u0442 \u043d\u0430 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0435 \u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0443\u0439\u043c\u044b \u0443\u0441\u0438\u043b\u0438\u0439\u202f\u2014\u202f\u0443\u0434\u043e\u0431\u043d\u043e\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438\u202f\u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433 <strong>\u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0433\u043e 6Dof\u202f\u0432\u0438\u0434\u0435\u043e<\/strong>. \u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0441\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043a\u202f\u0434\u0432\u0443\u043c \u043a\u0440\u0443\u043f\u043d\u044b\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u043c.  <\/p>\n<ul>\n<li>\n<p><strong>\u041c\u043d\u043e\u0433\u043e\u043a\u0430\u043c\u0435\u0440\u043d\u0430\u044f \u0440\u0435\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f.<\/strong> \u0422\u0443\u0442 \u0436\u0438\u0432\u0443\u0442\u202fSFM, \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043c\u0435\u0448\u2011\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u044b, nerf, gaussian splatting\u202f\u2014\u202f\u0438 \u0432\u0441\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432. \u042d\u0442\u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0434\u043b\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u044b\u0445 \u0441\u0446\u0435\u043d, \u043d\u043e \u0441 \u0432\u0438\u0434\u0435\u043e \u043f\u043e\u043a\u0430 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u0438\u0435. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u0430\u043c\u0435\u0440 \u0438 \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0441\u0435\u0442\u0430\u043f\u044b \u0434\u043b\u044f \u0441\u044a\u0435\u043c\u043a\u0438<\/p>\n<\/li>\n<li>\n<p><strong>\u0427\u0438\u0441\u0442\u0430\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0432\u0438\u0434\u0435\u043e.<\/strong> \u0414\u0438\u0444\u0444\u0443\u0437\u0438\u043e\u043d\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0431\u044b\u0441\u0442\u0440\u043e \u0443\u0447\u0430\u0442\u0441\u044f \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0443. \u0421\u0432\u0435\u0436\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440\u00a0\u2014\u00a0Veo\u202f3 \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u0441\u043d\u043e\u0441\u043d\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c equirect \u0432\u0438\u0434\u0435\u043e  (<a href=\"https:\/\/www.youtube.com\/watch?v=OjaupTb7S-w\" rel=\"noopener noreferrer nofollow\">https:\/\/www.youtube.com\/watch?v=OjaupTb7S-w<\/a>) \u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u043e\u0432<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0434\u043b\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 (VR), \u0441\u043e\u0437\u0434\u0430\u0432 \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f ComfyUI, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442:<\/p>\n<ul>\n<li>\n<p>\u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438\u202f\u0432\u0438\u0434\u0435\u043e \u043c\u0435\u0436\u0434\u0443 <em>pinhole<\/em>, <em>fisheye<\/em> \u0438\u202f<em>equirectangular<\/em> \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u044f\u043c\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0438\u0442\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u0430\u0443\u0442\u043f\u0435\u0439\u043d\u0442\u0438\u0442\u044c \u043f\u0430\u043d\u043e\u0440\u0430\u043c\u044b \u0434\u043e \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0441\u0444\u0435\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043e\u0445\u0432\u0430\u0442\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0441\u0438\u043d\u0442\u0435\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0440\u0430\u043a\u0443\u0440\u0441\u044b \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u044b\u043c \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435\u043c \u043a\u0430\u043c\u0435\u0440\u044b \u0432\u00a03\u2011D\u2011\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435.<\/p>\n<\/li>\n<\/ul>\n<p>\u042f \u043f\u043e\u043a\u0430\u0436y, \u043a\u0430\u043a \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 reprojection (grid_sample + \u0442\u043e\u0447\u043a\u0438 \u043d\u0430 \u0441\u0444\u0435\u0440\u0435) \u0441 \u043a\u0430\u0440\u0442\u0430\u043c\u0438 \u043a\u0430\u0440\u0442\u0430\u043c\u0438 \u0433\u043b\u0443\u0431\u0438\u043d\u044b \u0438 \u043e\u0431\u043b\u0430\u043a\u0430\u043c\u0438 \u0442\u043e\u0447\u0435\u043a, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u044b\u0435 \u00ab\u043d\u043e\u0432\u044b\u0435 \u0432\u0438\u0434\u044b\u00bb \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c \u043f\u043e\u0434\u0445\u043e\u0434 \u0441 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0435\u0439 \u0445\u043e\u0440\u043e\u0448\u043e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c \u0441 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u043c Video Generation<\/p>\n<h2>\u0422\u0438\u043f\u044b \u043a\u0430\u043c\u0435\u0440 \u0438\u00a0\u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0439: pinhole, fisheye, equirect<\/h2>\n<h3>Pinhole (\u043a\u0430\u043c\u0435\u0440\u0430 \u043e\u0431\u0441\u043a\u0443\u0440\u0430)<\/h3>\n<figure class=\"\">\n<div><figcaption>\u041f\u0440\u043e\u0435\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043d\u0430 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0432 pinhole \u043a\u0430\u043c\u0435\u0440\u0435<\/figcaption><\/div>\n<\/figure>\n<p><em>d = 1\/tan(fov\/2)<\/em><br \/><em>r = x\u00b2 + y\u00b2<br \/>theta = atan2(r, d) # angle from center<br \/>phi = atan2(y, x)<br \/>Z = R  cos(theta)<br \/>X = R  sin(theta)  cos(phi)<br \/>Y = R  sin(theta) * sin(phi)<\/em><\/p>\n<p>\u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0441\u043b\u043e\u0436\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043b\u0438\u043d\u0437 \u0432 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043a\u0430\u043c\u0435\u0440\u0430\u0445, \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043a\u0430\u043c\u0435\u0440 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u044d\u0442\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u0438 \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0435 \u0434\u043b\u044f \u043d\u0430\u0441 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u0427\u0442\u043e \u0432\u0430\u0436\u043d\u043e, \u0442\u0430\u043a\u043e\u0439 \u0442\u0438\u043f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0438 \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f vision \u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439. \u042d\u0442\u043e \u0432\u0430\u0436\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0447\u0442\u043e \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u044f \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0438 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0442\u0430\u043a\u043e\u0439. \u041e\u0431\u044b\u0447\u043d\u043e FOV \u043d\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 60 \u0433\u0440\u0430\u0434\u0443\u0441\u043e\u0432, \u0438\u043d\u043e\u0433\u0434\u0430 \u0434\u043e 90. \u0415\u0441\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 &#8212; \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0432\u0438\u0434\u043d\u043e \u0438\u0441\u043a\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u043e \u043a\u0440\u0430\u044f\u043c \u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u0446\u0435\u043d\u0442\u0440\u0430. \u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441\u043f\u0440\u043e\u0435\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441 FOV \u0440\u0430\u0432\u043d\u044b\u043c \u0438\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 180 \u0433\u0440\u0430\u0434\u0443\u0441\u043e\u0432<\/p>\n<h3>Fisheye (\u0440\u044b\u0431\u0438\u0439 \u0433\u043b\u0430\u0437)  <\/h3>\n<figure class=\"\">\n<div><figcaption>\u041f\u0440\u043e\u0435\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043d\u0430 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0432 fisheye \u043a\u0430\u043c\u0435\u0440\u0435<\/figcaption><\/div>\n<\/figure>\n<p> \u0412 \u044d\u0442\u043e\u043c \u0442\u0438\u043f\u0435 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0438 \u0440\u0430\u0434\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0443\u0433\u043b\u0443 <\/p>\n<p><em>r = x\u00b2 + y\u00b2 <\/em><br \/><em>theta = r *(fov \/ 2) # angle from center<\/em><br \/><em>phi = atan2(y, x)<\/em><br \/><em>Z = R*cos(theta)<\/em><br \/><em>X = R*sin(theta)*cos(phi)<\/em><br \/><em>Y = R  sin(theta)  sin(phi)<\/em>  <\/p>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0434\u043e 360\u00b0 FOV, \u043d\u043e \u0438\u0441\u043a\u0430\u0436\u0430\u0435\u0442 \u043f\u0440\u044f\u043c\u044b\u0435 \u043b\u0438\u043d\u0438\u0438. \u0425\u043e\u0442\u044f \u0437\u0434\u0435\u0441\u044c \u043d\u0435\u0442 \u043c\u0430\u0442\u0435\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u0433\u043b\u0443, \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u0442\u0435\u043c \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043b\u0438\u043d\u0437\u0443 \u0447\u0442\u043e\u0431 \u043e\u043d\u0430 \u0438\u0441\u043a\u0430\u0436\u0430\u043b\u0430 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u043b\u0443\u0447\u0438 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431 r \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0438 \u0431\u044b\u043b \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u043e\u043d\u0430\u043b\u0435\u043d \u0443\u0433\u043b\u0443. \u041d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 fisheye \u043e\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043e\u0432 \u0438 \u043a\u0430\u043a \u0435\u0435 \u0443\u0447\u0435\u0441\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0442\u0443\u0442 <a href=\"http:\/\/www.paulbourke.net\/dome\/fisheyecorrect\/\" rel=\"noopener noreferrer nofollow\">http:\/\/www.paulbourke.net\/dome\/fisheyecorrect\/<\/a> . \u041d\u043e \u0442\u0430\u043a \u043a\u0430\u043a \u044f \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u0441 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u0430 \u043d\u0435 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u044f\u043c\u0438, \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0441\u0442\u0438 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043d\u0435\u0442<\/p>\n<h3>Equirectangular (\u0420\u0430\u0432\u043d\u043e\u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u0430\u044f) \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u044f<\/h3>\n<figure class=\"\"><\/figure>\n<p>\u042d\u0442\u043e \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u0444\u0435\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 theta, phi \u043d\u0430 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a, \u043c\u043d\u043e\u0433\u0438\u043c \u0437\u043d\u0430\u043a\u043e\u043c\u043e\u0435 \u0435\u0449\u0435 \u0441 \u0443\u0440\u043e\u043a\u043e\u0432 \u0448\u043a\u043e\u043b\u044c\u043d\u043e\u0439 \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0438. <\/p>\n<p><em>phi = x  (horizontal_fov \/ 2)<\/em><br \/><em>theta = y  (vertical_fov \/ 2)<\/em><br \/><em>X = R  cos(theta)  sin(phi)\/<\/em><br \/><em>Y = R  sin(theta)<\/em><br \/><em>Z = R  cos(theta) * cos(phi)<\/em>  <\/p>\n<p>\u0414\u0435-\u0444\u0430\u043a\u0442\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c \u0434\u043b\u044f \u043f\u0430\u043d\u043e\u0440\u0430\u043c (360\u00b0 \u0438 180\u00b0) \u0438 VR \u0432\u0438\u0434\u0435\u043e. \u042d\u0442\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0438 \u043d\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u0430. <\/p>\n<h2>\u0418\u0434\u0435\u044f 1. \u041f\u0438\u0448\u0435\u043c \u043f\u0435\u0440\u0435\u043f\u0440\u043e\u0435\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h2>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043e\u0442 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u043e\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0438 \u043a \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044e \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0434\u0435\u043b\u0430\u0435\u043c \u0448\u0430\u0433\u0438<\/p>\n<ol>\n<li>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u043d\u0430 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0438 \u0438\u0449\u0435\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u043d\u0430 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u043e\u0439 \u0441\u0444\u0435\u0440\u0435<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u044d\u0442\u0438\u0445 \u0442\u043e\u0447\u0435\u043a \u043d\u0430 \u0441\u0444\u0435\u0440\u0435 \u0438\u0449\u0435\u043c \u0442\u043e\u0447\u043a\u0443 \u043d\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0438. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043a\u0430\u0440\u0442\u0443 \u043e\u0442\u043a\u0443\u0434\u0430 \u0431\u0440\u0430\u0442\u044c \u0442\u043e\u0447\u043a\u0443 \u043d\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u044d\u0442\u0443 \u043a\u0430\u0440\u0442\u0443. \u041a\u043e\u0434 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"python\">def map_grid(  grid_torch: torch.Tensor,  input_projection: str,  output_projection: str,  input_horizontal_fov: float,  output_horizontal_fov: float,  rotation_matrix: torch.Tensor = None  ) -&gt; np.ndarray:  \"\"\"  Maps a 2D grid from one projection type to another. Args:     grid_torch (torch.Tensor): A 2D array of shape (height, width, 2) with x and y coordinates normalized to [-1, 1].     input_projection (str): The input projection type (\"PINHOLE\", \"FISHEYE\", \"EQUIRECTANGULAR\").     output_projection (str): The output projection type (\"PINHOLE\", \"FISHEYE\", \"EQUIRECTANGULAR\").     input_horizontal_fov (float): Horizontal field of view for the input projection in degrees.     output_horizontal_fov (float): Horizontal field of view for the output projection in degrees.     rotation_matrix (torch.Tensor, optional): A 4x4 rotation matrix. Defaults to identity matrix if not provided.  Returns:     np.ndarray: A 2D array of shape (height, width, 2) with the mapped x and y coordinates. \"\"\" with torch.no_grad():     if rotation_matrix is None:         rotation_matrix = torch.eye(4)  # Identity matrix     rotation_matrix = rotation_matrix.float().to(grid_torch.device)     # convert all floats to tensors     input_horizontal_fov = torch.tensor(input_horizontal_fov, device=grid_torch.device).float()     output_horizontal_fov = torch.tensor(output_horizontal_fov, device=grid_torch.device).float()      # Calculate vertical field of view for input and output projections     output_vertical_fov = output_horizontal_fov  # Assuming square aspect ratio     input_vertical_fov = input_horizontal_fov * (grid_torch.shape[0] \/ grid_torch.shape[1])      # Normalize the grid for vertical FOV adjustment     normalized_grid = grid_torch.clone()     normalized_grid[..., 1] *= (grid_torch.shape[0] \/ grid_torch.shape[1])      # Step 1: Map each pixel to its location on the sphere for the output projection     if output_projection == \"PINHOLE\":         D = 1.0 \/ torch.tan(torch.deg2rad(output_horizontal_fov) \/ 2)         radius_to_center = torch.sqrt(normalized_grid[..., 0]**2 + normalized_grid[..., 1]**2)         phi = torch.atan2(normalized_grid[..., 1], normalized_grid[..., 0])         theta = torch.atan2(radius_to_center, D)         x = torch.sin(theta) * torch.cos(phi)         y = torch.sin(theta) * torch.sin(phi)         z = torch.cos(theta)     elif output_projection == \"FISHEYE\":         phi = torch.atan2(normalized_grid[..., 1], normalized_grid[..., 0])         radius = torch.sqrt(normalized_grid[..., 0]**2 + normalized_grid[..., 1]**2)         theta = radius * torch.deg2rad(output_horizontal_fov) \/ 2         x = torch.sin(theta) * torch.cos(phi)         y = torch.sin(theta) * torch.sin(phi)         z = torch.cos(theta)     elif output_projection == \"EQUIRECTANGULAR\":         phi = grid_torch[..., 0] * torch.deg2rad(output_horizontal_fov) \/ 2         theta = grid_torch[..., 1] * torch.deg2rad(output_vertical_fov) \/ 2         y = torch.sin(theta)         x = torch.cos(theta) * torch.sin(phi)         z = torch.cos(theta) * torch.cos(phi)     else:         raise ValueError(f\"Unsupported output projection: {output_projection}\")      # Step 2: Apply rotation matrix for yaw and pitch     coords = torch.stack([x.flatten(), y.flatten(), z.flatten()], dim=-1)     coords_homogeneous = torch.cat([coords, torch.ones((coords.shape[0], 1), device=coords.device)], dim=-1)     coords_rotated = torch.matmul(rotation_matrix, coords_homogeneous.T).T     coords = coords_rotated[..., :3]  # Extract x, y, z after rotation      # Step 3: Map rotated points back to the input projection     if input_projection == \"PINHOLE\":         D = 1.0 \/ torch.tan(torch.deg2rad(input_horizontal_fov) \/ 2)         theta = torch.atan2(torch.sqrt(coords[..., 0]**2 + coords[..., 1]**2), coords[..., 2])         phi = torch.atan2(coords[..., 1], coords[..., 0])         radius = D * torch.tan(theta)         x = radius * torch.cos(phi)         y = radius * torch.sin(phi)         mask = coords[..., 2] &gt; 0  # Only keep points where z &gt; 0         x[~mask] = 100         y[~mask] = 100     elif input_projection == \"FISHEYE\":         theta = torch.atan2(torch.sqrt(coords[..., 0]**2 + coords[..., 1]**2), coords[..., 2])         phi = torch.atan2(coords[..., 1], coords[..., 0])         radius = theta \/ (torch.deg2rad(input_horizontal_fov) \/ 2)         x = radius * torch.cos(phi)         y = radius * torch.sin(phi)     elif input_projection == \"EQUIRECTANGULAR\":         theta = torch.asin(coords[..., 1])         phi = torch.atan2(coords[..., 0], coords[..., 2])         x = phi \/ (torch.deg2rad(input_horizontal_fov) \/ 2)         y = theta \/ (torch.deg2rad(input_vertical_fov) \/ 2)     else:         raise ValueError(f\"Unsupported input projection: {input_projection}\")      x = x.view(grid_torch.shape[0], grid_torch.shape[1])     y = y.view(grid_torch.shape[0], grid_torch.shape[1])     output_grid = torch.zeros_like(grid_torch)     output_grid[..., 0] = x     output_grid[..., 1] = y  return output_grid <\/code><\/pre>\n<p>\u041c\u043e\u0436\u043d\u043e \u043e\u0431\u0435\u0440\u043d\u0443\u0442\u044c \u043f\u0435\u0440\u0435\u043f\u0440\u043e\u0435\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 ComfyUI <a href=\"https:\/\/github.com\/Alexankharin\/camera-comfyUI\/blob\/main\/reprojection_nodes.py\" rel=\"noopener noreferrer nofollow\">node<\/a><\/p>\n<p>\u0417\u0430\u043c\u0435\u0447\u0430\u0435\u043c \u0447\u0442\u043e \u043d\u0430 \u0448\u0430\u0433\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c\u0438 XYZ \u043b\u0435\u0433\u043a\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0432\u0443\u044e\u0442 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f\u043c \u043a\u0430\u043c\u0435\u0440\u044b \u043f\u0443\u0442\u0435\u043c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u0432 \u043e\u0434\u043d\u043e\u0440\u043e\u0434\u043d\u044b\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b (\u0432\u0435\u043a\u0442\u043e\u0440 XYZ \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u043c \u0432 XYZ1) \u0438 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9C%D0%B0%D1%82%D1%80%D0%B8%D1%86%D0%B0_%D0%BF%D0%B5%D1%80%D0%B5%D1%85%D0%BE%D0%B4%D0%B0\" rel=\"noopener noreferrer nofollow\">\u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430<\/a> . \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u0435\u0437 \u0443\u0441\u0438\u043b\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0443\u0437\u0435\u043b \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u043f\u0440\u043e\u0435\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u043d\u043e \u0438 \u043f\u043e\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0438\u0445<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041f\u043e\u0432\u043e\u0440\u043e\u0442 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0432 pinhole \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u041c\u043e\u0436\u043d\u043e \u043f\u0440\u0438 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0435 \u0442\u0430\u043a\u0436\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043c\u0430\u0441\u043a\u0443 \u0441 \u043d\u0435\u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u043c\u0438 \u0440\u0435\u0433\u0438\u043e\u043d\u0430\u043c\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0445\u043e\u0447\u0435\u0442\u0441\u044f, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Patch-based \u043f\u043e\u0434\u0445\u043e\u0434 \u0434\u043b\u044f \u0438\u0442\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0443\u0441\u0442\u044b\u0445 \u043c\u0435\u0441\u0442 \u043f\u0440\u0438 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0435! \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<br \/>\u041f\u0440\u043e\u0435\u0446\u0438\u0440\u0443\u0435\u043c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0432 fisheye 180, \u0434\u0430\u043b\u0435\u0435 \u043f\u0430\u0442\u0447\u0430\u043c\u0438 \u043f\u043e\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0435\u0435 \u0432 Pinhole, \u0434\u0435\u043b\u0430\u0435\u043c oupainting \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e, \u043f\u0440\u043e\u0435\u0446\u0438\u0440\u0443\u0435\u043c \u043e\u0431\u0440\u0430\u0442\u043d\u043e. \u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441 Flux:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>ComfyUI workflow \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u043b\u0435\u0436\u0430\u0442 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 <\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0417\u0430\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u043f\u043e \u0444\u0430\u043a\u0442\u0443 \u043c\u044b \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0432 3\u0434 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u043e\u043c \u0448\u0430\u0433\u0435 \u043f\u0435\u0440\u0435\u043f\u0440\u043e\u0435\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0435\u0441\u043b\u0438 \u0431\u044b \u043c\u044b<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-467508","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/467508","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=467508"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/467508\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=467508"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=467508"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=467508"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}