Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8801643
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T00:53:14+00:00 2026-06-14T00:53:14+00:00

Given an image and a set of labels attached to particular points on the

  • 0

Given an image and a set of labels attached to particular points on the image, I’m looking for an algorithm to lay out the labels to the sides of the image with certain constraints (roughly same number of labels on each side, labels roughly equidistant, lines connecting the labels to their respective points with no lines crossing).

Now, an approximate solution can typically be found quite naively by ordering the labels by Y coordinate (of the point they refer to), as in this example (proof of concept only, please ignore accuracy or otherwise of actual data!).

Now to satisfy the condition of no crossings, some ideas that occurred to me:

  • use a genetic algorithm to find an ordering of labels with no crossovers;
  • use another method (e.g. dynamic programming algorithm) to search for such an ordering;
  • use one of the above algorithms, allowing for variations in the spacing as well as ordering, to find the solution that minimises number of crossings and variation from even spacing;
  • maybe there are criteria I can use to brute search through every possible ordering of the labels within certain criteria (do not re-order two labels if their distance is greater than X);
  • if all else fails, just try millions of random orderings/spacing offsets and take the one that gives the minimum crossings/spacing variation. (Advantage: straightforward to program and will probably find a good enough solution; slight disadvantage, though not a show-stopper: maybe can’t then run it on the fly during the application to allow user to change layout/size of the image.)

Before I embark on one of these, I would just welcome some other people’s input: has anybody else experience with a similar problem and have any information to report on the success/failure of any of the above methods, or if they have a better/simpler solution that isn’t occurring to me? Thanks for your input!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T00:53:15+00:00Added an answer on June 14, 2026 at 12:53 am

    Lucas Bradsheet’s honours thesis Labelling Maps using Multi-Objective Evolutionary Algorithms has quite a good discussion of this.

    First off, this paper creates usable metrics for a number of metrics of labelling quality.

    For example, clarity (how obvious the mapping between sites and labels was): clarity(s)=rs+rs1/rt
    where rs is the distance between a site and its label and rt is the distance between a site and there closest other label).

    It also has useful metrics for the conflicts between labels, sites and borders, as well as for measuring the density and symmetry of labels. Bradsheet then uses a multiple objective genetic algorithm to generate a “Pareto frontier” of feasible solutions. It also includes information about how he mutated the individuals, and some notes on improving the speed of the algorithm.

    There’s a lot of detail in it, and it should provide some good food for thought.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given the image below, what algorithm might I use to detect whether regions one
Having a strange issue, Image given below having size of 136x166 when I set
I need to upload a given image using Amazon S3 I have this PHP:
I have grid of images, when the mouse is over any given image a
Question: Given an image in PNG format, what is the simplest way to programmatically
I'm given an image of unknown size. I want to shrink it such that
I have given bg image for radio button. It is working in chrome but
Does anyone know how I can create a Completely transparent image or given am
Given a url to an image is there a way in Django/Python to pull
Given a URL to an image (and not the image itself), what's the most

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.