Log in or register to post comments

GetCameraImage slow

May 30, 2016 - 8:32am #1

Hello:

I am developing an Android application using the Vuforia plugin for Unity. As part of my needs, I must obtain the pixels captured by the camera for image processing. For this purpose, I am using the GetCameraImage method, which turns out to be slow, since my framerates drop below 20 FPS.

Is there a faster alternative to this? I have also been trying to obtain the camera image from C++ native code (NDK), but it doesn't work.

Thank you

GetCameraImage slow

June 29, 2016 - 8:28am #4

Hello,

The GetCameraImage is the right API to obtain camera frames, if your goal is to process the image pixels. Obtaining the full camera frame image has a certain computational cost of course.

However, you could try with different Image Formats; for example, obtaining the image in Grayscale may be significantly faster than obtaining the same image in RGB or RGBA formats.

Note:

If you need to process the camera image for rendering purposes only, you could achieve that using a shader; in such a case you can simply get the camera texture, apply that to a material and use a custom shader with it; this is typically inexpensive for your CPU; this technique is demonstrated in the OcclusionManagement sample.

Thanks

GetCameraImage slow

June 24, 2016 - 12:19pm #3

Hello again:

Anyone able to help with this?

Thank you

GetCameraImage slow

May 31, 2016 - 3:04am #2

The GetCameraImage is the right API to obtain camera frames, if your goal is to process the image pixels. Obtaining the full camera frame image has a certain computational cost of course.

However, you could try with different Image Formats; for example, obtaining the image in Grayscale may be significantly faster than obtaining the same image in RGB or RGBA formats.

Note:

If you need to process the camera image for rendering purposes only, you could achieve that using a shader; in such a case you can simply get the camera texture, apply that to a material and use a custom shader with it; this is typically inexpensive for your CPU; this technique is demonstrated in the OcclusionManagement sample.

Log in or register to post comments