Search Unity

Question Fast moving ball detection

Discussion in 'AR' started by unity_2LMxNW2cjGl2mA, Apr 8, 2021.

  1. unity_2LMxNW2cjGl2mA

    unity_2LMxNW2cjGl2mA

    Joined:
    Dec 5, 2017
    Posts:
    3
    Hi,

    I was wondering if someone could guide me if the following functionality is possible using Unity AR foundation?



    Are there any samples I can refer to? It is imperative that the solution is able to detect fast moving (balls) in real-time like basketball dribbling or baseball (I know it’s a stretch, but I need to know if the phone cameras are fast enough to do it or we need to do post processing using opencv etc).

    Would appreciate some advice.

    Thanks!
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    i'd think opencv is the way.. even the google ar instant placement is rather slow,
    https://developers.google.com/ar/develop/java/instant-placement/overview

    also,
    since camera is not moving, you could maybe fake it, detect if target area color changes (to near ball color..)
    or in shader could do color thresholding and blob detection for those pixels, to possibly get actual ball position..

    but of course those would fail if background has same colors
     
  3. unity_2LMxNW2cjGl2mA

    unity_2LMxNW2cjGl2mA

    Joined:
    Dec 5, 2017
    Posts:
    3
    I see - what about unity AR Foundation 2d image tracking?