将旧的Opencv代码转换为新的c++ API,替换cvGetSubRect
Converting old Opencv code to the new C++ API, replacement for cvGetSubRect?
我正在使用C api将一些旧的OpenCV代码转换为OpenCV 2.3中的新c++ api。我想知道取代cvGetSubRect
调用的方法是什么?
我有以下cvGetSubRect(some_cv_mat_pointer, another_cv_mat_pointer, some_cv_rect);
在c++ api中与此等价的是什么?
你在源图像上创建一个roi,它会给你一个新的图像-没有实际的像素复制它都是自动发生的
Mat image(.....) // original image
Rect roi(10, 20, 100, 50); // shape of roi
Mat image_roi = image(roi); /// really a window into image, copy it if you need to change it
http://opencv.willowgarage.com/documentation/cpp/c + + _cheatsheet.html 相关文章:
- 用于访问容器<T>数据成员的正确 API
- 如何使用Luacneneneba API正确读取字符串和表参数
- C++MySQL C api用户输入行
- 如何使用 AWS Transcribe C++ API 中的'StartTranscriptionJobRequest'?
- 将std::string传递给WriteConsole API
- EvtExportLogneneneba API正在将远程计算机的事件日志保存到远程PC本身.如何将其保存到主机
- 在gtest.中使用fff.h模拟系统API
- 有没有任务栏API可以立即应用注册表更改
- C++win32 API创建多个类似视口的窗口
- 使用libcurl提交批量url的正确BING Api POST url是什么
- 如何将真正的字符串从python c-api转换为python脚本
- 使用Qt框架在c ++类中创建API调用
- Libreoffice API (UNO):需要更改用户的 xTextField 文本
- 使用 WIN32 API (C/C++) 对特定树视图项进行着色
- 使用 Python Extension API 包装复杂C++类
- 如何使用 samtools C API 构建一个简单的主.cpp文件
- 第三方 API 中的编译错误 - Visual Studio
- Tensorflow c++ api undefined reference to 'tflite::D efaultErrorReporter()'
- clang 的 libFuzzer 可以在同一二进制文件中测试超过 1 个 API 吗?
- Issues with Win32 ReadProcessMemory API