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

  • Home
  • SEARCH
  • 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 96433
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T23:48:51+00:00 2026-05-10T23:48:51+00:00

Have created a c++ implementation of the Hough transform for detecting lines in images.

  • 0

Have created a c++ implementation of the Hough transform for detecting lines in images. Found lines are represented using rho, theta, as described on wikipedia:

‘The parameter r represents the distance between the line and the origin, while θ is the angle of the vector from the origin to this closest point ‘

How can i find the intersection point in x, y space for two lines described using r, θ?

For reference here are my current functions for converting in and out of hough space:

//get 'r' (length of a line from pole (corner, 0,0, distance from center) perpendicular to a line intersecting point x,y at a given angle) given the point and the angle (in radians) inline float point2Hough(int x, int y, float theta) {     return((((float)x)*cosf(theta))+((float)y)*sinf(theta)); }  //get point y for a line at angle theta with a distance from the pole of r intersecting x? bad explanation! >_< inline float hough2Point(int x, int r, float theta) {     float y;     if(theta!=0) {             y=(-cosf(theta)/sinf(theta))*x+((float)r/sinf(theta));     } else {             y=(float)r; //wth theta may == 0?!     }     return(y); } 

sorry in advance if this is something obvious..

  • 1 1 Answer
  • 4 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. 2026-05-10T23:48:51+00:00Added an answer on May 10, 2026 at 11:48 pm

    Looking at the Wikipedia page, I see that the equation of a straight line corresponding to a given given r, θ pair is

    r = x cosθ + y sinθ 

    Thus, if I understand, given two pairs r1, θ1 and r2, θ2, to find the intersection you must solve for the unknowns x,y the following linear 2×2 system:

    x cos θ1 + y sin θ1 = r1 x cos θ2 + y sin θ2 = r2 

    that is AX = b, where

    A = [cos θ1  sin θ1]   b = |r1|   X = |x|     [cos θ2  sin θ2]       |r2|       |y| 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a suffix array using the Princeton implementation. However, my basic text
I have created my own Tree implementation for various reasons and have come up
I have a berkeley db file (*.bdb) which is created by the C implementation(python
I have created a mac application using the WebView. But issue is that webView
Here's the scenario - I have created a custom NSView subclass, and the implementation
I have created Tree with more than 1 column using TreeColumn. Right now what
I have created two classes as interface / implementation classes, and wish to pass
I have created a VSTO plugin with my own RTD implementation that I am
I have created a C++ implementation of a collection type. I would like to
I have created a smart pointer implementation as given below :: #include <iostream> #include

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.