I have done the following with imagemagick
How can I make the transitions between the slices smooth?
and what software to use?
Thanks
I have done the following with imagemagick
How can I make the transitions between the slices smooth?
and what software to use?
Thanks
Can you redo the same and have some overlap between the slices?
I think I could do some overlap with the +smush but it will not be smoothed. What Iâd like is to fade from the slice left into the next slice
Thanks
You add some overlap, and then you add progressive opacity on the overlap on one side of the upper layer:
Here done with Gimp but if you already automated things with IM, you can probably also use it to add the progressive opacity.
I suppose you have started from about 25 photos of the same view, at different times of the day. The photos seem to be aligned geometrically, so the task is to align them colorimetrically. I suppose you have overlapping areas between the bands shown.
The clouds are a problem. You could paint them out.
Some bands are significantly lighter than the bands on both sides. I suggest a normalising process so that there is a smooth progression from one band to the next band, and the next, and so on. You might do this iteratively: adjust a band so its average lightness is the average of the neighbouring bands. Do this for all bands except the extreme left and right. Do it repeatedly until the solution stabilises.
This could be done by ârelax fillâ, aka Poisson pasting, perhaps using a 25x1 pixel image (ie one pixel per band, representing the average colour of each band). See Seamless photomontage.
On that page, see âColour-correction for panoramasâ which would give a âperfectâ gradient so band boundaries would not be visible.
The type of processing also depends on the result you want. Personally, I think the bars add to the effect, though I would want to normalize the harsher transitions.
For example, the brighter centre to right section in the sky and on the buildings is distracting. Too different from the rest of the image, which is very dark.
One approach would be to normalize each image before the splicing so that each image is around the same brightness throughout. That would help control the wacky variation. Normalization would make each image flat individually but less varied horizontally in the composite. To fix that, reverse the normalization by increasing local contrast while controlling the edges of each column.
Another approach would be the generate an HDR image where you can change the exposure gradually from left to right.
Interpolating data between images might be yet another possibility so that we end up with more than however many images you captured. We can go as far as content-aware interpolation where objects and details are tracked and re-positioned. Quite possible now that AI is more readily available.
But now, we are getting ahead of ourselves. The point is that you have to know your expectations and dream a little.
I assume there are 26 bands, of equal width. (This is false.)
Using ImageMagick, I smooth the lightness of the average of the bottom 165 pixels of each band. This avoids bias from the clouds, light buildings, orange reflections, etc.
magick ^
timelapse.jpeg ^
-crop x165+0+840 +repage ^
-crop 26x1@ +repage ^
-scale "1x1^!" ^
+append +repage ^
-colorspace Gray ^
-alpha off ^
( +clone ^
-fx "if ( i == 0 || i==25, u, (p[-1,0]+p[1,0])/2 )" ^
-fx "if ( i == 0 || i==25, u, (p[-1,0]+p[1,0])/2 )" ^
-fx "if ( i == 0 || i==25, u, (p[-1,0]+p[1,0])/2 )" ^
-fx "if ( i == 0 || i==25, u, (p[-1,0]+p[1,0])/2 )" ^
-fx "if ( i == 0 || i==25, u, (p[-1,0]+p[1,0])/2 )" ^
-fx "if ( i == 0 || i==25, u, (p[-1,0]+p[1,0])/2 )" ^
-fx "if ( i == 0 || i==25, u, (p[-1,0]+p[1,0])/2 )" ^
-fx "if ( i == 0 || i==25, u, (p[-1,0]+p[1,0])/2 )" ^
-fx "if ( i == 0 || i==25, u, (p[-1,0]+p[1,0])/2 )" ^
-fx "if ( i == 0 || i==25, u, (p[-1,0]+p[1,0])/2 )" ^
-alpha off ^
) ^
-compose DivideDst -composite ^
-scale "1502x1005^!" ^
timelapse.jpeg ^
+swap ^
-compose Multiply -composite ^
m.jpg
The result, m.jpg, is:
It looks to me like you might be trying to replicate Stephen Wilkesâ Day to Night technique. He uses way more shots to achieve them (like 2500) so the strips are narrower and have smaller time differences between them.
That is one huge wall of text!
Iâd try to use alpha mask to start from solid on the desired width to roll to transluscent on a transition width over the next slice.
The composite command seems to be able to do the trick to prepare the slices.
Itâs a bit like what @Ofnuts is suggesting.
composite -compose Dst_In \( mask.png -alpha copy \) main.png -alpha Set PNG32:result.png
I just look at that. Wow! Obviously it can be done but right now itâs way above my understanding. (Iâm an old guy messing around with bash).
Yes, âI knowâ about Stephen Wilkes. His technique is completely different.
My understanding is that he spend from 8 to 24 hours in his cherry picker with his assistant and take a photo each time he sees something interesting happening in his field of view.
Then in photoshop he brings the âmini-sceneâ by doing some masking and adding it to the final image. He did a few interviews that are on youtube.
Thatâs great for the water. Iâve another (of some building) on without any water.
How would I smooth the whole height of the strip?
Thanks
How could I do that in Darktable or ART?
Thanks
Many variations are possible. For example, we normalise using data from the top 200 rows. Instead of doing a slight smoothing, we adjust all bands to be the same lightness. The result loses the left-to-right light-to-dark graduation, so we grab that from the first and last bands, and restore that graduation at the end.
magick ^
timelapse.jpeg ^
-write mpr:INP ^
-crop x200+0+0 +repage ^
-crop 26x1@ +repage ^
-scale "1x1^!" ^
+append +repage ^
-colorspace Gray ^
-alpha off ^
( +clone ^
-scale "1x1^!" ^
-scale "26x1^!" ^
-alpha off ^
) ^
-define compose:clamp=off ^
-compose DivideDst -composite ^
-evaluate Divide %%[fx:maxima] ^
( +clone ^
-chop 24x0+1+0 +repage ^
-fx "1/u" ^
-evaluate Divide %%[fx:maxima] ^
-resize "1502x1^!" ^
-evaluate Divide %%[fx:minima] ^
-scale "1502x1005^!" ^
-write mpr:GRAD ^
+delete ^
) ^
-scale "1502x1005^!" ^
mpr:INP ^
+swap ^
-compose Multiply -composite ^
mpr:GRAD ^
-compose Multiply -composite ^
m5.jpg
The result, m5.jpg, is:
This normalises the average of the top 200 rows. If you want to normalise the entire height, remove the first -crop
.
I have used the supplied jpeg as input. We should never do this. Jpegs are only 8 bit/channel, and they are lossily compressed, so the image processing we can do without making the result really horrible is limited.
Wendy Liu said : âinstead of placing the images side by side, we let them overlap and blend them into each otherâ
blending is done by using âgrayâ mask
The Python script provided on github works well.
If you want to try it with python3 and imagemagick7, you should update the script :
//
my first test have been done using timelapses found on the web (VLC was my friend to get still images)
Iâm not an ImageMagick guy, but I tried Poisson Blending, with 27 patches, and it generates this result, which is not that bad I think:
Compared to the âno blendingâ approach:
And the âoverlap blendingâ approach :
Iâm pretty sure we can then combine the Poisson + overlap blending results to keep the correct colors while smoothing out the banding effect.
EDIT: Something that seems to work quite well : Rather than using the FFT to solve the Poisson problem in one shot (i.e. invert the Laplacian), I use several (here, 1000) gradient descent iterations, but starting from the patch-blended image.
At the end, I get a nice mix between the two approaches. Hereâs my result:
I wonder if that could do a nice GâMIC filter
OK, forget about all I said. There is so much simpler than that, using gaussian blending:
Result:
Code (GâMIC):
foo :
a z
100%,100%,1,3,"
z = lerp(0,d#0 - 1,x/(w - 1));
res = vector(#s);
sum_weights = 0;
repeat (d#0,k,
weight = gauss(k - z,3);
res+=weight*I(#0,x,y,k);
sum_weights+=weight;
);
res/sum_weights"
k.
for a guy that had never used a script gmic, what is the starting point to use your nice code?
tres beau resultat obtenu!!