I'm using Computer Vision and ARKit to detect rectangles and track them (as in Apple's sample here: https://developer.apple.com/documentation/arkit/tracking_and_altering_images). I found though that it is a little unreliable, as sometimes it starts trying to track an out-of-focus version of the object, and when the object comes in to focus, the ARReferenceImage and the actual image no longer match and so the tracking becomes very unreliable. Is there a fast way to ignore images that are blurred? I googled online and found that one can use OpenCV to get the variance of the laplacian, however, I'm curious how I do this via GPU-accelerated Metal Performance Shaders using Swift?