You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. I want to take a picture without the sceneform objects drawn on it as I need the original image for further computer vision processing and the AR objects hide key features that are needed by my computer vision algorithm. Currently, I am doing the following:
// bitMapVoid function consumes the bitmap for computer vision related processing
Bitmap bitmap = Bitmap.createBitmap(arSceneView.getWidth(), arSceneView.getHeight(),
Bitmap.Config.ARGB_8888);
PixelCopy.request(arSceneView, bitmap,
(copyResult) -> bitmapVoidFunction.accept(bitmap),
pixelCopierHandler);
The above code not only captures the image but also captures the AR items drawn on it. How do I get the original image without any of the AR objects on it? My alternative was to disable all nodes while the bitmap was being created and re-enable it when the process completes but that doesn't feel like an elegant solution.
EDIT:
As a workaround, I am taking the Image object I get from the Frame (Image image = frame.acquireCameraImage()) and converting that to a bitmap since that is just the raw image seen by ARCore. However, this is a 640 by 480 image and not 1920 by 1080 one which is the original image.
I would prefer not to increase the resolution of the image, seen by ARCore, to 1920 by 1080 as that can potentially slow down the app. Please, if anyone finds a way to get the original 1920 by 1080 image without any of the Sceneform stuff drawn on it, then do let me know.
This discussion was converted from issue #230 on December 09, 2021 13:01.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello. I want to take a picture without the sceneform objects drawn on it as I need the original image for further computer vision processing and the AR objects hide key features that are needed by my computer vision algorithm. Currently, I am doing the following:
The above code not only captures the image but also captures the AR items drawn on it. How do I get the original image without any of the AR objects on it? My alternative was to disable all nodes while the bitmap was being created and re-enable it when the process completes but that doesn't feel like an elegant solution.
EDIT:
As a workaround, I am taking the Image object I get from the Frame (Image image = frame.acquireCameraImage()) and converting that to a bitmap since that is just the raw image seen by ARCore. However, this is a 640 by 480 image and not 1920 by 1080 one which is the original image.
I would prefer not to increase the resolution of the image, seen by ARCore, to 1920 by 1080 as that can potentially slow down the app. Please, if anyone finds a way to get the original 1920 by 1080 image without any of the Sceneform stuff drawn on it, then do let me know.
Beta Was this translation helpful? Give feedback.
All reactions