microsoft / MixedRealityToolkit-Unity

This repository is for the legacy Mixed Reality Toolkit (MRTK) v2. For the latest version of the MRTK please visit https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity
https://aka.ms/mrtkdocs
MIT License
6k stars 2.12k forks source link

QR Tracker slow to track QR's if at all #8831

Closed deybrigh closed 9 months ago

deybrigh commented 3 years ago

Describe the bug

Trying to use the QR Tracker in Hololens 2 produces unusable results. It takes upwards of 5 mins to scan a QR code and often in the most unlikely scanning positions. Just doing simple QR recognition seems to be faster and easier to read QRs in all positions using PhotoCapture for a texture to decode

To reproduce

Steps to reproduce the behavior:

  1. Load basic scene with included QRWatcher script in the scene.
  2. Attach a Text object for scanning feedback
  3. Build and stand in front of a QR code until it scans

Expected behavior

The QRWatcher script looks for newly found QR codes and filters out any in hololens memory to avoid 'ghost' qr codes. It simply looks for a QR code, adds it to the list of found codes and updates the text object to give basic text feedback when a code is recognized. This should be giving QR text feedback every frame the QR is in camera view.

Screenshots

A screenshot doesn't do much justice but here is a comparison video of performance https://visuallive-my.sharepoint.com/:v:/p/deynon_b/Ef9H7T-fpSlKuljvQOF3A5oBGiZK4iVBb5aznCA4bosDHg?e=afa6Jf

Your setup (please complete the following information)

-QrWatcher.txt [converted to .txt from .cs]

Target platform (please complete the following information)

Additional context

When our developers asked for access to PV camera in hololens 2, we were prompted to use the QR Tracker provided by Microsoft. In the early hololens 2 development we did use this system for QR reading. After multiple field and customer tests, we gathered that the system seemed to be too unresponsive for most use cases and have given our proprietary reader access via PhotoCapture. This produces better results but does show a noticeable performance hitch as it is capturing and decoding. For our own QR Reader to work seamlessly, we need access to a performant camera stream.

tmhab commented 3 years ago

Relevant discussion in different repo (Microsoft QRWatcher example): https://github.com/chgatla-microsoft/QRTracking/issues/19

I think it comes down to camera resolution. I have printed out a QR code almost the size of a piece of A4 paper sheet, and at 1-2 meters it tracks instantly, without any performance stuttering.

I am a bit disappointed with the experience though, having to workaround by increasing QR code size so much.

ModischFabrications commented 3 years ago

I have encountered the same problem while experimenting with the example, it's unusable in it's current state. 10x10cm QR Codes needed a distance <40cm to be detected, smaller ones were even worse.

Is it possible to enable the usage of the main camera for the QR code detection?

(While we are at it, the Unity integration of the QR Tracker is cumbersome due to it being distributed by nuget and is lacking any kind of unity integration. I would wish for it to be included with MRTK, since it seems like a natural extension. )

HizPhilips commented 3 years ago

Any updates on this? Tracking seems to be slow especially when the distance between guessed point and qr marker is small. If the distance gets bigger, it seems to be instant.

stale[bot] commented 2 years ago

This issue has been marked as stale by an automated process because it has not had any recent activity. It will be automatically closed in 30 days if no further activity occurs. If this is still an issue please add a new comment with more recent details and repro steps.

IssueSyncBot commented 9 months ago

We appreciate your feedback and thank you for reporting this issue.

Microsoft Mixed Reality Toolkit version 2 (MRTK2) is currently in limited support. This means that Microsoft is only fixing high priority issues. Unfortunately, this issue does not meet the necessary priority and will be closed. If you strongly feel that this issue deserves more attention, please open a new issue and explain why it is important.

Microsoft recommends that all new HoloLens 2 Unity applications use MRTK3 instead of MRTK2.

Please note that MRTK3 was released in August 2023. It features an all-new architecture for developing rich mixed reality experiences and has a minimum requirement of Unity 2021.3 LTS. For more information about MRTK3, please visit https://www.mixedrealitytoolkit.org.

Thank you for your continued support of the Mixed Reality Toolkit!