mil*_*ner 3 c++ opencv visual-studio-2013
使用OpenCV(2.49二进制文件)与MSVC 2013,调试运行时报告在使用cv::minMaxIdx此短代码时堆栈损坏:
cv::MatND hist;
int histSize[] = { 256 };
float range[] = { 0, 256 };
const float* histRange[] = { range };
cv::calcHist(&image, 1, { 0 }, cv::Mat(), hist, 1, histSize, histRange, true /* uniform */, true /* accumulate */);
// this line provokes a stack corruption
cv::minMaxIdx(hist, nullptr, nullptr, nullptr, &maxIdx);
Run Code Online (Sandbox Code Playgroud)
我可以在调试器中看到直方图,所有值和变量看起来都是正确的.在发布模式下不会发生此问题,但我怀疑这只是因为检查未运行.更改hist到hist.col(0)没有帮助.
| 归档时间: |
|
| 查看次数: |
884 次 |
| 最近记录: |