Harnessing the Power of AI with Windows Ink
Harnessing the Power of AI with Windows Ink
Harnessing the Power of AI with Windows Ink
type this
3D in
Windows 10
Windows Ink
Microsoft
Edge
Faster to
done
Microsoft
Office
Cortana
More creative, more productive
3rd
in purchase intent
212m
U.S. adults use
analog or digital
pen
Processor/Ram/Storage
Battery Life
Pen
Switch Storage
from HDD to SSD
Increase screen resolution
Windows Hello
2-in-1 purchase intent when shown new scenarios
3D in
Windows 10
Windows Ink
Microsoft
Edge
Faster to
done
Microsoft
Office
Cortana
More creative, more productive
3rd
in purchase intent
212m
U.S. adults use
analog or digital
pen
10x
more pen enabled
devices than iOS
or Android
2x
More pen devices
year over year
2x
More user
engagement year
over year
8pts
higher average
NPS scores for
pen attached
systems
60%
Top 10 revenue
producing apps
use Windows Ink
50%
More apps using
Windows Ink in
Windows Store
Simple
Natural
Powerful
Differentiated
Intelligent
Harnessing the Power of AI with Windows Ink
UWP and Win32
The Windows Ink Platform
Low Level
APIs / Engine
Controls
HID
Hardware
Pointer (PointerPoint, WM_Pointer)
Radial
Controller
DirectInk
Ink Presenter
Rendering InkStrokeContainer
Low Latency
Beautiful Ink
Core WetStroke
Update Source
Custom Dry
Built-in Brushes
and Drawing
Attributes
Acceleration
Off-thread Input
Stroke Creation
Prediction
Smoothing
XAML Controls
InkCanvas InkToolbar TextBox
SmartInk
InkAnalysis Local
Ink Classification
Layout Analysis
Handwriting
Recognition
Shape Recognition
InkAnalysis Cloud
Ink Classification
Layout Analysis
Handwriting
Recognition
Shape Recognition
Cloud Service
APIs
UWP and Win32
The Windows Ink Platform
Low Level
APIs / Engine
HID
Hardware
Pointer (PointerPoint, WM_Pointer)
Radial
Controller
DirectInk
Ink Presenter
Rendering InkStrokeContainer
Low Latency
Beautiful Ink
Core WetStroke
Update Source
Custom Dry
Built-in Brushes
and Drawing
Attributes
Acceleration
Off-thread Input
Stroke Creation
Prediction
Smoothing
SmartInk
InkAnalysis Local
Ink Classification
Layout Analysis
Handwriting
Recognition
Shape Recognition
InkAnalysis Cloud
Ink Classification
Layout Analysis
Handwriting
Recognition
Shape Recognition
Cloud Service
APIs
Controls
XAML Controls
InkCanvas InkToolbar TextBox
<InkCanvas x:Name=“m_inkCanvas”/>
<InkToolbar TargetInkCanvas=“{x:Bind m_inkCanvas}”/>
XAML Ink Canvas
XAML Ink Toolbar
RichEditBoxTextBox AutoSuggestBox
Delete Words
Delete Lines
Insert words
into a sentence
Join two words
Add a new line
Overwrite Words
UWP and Win32
The Windows Ink Platform
Low Level
APIs / Engine
HID
Hardware
Pointer (PointerPoint, WM_Pointer)
Radial
Controller
SmartInk
InkAnalysis Local
Ink Classification
Layout Analysis
Handwriting
Recognition
Shape Recognition
InkAnalysis Cloud
Ink Classification
Layout Analysis
Handwriting
Recognition
Shape Recognition
Cloud Service
APIs
Controls
XAML Controls
InkCanvas InkToolbar TextBox
DirectInk
Ink Presenter
Rendering InkStrokeContainer
Low Latency
Beautiful Ink
Core WetStroke
Update Source
Custom Dry
Built-in Brushes
and Drawing
Attributes
Acceleration
Off-thread Input
Stroke Creation
Prediction
Smoothing
• Ballpoint Pen
• Highlighter
• Tilt Pencil
Model how analog pencil works
Natural pencil inking – dynamic range, layering
• Erasing
Stroke erase – erases full stroke
Erase all
• Stencils
Built-in Brushes and Erasing
Pen Hardware & Ecosystem Update
Ink Acceleration
 Using GPU preemption, Windows no longer has to
