Topic locked

Camera zoom in text recognition

March 26, 2014 - 8:54am #1

Hello, is there any way to zoom camera in text reco? 

I tried editing this lines: 

boundsEAGLView.size.width *= 2.0;  // 3.0 , 15.0

boundsEAGLView.size.height *= 2.0; // 3.0 , 15.0

 

Well it seems to zoom, but fails to recognize text.

 

Any ideas?

Camera zoom in text recognition

April 2, 2014 - 12:59am #7

Let's say i want to achieve zoom.

What files do i have to modify for each of these steps?

Why do you ask this ? This is application logic; as I said,this is not something that the Vuforia API exposes; the steps that I have highlighted explain what you would need to do at application logic level; so, clearly, something that is up to you for the actual implmentation: do you expect that I write the application code for you ?

 

Camera zoom in text recognition

April 1, 2014 - 10:40pm #6

- magnify the rendering of the video background texture; to this aim, it could be of help reading the sample code in the Background Texture Access sample, where the details of how to render the background camera image are revealed, using OpenGL; you could probably start off from there and implement your own custom OpenGL rendering 

- adjust the rendering of the Region of Interest for Text reco, so that it also scales appropriately according to the scaled video background; this could require some maths, but it should not be too hard 

- adjust the position of the reported WordResults trackables, so that their boudning boxes are also rendered according to the scale factor of the zoom.

 

Let's say i want to achieve zoom.

What files do i have to modify for each of these steps?

What other programs do i have to use apart from Xcode?

 

Camera zoom in text recognition

March 29, 2014 - 7:10am #5

Why do i need? Well, for example if text is too far away to read it, maybe zoom could help?

Note that Vuforia will still relies on the original (not zoomed) camera image to recognize the text; so, if text is too far and hard to read for a human being, you should probably not expect that Vuforia can easily detect it.

 

Making zoom myself looks too complicated, because i have never put my hands on opengl. Would it be too hard? 

if you have no experience with OpenGL, then this could be a fairly challenging task.

 

(EDIT: would it be possible to add number recognition?)

This is a request that you can post in the Forum Wish List:

https://developer.vuforia.com/forum/general-discussion/wish-list

 

 

Camera zoom in text recognition

March 29, 2014 - 4:09am #4

Why do i need? Well, for example if text is too far away to read it, maybe zoom could help?

Making zoom myself looks too complicated, because i have never put my hands on opengl. Would it be too hard? 

(EDIT: would it be possible to add number recognition?)

Camera zoom in text recognition

March 27, 2014 - 5:30am #3

This looks like code from a previous version of the SDK.

Either way the loupe/ROI (region of interest) is failry tighly bound to the camera image and dimensions.

So when you simply double the scale, what happens is that the window at the top is misaligned to the camera section that will be sent for text recognition i.e. it is off screen.  So the chances are if you point it around a large amount of text it will eventually recognise text, but really this is not of any use.

 

Why exactly do you want to zoom the text anyway?   .. as the whole point is that the TR is there to recognise what comes through the camera.  From a user experience perspective th esample app highlights the text in bigger letters anyway to show what has been recognised.

HTH

N

Camera zoom in text recognition

March 27, 2014 - 5:27am #2

Vuforia does not provide an explicit support for Zooming, at present.

If you want to try to implement something like a zoom, you will neeed to:

- magnify the rendering of the video background texture; to this aim, it could be of help reading the sample code in the Background Texture Access sample, where the details of how to render the background camera image are revealed, using OpenGL; you could probably start off from there and implement your own custom OpenGL rendering 

- adjust the rendering of the Region of Interest for Text reco, so that it also scales appropriately according to the scaled video background; this could require some maths, but it should not be too hard 

- adjust the position of the reported WordResults trackables, so that their boudning boxes are also rendered according to the scale factor of the zoom.

 

Note: doing this is not trivial, but you could achieve it if you have a good familiarity with OpenGL programming.

 

Topic locked