How to replicate ARReferenceImage.Validate()

This function will validate the tracking quality of an image. That is, will the phone camera be able to recognize and track a given photo. I need this functionality for a macOS application, but ARKit is not available on macOS. Can anyone give me tips on how to replicate this function? In wwdc video apple defines a trackable image as having [distinct features, well textured, good contrast] and a non trackable image as having [repetitive structures, uniform color regions, narrow histogram]. I imagine this will require python/openCV to implement, but i need more information from Apple, like how narrow is too narrow histogram? What metric for well textured? Can i use accelerate or coreImage to calculate image tracking quality?
Do you need this functionality at runtime in your macOS application?
If your question is about assessing the suitability of an image for ARKit tracking on the Mac, you can accomplish this in Xcode:
  1. Create a new project, for example start from the "Augmented Reality App" template.

  2. Click "Assets.xcassets" in the Project Navigator.

  3. Click the + button and add an "AR Resource Group" item from the "AR and SceneKit" category.

  4. Drag an image to the area that says "Drag and drop AR reference images or object files".

The image will automatically be analyzed and an exclamation mark will be displayed in case of potential problems. Click on the exclamation sign for further details and suggestions how to improve the image.

Thank you for the response! Unfortunately this will not work. The purpose of the macOS app is to analyze a series of images and accept the ones that would be valid ARReferenceImages.
How to replicate ARReferenceImage.Validate()
 
 
Q