{"id":954,"date":"2019-06-29T18:59:32","date_gmt":"2019-06-29T23:59:32","guid":{"rendered":"http:\/\/sunapi386.ca\/wordpress\/?p=954"},"modified":"2019-06-29T19:16:36","modified_gmt":"2019-06-30T00:16:36","slug":"2d-photos-to-3d-model","status":"publish","type":"post","link":"https:\/\/sunapi386.ca\/wordpress\/2d-photos-to-3d-model\/","title":{"rendered":"2D Photos to 3D model"},"content":{"rendered":"\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"2031\" height=\"1182\" src=\"https:\/\/i0.wp.com\/sunapi386.ca\/wordpress\/wp-content\/uploads\/2019\/06\/image.png?fit=625%2C364\" alt=\"\" class=\"wp-image-955\" srcset=\"https:\/\/sunapi386.ca\/wordpress\/wp-content\/uploads\/2019\/06\/image.png 2031w, https:\/\/sunapi386.ca\/wordpress\/wp-content\/uploads\/2019\/06\/image-300x175.png 300w, https:\/\/sunapi386.ca\/wordpress\/wp-content\/uploads\/2019\/06\/image-768x447.png 768w, https:\/\/sunapi386.ca\/wordpress\/wp-content\/uploads\/2019\/06\/image-1024x596.png 1024w, https:\/\/sunapi386.ca\/wordpress\/wp-content\/uploads\/2019\/06\/image-624x363.png 624w\" sizes=\"auto, (max-width: 2031px) 100vw, 2031px\" \/><\/figure>\n\n\n\n<p>Came across some photogrammetry software lately. I had an idea to try them out by taking a bunch of photos and generate a 3d model.<\/p>\n\n\n\n<p>But it&#8217;s difficult. Tools I tried were COLMAP and visualSFM. Seems to be bad results. I think I had insufficient number of photos, and there weren&#8217;t enough correlated features.<\/p>\n\n\n\n<p>I thought &#8220;well what if I used a video&#8221;, so I took a video of my mouse, and dump them into images. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1920\" height=\"1080\" src=\"https:\/\/i0.wp.com\/sunapi386.ca\/wordpress\/wp-content\/uploads\/2019\/06\/logi-0008.jpg?fit=625%2C352\" alt=\"\" class=\"wp-image-958\" srcset=\"https:\/\/sunapi386.ca\/wordpress\/wp-content\/uploads\/2019\/06\/logi-0008.jpg 1920w, https:\/\/sunapi386.ca\/wordpress\/wp-content\/uploads\/2019\/06\/logi-0008-300x169.jpg 300w, https:\/\/sunapi386.ca\/wordpress\/wp-content\/uploads\/2019\/06\/logi-0008-768x432.jpg 768w, https:\/\/sunapi386.ca\/wordpress\/wp-content\/uploads\/2019\/06\/logi-0008-1024x576.jpg 1024w, https:\/\/sunapi386.ca\/wordpress\/wp-content\/uploads\/2019\/06\/logi-0008-624x351.jpg 624w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/figure>\n\n\n\n<p>But a lot of them were blurry, like this.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1920\" height=\"1080\" src=\"https:\/\/i0.wp.com\/sunapi386.ca\/wordpress\/wp-content\/uploads\/2019\/06\/logi-0688.jpg?fit=625%2C352\" alt=\"\" class=\"wp-image-959\" srcset=\"https:\/\/sunapi386.ca\/wordpress\/wp-content\/uploads\/2019\/06\/logi-0688.jpg 1920w, https:\/\/sunapi386.ca\/wordpress\/wp-content\/uploads\/2019\/06\/logi-0688-300x169.jpg 300w, https:\/\/sunapi386.ca\/wordpress\/wp-content\/uploads\/2019\/06\/logi-0688-768x432.jpg 768w, https:\/\/sunapi386.ca\/wordpress\/wp-content\/uploads\/2019\/06\/logi-0688-1024x576.jpg 1024w, https:\/\/sunapi386.ca\/wordpress\/wp-content\/uploads\/2019\/06\/logi-0688-624x351.jpg 624w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/figure>\n\n\n\n<p>So I thought there should be a way to filter out the blurry images. Such as using <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li> Fast Fourier Transform <\/li><li> Laplace (or LoG) filter <\/li><\/ul>\n\n\n\n<p>There were some suggestions on  <a href=\"https:\/\/stackoverflow.com\/questions\/7765810\/is-there-a-way-to-detect-if-an-image-is-blurry\">StackOverflow<\/a> that hint OpenCV is a good tool. I found some blurry detector on github  <a href=\"https:\/\/github.com\/indyka\/blur-detection\">https:\/\/github.com\/indyka\/blur-detection<\/a>  but there was some issues. For one, the threshold computed varied too greatly and so I had to manually figure out what were the 80th percentile and better (sharper, higher score) images. But some images contained no content, such as a blank table. It would be classified as sharp&#8230; so if going down this method, you might want to remove those blank images. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Came across some photogrammetry software lately. I had an idea to try them out by taking a bunch of photos and generate a 3d model. But it&#8217;s difficult. Tools I tried were COLMAP and visualSFM. Seems to be bad results. I think I had insufficient number of photos, and there weren&#8217;t enough correlated features. I &hellip; <a href=\"https:\/\/sunapi386.ca\/wordpress\/2d-photos-to-3d-model\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">2D Photos to 3D model<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34],"tags":[],"class_list":["post-954","post","type-post","status-publish","format-standard","hentry","category-thoughts"],"_links":{"self":[{"href":"https:\/\/sunapi386.ca\/wordpress\/wp-json\/wp\/v2\/posts\/954","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sunapi386.ca\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sunapi386.ca\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sunapi386.ca\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sunapi386.ca\/wordpress\/wp-json\/wp\/v2\/comments?post=954"}],"version-history":[{"count":2,"href":"https:\/\/sunapi386.ca\/wordpress\/wp-json\/wp\/v2\/posts\/954\/revisions"}],"predecessor-version":[{"id":961,"href":"https:\/\/sunapi386.ca\/wordpress\/wp-json\/wp\/v2\/posts\/954\/revisions\/961"}],"wp:attachment":[{"href":"https:\/\/sunapi386.ca\/wordpress\/wp-json\/wp\/v2\/media?parent=954"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sunapi386.ca\/wordpress\/wp-json\/wp\/v2\/categories?post=954"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sunapi386.ca\/wordpress\/wp-json\/wp\/v2\/tags?post=954"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}