wait for the next scanout to get ink on the screen.
Microsoft Pen Program
Microsoft Pen
UWP and Win32
The Windows Ink Platform
Low Level
APIs / Engine
HID
Hardware
Pointer (PointerPoint, WM_Pointer)
Radial
Controller
Controls
XAML Controls
InkCanvas InkToolbar TextBox
DirectInk
Ink Presenter
Rendering InkStrokeContainer
Low Latency
Beautiful Ink
Core WetStroke
Update Source
Custom Dry
Built-in Brushes
and Drawing
Attributes
Acceleration
Off-thread Input
Stroke Creation
Prediction
Smoothing
SmartInk
InkAnalysis Local
Ink Classification
Layout Analysis
Handwriting
Recognition
Shape Recognition
InkAnalysis Cloud
Ink Classification
Layout Analysis
Handwriting
Recognition
Shape Recognition
Cloud Service
APIs
Harnessing the Power of AI with Windows Ink
Ink Analysis
Root
WritingRegion Drawing Drawing DrawingWritingRegion … …
ListItem x2Line
Line
InkWord InkWord
InkWord InkWord
…
…
InkBullet
Paragraph
For Each Text Node
• RecognizedText – The string representing the recognized text in the node
Note: Line, ListItem, and Paragraph nodes also have a RecognizedText property
• TextAlternates – The list of alternates for the recognized text
• Understand slanted text via RotatedBoundingRect
Text Recognition
Avani hello, halo, hollo
Shape Recognition
Triangles Equilateral
Triangles
Isosceles
Triangles
Right
Triangles
Squares Rectangles Diamonds Quadrilaterals Parallelograms
TrapezoidsPentagons Hexagons Circles Ellipses
Ink
Drawing
Microsoft Confidential
Demo - InkEditor
Important InkAnalysis Concepts and Tips
Microsoft Confidential
Stateless Ink Analysis
Find the nodes
you’re
interested in
Extract strokes
Send to
InkAnalyzer
Analyze the
strokes
Do cool stuff
var inkAnalyzer = new InkAnalyzer();
private async void AnalyzeButton_Clicked(object sender, RoutedEventArgs e)
{
if (!inkAnalyzer.IsAnalyzing)
{
inkAnalyzer.ClearDataForStrokes(strokes);
var strokes = inkCanvas.InkPresenter.StrokeContainer.GetStrokes();
inkAnalyzer.AddDataForStrokes(strokes);
var results = await inkAnalyzer.AnalyzeAsync();
}
}
Microsoft Confidential
Stateful (Incremental) Ink Analysis
Find the nodes
you’re
interested in
Strokes
changed
Update
InkAnalyzer
Analyze the
strokes
Do cool stuff
private void
InkPresenter_StrokesCollected(InkPresenter sender, InkStrokesCollectedEventArgs args)
{
inkAnalyzer.AddDataForStrokes(args.Strokes);
}
private void
InkPresenter_StrokesEraseded(InkPresenter sender, InkStrokesErasedEventArgs args)
{
foreach (var stroke in args.Strokes)
{
inkAnalyzer.RemoveDataForStroke(stroke.Id);
}
}
Microsoft Confidential
Stateful (Incremental) Ink Analysis
Find the nodes
you’re
interested in
Strokes
changed
Update
InkAnalyzer
Analyze the
strokes
Do cool stuff
private void StrokesUpdated(IReadOnlyList<uint> updatedStrokeIds)
{
var strokeContainer = inkCanvas.InkPresenter.StrokeContainer;
foreach(var id in updatedStrokeIds)
{
inkAnalyzer.ReplaceDataForStroke(strokeContainer.GetStrokeById(id));
}
}
private async void AnalyzeButton_Clicked(object sender, RoutedEventArgs e)
{
if (!inkAnalyzer.IsAnalyzing)
{
var results = await inkAnalyzer.AnalyzeAsync();
}
}
Microsoft Confidential
var results = await _inkAnalyzer.AnalyzeAsync();
var root = inkAnalyzer.AnalysisRoot;
// Query for particular node kind
var drawings = root.FindNodes(InkAnalysisNodeKind.InkDrawing);
var paragraphs = root.FindNodes(InkAnalysisNodeKind.Paragraph);
var words = root.FindNodes(InkAnalysisNodeKind.InkWord);
// Document tree traversal
foreach (var paragraph in writingRegion.Children) {…}
foreach (var word in line.Children) {…}
var line = word.Parent;
Query Document Structure
Find the nodes
you’re
interested in
Strokes
changed
Update
InkAnalyzer
Analyze the
strokes
Do cool stuff
Microsoft Confidential
var results = await _inkAnalyzer.AnalyzeAsync();
var root = inkAnalyzer.AnalysisRoot;
var drawings = root.FindNodes(InkAnalysisNodeKind.InkDrawing);
foreach (var drawing in drawings)
{
var shape = drawing as InkAnalysisInkDrawing;
if(shape.DrawingKind == InkAnalysisDrawingKind.Circle)
{
convertInkToXAMLShape(shape);
var strokeIds = shape.GetStrokeIds();
inkAnalyzer.removeDataForStrokes(strokeIds);
foreach(var id in strokeIds)
{
strokeContainer.GetStrokeById(id).Selected = true;
}
strokeContainer.DeleteSelected();
}
}
Mapping between strokes and
InkAnalysisNode
Microsoft Confidential
Use Prior Knowledge
Find the nodes
you’re
interested in
Strokes
changed
Update
InkAnalyzer
Analyze the
strokes
Do cool stuff
private void
InkPresenter_StrokesCollected(InkPresenter sender, InkStrokesCollectedEventArgs args)
{
inkAnalyzer.AddDataForStrokes(args.Strokes);
foreach (var stroke in args.Strokes)
{
inkAnalyzer.SetStrokeDataKind(stroke.Id, InkAnalysisStrokeKind.Writing);
//inkAnalyzer.SetStrokeDataKind(stroke.Id, InkAnalysisStrokeKind.Drawing);
}
}
Harnessing the Power of AI with Windows Ink
Harnessing the Power of AI with Windows Ink
Microsoft Confidential
Cloud Service For Smart Ink
Consistent Ink Recognition Experience
Across Devices and Platforms
Faster and Frequent Improvements to the
core recognition capabilities
Personalized Recognition with the
Microsoft Cloud and Microsoft Graph
Compute Power for larger ML models for
better accuracy
Microsoft Confidential
Reachouttous!
• Learn more:
• aka.ms/WindowsInkSample
• aka.ms/DigitalInkBlog
• aka.ms/WinHEC2017
• aka.ms/InputScope
• aka.ms/InkPresenterClass
• aka.ms/HandwritingView
• Code Samples
• aka.ms/SimpleInkSample
• aka.ms/ComplexInkSample
• aka.ms/InkAnalysisSample
Interested in being a co-engineering
partner for our cloud solution, or have an
ink related question for the team? Contact
us here:
WindowsInk@Microsoft.com
Follow us on Twitter for the latest ink and
pen news from our team!
Twitter: WindowsInk
Harnessing the Power of AI with Windows Ink
Harnessing the Power of AI with Windows Ink
Harnessing the Power of AI with Windows Ink

