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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:25:30+00:00 2026-05-29T09:25:30+00:00

I am doing project on image processing (molecule identification in an image and drawing

  • 0

I am doing project on image processing (molecule identification in an image and drawing those molecules in an editor). So want help in identifying, which algorithm can be used to detect the objects like lines, curves, bifurcations and characters in an image.

Yes, canny’s algorithm detects the edges in image. But to draw these edges in an editor I want the end points(pixel values) of these edges. So how the canny’s algorithm will be helpful to do so? or are there any algorithms for recognising these end points of lines?

Sample image as follows

enter image description here

  • 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-29T09:25:31+00:00Added an answer on May 29, 2026 at 9:25 am

    As gcalmettes has already noted, Hough can detect lines. You are looking for line segments, though, which is a slight wrinkle to the standard algorithm.

    Another option is the RANSAC algorithm, which is worth studying since it follows a quite different approach:

    http://en.wikipedia.org/wiki/RANSAC

    The Hough technique can also be used to find circles. For curves fitting you can use spline fitting techniques or sometimes even polynomial fits, although the latter tend to be less useful for real-world image analysis.

    You’ll have to be careful with skeletonization / thinning (or a medial axis transform), because thinning will tend to yield undesirable curves around 3-way intersections such as the two T-intersections in the character “H”. Thinning algorithms can be fast, though. Check out the implementations of Stentiford and Zhang-Suen thinning algorithms in WinTopo, an app for raster-to-vector conversion (i.e. pixels to curves):

    http://wintopo.com/

    In your sample image there are several examples of 2-way and 3-way intersections of known, fixed angle. If you study corner detection a bit, you should see how to extend it to detecting intersections for fixed angles.

    http://en.wikipedia.org/wiki/Corner_detection

    If the size of the characters and figures in the images are constant–for example, if the “H” is always 40 pixels tall–then template matching could be used to find just about any pattern. (Search for the term “normalized cross-correlation”, though the Wikipedia entry may not be all that helpful.)

    http://en.wikipedia.org/wiki/Template_matching

    Briefly put, if the features in the image will be a constant size, you can create a template (something like a mask or a stencil) that matches the light/dark pattern of the object to be identified. Template matching is relatively easy to implement and debug, and is a bit more intuitive than Hough.

    In simple terms, imagine that you would assign every black pixel to a value of 0 (an absence of reflection) and every white pixel a value of 1 (total reflection). To find a 3 x 3 unfilled black square, you would create a template like this:

    1 1 1 1 1
    1 0 0 0 1
    1 0 1 0 1
    1 0 0 0 1
    1 1 1 1 1
    

    You then check this template for matches in the original image. You have a match if all white pixels in the template match white pixels in the image, and all black pixels in the template match black pixels in the image.

    To match a small hexagon for your benzene ring (or whatever it is), you could have a template like this:

    1 1 0 1 1 
    1 0 1 0 1 
    0 1 1 1 0 
    0 1 1 1 0 
    0 1 1 1 0 
    1 0 1 0 1 
    1 1 0 1 1 
    

    That’s not quite the right shape since the angles won’t be 45 degrees.

    You won’t get a perfect match for a template in some cases because other figures such as line segments, circles, and characters intrude in the rectangle circumscribing any particular feature you want to find. Rather than a perfect match, you can require that 90% or more of all pixels in the template match. The “normalized” part of “normalize cross-correlation” makes the template more robust under changes in contrast: for example, your image might be dark gray figures on a light gray background rather than black figures on a white background.

    After examining the various combinations of different figures, you can identify certain elements in the 2D template as “don’t care”, meaning the element can be either black or white. Since you can have line segments representing bonds at the corners of the hexagon, you have some good candidates for “don’t care” pixels.

    The “don’t care” pixels below are marked with X. Identifying which elements in the template can be “don’t care” pixels takes some tinkering and tweaking.

    X 1 0 1 X 
    1 0 1 0 1 
    0 1 1 1 0 
    0 1 X 1 0 
    0 1 1 1 0 
    1 0 1 0 1 
    X 1 0 1 X 
    

    There are certainly more complicated ways to find various figures, but I recommend the simplest approaches first in case they work. Hough and RANSAC techniques can be generalized to find just about anything, but the implementation can be tricky.

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

Sidebar

Related Questions

I am doing image processing in my project so I need to calculate the
Now a day i am doing a project related to image processing with the
I am doing a project in 'Steganography' in which I want to encrypt the
I am very new to grails.I am doing one sample project for image uploading
I am doing a project where I want a person to enter the name
For my project i am writing an image pre processing library for scanned documents.
I have a specific project in which I want to use either a scripting
I'm doing project in OpenCV on object detection which consists of matching the object
Doing a project in win32 in c++, attempting to double buffer the image being
I'm creating a map editor for a little game project that I'm doing. Considering

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.