How to Change Camera Preview to landscape of Abbyy OCR

Hello All , 

I want to change the default camera preview of abbyy ocr . I want to show a preview in landscape mode and with longer rectangle width wise and height should be smaller .

Please help if any one have did it .


Was this article helpful?

0 out of 0 found this helpful



  • Avatar
    Oksana Serdyuk

    Could you please specify what version of RTR SDK you use? The fact is that the current version of RTR SDK R6 (build# already includes the code samples supporting both orientations (in portrait and landscape modes).

    Also it would be useful to review the similar post: RTR Device Orientation.

  • Avatar
    Sandeep Kumar
    Hello , Thanks for the reply , i am using sdk R6 and in landscape mode i want to make height of preview smaller .so please help me to decrease height .and also i have noticed one thing is that while i want to read text placing inside preview section ,after keeping it for more than 30 sec it hangs and also consume lot of memory .so how to solve that as well because i want to make this app for smaller configuration phones and if this happens then lot of issue arises on smaller phone . I would be looking for your reply Thanks
  • Avatar
    Oksana Serdyuk

    The size of the window and the search area are set via selectedArea. If you follow the chain of method calls, then after changing the visual part (self.selectedArea), setAreaOfInterest is also updated. If you want to change the recognition area, then use, for example, the following code:

    //Set a frame area of the same size as the window area with margins of 10 points on the edges
    self.selectedArea = CGRectInset(viewBounds, 10, 10);

    Please see the details about usage of CGRectInset in Apple Developer Documentation. 

    As for the second issue, it seems that the program cannot return you any stable result, so the recognition does not finish. You can manage the level of the result stability via the RTRResultStabilityStatus enumeration constant, but still it is not guaranteed that it ever reaches the desired level for a particular scene. 

    Do we understand correctly, that this issue happens only for some specific texts? Possible that such text just is not supported: under some certain conditions, unsupported fonts, complex background, etc.


Please sign in to leave a comment.