Fix build with opencv 4.2
Port away from old API which is removed in 4.2
Differential Revision: https://phabricator.kde.org/D26143