There is already a plugin that uses OpenCV. You may be able to use that directly, or use it as a starting point.
https://github.com/areaDetector/ADCompVision
Mark
________________________________
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Marcin Lukaszewski via Tech-talk <tech-talk at aps.anl.gov>
Sent: Wednesday, March 4, 2020 9:59 AM
To: tech-talk at aps.anl.gov
Subject: Problem during compilation of IOC with custom ADPlugin
Hi all,
I'm working on custom ADPlugin with OpenCV.
I use ADPluginBar as a reference, following instructions from
https://github.com/areaDetector/ADPluginBar
I made required changes to the areaDetector installation and both ADPluginBar and my plugin compiles successfully with areaDetector.
However, when I try to compile IOC with ADPluginBar, I get undefined reference errors, like:
/usr/local/epics/support/areaDetector/areaDetector-R3-8/ADPluginBar/lib/linux-x86_64/libNDPluginBar.so: undefined reference to `cv::Mat::deallocate()
I assume that in my IOC I need to link only ADPluginBar and there is no need to directly link external libraries (OpenCV and zbar). Is that correct?
What I'm missing?
Has anyone have an example of IOC with ADPluginBar or custom ADPlugin which uses external library, like OpenCV?
My environment:
base: 7.0.3.1
asyn: 4-38
areaDetector: R3-8
OpenCV: 2.4.13.6 (installed from the source, to the default system location)
I appreciate any suggestion or feedback.
Thanks
Marcin