OpenCV IplImage数据浮动 [英] OpenCV IplImage data to float

查看:119
本文介绍了OpenCV IplImage数据浮动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法可以将IplImage指针转换为浮点指针?基本上将图像数据转换为浮点型. 感谢任何帮助.

Is there a way to convert IplImage pointer to float pointer? Basically converting the imagedata to float. Appreciate any help on this.

推荐答案

使用cvConvert(src,dst),其中src是源图像,而dst是预分配的浮点图像.

Use cvConvert(src,dst) where src is the source image and dst is the preallocated floating point image.

例如

dst = cvCreateImage(cvSize(src->width,src->height),IPL_DEPTH_32F,1);
cvConvert(src,dst);

这篇关于OpenCV IplImage数据浮动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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