-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NFT marker detection #65
base: master
Are you sure you want to change the base?
Conversation
All projects retargeted to "Platform Toolset Visual Studio 2019 (v142)". Added a post build event to copy the built DLL into the Unity project's "Plugins" folder.
…nsARToolKit into nft_detection
…dle the correct placement of the virtual content based on the scale ratio between the sizes of the trained image soft-copy and the image hard-copy.
Hi again @qian256, I've just updated the pull request adding few improvements about the NFT detection feature. This option, which is set to 1.0 by default, is decisive for ARToolKit to be able to calculate the proper "depth" of the virtual content/object position relative to the physical marker position. For example, say the image soft-copy is 14 x 18 cm but the printed image hard-copy is magnified by a factor of 3 (its physical size is 42 x 54 cm). Another important thing I'd like to share with you (probably you are already aware of it) is about the process used by the ARToolKit SDK to train an image detection and track. These considerations reply to one of the potential flaws described in my previous comment, which actually doesn't represent a defective behaviour but a lack of knowledge ;) |
Ah, one last thing. For whoever could be interested, I managed to migrate the HoloLensARToolKit project to Unity 2020.3.4f1. Anyway I didn't include the changes into the nft_detection branch, which is involved in this pull request. As we all know, starting from Unity 2020.1 the bulit-in Legacy VR feature isn't supported anymore and it has been replaced by the XR SDK. Moreover, the XR SDK supports two possible plugins: OpenXR and Windows Mixed Reality (again deprecated starting from Unity 2021.2). So far I was able to upgrade the HoloLensARToolKit project to Unity 2020.3.4f1 making use of the Windows Mixed Reality plugin. To achieve that you need to:
with
That's it. |
Hi @qian256 😄
here is the pull request with the NFT markers detection integration, as promised.
I wanted to perform few tests before releasing it.
However I had the chance to test it on my HoloLens 2 only, so I cannot guarantee it works on the first generation HoloLenses as well (as I believe, anyway).
I added a new scene named HL2ARToolKitNFT to the Unity project which shows the NFT detection of the ARToolKit "pinball" image marker.
Flaws and potential improvements
The NFT marker detection seems to be a little bit too slow (sometimes it takes from 3 to 4 seconds to show the virtual content, especially the first time). This is true even if the preview video is disabled.
I tried reintroducing the "color pattern detection mode" based on your previous implementation (v0.2 release), leaving to the user the choice of the detection mode to use. My guess was that "maybe" the color mode could ease and speed up the detection phase (didn't have time to go in depth into the original mechanism adopted by ARToolKit libraries).
However I'm still having troubles showing the color video stream into the Texture2D object, even creating a specific color shader.
I think I'm doing some mistake related to the bitmap's buffer locking which is required during the conversion stage and/or something related to the threads management.
Maybe you can shed some light on this topic...
Used software
This is the list of software versions used to compile the DLL and deploy the app into the HL2:
I'm open to discuss any further improvement or give explanations if required.