Adds C methods that take a cv::Mat* (#21)

Some implementations of OpenCV use cv::Mat as their native pointer
rather then CvMat, so we need to support both in the C interface
This commit is contained in:
Thad House
2016-11-30 22:00:44 -08:00
committed by Peter Johnson
parent 1332ba3ad2
commit 3625f11e08
5 changed files with 19 additions and 0 deletions

View File

@@ -185,6 +185,10 @@ uint64_t CS_GrabSinkFrame(CS_Sink sink, struct CvMat* image,
return cs::GrabSinkFrame(sink, mat, status);
}
uint64_t CS_GrabSinkFrameCpp(CS_Sink sink, cv::Mat* image, CS_Status* status) {
return cs::GrabSinkFrame(sink, *image, status);
}
char* CS_GetSinkError(CS_Sink sink, CS_Status* status) {
llvm::SmallString<128> buf;
auto str = cs::GetSinkError(sink, buf, status);