Interactive Ink

iOS recognize text

 In the process of word recognition, three problems were found:
     1 writing multi-line text, the text can not wrap, is there any way to return the results can branch?

     2. Write multi-line text, writing a lot of text, only identify some of the text after the error message is not identified, the following is the error message, write text and recognition results

“ Error, -[IINKEditor pointerEvents:count:doProcessGestures:error:]::187 pointer with same pointerId has a trace already pending ”




 NSArray *lineArray = [UseFmdbDataBase findLinesByPageId:self.thepageid];
    for (Line *theline in lineArray) {
        NSArray *pointArr = [UseFmdbDataBase findPontsByLineId:theline.lineID];

        NSUInteger n = pointArr.count;
        IINKPointerEvent events[n];
        IINKPointerEvent *p = events;
        NSUInteger i = 0;
        for (PPoint *point in pointArr) {
            NSLog(@"x=%@        y=%@       i=%ld    n=%ld",point.px , , i ,n);
            if (i == 0) {
                CGPoint pp =CGPointMake([point.px floatValue] ,[ floatValue]);
                *p++ = IINKPointerEventMakeDown(pp, -1, 0, IINKPointerTypePen, 0);
            }else if(i == n-1 ){
                CGPoint pp =CGPointMake([point.px floatValue] ,[ floatValue]);
                *p++ = IINKPointerEventMakeUp(pp, -1, 0, IINKPointerTypePen, 0);
                CGPoint pp =CGPointMake([point.px floatValue] ,[ floatValue]);
                *p++ = IINKPointerEventMakeMove(pp, -1, 0, IINKPointerTypePen, 0);
        [self.editor pointerEvents:events count:n doProcessGestures:YES error:nil];

     3. Set the 'package' type When using 'text document' and 'text', the results returned by 'text document' are usually not used. "IINKContentPart * part = [package createPart: @" Text "error: nil]; // The options are:" Diagram "," Drawing "," Math "," Text Document "," Text "

1 Comment

Dear Harry,

I am sorry but we are facing difficulties understanding your explanations. Feel free to write in Chinese, as we have some native Chinese employes :-)

1-What do you mean by the "text can not wrap", is there any way to return the results can branch?" ? Indeed we are not able to figure our what you mean;

2-This occurs because pointer up (IINKPointerEventMakeUp) has not been called. In your code, it seems you are not going into if (i==n-1)
Can you do step by step debug and ensure you are doing IINKPointerEventMakeUp?

3-We are not sure to understand: Are you trying to create two parts at the same type, e.g. a text part and a texrt document one and not getting the same result?
Indeed, text document mode must not be used with external device, as you must ensure to write exactly on the lines displayed on the screen. Otherwise, you will have a very low accuracy. For your use-case, you must ensure to use text mode.

Best regards,


Login or Signup to post a comment