3

I need to start building a image application and my customer wants to arrange the picutes in the screen like google tv does, as well as everpix. I have been looking for it for a while but I was unable to find it. The result of arranging the pictures this way is amazing and makes the best use of the screen space.

http://www.google.com//tv/static/images/photos_tv_straight.png

enter image description here

Is this a known algorithm? Does it have a name?

Many thanks T

Thiago
  • 4,664
  • 10
  • 33
  • 43

3 Answers3

2

Like jwpat7 suggested look for "photo collage layout" algorithms. Particularly things like "treemap" and similar (squarified trieemap). I am working on similar algorithm and for some small number of images you just need to solve simple system of linear equations. There is another HP article that is probably more close to what are you looking for.

Mixed-Initiative Photo Collage Authoring - look at part 4.

Following image is done with some squarified treemap and ratio optimization. enter image description here

Ross
  • 1,963
  • 2
  • 21
  • 25
  • This article is great, explains a lot! Thanks Ross! – Thiago Oct 31 '11 at 18:34
  • Hi ross, I would like to know more about how to accomplish it? Since square map only take area into consideration, I am unable to keep the aspect ration of images intact while laying them out on a slide. – sudharsan tk May 11 '19 at 21:59
1

Search for photo montage and photo collage algorithms, as well as photo tiling.

An HP article called "Structured Layout for Resizable Background Art" may be helpful.

Numerous collage programs are available for purchase and some software is available in source form; e.g. see hlrnet list, software.informer list, and perhaps this resizing blurb.

The algebra for scaling photos for a collage while maintaining aspect ratios is straightforward and easily described for specific cases, but not for too-general ones.

James Waldby - jwpat7
  • 8,060
  • 2
  • 19
  • 35
  • Thats the first time I see a unfair scenario here. All three answers are great, but I can only choose one! Thanks for all answers, I definitely using all three as resources for my search! – Thiago Oct 31 '11 at 18:52
  • It's ok to vote up all of the answers that are useful to you, even if you can only mark one of them as your chosen answer! – James Waldby - jwpat7 Oct 31 '11 at 22:50
1

In css you can arrange images from horizontal to vertical. A good example is the Google image search. There is the Jquery Masonry plugin to arrange from vertical to horizontal and it has some nice animation. In your example you want to have rather a rectangle arrangement I suggest a treemap algorithm where you can also rotate the rectangle in 90°.

Gigamegs
  • 12,342
  • 7
  • 31
  • 71