The on-line document on hitTest says:
public List<HitResult> hitTest (float xPx, float yPx)
..............................
Parameters
xPx x coordinate in pixels
yPx y coordinate in pixels
.................................
However, I do not know in which coordinate system these pixel value are in regards.
Background:
we obtained a 2D point using computer vision algorithm based on the arcore
computervision_java
sample. The image obtained is 1280x720
in resolution and is from GPU
. We need to find the intersection 3D coordinate of the 2D_point
with the plane from Frame. however the result of hitTest
is not we expected.
I am guessing that maybe the hitTest need to use an image from Frame (640x480
in resolution). We have also tried to scale the pixel coordinate from 1280x720
down to 640x480
, but the result is still not make any sense to us.
Thank you. Peter Yin