About Decrease Camera Preview Surface Size

  • Last Post 24 October 2018
mobile rlogical posted this 16 October 2018

Hello Team,


I am using your library and really amazing library as compared with other ones in market.

But now i need your bit help to customize frame size as well as camera preview size. I have changed it and reduced height and width but i am getting issue with lines recolonization. If i scan any text inside the frame then also its returning above and below lines in the result. I can say it's returning lines as per camera preview size.

Frame size is ok but we are unable to set camera surface size. So it's returning more then one lines if we scan any one inside the frame.

In ios we have updated Area Of interest but in android we didn't find any method for the same. 

I have attached screenshot of my issue. As per screenshot, i am scanning text "Four Hundred and Twenty KWD" but it returns both "Four Hundred and Twenty KWD" and "Exchange Rate".

Why it returns texts from outside the surface frame area?

Can you please help me to fix this issue? Or any guidance from you guys to achieve as i explained. 

Waiting for your quick and valuable reply.

Thank you


Attached Files

Order By: Standard | Newest | Votes
Diana Khammatova posted this 17 October 2018

Hello! 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.

For example, if you want to change the recognition area use the following code.

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

Please note, that you can also change viewBounds parameter if necessary.


mobile rlogical posted this 19 October 2018

Hello Diana Khammatova ,

Thank you for the your kind Response,

we have used your OCR SDK in our Android Native Project so we are Expecting some help in Android.

The given example code is integrated in iOS.

we have also tried to set our new Frame area of interest in setareaofintrest()  method but it always throws the "invalid Area of interest" error.

we have passed the new areaofinterest which is new Rect() size by calling setareaofintrest() method. 

Can you please help me to fix this issue? Or any guidance from you guys to achieve as i explained. 

Waiting for your quick and valuable reply.


Thank you.

Diana Khammatova posted this 24 October 2018

Please send the following additional information to SDK_Support@abbyy.com:
1) What version of RTR SDK do you use: free or extended? If the second one, then kindly specify your serial number.
2) Also, please specify the build number of RTR SDK, which you can find in the Readme.html file included in the distribution.
3) What iOS version are you using/testing on?
4) Please describe the issue in more details. You can attach some screenshots and logs for illustrating the problem.
5) Please send us a modifyed standard sample that reproduces the issue.