More Related Content

PPT
Exploring Ink Analysis
PPT
Tablet PC as Pretty Cool Smart Client Platform
PDF
Next Generation LOB (Line of Business) Applications
PDF
Samsung SG - Samsung Mobile SDK
PDF
Androidmeetup sg
PDF
Ary Mouse for Image Processing
PDF
Ary Mouse for Image Processing
PPTX
Coding Like the Wind - Tips and Tricks for the Microsoft Visual Studio 2012 C...
Exploring Ink Analysis
Tablet PC as Pretty Cool Smart Client Platform
Next Generation LOB (Line of Business) Applications
Samsung SG - Samsung Mobile SDK
Androidmeetup sg
Ary Mouse for Image Processing
Ary Mouse for Image Processing
Coding Like the Wind - Tips and Tricks for the Microsoft Visual Studio 2012 C...

Similar to Harnessing the Power of AI with Windows Ink (20)

PPTX
15 sensors and proximity nfc and bluetooth
PPTX
Wpf Tech Overview2009
PPT
Building_The_Next-Generation_UI - Multitouch and Ribbon
PPT
Developing Multi Touch Applications
PDF
Luidia eBeam Interact Features VG
PDF
Redefining Mobile Graphics Stack
PPTX
ArcReady - Architecting For The Client Tier
PPTX
Deeper into Windows 10 Development
PPTX
微软客户端技术纵览
PDF
ITCamp 2011 - Raul Andrisan - What’s new in Silverlight 5
PDF
Designing Apps for Intel RealSense Technology
PDF
SmartBoard, the Internet, & MS Office
PPTX
Rapidly Construct LOB Applications with UWP and Visual Studio 2017
PPTX
Yahoo! On Microsoft .NET 3.0 and Microsoft Expression
PPT
InkSeine: In Situ Search for Active Note Taking
PPTX
PDF
QBS Visual Studio 2012 and modern windows apps
PDF
MIX11アップデート ~Windows Phone 7, Silverlight 5, IE9, HTML5~ 前編
PPTX
Lessons Learned: Designer/Developer Productivity in Windows Presentation Foun...
PDF
Windows 10 Hybrid Development
15 sensors and proximity nfc and bluetooth
Wpf Tech Overview2009
Building_The_Next-Generation_UI - Multitouch and Ribbon
Developing Multi Touch Applications
Luidia eBeam Interact Features VG
Redefining Mobile Graphics Stack
ArcReady - Architecting For The Client Tier
Deeper into Windows 10 Development
微软客户端技术纵览
ITCamp 2011 - Raul Andrisan - What’s new in Silverlight 5
Designing Apps for Intel RealSense Technology
SmartBoard, the Internet, & MS Office
Rapidly Construct LOB Applications with UWP and Visual Studio 2017
Yahoo! On Microsoft .NET 3.0 and Microsoft Expression
InkSeine: In Situ Search for Active Note Taking
QBS Visual Studio 2012 and modern windows apps
MIX11アップデート ~Windows Phone 7, Silverlight 5, IE9, HTML5~ 前編
Lessons Learned: Designer/Developer Productivity in Windows Presentation Foun...
Windows 10 Hybrid Development
Ad

