By fanjack
on Tue, 07/08/2014 - 06:09
Hi,
I tried to access camera frame according to https://developer.vuforia.com/forum/faq/android-how-can-i-access-camera-image
Here is the code I added in onQCARUpdate() on Vuforia Sample app.The activity will be forced close always.I attached the log.
Please have a look and give any advice.
ThanksJack
@Override public void onQCARUpdate(State state) { Image imageRGB565 = null; Frame frame = state.getFrame(); for (int i = 0; i < frame.getNumImages(); ++i) { Image image = frame.getImage(i); if (image.getFormat() == PIXEL_FORMAT.RGB565) { imageRGB565 = image; break; } } if (imageRGB565 != null) { int imageWidth = imageRGB565.getWidth(); int imageHeight = imageRGB565.getHeight(); int stride = imageRGB565.getStride(); Log.d("Image", "Image width: " + imageWidth); Log.d("Image", "Image height: " + imageHeight); Log.d("Image", "Image stride: " + stride); ByteBuffer pixels = imageRGB565.getPixels(); byte[] pixelArray = pixels.array(); Log.d("Image", "First pixel byte: " + pixelArray[0]); }
how-can-i-access-camera-image
Hi,
It seems the problem is the same as
https://developer.vuforia.com/forum/android/opencv-vuforia
Could you let us know when the solution will be released?
Thanks
Jack
how-can-i-access-camera-image
The new version of Vuforia is expected relatively soon and will contain the fix. Stay tuned, as you should receive an email announcing the new release.
how-can-i-access-camera-image
I confirmed the issue no longer exists on ver 3.0.
Thanks
how-can-i-access-camera-image
Thanks for confirmation.