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.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
U didn't called processImage or import processImage.
I was under the impression that it gets called automatically if I am conforming to the protocol <cvvideocameradelegate> in Override.h. Additionally, I never had to call processImage in the native iOS application in order for it to run.
the documentation for the Objective C bindings are very bare. unfortunately you are in uncharted territory. maybe this tutorial can help you https://docs.opencv.org/master/db/dc8...