Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.programming    |    Programming issues that transcend langua    |    57,431 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 56,733 of 57,431    |
|    Paul N to Malcolm McLean    |
|    Re: Simplifying wiggly paths    |
|    06 Dec 22 05:04:10    |
      From: gw7rib@aol.com              On Tuesday, December 6, 2022 at 10:52:35 AM UTC, Malcolm McLean wrote:       > I'm working on a problem where a user enters a degraded, wiggly curve (it's       actually created by tracing software from what might have been once a       rectangle, for example, but has been physically printed, then scanned, and so       on, so that there are plenty        of stray pixels picked up by the tracing software).        >        > So basically what I want to do is sample the curve at a fairly low       resolution, then re-fit it, to get rid of the noise. However I want to retain       the genuine sharp corners. So in the rectangle case, the desired output       wouldn't be a mathematical        rectangle, but it would be four clean almost straight curves, connected by       four corners of almost ninety degreees.        >        > The curve tends to go back on itself. It's like a coastline. It's easy to       pick out the real curve from the noise by eye, but harder to do it       automatically.              Would it help to assume that if the "curve" is close enough to a straight       line, then it is meant to be one, and choose the best straight line that fits?              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca