support for new source/sink implementation

pull/3471/head
kallaballa 2 years ago
parent 5c1260be6e
commit 1f1a32dbe3
  1. 5
      modules/v4d/samples/custom_source_and_sink.cpp

@ -21,11 +21,10 @@ int main() {
}, 60.0f); }, 60.0f);
//Make a sink the saves each frame to a PNG file (does nothing in case of WebAssembly). //Make a sink the saves each frame to a PNG file (does nothing in case of WebAssembly).
Sink sink([](const cv::UMat& frame){ Sink sink([](const uint64_t& seq, const cv::UMat& frame){
try { try {
#ifndef __EMSCRIPTEN__ #ifndef __EMSCRIPTEN__
static long cnt = 0; imwrite(std::to_string(seq) + ".png", frame);
imwrite(std::to_string(cnt++) + ".png", frame);
#else #else
CV_UNUSED(frame); CV_UNUSED(frame);
#endif #endif

Loading…
Cancel
Save