{"id":4061,"date":"2013-02-12T12:50:19","date_gmt":"2013-02-12T16:50:19","guid":{"rendered":"http:\/\/starlightcascade.ca\/blog\/?p=4061"},"modified":"2013-05-21T11:42:18","modified_gmt":"2013-05-21T15:42:18","slug":"more-imagemagick-tricks","status":"publish","type":"post","link":"https:\/\/starlightcascade.ca\/blog\/2013\/02\/more-imagemagick-tricks\/","title":{"rendered":"More Imagemagick tricks"},"content":{"rendered":"<p>I am attempting to learn how to stack or combine or layer multiple images ontop of each other.<br \/>\nSpecifically to take all of the images of meteors taken throughout the night and put them together into a single image showing all of the meteors.<br \/>\nWe&#8217;ll start simply, with only two images taken from 2013 February 11th:<\/p>\n<table>\n<tr>\n<td><img decoding=\"async\" src=\"http:\/\/starlightcascade.ca\/allsky2\/specialevents\/ev_20130211_021913A_10A.png\" width=\"300\" class=\"alignnone\" \/><\/p>\n<td><img decoding=\"async\" src=\"http:\/\/starlightcascade.ca\/allsky2\/specialevents\/ev_20130211_073311A_10A.png\" width=\"300\"  class=\"alignnone\" \/><br \/>\n<\/table>\n<table border=1>\n<tr>\n<td>The output should look something like this (this is 4 images put together manually in corel photopaint&#8230;whereas we want to automate the process under Linux).<\/p>\n<td><a href=\"http:\/\/starlightcascade.ca\/blog\/wp-content\/uploads\/2013\/02\/Allsky2-4meteors1.jpg\"><img decoding=\"async\" src=\"http:\/\/starlightcascade.ca\/blog\/wp-content\/uploads\/2013\/02\/Allsky2-4meteors1.jpg\" alt=\"Allsky2-4meteors\" width=\"300\"  class=\"alignright size-full wp-image-4064\" \/><\/a><\/p>\n<tr>\n<td>Let&#8217;s try this command:<br \/>\nconvert   ev_20130211_*.png +append  ev_20130211.png<\/p>\n<td><a href=\"http:\/\/starlightcascade.ca\/blog\/wp-content\/uploads\/2013\/02\/ev_20130211convert_append.png\"><img decoding=\"async\" src=\"http:\/\/starlightcascade.ca\/blog\/wp-content\/uploads\/2013\/02\/ev_20130211convert_append.png\" alt=\"ev_20130211convert_append\" width=\"400\"  class=\"alignright size-full wp-image-4066\" \/><\/a><br \/>\nThis takes two 640&#215;480 images and turns it into a 1280&#215;480 image side by side.  Not what we want.<\/p>\n<tr>\n<td>Let&#8217;s try composite  ev_20130211_*.png   ev_20130211.png<\/p>\n<td><a href=\"http:\/\/starlightcascade.ca\/blog\/wp-content\/uploads\/2013\/02\/ev_20130211composite.png\"><img decoding=\"async\" src=\"http:\/\/starlightcascade.ca\/blog\/wp-content\/uploads\/2013\/02\/ev_20130211composite.png\" alt=\"ev_20130211composite\" width=\"300\"  class=\"alignright size-full wp-image-4070\" \/><\/a><br \/>\nNo.. that didn&#8217;t seem to work either<\/p>\n<tr>\n<td>montage -mode concatenate -tile 1x   ev_20130211_*.png   ev_20130211.png<\/p>\n<td><a href=\"http:\/\/starlightcascade.ca\/blog\/wp-content\/uploads\/2013\/02\/ev_20130211montage.png\"><img decoding=\"async\" src=\"http:\/\/starlightcascade.ca\/blog\/wp-content\/uploads\/2013\/02\/ev_20130211montage.png\" alt=\"ev_20130211montage\" width=\"300\"  class=\"alignright size-full wp-image-4072\" \/><\/a><br \/>\nNope.<\/p>\n<tr>\n<td>convert -combine ev_20130211_*.png    ev_20130211.png<\/p>\n<td><a href=\"http:\/\/starlightcascade.ca\/blog\/wp-content\/uploads\/2013\/02\/ev_20130211convert-combine.png\"><img decoding=\"async\" src=\"http:\/\/starlightcascade.ca\/blog\/wp-content\/uploads\/2013\/02\/ev_20130211convert-combine.png\" alt=\"ev_20130211convert-combine\" width=\"300\"  class=\"alignright size-full wp-image-4075\" \/><\/a><\/p>\n<p>Getting closer<\/p>\n<tr>\n<td>convert -flatten ev_20130211_*.png    ev_20130211.png<\/p>\n<td><a href=\"http:\/\/starlightcascade.ca\/blog\/wp-content\/uploads\/2013\/02\/ev_20130211flatten.png\"><img decoding=\"async\" src=\"http:\/\/starlightcascade.ca\/blog\/wp-content\/uploads\/2013\/02\/ev_20130211flatten.png\" alt=\"ev_20130211flatten\" width=\"300\"  class=\"alignright size-full wp-image-4077\" \/><\/a><br \/>\nno.. lost the 2nd image<\/p>\n<tr>\n<td>convert -combine -compose over ev_20130211_*.png ev_20130211.png<\/p>\n<td><a href=\"http:\/\/starlightcascade.ca\/blog\/wp-content\/uploads\/2013\/02\/ev_20130211composeover.png\"><img decoding=\"async\" src=\"http:\/\/starlightcascade.ca\/blog\/wp-content\/uploads\/2013\/02\/ev_20130211composeover.png\" alt=\"ev_20130211composeover\" width=\"300\" class=\"alignright size-full wp-image-4079\" \/><\/a> nope<\/p>\n<tr>\n<td>convert  ev_20130211_*.png -evaluate-sequence mean    ev_20130211.png<br \/>\nThis is very close but dimmed<\/p>\n<td><a href=\"http:\/\/starlightcascade.ca\/blog\/wp-content\/uploads\/2013\/02\/ev_20130211mean.png\"><img decoding=\"async\" src=\"http:\/\/starlightcascade.ca\/blog\/wp-content\/uploads\/2013\/02\/ev_20130211mean.png\" alt=\"ev_20130211mean\" width=\"300\" class=\"alignright size-full wp-image-4081\" \/><\/a><\/p>\n<tr>\n<td>convert  ev_20130211_*.png -evaluate-sequence add    ev_20130211.png<\/p>\n<td><a href=\"http:\/\/starlightcascade.ca\/blog\/wp-content\/uploads\/2013\/02\/ev_20130211add.png\"><img decoding=\"async\" src=\"http:\/\/starlightcascade.ca\/blog\/wp-content\/uploads\/2013\/02\/ev_20130211add.png\" alt=\"ev_20130211add\" width=\"300\"  class=\"alignright size-full wp-image-4083\" \/><\/a><br \/>\nthis looks good but after 5 or 10 images it turns all white (from the add function)<br \/>\n<\/table>\n<p>convert  ev_20130211_*.png -evaluate-sequence max    ev_20130211.png<br \/>\ngives us this result:<\/p>\n<p><a href=\"http:\/\/starlightcascade.ca\/blog\/wp-content\/uploads\/2013\/02\/ev_20130211max.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/starlightcascade.ca\/blog\/wp-content\/uploads\/2013\/02\/ev_20130211max.png\" alt=\"ev_20130211max\" width=\"640\" height=\"480\" class=\"alignright size-full wp-image-4086\" \/><\/a><br \/>\nGot it!<br \/>\nThis is how to stack or combine multiple images from a nights run of meteor imaging into one single image that shows all of the meteors in one image.<\/p>\n<p>A better example is from 15 images from 2012 August 08:<br \/>\nconvert  ev_20120808_*.png -evaluate-sequence max    ev_20120808.png<br \/>\n<a href=\"http:\/\/starlightcascade.ca\/blog\/wp-content\/uploads\/2013\/02\/ev_20120808max.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/starlightcascade.ca\/blog\/wp-content\/uploads\/2013\/02\/ev_20120808max.png\" alt=\"ev_20120808max\" width=\"640\" height=\"480\" class=\"alignright size-full wp-image-4088\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am attempting to learn how to stack or combine or layer multiple images ontop of each other. Specifically to take all of the images of meteors taken throughout the night and put them together into a single image showing all of the meteors. We&#8217;ll start simply, with only two images taken from 2013 February [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,15],"tags":[],"class_list":["post-4061","post","type-post","status-publish","format-standard","hentry","category-astronomy","category-tech"],"_links":{"self":[{"href":"https:\/\/starlightcascade.ca\/blog\/wp-json\/wp\/v2\/posts\/4061","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/starlightcascade.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/starlightcascade.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/starlightcascade.ca\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/starlightcascade.ca\/blog\/wp-json\/wp\/v2\/comments?post=4061"}],"version-history":[{"count":0,"href":"https:\/\/starlightcascade.ca\/blog\/wp-json\/wp\/v2\/posts\/4061\/revisions"}],"wp:attachment":[{"href":"https:\/\/starlightcascade.ca\/blog\/wp-json\/wp\/v2\/media?parent=4061"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/starlightcascade.ca\/blog\/wp-json\/wp\/v2\/categories?post=4061"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/starlightcascade.ca\/blog\/wp-json\/wp\/v2\/tags?post=4061"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}