Closed Ivan547-arnus closed 3 years ago
If you want the raw camera pixels on the CPU, there's an API for that and a sample scene.
Yes, i want get texture2D from ar foundation and use in open cv to show in Raw image, i´ll see the sample scene
I can use the cpu image but the texture2D is rotated so to solve this i used opencv rotate but the image is a bit streched, any idea to perserve aspect?
ARFoundation's API just provides the raw pixel data, with a few limited transformations (like mirroring).
Your question concerns the OpenCV API, which is out of scope for this issues page. Sorry; I can't tell you why a third-party library does something unexpected. OpenCV does have a pretty extensive community, though. Have you tried their forum?
Ok, thanks i should see in openCV forum
ok, everything work fine but the app crash after a few minutes of use, this happens even if i dont use computational vision algorithm
@tdmowrer can you help me? please
@tdmowrer can you help me? please
If you can share a stack trace of log information as part of a Unity Issue Tracker report then we should be able to tell whether the crash is in application code. Please log an issue. https://unity3d.com/unity/qa/bug-reporting
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
been able to get OpenCVForUnity to work with ARFoundation/ARKit since at least 2018 (haven't tried recently)
been able to get OpenCVForUnity to work with ARFoundation/ARKit since at least 2018 (haven't tried recently)
@yosun wich was your solution to rotate camera
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@yosun @Ivan547-arnus did you get ArUco markers to work with ArFoundation CpuImage? I am able to detect the markers with OpenCvForUnity, but i can not seem to get the OpenCv pose of the marker correctly converted to a Unity pose. When i use the OpenCv pose and convert it from right handed to left handed, the on-screen position and rotation of my marker-cube is not aligned to the marker in the image.
Hi @Weasy666 you should rotate cpu image before of you opencv algorithm otherwise your result pose not work however i am not using ArUco marker
Thanks for the fast answer. You are right, found my problem shortly after asking here.
A tip for others, when using Utils.fastMatToTexture
with the parameterflip=true
, the image will not just be flipped for the texture, but the src Mat will also get flipped.
i was using webcametexture and my computer vision algorith work however i need functions of ar foundation in same project so i want adapt my project with camera from ar foundation, any idea?