Technology Questions

Go Back   Technology Questions > Hardware Questions > Mobile Computers > Tablet PC > Tablet PC Software > Tablet PC Developers

Tablet PC Developers Show off your work while discussing with others how to create ink enabled applications.

Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old 06-01-2007, 11:10 AM
U of M GradMan
Newsgroup Contributor
 
Posts: n/a
Bounding box for Ink

I am trying to develop a ink box in C# that can be drawn in so a person can
trace a letter (e.g the letter "a") however, even when I try to bound the
box, if the person is holding down the mouse button and goes beyond the box,
ink will continue to be drawn even though the user cannot see it. In case
that not entirely clear, its more or less like you are writing on a piece of
paper and you pen slips off of it, on paper you stop writing, in my program
it continues to write. Even worse is that when I go to recognize what they
have written all of the ink outside of the box will be recognized (i.e. if
they wrote the letter "a" almost completely outside the box, it will still be
recognized as the letter "a"). Can anyone help me out?

Thanks!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

 
Old 06-01-2007, 11:10 AM
  #2 (permalink)  
Old 06-03-2007, 09:10 PM
Josh Einstein
Newsgroup Contributor
 
Posts: n/a
Re: Bounding box for Ink

You need to clip the ink. But you need to decide how you want this to work.
If they drag outside the line and drag back in, should that be considered
two separate strokes? Or should the points be constrained to the edge of the
bounding box and the stroke be treated as a single stroke?

You can achieve the latter using RealTimeStylus which has a bit of a
learning curve but is a very powerful tool for accessing and manipulating
the stylus data streams.

If you just want to clip the ink (which may result in a "broken" stroke
which appears as two strokes) you can use the Clip method of the Strokes
class prior to sending the strokes to the recognizer.

--
Josh Einstein (Tablet PC MVP)
Einstein Technologies
Tablet Enhancements for Outlook - Try it free: www.tabletoutlook.com


"U of M GradMan" <UofMGradMan@discussions.microsoft.com> wrote in message
news:BFA2D405-E490-491B-9AE9-1A770AC6F588@microsoft.com...
>I am trying to develop a ink box in C# that can be drawn in so a person can
> trace a letter (e.g the letter "a") however, even when I try to bound the
> box, if the person is holding down the mouse button and goes beyond the
> box,
> ink will continue to be drawn even though the user cannot see it. In case
> that not entirely clear, its more or less like you are writing on a piece
> of
> paper and you pen slips off of it, on paper you stop writing, in my
> program
> it continues to write. Even worse is that when I go to recognize what
> they
> have written all of the ink outside of the box will be recognized (i.e. if
> they wrote the letter "a" almost completely outside the box, it will still
> be
> recognized as the letter "a"). Can anyone help me out?
>
> Thanks!


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #3 (permalink)  
Old 06-04-2007, 05:40 AM
U of M GradMan
Newsgroup Contributor
 
Posts: n/a
Re: Bounding box for Ink

I am basically trying to not even allow them to write beyond the bounds of
the box if there is a way to do that and if there isn't I would prefer the
recognizer either disregard all ink outside the box or do as you said and
count it as two separate strokes so the letter recognition comes up incorrect.

"Josh Einstein" wrote:

> You need to clip the ink. But you need to decide how you want this to work.
> If they drag outside the line and drag back in, should that be considered
> two separate strokes? Or should the points be constrained to the edge of the
> bounding box and the stroke be treated as a single stroke?
>
> You can achieve the latter using RealTimeStylus which has a bit of a
> learning curve but is a very powerful tool for accessing and manipulating
> the stylus data streams.
>
> If you just want to clip the ink (which may result in a "broken" stroke
> which appears as two strokes) you can use the Clip method of the Strokes
> class prior to sending the strokes to the recognizer.
>
> --
> Josh Einstein (Tablet PC MVP)
> Einstein Technologies
> Tablet Enhancements for Outlook - Try it free: www.tabletoutlook.com
>
>
> "U of M GradMan" <UofMGradMan@discussions.microsoft.com> wrote in message
> news:BFA2D405-E490-491B-9AE9-1A770AC6F588@microsoft.com...
> >I am trying to develop a ink box in C# that can be drawn in so a person can
> > trace a letter (e.g the letter "a") however, even when I try to bound the
> > box, if the person is holding down the mouse button and goes beyond the
> > box,
> > ink will continue to be drawn even though the user cannot see it. In case
> > that not entirely clear, its more or less like you are writing on a piece
> > of
> > paper and you pen slips off of it, on paper you stop writing, in my
> > program
> > it continues to write. Even worse is that when I go to recognize what
> > they
> > have written all of the ink outside of the box will be recognized (i.e. if
> > they wrote the letter "a" almost completely outside the box, it will still
> > be
> > recognized as the letter "a"). Can anyone help me out?
> >
> > Thanks!

