diff --git a/modules/highgui/src/plugin_wrapper.impl.hpp b/modules/highgui/src/plugin_wrapper.impl.hpp index 3fa2cfa11a..97aea69098 100644 --- a/modules/highgui/src/plugin_wrapper.impl.hpp +++ b/modules/highgui/src/plugin_wrapper.impl.hpp @@ -232,8 +232,12 @@ std::vector getPluginCandidates(const std::string& baseName) return results; } +// NB: require loading of imgcodecs module +static void* g_imwrite = (void*)imwrite; + void PluginUIBackendFactory::loadPlugin() { + CV_Assert(g_imwrite); for (const FileSystemPath_t& plugin : getPluginCandidates(baseName_)) { auto lib = std::make_shared(plugin);