Montage combined with Faded array for 20 different images - How?

Hi,
Through C19 all class photo’s are cancelled. I want to make a frivolous montage of all 4 year olds heads myself. Ideally I can use the Gmic Montage function, which is great. But what would be fantastic fun is to be able to also rotate and fade all these little heads. Now the Faded array from Gmic always takes the same image as input. Is there a way to use 20 different images?
I’m new to Gmic, but know a bit of imagemagick.

Thanks!

Hello, yes you can. Open the first image in Gimp, then say File - Open as layers and choose the other 19 pictures.

Sounds like a compositing job to me. Why not use software made for just that… Natron e.g. - you can even go one step further and animate all your merging… :wink:

Hi, Thansk for replying. Actually I have done this from the beginning. it creates a Tiling array only with one image per page or rendering. The only G’Mic filter that I have found that enables the selection of multiple images is Montage, under Arrays and Tiles.
Or, am I missing something?

Ok, I will have a look at Natron - but I have to confess I’m more of a sound person… And they need to printable :wink:
Though it would be really a lot of fun for their heads to spin about…

@dywen Welcome to the forum! Could you provide a small visual example of what you have in mind?

As it are kids photo’s I did a “simulation” with the default cat Array image. I hope you get it :smiley: arrays_cat_full_4-1
So, in this case 8 different images should “spread out”. My idea was to open the 8 images as layers and that then they are arranged in this or a similar way. At the moment I’m manually cropping their heads in circles as the images sometimes have very bad lighting, taken with a crappy camera…

1 Like

I really enjoy this simulation.

I had fun making it!!! :crazy_face: :star_struck: :star_struck: :metal:

Which is why an example is important. My question is whether this is what you are looking for or what you have come up with so far. (In the OP, you mentioned fading and rotation: what do you mean by that?) If this is the latter case, please draw a mock up of what you are hoping to achieve.

In any case, it doesn’t appear you would like to do a traditional class portrait montage.

Hi,
Good questions. It all becomes clearer working on it (in the evening, when the lovely four year old sleeps and you are too t/w/ired to work as there are still some C19 measures going on in your country).

I’m looking for several things:

  • automation to do this (because it resizes, blurs the edges and makes a pattern humans would have trouble with generating)
    I want to do this four two classes of kids → that means 2 times 23 children
  • other versions if automation with a certain playfulness and sillyness creating patterns, but keeping all sizes equal (no child should be bigger than another one)
  • more serious automation for generating a “classic class picture” of 2 times 23 children
    I think full body, with very different backgrounds and sometimes bad quality images

For the moment, I’m cropping their lovely little heads by hand in Gimp, with the ellipse tool, adding an alpha channel for transparancy.

Cat → represents child’s headcat_full_4

Now that the problem is clearly explained I am sure the community can help you.

… … … . … radio/forumsilence… . . . . . …

Now, I realized you are the OP. The effect you want is possible, and while I cannot script due to issues, I’ll tell you a pseudocode.

  1. Create edge fade within pictures.
  2. Connect each pictures by the edge. You need to find how to make it seamless. The shift is evidently dependent on column number.
  3. Blend each pictures.

Thanks @Reptorian.

@dywen People respond when they can or want to: no need to bump.

Depending on the number of portraits, the bottom right corner might have a few blank positions; in which case, you may do some creative shifting of rows as class portrait sets tend to do. The code is the general approach. Modify at your leisure. The first part repeat 9 sample portrait{$^>+1},400 done is merely used to input sample images.

gmic repeat 9 sample portrait{$>+1},400 done +gaussian. 25%,35% * [-1] remove. append_tiles 0 output montage.png

Edit The forum won’t let me insert a new sample image. Adding cut. 0,40% after +gaussian. 25%,35% would make the faces clearer. Highly recommended. In addition, since the faces are lower in this example (or rather, some folks have longer faces and pointier chins), perhaps we should lower the oval mask a bit (for some of them) as well.

1 Like

Close. All one need to do is create a copy of that, apply alpha threshold where every alpha value less than max alpha becomes zero, solidify the background, and them blend the background. I think the OP can figure this out.

Hi, yes I know about forum speeds and generally am a patient person, however, school ends on Tuesday and it already took me more than 2 weeks to get all the images and a colour coded spreadsheet… :sweat:
So, great thanks in taking this up :+1:

I may make a filter for the plugin later.

Instructions Below is sample code. To use it, replace 9 sample portrait{$>+1},400 with $! and specify your inputs before repeat. Hint .49 is radius size and 230,255,230 background colour.

gmic repeat 9 sample portrait{$>+1},400 local[$>] +fill. 1 +circle. 50%,50%,{min(w,h)*.49} normalize[0,1] 0,255 -[1] 1 blend_fade[0,1] . keep[0] endlocal done append_tiles 0 replace_color 0,0,-1,-1,-1,230,255,230 output montage-2.png

1 Like

Nice result!
→ So I run the following in the terminal?
gmic 23 repeat !$ local[$^>] +fill. 1 +circle. 50%,50%,{min(w,h)*.49} normalize 0,255 -[1] 1 blend_fade[0,1] . keep[0] endlocal done append_tiles 0 replace_color 0,0,-1,-1,-1,230,255,230 output montage-2.png

→ This gives me bash: syntax error near unexpected token ('`
hmmm

The reason for your error is that you have two typos in your command line.

1 !$ should be $!.

2 Since you use bash, you shouldn’t be using the Windows ^ escape. Change local[$^>] to local[$>]. I edited my previous post but you didn’t catch it.

Bonus If your images are in the same format or from the same location, you may use input_glob to input them; e.g. input_glob *.jpg to input all the JPGs from your current directory. Of course, there is more to globbing than that.

People are busy. I tend to give fairly complete help but I haven’t had the time or energy recently.

1 Like