1

I'm currently using OpenCV to process an image, while also using VNCoreMLRequest requests/handlers (unrelated) like so:

var image_cap = CameraCaptureManager.GetImageFromPixelBuffer(pixelBuffer)
let imageRequestHandler = VNImageRequestHandler(cvPixelBuffer: pixelBuffer, orientation: .up, options: [:])
        
do {
  try imageRequestHandler.perform(self.requests)
} catch {
  print(error)
}

let img_overlay = opencv_wrapper.detect(in: image_cap)

I'd like to create my own subclass of VNImageBasedRequest to add to self.requests for my own opencv manipulation/detection instead of running a separate process.

Does anyone have an example of subclassing their own VNImageBasedRequest? Thanks!

justin
  • 651
  • 1
  • 8
  • 18

0 Answers0