Log in or register to post comments

Capture Image Size

July 28, 2013 - 11:39pm #1

Hi 

For a while i have been trying to get the captured camera frame and do some cropping and OCR on it. I managed to build up all the required systems to acieheve that goal. But the problem was , when i cropped the image according to the target image on the camera screen there was a problem with the height, the width was fitting perfectly for the target but the height was always bigger than excepted. 

 

And finally i found out that the frame that is captured from the camera with he method described  in this link, is capturing bigger area than the camera shows on the app. The width is the same, but the height is bigger. So when i want to do the cropping according to the calculated  target points on the camera, it takes a taller image.

Is there a way to change that captured frame to cath exactly the same frame as its seen on the screen of the app while the camera is open?

 

Thanks

Capture Image Size

July 29, 2013 - 12:10am #3

Thank you Alessandro, I will try both methods

Capture Image Size

July 29, 2013 - 12:05am #2

Hi, if you want to capture the part of the camera image that corresponds to the actual screen size, you could consider 2 options:

1. follow the method that you are already using, and manually crop the image by copying the sub-part content to an image with the right size (this will require to iterate over the content pixel by pixel).

2. Capture the OpenGL view as explained in this link:

https://developer.vuforia.com/forum/faq/android-how-can-i-capture-ar-view

If you follow approach #2, you will obtain the actual view also including the 3D models or any other OpenGL augmentation; if you want to exclude those elements (i.e. only getting the video background), you will need to adjust the approach so to call glReadPixels right after the drawVideoBackground() call.

 

Log in or register to post comments