More from Windows Developer (20)

PPTX
Our Fluent Path to Spatial Computing: Easy as 1-2D-3D
PPTX
Fluent Design System inside of Microsoft: Office
PPTX
Building powerful desktop and MR applications with new windowing apis
PPTX
Creating Innovative Experiences for Fluent Design using the Visual Layer
PPTX
Modernizing Desktop Apps on Windows 10
PPTX
How Simplygon helped Remix become platform independent
PPTX
Technical deep dive into creating the “Solutions Showcase for Mixed Reality” ...
PPTX
Developing for Sets on Windows 10
PPTX
Data-Driven and User-Centric: Improving enterprise productivity and engagemen...
PPTX
Drive user reengagement across all your Windows, Android, and iOS with Micros...
PPTX
Fluent Design: Evolving our Design System
PPTX
Seizing the Mixed Reality Revolution – A past, present and future Mixed Reali...
PPTX
Windows 10 on ARM for developers
PPTX
Building Mixed reality with the new capabilities in Unity
PPTX
Set up a windows dev environment that feels like $HOME
PPTX
Modernizing Twitter for Windows as a Progressive Web App
PPTX
Holograms for trade education, built for students, by students with Immersive...
PPTX
Designing Inclusive Experiences to Maximize Reach and Satisfaction
PPTX
Cboard: A Progressive Web App for Everyone
PPTX
Turn good code into a great business
Our Fluent Path to Spatial Computing: Easy as 1-2D-3D
Fluent Design System inside of Microsoft: Office
Building powerful desktop and MR applications with new windowing apis
Creating Innovative Experiences for Fluent Design using the Visual Layer
Modernizing Desktop Apps on Windows 10
How Simplygon helped Remix become platform independent
Technical deep dive into creating the “Solutions Showcase for Mixed Reality” ...
Developing for Sets on Windows 10
Data-Driven and User-Centric: Improving enterprise productivity and engagemen...
Drive user reengagement across all your Windows, Android, and iOS with Micros...
Fluent Design: Evolving our Design System
Seizing the Mixed Reality Revolution – A past, present and future Mixed Reali...
Windows 10 on ARM for developers
Building Mixed reality with the new capabilities in Unity
Set up a windows dev environment that feels like $HOME
Modernizing Twitter for Windows as a Progressive Web App
Holograms for trade education, built for students, by students with Immersive...
Designing Inclusive Experiences to Maximize Reach and Satisfaction
Cboard: A Progressive Web App for Everyone
Turn good code into a great business
Ad

