Unity-ARKit-Plugin
Unity-ARKit-Plugin copied to clipboard
CVbuffer access in Unity
Hi, Can I get the CVbuffer data directly inside Unity, like the IntPtr of the Yplane and CbCr? It will be very usefull to feed another plugin with the YUV buffer for processing. Your plugin can do that? Thanks
Well currently it can't but I'm working on this feature. Currently it only allows you to get the CVBuffer from the native objective-c interface in the native implementation objective-c++ file, but not from the C# interface in Unity. I will finish this feature as soon as possible.
mmh, ok, nice! It's a good work. I was playing around the codes and i didn't archieve nothing, i can't figure how to push a mtlbuffer or the native cvbuffer directly in unity. I will intempt to read your uiimage in unity, i think i have to push it in the app path.
yeah, push it in the app path could be one solution.
Instead, you can modified the dllexport interface. That's how the ARCamera is passed from ARKit to the UnityARCamera in the unity.
You can make a little modification to change ARCamera into ARFrame.
On Thu, Jul 13, 2017 at 10:20 AM, lgRecip [email protected] wrote:
mmh, ok, nice! It's a good work. I was playing around the codes and i didn't archieve nothing, i can't figure how to push a mtlbuffer or the native cvbuffer directly in unity. I will intempt to read your uiimage in unity, i think i have to push it in the app path.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/StephenGuanqi/Unity-ARKit-Plugin/issues/3#issuecomment-314951144, or mute the thread https://github.com/notifications/unsubscribe-auth/AGVLVdfS88YxUSrQIHArD5baBWDDm5Cdks5sNX71gaJpZM4OWV0P .
--
Guanqi Yu
Master of Information Systems Management
Carnegie Mellon University
Telephone: +61 421935029
Email: [email protected] [email protected] Linkedin: https://www.linkedin.com/in/yuguanqi https://www.linkedin.com/in/yuguanqi Skype: Guanqi Yu
i had try some things in this way (make a pointer to the cvbuffer in dll interface) but i always be in the same issue, casting the datas or bring them back to unity seem to me be impossible, i don't figure in wich format i have to make them to be pushed to unity.
Well, I may have encounter the same problem as yours before. And that's why I haven't finish the IntPtr interface in my initial commit, which is the current HEAD.
I will try and make some efforts latter to see if we can fix this problem.
Thanks.
On Thu, Jul 13, 2017 at 10:45 AM, lgRecip [email protected] wrote:
i had try some things in this way (make a pointer to the cvbuffer in dll interface) but i always be in the same issue, casting the datas or bring them back to unity seem to me be impossible, i don't figure in wich format i have to make them to be pushed to unity.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/StephenGuanqi/Unity-ARKit-Plugin/issues/3#issuecomment-314954765, or mute the thread https://github.com/notifications/unsubscribe-auth/AGVLVWeQV1Z71DqC_JRwnuO_rEtL41nWks5sNYTggaJpZM4OWV0P .
--
Guanqi Yu
Master of Information Systems Management
Carnegie Mellon University
Telephone: +61 421935029
Email: [email protected] [email protected] Linkedin: https://www.linkedin.com/in/yuguanqi https://www.linkedin.com/in/yuguanqi Skype: Guanqi Yu
Ok thanks, If i find somthing i tell you.
Any update on this? I would like this feature as well, but am not familiar enough with Unity to do it myself.
Sorry buddy I have lost my iPhone 6s which is necessary for the ARKit Test. I will work on this feature once I have bought a new one.
On Fri, Jul 28, 2017 at 8:27 AM, an-kumar [email protected] wrote:
Any update on this? I would like this feature as well, but am not familiar enough with Unity to do it myself.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/StephenGuanqi/Unity-ARKit-Plugin/issues/3#issuecomment-318522946, or mute the thread https://github.com/notifications/unsubscribe-auth/AGVLVdtGSOiOO6NC_PplG3oTiY3wfUwuks5sSSrsgaJpZM4OWV0P .
--
Guanqi Yu
Master of Information Systems Management
Carnegie Mellon University
Telephone: +61 421935029
Email: [email protected] [email protected] Linkedin: https://www.linkedin.com/in/yuguanqi https://www.linkedin.com/in/yuguanqi Skype: Guanqi Yu
I have just commit the previous missing files and you guys can try it for the new features.
Sorry about the inconvenience.
If we can't access the pixelbuffer directly from unity, could we directly access the file system where the json and images are stored?
How can we access it via unity? Would this work?
string savepath;
if (Application.platform == RuntimePlatform.IPhonePlayer) {
savepath = Application.dataPath.Replace ("UnityARRecorder.app/Data", "/Documents/");
}
I figured it out. I could access it with
Application.persistentDataPath: