StereoBM::disp12MaxDiff Crash the Release
Initializing "cv::StereoBM bm.state->disp12MaxDiff" should be careful, inappropriate value might crash your program. Suggested that you set it to -1 to disable it.
OpenCV中的算兩幅圖像差的函數(shù)CVAPI(void) cvFindStereoCorrespondenceBM( const CvArr* left, const CvArr* right, CvArr* disparity, CvStereoBMState* state ); 中的最后一個參數(shù)state是用來調(diào)節(jié)參數(shù)得到不同效果的Disparity圖,里面有個參數(shù)disp12MaxDiff是用來設(shè)定左右兩視圖的最大不同值,在初始化值的時候要小心,錯誤的初始化值可能會讓整個程序崩潰,保險的做法是設(shè)為-1,禁用該參數(shù)。
disp12MaxDiff?– Maximum allowed difference (in integer pixel units) in the left-right disparity check. Set it to a non-positive value to disable the check.
本文轉(zhuǎn)自博客園Grandyang的博客,原文鏈接:StereoBM::disp12MaxDiff Crash the Release,如需轉(zhuǎn)載請自行聯(lián)系原博主。
總結(jié)
以上是生活随笔為你收集整理的StereoBM::disp12MaxDiff Crash the Release的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: FTP服务器搭建下的主动模式和被动模式
- 下一篇: 【302天】跃迁之路——程序员高效学习方