>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #4 (permalink)  
Old 06-05-2007, 07:20 AM
Josh Einstein
Newsgroup Contributor
 
Posts: n/a
Re: Bounding box for Ink

The only way to stop it is to use RealTimeStylus. Otherwise just allow it
and clip it before you send it to the recognizer and then it will be treated
as two strokes.

Strokes allStrokes = myOverlay.Ink.Strokes;
allStrokes.Clip(boundsInInkSpace);

recoContext.Strokes = allStrokes;

RecognitionStatus recoStatus;
RecognitionResult result = recoContext.Recognize(out recoStatus);

--
Josh Einstein (Tablet PC MVP)
Einstein Technologies
Tablet Enhancements for Outlook - Try it free: www.tabletoutlook.com


"U of M GradMan" <UofMGradMan@discussions.microsoft.com> wrote in message
news:69DB0C2A-4E92-4B70-9933-8FA91451CEFC@microsoft.com...
>I am basically trying to not even allow them to write beyond the bounds of
> the box if there is a way to do that and if there isn't I would prefer the
> recognizer either disregard all ink outside the box or do as you said and
> count it as two separate strokes so the letter recognition comes up
> incorrect.
>
> "Josh Einstein" wrote:
>
>> You need to clip the ink. But you need to decide how you want this to
>> work.
>> If they drag outside the line and drag back in, should that be considered
>> two separate strokes? Or should the points be constrained to the edge of
>> the
>> bounding box and the stroke be treated as a single stroke?
>>
>> You can achieve the latter using RealTimeStylus which has a bit of a
>> learning curve but is a very powerful tool for accessing and manipulating
>> the stylus data streams.
>>
>> If you just want to clip the ink (which may result in a "broken" stroke
>> which appears as two strokes) you can use the Clip method of the Strokes
>> class prior to sending the strokes to the recognizer.
>>
>> --
>> Josh Einstein (Tablet PC MVP)
>> Einstein Technologies
>> Tablet Enhancements for Outlook - Try it free: www.tabletoutlook.com
>>
>>
>> "U of M GradMan" <UofMGradMan@discussions.microsoft.com> wrote in message
>> news:BFA2D405-E490-491B-9AE9-1A770AC6F588@microsoft.com...
>> >I am trying to develop a ink box in C# that can be drawn in so a person
>> >can
>> > trace a letter (e.g the letter "a") however, even when I try to bound
>> > the
>> > box, if the person is holding down the mouse button and goes beyond the
>> > box,
>> > ink will continue to be drawn even though the user cannot see it. In
>> > case
>> > that not entirely clear, its more or less like you are writing on a
>> > piece
>> > of
>> > paper and you pen slips off of it, on paper you stop writing, in my
>> > program
>> > it continues to write. Even worse is that when I go to recognize what
>> > they
>> > have written all of the ink outside of the box will be recognized (i.e.
>> > if
>> > they wrote the letter "a" almost completely outside the box, it will
>> > still
>> > be
>> > recognized as the letter "a"). Can anyone help me out?
>> >
>> > Thanks!

>>


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



New To Technology Questions? Do You Need Help with Your Computer or Device? Do You Need Help with this site?

All times are GMT -8. The time now is 12:44 AM.


2003 - 2009 All Rights Reserved. Technology Questions

Search Engine Friendly URLs by vBSEO 3.3.0