C++ 中是否有 Opencv 2.3 Mat 指针?
我是 opencv 的新手,在 C++ 中使用 2.3 版本。我的方法是获取一个指向 cv::Mat_ 值的 float** 指针,我还可以在其中更改值或通过 float[][] 进行访问。我需要它来使用 fftw3 和其他东西,我通常需要这些指针。 opencv 的文档非常好,但我只能找到 uchar* 指针“数据”。用这个指针读取图像不是问题,但我还想在 cv::Mats 中写入浮点数或双精度数。
只是为了帮助:我的最终函数应该如下所示:
template <typename T> cv::Mat_<complex<T> > fft2 (cv::Mat_<T> input)
那么有人有一个解决这个问题的小代码片段吗?
I'm new in opencv and use the version 2.3 in C++. My approach is to get a float** pointer to the values of a cv::Mat_ where I can also change values or get access via float[][]. I need it to use fftw3 and other stuff, where I usually need those pointers. The documentation of opencv is very nice, but I could just find the uchar* pointer "data". Reading images with this pointer is not a problem, but I also want to write floats or doubles in cv::Mats.
just for help: my final function should look like:
template <typename T> cv::Mat_<complex<T> > fft2 (cv::Mat_<T> input)
So has somebody a small code snippet for this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用这个:
use this: