算法在屏幕上排列图像
我需要开始构建一个图像应用程序,我的客户希望像 google tv 和 Everpix 一样在屏幕上排列图片。我已经找了一段时间但没找到。以这种方式排列图片的结果是惊人的,并且充分利用了屏幕空间。
http://www.google.com//tv/static/images/ photos_tv_straight.png
这是已知算法吗?它有名字吗?
非常感谢 时间
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
Is this a known algorithm? Does it have a name?
Many thanks
T
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
就像 jwpat7 建议寻找“照片拼贴布局”算法。特别是像“treemap”和类似的东西(方形的 trieemap)。我正在研究类似的算法,对于一些少量的图像,您只需要求解简单的线性方程组。还有另一篇 HP 文章可能更接近您正在寻找的内容。
混合主动照片拼贴创作 - 查看部分内容4.
下图是通过一些方形树图和比例优化完成的。
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.
搜索照片蒙太奇和照片拼贴算法以及照片平铺。
一篇名为“可调整大小背景艺术的结构化布局”的 HP 文章 “可能会有帮助。
许多拼贴程序可供购买,并且一些软件以源代码形式提供;例如,请参阅 hlrnet 列表,software.informer 列表,也许还有这个调整大小 模糊。
在保持纵横比的同时缩放拼贴照片的代数对于特定情况来说是简单且容易描述的,但对于过于笼统的情况则不然。
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.
在 css 中,您可以将图像从水平到垂直排列。一个很好的例子是谷歌图像搜索。有 Jquery Masonry 插件可以从垂直到水平排列,它有一些漂亮的动画。在您的示例中,您想要有一个矩形排列,我建议使用树形图算法,您也可以将矩形旋转 90°。
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°.