Pattern recognition of basic shapes in Rev
bobs at twft.com
Thu Aug 19 11:44:33 EDT 2010
Given that computers are as dumb as a post and don't know anything about geometry to start with, I don't think the first example is so embarrassing after all. You have to tell the computer what each shape is before it gets smart enough to recognize it. The real difference lies in the purpose you are making the function for. If you are trying to give the user a way to hand draw standard shapes and then perfect them for him, the first method seems ideal. But if you are making a way for the user to draw complex objects with mixed curves and straight sides and what not, then the second method seems like the only way to go.
Maybe the recognition method is not granular enough. Maybe you should be thinking more like Illustrator does, with lines, curves and connection points. A subtle curve may be a shaky hand or exactly what the user wanted to draw. The difference between a perfect circle and a subtle oval would be indiscernible to a computer. How does the computer know the difference? You would have to give the user a way to choose.
Just my 2¢
On Aug 17, 2010, at 11:30 AM, Randall Reetz wrote:
> I am working on two such filters. The first is a brute force recognizer looking for matches to standard shapes (point, line, angle, triangle, rectangle, polygon, oval, conic and cylindric sections) and how closely a user drawing matches platonic forms of these (exp. right and equilateral triangles, square, right rectangle, golden rectangle, parallelogram, circle) at any rotation. The second filter is one I have been working on for 15 years and is a universal pattern engine which does the same as above but without a set of arbitrarily pre-defined target shapes. From the self-evolving AI perspective from which I work, I consider the first filter set cheating and embarrassing (but hey, it is far easier to pull off).
> By the way, anyone can copy a code library or algorithm. I am always interested in the ways different people go about solving problems like this. The way I attack a problem is by collecting salient data. What can I know about these user created polygons (number of points (or line segments), vertice angles between segments, relative segment lengths, relative distance of each vertices from the object's center of area, open or closed, etc.)? Once this data is collected and stored for all user polygons, it can be compared with the same data collected from platonic shapes.
> How would you go about solving this problem?
> On Aug 17, 2010, at 1:38 AM, David Bovill wrote:
>> Thanks Mark - great paper!
>> There does not seem to be a lot of code around - nearest I can find is
>> I'd have thought it was something built into the touch screen OS's as it is
>> kind of essential for vector graphic drawing on touch screens?
>> On 17 August 2010 04:58, AcidJazz <mpezzo at gmail.com> wrote:
>>> Here's a link to a technical article that discusses the fuzzy logic
>>> in pattern recognition of shapes. It doesn't provide the exact algorithm,
>>> but should get you a little further down the road in your search.
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode