android – 使用Vision API自定义RectangleDetector

如何在Mobile vision API中创建FaceDetector和BarcodeDetector等自定义RectangleDetector?我需要从相机框架中检测矩形形状.我怎样才能实现这一目标? 最佳答案 您将扩展Detector类:

https://developers.google.com/android/reference/com/google/android/gms/vision/Detector

定义RectangleDetector类.检测矩形的代码将通过覆盖detect()方法来实现.您需要自己实现,因为还没有用于检测移动视觉中矩形的代码.

有了这个,你就可以将它与CameraSource和移动视觉API的其他部分一起使用.

点赞