Recently uploaded (20)

PPTX
Module 1 Introduction to Web Programming .pptx
PDF
A review of recent deep learning applications in wood surface defect identifi...
PDF
Enhancing plagiarism detection using data pre-processing and machine learning...
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PPTX
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
PDF
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
PDF
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
PDF
The influence of sentiment analysis in enhancing early warning system model f...
PDF
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PPTX
Microsoft Excel 365/2024 Beginner's training
DOCX
Basics of Cloud Computing - Cloud Ecosystem
PDF
Flame analysis and combustion estimation using large language and vision assi...
PPT
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
PPTX
TEXTILE technology diploma scope and career opportunities
PDF
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
PDF
sbt 2.0: go big (Scala Days 2025 edition)
PPTX
Configure Apache Mutual Authentication
PPTX
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
PDF
Transform-Your-Factory-with-AI-Driven-Quality-Engineering.pdf
Module 1 Introduction to Web Programming .pptx
A review of recent deep learning applications in wood surface defect identifi...
Enhancing plagiarism detection using data pre-processing and machine learning...
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
The influence of sentiment analysis in enhancing early warning system model f...
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
Taming the Chaos: How to Turn Unstructured Data into Decisions
Microsoft Excel 365/2024 Beginner's training
Basics of Cloud Computing - Cloud Ecosystem
Flame analysis and combustion estimation using large language and vision assi...
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
TEXTILE technology diploma scope and career opportunities
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
sbt 2.0: go big (Scala Days 2025 edition)
Configure Apache Mutual Authentication
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
Transform-Your-Factory-with-AI-Driven-Quality-Engineering.pdf

