Limit Detection Area in Vision API

后端 未结 1 1599
别那么骄傲
别那么骄傲 2021-02-05 13:56

It seems I\'ve found myself in the deep weeds of the Google Vision API for barcode scanning. Perhaps my mind is a bit fried after looking at all sorts of alternative libraries (

1条回答
  •  失恋的感觉
    2021-02-05 14:14

    The API currently does not have an option to limit the detection area. But you could crop the preview image before it gets passed into the barcode detector. See here for an outline of how to wrap a detector with your own class:

    Mobile Vision API - concatenate new detector object to continue frame processing

    You'd implement the "detect" method to take the frame received from the camera, create a cropped version of the frame, and pass that through to the underlying detector.

    0 讨论(0)
提交回复
热议问题