dip_opencv namespace

The dip_opencv namespace contains the interface between OpenCV 2 (or later) and DIPlib.

Contents

Classes

class ExternalInterface
This class is the dip::ExternalInterface for the OpenCV interface.

Functions

auto MatToDip(cv::Mat const& mat, bool forceUnsigned = false) -> dip::Image
Creates a DIPlib image around an OpenCV cv::Mat, without taking ownership of the data.
auto DipToMat(dip::Image const& img) -> cv::Mat
Creates an OpenCV cv::Mat object around a DIPlib image, without taking ownership of the data.
auto CopyDipToMat(dip::Image const& img) -> cv::Mat
Creates an OpenCV cv::Mat object from a DIPlib image by copy.
void FixBinaryImageForDip(dip::Image& img)
Fixes the binary image img to match expectations of DIPlib (i.e. only the bottom bit is used).
void FixBinaryImageForOpenCv(dip::Image& img)
Fixes the binary image img to match expectations of OpenCV (i.e. all bits have the same value).