1 / 43

Reading Knot Diagrams

Reading Knot Diagrams. A Computer Vision Project By Dale Clements Advisors: Victor Milenkovic & Kenneth Baker. Knot Theory. Dr. Baker Mathematical Knots a knot is an embedding of a circle in 3-dimensional Euclidean space Closed Represented by a Knot Diagram. Knot Diagrams.

inge
Download Presentation

Reading Knot Diagrams

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Reading Knot Diagrams A Computer Vision Project By Dale Clements Advisors: Victor Milenkovic & Kenneth Baker

  2. Knot Theory • Dr. Baker • Mathematical Knots • a knot is an embedding of a circle in 3-dimensional Euclidean space • Closed • Represented by a Knot Diagram

  3. Knot Diagrams

  4. Knot Diagrams • Flat (2D) image • Represents Three Dimensions • Over/Under crossings are depth

  5. The Mission • Given: A hand-drawn diagram like this • Generate: A program-readable representation of the knot. • SnapPy • Rhino

  6. The Steps • Start by pulling out pixels that represent where the curves are. • These will be coordinates

  7. The Steps • Start by pulling out pixels that represent where the curves are. • These will be coordinates • Next connect endpoints to make a continuous knot • Because of the way knot diagrams are drawn, and jump like this represents an “under” crossing

  8. First things first – Reading the Curves • Image of a line isn’t a line • It’s a blob of pixels

  9. First things first – Reading the Curves • Image of a line isn’t a line • It’s a blob of pixels • But I just want the ones in the middle • Sequential

  10. First things first – Reading the Curves • Enter Thinning • Zhang / Suen Thinning

  11. From Zhang-Suen Thinning Paper

  12. Binary Images • Thinning and other useful algorithms can only be applied to binary images. • Usually color data of a pixel is stored ARGB • Alpha, Red, Green, Blue • (0–255, 0–255, 0–255, 0–255) • Like it sounds, Binary images just store 1 or 0

  13. BoofCV • There’s a ton of other operations that I can just use an external library for • Enter BoofCV • Computer Vision Library • Java • Well documented • BoofCV.org

  14. Several Steps to Clean Up The Image This looks pretty clean, but there’s more I need to do before I can use it

  15. Several Steps to Clean Up The Image This looks pretty clean, but there’s more I need to do before I can use it Once it’s converted to binary, you can see it’s kind of a mess.

  16. Several Steps to Clean Up The Image This looks pretty clean, but there’s more I need to do before I can use it Once it’s converted to binary, you can see it’s kind of a mess. Luckily BoofCV has an “Erode” operation. This looks like something I can try to Thin.

  17. Thinning

  18. Thinning • Came to about 200 lines of code • Took more time to implement than it should have • One source provided a false mathematical definition of “Connectivity” • After some modification, gave me exactly what I was looking for

  19. Thinning 4 3 2 1

  20. “Blobbing” • Just separates the segments • It’s a BoofCV operation on binary images

  21. “Blobbing” • Just separates the segments • It’s a BoofCV operation on binary images • But the pixels aren’t sequential from end to end. • Gradient goes from Darker Pixels = First • Lighter Pixels = Last

  22. Segments • Create Segment class • Contains a list of points • Contains a list of endpoints (size 2) • Has Endpoint subclass • Contains Parent • Neighbor • Some other things

  23. Segments Order the points from endpoint to endpoint Direction isn’t right… We need to connect endpoints

  24. Connect Segments This is the next big part of the project Two ways of comparing whether two endpoints should go together.

  25. Connect Segments • This is the next big part of the project • Two ways of comparing whether two endpoints should go together. • Proximity

  26. Connect Segments • This is the next big part of the project • Two ways of comparing whether two endpoints should go together. • Proximity • Angles

  27. Connect Segments • This is the next big part of the project • Two ways of comparing whether two endpoints should go together. • Proximity • Angles • Of course there are pros and cons to both, so I’d have to use both.

  28. Connect Segments

  29. Connect Segments

  30. Connect Segments

  31. Connect Segments

  32. Connect Segments

  33. Connect Segments

  34. Connect Segments

  35. Connect Segments

  36. Connect Segments Once all of the segments are connected, I need just need to add them to a list in the right order. I can scan through the endpoint, their neighbors, and their parent(segment) and add those segments to a list of segments in the right order.

  37. Connect Segments Once all of the segments are connected, I need just need to add them to a list in the right order. And while I do that, I sometimes need to reverse the order of points in each segment.

  38. So you do all that, what do you get? • I have a list of segments and each segment has a list of points. • When I scan through them, I have in proper order a list of coordinates that represent the curves of the knot. • Every jump from one segment to another is an “under” crossing

  39. SnapPy • Knot analysis program

  40. SnapPy

  41. SnapPy List of vertices What vertices connect to what

  42. What I can generate

  43. Future Finish writing to a SnapPy file Write to a Rhino readable file like IGES More features to make up for human error in drawing the knot Develop an Android application that uses the algorithm

More Related