Comments (7)
from unityvision-ios.
Hi there,
It seems to me that the CVPixelBuffer ARKit exposes gets deallocated before it arrives to the native vision plugin. Remember, The Unity ARKit plugin has no idea that UnityVision is reading its image buffer, so if Unity made changes how and when the buffer for the front facing camera gets released, that may cause problems for UnityVision.
There are ways in UnityVision to allocate a buffer that it owns. In the ARKitExample, UnityVision steals the buffer reference from ARKit, because this way we save a copy. But in the webcam example, an independent metal texture is used for classification. Also, I have written a managed wrapper for CVPixelBuffer. You can check it out in the core video example.
I may implement a way to duplicate native CVPixelBuffers, so you don't have to rely on the WebCamTexture API when you also use ARKit. You would then just make a copy of ARKit's buffer and its guaranteed that it won't get released before time. I just need to allocate some time for this. Meanwhile, you can use a webcam texture.
Please keep me updated!
from unityvision-ios.
from unityvision-ios.
from unityvision-ios.
Hi Leif,
I added a new example for ARKit. I hope this approach solves your problem.
It uses the texture that Unity's ARKit plugin generates from the capturedImage (CVPixelBuffer) of the current ARFrame. I want you to try this first before having to create a deep copy of the pixel buffer every frame in your client application.
You can find it in ARKitExample2.cs. Try it out and let me know if it works for you.
Best regards,
Adam
from unityvision-ios.
Hi Adam,
I am working on the measurement application like the apple's Measure App. I have tried with ARKit
but not getting any satisfying result. After looking at your demo I think it's useful for my application. Please find below link for my requirements.
Edge-detection-corner-detection-in-AR
I am waiting for your acknowledgement.
Thanks and regards,
Ilesh
from unityvision-ios.
Hi Ilesh,
This plugin features rectangle detection which only gives you results reliably if a rectangular object is visible in full. You can try implementing your app with the current state of the plugin, but I don't guarantee anything. Also, since you don't need image classification, you'll probably need to strip out that feature from the plugin because the mlmodel is over a 100 MBs.
If I were you I'd probably look for a native edge detection solution for iOS and use this plugin as an example how to integrate it with Unity.
Best regards,
Adam
from unityvision-ios.
Related Issues (10)
- Performance control HOT 2
- Freezes up intermittently on only one iPhone HOT 8
- Rectangle Detection is not accurate in IOS please help
- Foundation?
- Cant make a build getting this error HOT 1
- Error build with xcode in ARSessionNative
- 2 different swift compiler errors
- Please fix this so it works with modern day ARFoundadtion / ARKit!
- Please update to Unity 2022.3.19f1 for visionOS Polyspatial support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unityvision-ios.