Results 1 to 2 of 2

Math Help - Distinguish if a line is almost straight or a curve

  1. #1
    Newbie
    Joined
    Jan 2013
    From
    Cyprus
    Posts
    1

    Question Distinguish if a line is almost straight or a curve

    Hello people,
    I am a computer science student I am trying to find a way to distinguish the shape between lines in a program I am developing. For example, in the image below the connected pixels represent lines. The two colours, white and yellow, are used in this example to depict which lines need to be considered as straight lines and which as curves. After making this distinction, the "curved lines" will be erased. Can anyone help me in archiving this?

    Distinguish if a line is almost straight or a curve-lines.png

    Thank you
    Attached Thumbnails Attached Thumbnails Distinguish if a line is almost straight or a curve-lines.png  
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Senior Member
    Joined
    Aug 2011
    Posts
    250
    Thanks
    60

    Re: Distinguish if a line is almost straight or a curve

    Hello,

    I suggest to begin with a crude distinction :
    - Define a system of axes in order to compute the (x,y) coordinates of the pixels of the line.
    - Perform an orthogonal linear regression, i.e. perpendicular offsets (not a common regression) Refences below.
    - Compute the mean squares of the orthogonal distances.
    - Standardize the mean sq. versus the extend of the data.
    - Compare the standardised mean sq. to a threshold (previously experimentaly chosen) in order to qualify the line.

    The orthogonal regression can be done thanks to the "principal components analysis" method :
    Principal component analysis - Wikipedia, the free encyclopedia
    or alternatively, thanks to the formulas given §.3.3, page 8, in the pdf "Régressions Conique, Quadrique, Circulaire, Sphérique,..." published on :
    JJacquelin's Documents | Scribd
    Last edited by JJacquelin; January 15th 2013 at 05:22 AM.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Getting an angle from a curve and a straight line
    Posted in the Trigonometry Forum
    Replies: 6
    Last Post: December 23rd 2011, 11:24 AM
  2. [SOLVED] Line Integral along a straight line.
    Posted in the Calculus Forum
    Replies: 1
    Last Post: April 11th 2011, 08:18 PM
  3. Replies: 18
    Last Post: October 17th 2010, 09:33 AM
  4. straight line
    Posted in the Pre-Calculus Forum
    Replies: 4
    Last Post: November 30th 2009, 01:58 PM
  5. straight line help!!!
    Posted in the Algebra Forum
    Replies: 1
    Last Post: October 20th 2008, 09:53 AM

Search Tags


/mathhelpforum @mathhelpforum