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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:01:35+00:00 2026-05-25T22:01:35+00:00

i’m working with a hough transform (polar coordinates). i’d like to compute a vector

  • 0

i’m working with a hough transform (polar coordinates). i’d like to compute a vector representation of a line from a coordinate from the hough transform.

my current implementation loops through all the pixel coordinates in the image from (0,0) to (M, N) where M and N are the size of the image. as the loop traverses the space, this value is computed:

// angle and rho are the polar coordinates from hough space.

tmp = (int) ( (i * cos( angle ) ) + ( j * sin(angle) ) );

where tmp – rho == 0, is part of the line, so i track that position. when the loop reaches the end of the image (i,j) == (M,N), the loop is done again from the opposite direction (M, N) to (0,0).

the first (tmp-rho == 0) going left to right and the second (tmp-rho == 0) going right to left are the coordinates of the line. i then subtract those pixel coordinates to get a vector of the line in the hough space.

this is terribly inefficient (slow) and i’m 100% sure there’s a better way to compute this but, i can’t seem to figure it out. any help would be greatly appreciated!

  • 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-25T22:01:35+00:00Added an answer on May 25, 2026 at 10:01 pm

    You can solve your equation for i=0, i=M, j=0, j=N instead of looping

    rho = i * cos(angle) + j * sin(angle)
    
    i = 0 --> j1 = rho / sin(angle)
    i = M --> j2 = (rho - M*cos(angle)) / sin(angle)
    j = 0 --> i1 = rho / cos(angle)
    j = N --> i2 = (rho - N*sin(angle)) / cos(angle)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I would like to count the length of a string with PHP. The string
I've got a string that has curly quotes in it. I'd like to replace
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

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.