Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于数组的转化问题 #12

Open
ycj1124 opened this issue Feb 21, 2022 · 4 comments
Open

关于数组的转化问题 #12

ycj1124 opened this issue Feb 21, 2022 · 4 comments

Comments

@ycj1124
Copy link

ycj1124 commented Feb 21, 2022

大佬您好 我想问一下 您这个跑到最后得到的是不是一个float的数组呀?如果我想转化为Mat数组进行操作,具体要怎么做呢?是不是想如图中这里在ShowDisparityMap函数中的操作就是在转化为Mat呀?disp_mat就是得到的Mat类型的数组?
2月21日

@ethan-li-coding
Copy link
Owner

cv::Mat m = cv::Mat(height,width,CV_32F,disp_map)

@ycj1124
Copy link
Author

ycj1124 commented Feb 23, 2022

cv::Mat m = cv::Mat(height,width,CV_32F,disp_map)

请问大佬 在进行图片的保存之前的最后一个步骤得到的结果是否就是这个disp_left呢?
箭头
disp_left
我注意到这是一个float类型的数据,想问下如果想把这个转成Mat要怎么操作呢 谢谢!

@ethan-li-coding
Copy link
Owner

是的就是,这个,转换方法我在2楼说了,就那段代码,把disp_map换成你GetDisparityMap返回的指针

@ycj1124
Copy link
Author

ycj1124 commented Feb 24, 2022

是的就是,这个,转换方法我在2楼说了,就那段代码,把disp_map换成你GetDisparityMap返回的指针

好的 谢谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants