如何将矢量浮点数转换为Mat图像 [英] How Can I Convert Vector Float Into Mat Image

查看:669
本文介绍了如何将矢量浮点数转换为Mat图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有漂浮矢量然后我需要将其转换为mat图像并在调整大小和imwrite函数中使用它



我该怎么做呢

i有一个功能,但在运行代码时我有一个错误



功能:

i have afloat vector then i need to convert it into a mat image and use it in resize and imwrite function

how can i do this
i have a function but when running the code i have an error

the function:

memcpy(lbp.data,Vtrn.data(),Vtrn.size()*sizeof(float));
        resize(lbp, lbp, cvSize(50, 50)); //in order to make all image same size
        imwrite(In.vectorofotrainpath[i].c_str(),lbp);// true with mat image or not





我的错误是:



Windows在mycode.exe中触发了一个断点。



这可能是由于堆的损坏,这表明mycode.exe或其加载的任何DLL中存在错误。



这也可能是由于用户在mycode.exe有焦点时按下F12。



the error i have is:

Windows has triggered a breakpoint in mycode.exe.

This may be due to a corruption of the heap, which indicates a bug in mycode.exe or any of the DLLs it has loaded.

This may also be due to the user pressing F12 while mycode.exe has focus.

推荐答案

这篇关于如何将矢量浮点数转换为Mat图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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