Ask Your Question

Revision history [back]

Why is the processImage delegate not getting called automatically?

Hi OpenCV Community,

I hope everyone is well and safe!

In a native iOS application written in Objective-C, I am able to track a red laser and get the coordinates; however, I am having problems with dropping this code into a native iOS plugin for Unity which is a static library.

With that said, I am able to successfully set up the CvVideoCamera in the static library and compile the Unity application without any errors, but the processImage delegate is not getting called automatically as it does in the native application.

Below, I attached and labeled relevant codes for the working native iOS application along with the static library.

Unity application compiled with static library - This number should ideally be 8 to confirm that the processImage delegate has been called; however, it remains 7 which only indicates that the camera is working. If I could get this working in the same manner as the native iOS application, I could send over the coordinates to Unity.

Static library - Override.h

Static library - Override.mm

Static library - Override.mm 2

Native iOS application - ViewContoller.h

Native iOS application - ViewController.mm

Native iOS application - ViewController.mm 2

If more information is needed, please let me know!

Best,

Steve