Re: Pattern recognition of basic shapes in Rev

2010-08-19 Thread Randall Reetz
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
 herehttp://www.codeproject.com/KB/GDI-plus/blobby.aspx.
 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 mpe...@gmail.com wrote:
 
 
 Here's a link to a technical article that discusses the fuzzy logic
 involved
 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@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-revolution
 

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Pattern recognition of basic shapes in Rev

2010-08-19 Thread Bob Sneidar
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¢
Bob


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
 herehttp://www.codeproject.com/KB/GDI-plus/blobby.aspx.
 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 mpe...@gmail.com wrote:
 
 
 Here's a link to a technical article that discusses the fuzzy logic
 involved
 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@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-revolution
 
 
 ___
 use-revolution mailing list
 use-revolution@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-revolution

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: Pattern recognition of basic shapes in Rev

2010-08-19 Thread Randall Reetz
Yes, my code always presents a ghost shape (what the code thinks the user is 
after) sub-imposed below the user's sketch.  A key stroke tells the code if the 
user has chosen the suggested shape.  And, of course it is also reasonable to 
present platonic geometric shapes that have been roughed up a bit to look hand 
drawn (they hold their target platonic shape in custom property... screen 
rendering is skin-specific).

-Original Message-
From: Bob Sneidar b...@twft.com
Sent: Thursday, August 19, 2010 8:44 AM
To: How to use Revolution use-revolution@lists.runrev.com
Subject: Re: Pattern recognition of basic shapes in Rev

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¢
Bob


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
 herehttp://www.codeproject.com/KB/GDI-plus/blobby.aspx.
 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 mpe...@gmail.com wrote:
 
 
 Here's a link to a technical article that discusses the fuzzy logic
 involved
 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@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-revolution
 
 
 ___
 use-revolution mailing list
 use-revolution@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-revolution

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Pattern recognition of basic shapes in Rev

2010-08-19 Thread David Bovill
On 17 August 2010 19:30, Randall Reetz rlre...@gmail.com 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?


I'd Google for a library :)

But that's because it is not the problem I'm interested in, but a tool that
would improve the user experience. It's also because I'm pretty sure it's a
problem that soon will be addressed by the gesture recognition stuff in the
OS, and developing my own hack would well just be another hack.

If I were to do it now, my guess would be to avoid logical solutions based
on knowledge of geometry, and to take one of the C++ based genetic algorithm
libraries out there and train it on a set of user data. I did play with both
neural networks and GA's in MetaCard, and used some of that work in music
composition. Certainly very interesting areas - but right now I just want
the user to be able to draw polygons with their finger :)
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Pattern recognition of basic shapes in Rev

2010-08-17 Thread David Bovill
Thanks Mark - great paper!

There does not seem to be a lot of code around - nearest I can find is
herehttp://www.codeproject.com/KB/GDI-plus/blobby.aspx.
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 mpe...@gmail.com wrote:


 Here's a link to a technical article that discusses the fuzzy logic
 involved
 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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: Pattern recognition of basic shapes in Rev

2010-08-16 Thread AcidJazz


Here's a link to a technical article that discusses the fuzzy logic involved
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.  

Cheers,
  Mark

http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.37.5875rep=rep1type=pdf
-- 
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Pattern-recognition-of-basic-shapes-in-Rev-tp2325992p2327748.html
Sent from the Revolution - User mailing list archive at Nabble.com.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Pattern recognition of basic shapes in Rev

2010-08-15 Thread David Bovill
I'd like to emulate the behavior of some software which allows you to draw
rough shapes by hand and recognises whether you want to draw a circle,
triangle, rectangle etc. The tools would allow you to use the freehand pen
polygon tool to sketch and then replace the sketch with an appropriately
placed polygon or button.

The missing algorithm is one which will take an arbitrary set of poygon
points and return the recognised shape and vertices / dimensions. Any ideas
where to start?
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: Pattern recognition of basic shapes in Rev

2010-08-15 Thread Randall Reetz
Yes, the missing algorithm.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution