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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:04:46+00:00 2026-05-23T10:04:46+00:00

After running Canny edge detector on an image i’m getting clear lines. But the

  • 0

After running Canny edge detector on an image i’m getting clear lines. But the Hough line function seems to be missing out on pretty prominent lines when run on the Canny edgemap image.
I’m keeping only vertical and horizontal Hough lines (a tolerance of 15 degrees). Lots of extra lines are coming up but clearly visible lines bounding the rectangles are not being picked up.

Here’s the snippet:

cvCanny( img, canny, 0, 100, 3 );
lines = cvHoughLines2( canny, storage, CV_HOUGH_PROBABILISTIC, 1, CV_PI/180, 35, 20, 10 );

The main intention is to detect the rectangular boxes that denote the nodes of the linked list. However the squares.c sample program will detect only perfect rectangles, not if an arrowhead is touching the rectangle boundary.

Could you please explain the sort of changes to Hough line function which will help me get hough lines corresponding to clearly visible lines in Canny edge image?

hough

  • 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-23T10:04:47+00:00Added an answer on May 23, 2026 at 10:04 am

    (Added: a preprocessing step, suggested by shernshiou.)

    Preprocessing steps:

    1. Thresholding the image,
    2. Use connected-component
    3. From the connected-component results, detect and remove the small objects – the sets of four-digits below and in the middle of each box.

    (Remark. The thresholding step is simply a preprocessing step required by connected-component.)


    If you want to detect only perfectly horizontal and vertical lines, my suggestion is to perform horizontal and vertical edge enhancement (via convolution) before Hough transform.

    This will make the true lines more likely to “peak” in the Hough-projection, and increases the chance of the line being picked up by OpenCV.

    The steps would be:

    1. Compute Canny edge image from input
    2. Apply horizontal Sobel filtering on Canny edge image
    3. Apply Hough line detection on horizontally-enhanced edge image.
    4. Apply vertical Sobel filtering on Canny edge image. (Note: use step 1’s result, not step 2’s)
    5. Apply Hough line detection on vertically-enhanced edge image.
    6. Combine the horizontal and vertical lines and present the result.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am getting the following error after running git svn rebase: 'update-index --refresh: command
After running Code Analysis in VS2010 beta (FxCop for previous versions) I'm getting the
I got this error after running the following function: function send_buffer(){ ob_end_flush(); ob_flush(); flush();
After running the following lines : double d=Float.parseFloat(9.99); System.out.println(+d); I got this : 9.989999771118164
After running the program, Logcat shows some errors (picture). But after that program runs
I'm getting an MDA after running this code for the second time in a
After running ILDASM on two assemblies generated from identical C# code (but potentially different
I'm using Python/SQLite for accessing database. After running the query, and getting the result,
After running a insert or update query against a SQLServer 2005 database, under what
After running some usability tests, I found that participants opened a jQuery Lightbox to

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.