{"id":42,"date":"2014-11-14T23:27:56","date_gmt":"2014-11-14T21:27:56","guid":{"rendered":"https:\/\/serverstuff.info\/wordpress\/?p=42"},"modified":"2014-11-14T23:27:56","modified_gmt":"2014-11-14T21:27:56","slug":"image-magick-tricks","status":"publish","type":"post","link":"https:\/\/serverstuff.info\/wordpress\/2014\/11\/14\/image-magick-tricks\/","title":{"rendered":"image magick tricks"},"content":{"rendered":"<p>So, I had a couple of hundred images with the same background but people were in it in various places, I wanted to get the &#8220;average&#8221; background .. basically, getting the people out of the picture.<\/p>\n<p>You need to have multiple pictures of the exact same thing for this to work. Photoshop has a thing called &#8220;image statistics&#8221; with an option called &#8220;median&#8221;.<\/p>\n<pre lang=\"bash\">\r\nconvert *.jpg -evaluate-sequence median OUT.jpg\r\n<\/pre>\n<p>Then I wanted to remove some black things from the image and just replace them with white. Since there was a lil&#8217; bit of &#8220;black-ish&#8221; around the black, the -fuzz helped.<\/p>\n<pre lang=\"bash\">\r\nconvert OUT.jpg -fuzz 18% -fill white -opaque black OUT2.jpg\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>So, I had a couple of hundred images with the same background but people were in it in various places, I wanted to get the &#8220;average&#8221; background .. basically, getting the people out of the picture. You need to have multiple pictures of the exact same thing for this to work. Photoshop has a thing &hellip; <a href=\"https:\/\/serverstuff.info\/wordpress\/2014\/11\/14\/image-magick-tricks\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">image magick tricks<\/span> <span class=\"meta-nav\">&rarr;<\/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":[11],"tags":[],"class_list":["post-42","post","type-post","status-publish","format-standard","hentry","category-imagemagick"],"_links":{"self":[{"href":"https:\/\/serverstuff.info\/wordpress\/wp-json\/wp\/v2\/posts\/42","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/serverstuff.info\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/serverstuff.info\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/serverstuff.info\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/serverstuff.info\/wordpress\/wp-json\/wp\/v2\/comments?post=42"}],"version-history":[{"count":1,"href":"https:\/\/serverstuff.info\/wordpress\/wp-json\/wp\/v2\/posts\/42\/revisions"}],"predecessor-version":[{"id":44,"href":"https:\/\/serverstuff.info\/wordpress\/wp-json\/wp\/v2\/posts\/42\/revisions\/44"}],"wp:attachment":[{"href":"https:\/\/serverstuff.info\/wordpress\/wp-json\/wp\/v2\/media?parent=42"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/serverstuff.info\/wordpress\/wp-json\/wp\/v2\/categories?post=42"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/serverstuff.info\/wordpress\/wp-json\/wp\/v2\/tags?post=42"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}