Using a TreeMap with images
Asked Answered
I

1

2

For representing most popular artists from EchoNest API, I've been trying to set-up Silverlight Toolkit's TreeMap using images, their TreeItemDefinition.ValueBinding being defined as the area of the image.

While it mostly fills up the space when the image stretch is set to 'Fill' :

enter image description here

When setting image stretch to 'Uniform' a lot of blank spaces remain :

enter image description here

On this post, image carving is suggested : Treemapping with a given aspect ratio

How can I know which images should be carved and at what dimensions they should be carved if possible at all ?

Is this problem solvable without human intervention for a good result ?

Invoke answered 12/7, 2013 at 15:41 Comment(0)
A
0

I don't think there is a way to know which images should be carved and at what dimensions they should be carved. An ok-ish euristic might be to check if the mean energy of an image is > a certain threshold (this can be refined to check only blocks of every image, and combining the result later: if the image has blocks without details/energy, it can be carved, at least in that section).

What i think would be better is to apply seam carving to the already composed image: that will try to carve out the white outlines (adding "artificial" energy to the patches of images might lead to even better results, preserving more the shapes of each image). This paper might be of use to check out other image resizing methods too.

Adrienneadrift answered 28/2, 2022 at 11:12 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.