Shift Camera During Time-Lapse

Well, this works at night :)

Ever realize part way through a time-lapse you need to suddenly shift the camera? Argh! I'm going to run out of space! Of course if you had a nice slow-mo head this would be easy.

left

All I need to do is to grab the far right of the right image, copy it and append it onto the right side of the left image, crop off an equivalent amount on the far left, and I'm done. Not quite. Of course the sky is not quite the same and introduced a vertical line, so I need to blend the side bit using a gradient mask:

. The black side will allow the left through, the white side the side image,and the gradient section will blend from the left to the right through the overlap, and composite puts it together. You just have to calculate how much overlap you want. The instructions from the IM overlap help page:

Well, I didn't have the patience to figure it out. Here is my perl version of it, noting that the input and output sizes are identical, that I am cropping off from the left, and appending the side to the right:

my $mask = $COMP_DIR . '\\' . "overlap_mask.png";

my $width_side = 1244;

my $chop = 980;

my $overlap = 264;

my $width_r_m_overlap = $width_side - $overlap;

my $width_l_m_overlap = $width - $chop - $overlap;

# the 68 was due to a vertical discrepancy between left and right images....

$result = `convert -size ${height}x${width_r_m_overlap} xc:white -size ${height}x${overlap} gradient: -size ${height}x${width_l_m_overlap} xc:black -append -rotate 90 $mask`;

# mask done, now crop on the left, use the mask

$result = `convert $pic_one -crop ${crop_ini}x${height_m_bot}+${chop}+68 $pic_inter`; # +repage $pic_BOT -append

$result = `convert $pic_inter $pic_BOT -append $pic_two`;

$result = `convert $pic_two -size ${width_r_m_overlap}x${height} xc:black +append $pic_four`;

$result = `convert $pic_four $pic_three $mask -gravity East -composite $pic_five`;

Here's the final result, and you have to look really hard to see the join.

Now of course this won't work during the daytime, because the right side of the image is frozen.