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 6557297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:03:22+00:00 2026-05-25T13:03:22+00:00

Intro: I’m working on an image processing task trying to find two borders of

  • 0

Intro: I’m working on an image processing task trying to find two borders of an object, which can be described by two straight line segments. I’m using some variant of the hough line transform to find line segments in the target image. There are multiple lines found by the hough transform per border of the object (sharing a very small angle) and there might be some lines found which don’t correspond to the borders of the object somewhere in the image (false positives).
Since the spatial relationship (angle) between the two borders of the object is approximately known, i figured I’d go with some kind of clustering approach to leave out the false positives and calculate the average line segment out of the multiple line segments found per border.

Approach: In order to cluster the line segments one needs to define a similarity measure for the location of each segment. I figured I’d go with a tuple of angle between two line segments and some sort of average distance between two line segments. This is also where I’m wondering what the best approach would be to compute this average distance measure.
A somewhat simple approach would be to sample each segment at discrete locations and measure the closest distance (L2) of each sampled point to the other line segment, sum the distances up and divide the sum by the number of samples. I’m sure there is a more clever way to do this, any suggestions?

Hint: I’m working in C++ with a couple of LGPL/BSD licensed toolkits (OpenCV, Boost), so somewhat special mathematical operations like integration in mathematica might be hard to implement.

  • 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-05-25T13:03:23+00:00Added an answer on May 25, 2026 at 1:03 pm

    Assuming that I understand the problem correctly, what about the following solution:
    When you have lines, maybe you could try to determine the starting point and end point of those lines. When you calculated those, you simply measure the distance of both starting points and of both end points and just calculate the average of the distances.

    I assume that you have the lines as pixel values. Start and end points could be calculated by finding the maximum and minimum values of x and y of the line’s pixels.

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

Sidebar

Related Questions

intro Hello, I'm trying to develop some plugin or / and object in javascript,
Intro In the application I 'm currently working on, there are two kinds of
Intro: I have a LinearLayout, which contains two sub LinearLayouts, like so: <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android
Intro : I'm trying to migrate our Trac SQLite to a PostgreSQL backend, to
Intro I work in a facility where we have microscopes. These guys can be
Intro I am in the process of trying to convert my first HTML/CSS design
Intro I am trying to decide how best to set up my database schema
Intro I have an object @organization that has_many :quick_facts Basically, I want to produce
I have two sound files: Sound A is an 18 second intro designed to
I'm currently trying to follow the OpenGL intro guide here . I've pulled the

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.