Harnessing the Power of AI with Windows Ink

  • 5. 3D in Windows 10 Windows Ink Microsoft Edge Faster to done Microsoft Office Cortana More creative, more productive 3rd in purchase intent 212m U.S. adults use analog or digital pen Processor/Ram/Storage Battery Life Pen Switch Storage from HDD to SSD Increase screen resolution Windows Hello 2-in-1 purchase intent when shown new scenarios
  • 6. 3D in Windows 10 Windows Ink Microsoft Edge Faster to done Microsoft Office Cortana More creative, more productive 3rd in purchase intent 212m U.S. adults use analog or digital pen 10x more pen enabled devices than iOS or Android 2x More pen devices year over year 2x More user engagement year over year 8pts higher average NPS scores for pen attached systems 60% Top 10 revenue producing apps use Windows Ink 50% More apps using Windows Ink in Windows Store
  • 9. UWP and Win32 The Windows Ink Platform Low Level APIs / Engine Controls HID Hardware Pointer (PointerPoint, WM_Pointer) Radial Controller DirectInk Ink Presenter Rendering InkStrokeContainer Low Latency Beautiful Ink Core WetStroke Update Source Custom Dry Built-in Brushes and Drawing Attributes Acceleration Off-thread Input Stroke Creation Prediction Smoothing XAML Controls InkCanvas InkToolbar TextBox SmartInk InkAnalysis Local Ink Classification Layout Analysis Handwriting Recognition Shape Recognition InkAnalysis Cloud Ink Classification Layout Analysis Handwriting Recognition Shape Recognition Cloud Service APIs
  • 10. UWP and Win32 The Windows Ink Platform Low Level APIs / Engine HID Hardware Pointer (PointerPoint, WM_Pointer) Radial Controller DirectInk Ink Presenter Rendering InkStrokeContainer Low Latency Beautiful Ink Core WetStroke Update Source Custom Dry Built-in Brushes and Drawing Attributes Acceleration Off-thread Input Stroke Creation Prediction Smoothing SmartInk InkAnalysis Local Ink Classification Layout Analysis Handwriting Recognition Shape Recognition InkAnalysis Cloud Ink Classification Layout Analysis Handwriting Recognition Shape Recognition Cloud Service APIs Controls XAML Controls InkCanvas InkToolbar TextBox
  • 11. <InkCanvas x:Name=“m_inkCanvas”/> <InkToolbar TargetInkCanvas=“{x:Bind m_inkCanvas}”/> XAML Ink Canvas XAML Ink Toolbar
  • 13. Delete Words Delete Lines Insert words into a sentence Join two words Add a new line Overwrite Words
  • 14. UWP and Win32 The Windows Ink Platform Low Level APIs / Engine HID Hardware Pointer (PointerPoint, WM_Pointer) Radial Controller SmartInk InkAnalysis Local Ink Classification Layout Analysis Handwriting Recognition Shape Recognition InkAnalysis Cloud Ink Classification Layout Analysis Handwriting Recognition Shape Recognition Cloud Service APIs Controls XAML Controls InkCanvas InkToolbar TextBox DirectInk Ink Presenter Rendering InkStrokeContainer Low Latency Beautiful Ink Core WetStroke Update Source Custom Dry Built-in Brushes and Drawing Attributes Acceleration Off-thread Input Stroke Creation Prediction Smoothing
  • 15. • Ballpoint Pen • Highlighter • Tilt Pencil Model how analog pencil works Natural pencil inking – dynamic range, layering • Erasing Stroke erase – erases full stroke Erase all • Stencils Built-in Brushes and Erasing
  • 16. Pen Hardware & Ecosystem Update Ink Acceleration  Using GPU preemption, Windows no longer has to wait for the next scanout to get ink on the screen. Microsoft Pen Program Microsoft Pen
  • 17. UWP and Win32 The Windows Ink Platform Low Level APIs / Engine HID Hardware Pointer (PointerPoint, WM_Pointer) Radial Controller Controls XAML Controls InkCanvas InkToolbar TextBox DirectInk Ink Presenter Rendering InkStrokeContainer Low Latency Beautiful Ink Core WetStroke Update Source Custom Dry Built-in Brushes and Drawing Attributes Acceleration Off-thread Input Stroke Creation Prediction Smoothing SmartInk InkAnalysis Local Ink Classification Layout Analysis Handwriting Recognition Shape Recognition InkAnalysis Cloud Ink Classification Layout Analysis Handwriting Recognition Shape Recognition Cloud Service APIs
  • 19. Ink Analysis Root WritingRegion Drawing Drawing DrawingWritingRegion … … ListItem x2Line Line InkWord InkWord InkWord InkWord … … InkBullet Paragraph
  • 20. For Each Text Node • RecognizedText – The string representing the recognized text in the node Note: Line, ListItem, and Paragraph nodes also have a RecognizedText property • TextAlternates – The list of alternates for the recognized text • Understand slanted text via RotatedBoundingRect Text Recognition Avani hello, halo, hollo
  • 21. Shape Recognition Triangles Equilateral Triangles Isosceles Triangles Right Triangles Squares Rectangles Diamonds Quadrilaterals Parallelograms TrapezoidsPentagons Hexagons Circles Ellipses Ink Drawing
  • 24. Microsoft Confidential Stateless Ink Analysis Find the nodes you’re interested in Extract strokes Send to InkAnalyzer Analyze the strokes Do cool stuff var inkAnalyzer = new InkAnalyzer(); private async void AnalyzeButton_Clicked(object sender, RoutedEventArgs e) { if (!inkAnalyzer.IsAnalyzing) { inkAnalyzer.ClearDataForStrokes(strokes); var strokes = inkCanvas.InkPresenter.StrokeContainer.GetStrokes(); inkAnalyzer.AddDataForStrokes(strokes); var results = await inkAnalyzer.AnalyzeAsync(); } }
  • 25. Microsoft Confidential Stateful (Incremental) Ink Analysis Find the nodes you’re interested in Strokes changed Update InkAnalyzer Analyze the strokes Do cool stuff private void InkPresenter_StrokesCollected(InkPresenter sender, InkStrokesCollectedEventArgs args) { inkAnalyzer.AddDataForStrokes(args.Strokes); } private void InkPresenter_StrokesEraseded(InkPresenter sender, InkStrokesErasedEventArgs args) { foreach (var stroke in args.Strokes) { inkAnalyzer.RemoveDataForStroke(stroke.Id); } }
  • 26. Microsoft Confidential Stateful (Incremental) Ink Analysis Find the nodes you’re interested in Strokes changed Update InkAnalyzer Analyze the strokes Do cool stuff private void StrokesUpdated(IReadOnlyList<uint> updatedStrokeIds) { var strokeContainer = inkCanvas.InkPresenter.StrokeContainer; foreach(var id in updatedStrokeIds) { inkAnalyzer.ReplaceDataForStroke(strokeContainer.GetStrokeById(id)); } } private async void AnalyzeButton_Clicked(object sender, RoutedEventArgs e) { if (!inkAnalyzer.IsAnalyzing) { var results = await inkAnalyzer.AnalyzeAsync(); } }
  • 27. Microsoft Confidential var results = await _inkAnalyzer.AnalyzeAsync(); var root = inkAnalyzer.AnalysisRoot; // Query for particular node kind var drawings = root.FindNodes(InkAnalysisNodeKind.InkDrawing); var paragraphs = root.FindNodes(InkAnalysisNodeKind.Paragraph); var words = root.FindNodes(InkAnalysisNodeKind.InkWord); // Document tree traversal foreach (var paragraph in writingRegion.Children) {…} foreach (var word in line.Children) {…} var line = word.Parent; Query Document Structure Find the nodes you’re interested in Strokes changed Update InkAnalyzer Analyze the strokes Do cool stuff
  • 28. Microsoft Confidential var results = await _inkAnalyzer.AnalyzeAsync(); var root = inkAnalyzer.AnalysisRoot; var drawings = root.FindNodes(InkAnalysisNodeKind.InkDrawing); foreach (var drawing in drawings) { var shape = drawing as InkAnalysisInkDrawing; if(shape.DrawingKind == InkAnalysisDrawingKind.Circle) { convertInkToXAMLShape(shape); var strokeIds = shape.GetStrokeIds(); inkAnalyzer.removeDataForStrokes(strokeIds); foreach(var id in strokeIds) { strokeContainer.GetStrokeById(id).Selected = true; } strokeContainer.DeleteSelected(); } } Mapping between strokes and InkAnalysisNode
  • 29. Microsoft Confidential Use Prior Knowledge Find the nodes you’re interested in Strokes changed Update InkAnalyzer Analyze the strokes Do cool stuff private void InkPresenter_StrokesCollected(InkPresenter sender, InkStrokesCollectedEventArgs args) { inkAnalyzer.AddDataForStrokes(args.Strokes); foreach (var stroke in args.Strokes) { inkAnalyzer.SetStrokeDataKind(stroke.Id, InkAnalysisStrokeKind.Writing); //inkAnalyzer.SetStrokeDataKind(stroke.Id, InkAnalysisStrokeKind.Drawing); } }
  • 32. Microsoft Confidential Cloud Service For Smart Ink Consistent Ink Recognition Experience Across Devices and Platforms Faster and Frequent Improvements to the core recognition capabilities Personalized Recognition with the Microsoft Cloud and Microsoft Graph Compute Power for larger ML models for better accuracy
  • 33. Microsoft Confidential Reachouttous! • Learn more: • aka.ms/WindowsInkSample • aka.ms/DigitalInkBlog • aka.ms/WinHEC2017 • aka.ms/InputScope • aka.ms/InkPresenterClass • aka.ms/HandwritingView • Code Samples • aka.ms/SimpleInkSample • aka.ms/ComplexInkSample • aka.ms/InkAnalysisSample Interested in being a co-engineering partner for our cloud solution, or have an ink related question for the team? Contact us here: [email protected] Follow us on Twitter for the latest ink and pen news from our team! Twitter: WindowsInk

Editor's Notes