相当于OpenCV C ++接口中的cvSetImageROI [英] Equivalent to cvSetImageROI in the OpenCV C++ interface

查看:135
本文介绍了相当于OpenCV C ++接口中的cvSetImageROI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将一个旧的测试应用程序从OpenCV C接口迁移到新的C ++接口(我想学习它)。使用C ++接口的 cvSetImageROI cvResetImageROI 是什么等价的?我在文档中找不到它。

I'm migrating an old test application from the OpenCV C interface to the new C++ interface (I wish to learn it). What's the equivalent, using the C++ interface, of cvSetImageROI and cvResetImageROI? I couldn't find it in the documentation.

推荐答案

实际上,它在docs 。耻辱我。

Actually, it's right on the docs. Shame on me.

//Make a rectangle
Rect roi(10, 20, 100, 50);
//Point a cv::Mat header at it (no allocation is done)
Mat image_roi = image(roi)

这篇关于相当于OpenCV C ++接口中的cvSetImageROI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