Search Unity

Question AR Foundation - getting Rect of recognized image on screen

Discussion in 'AR' started by God0fMagic, Oct 15, 2020.

  1. God0fMagic

    God0fMagic

    Joined:
    Feb 8, 2019
    Posts:
    17
    Hello,

    It seems that AR Foundation when tracking images does not include color of the tracked image as a feature point. I have 3 images which all are the same except for the color and I put one of them in ReferenceImageLibrary. Just with that one image it recognizes all 3 versions. It is not a big issue as immediately after an image is recognized I iterate through pixels from camera feed to decide which color version was found. However if recognized image does not take most of the screen environment can confuse my color recognition.

    Is there a way to get a Rect of recognized image telling where on screen it was, when it was recognized?

    That would greatly improve the accuracy and speed of my code, which tries to decide which version of the image was found.

    Any other solutions for solving this problem are welcome too.

    Use case: we have some product with green box and red box, which are otherwise identical. After scanning the box we want to spawn a 3d object with the same color as scanned box.

    Thank you.

    [Sorry for lack of tags, tag auto complete doesn't work for some reason and it complains if I just write my own]