提交 b45e784b 编写于 作者: J jexner

Fix segmentation fault in cv::Mat::forEach

This issue concerns only matrices with more dimensions than columns.
See https://github.com/opencv/opencv/issues/8447
上级 f70cc29e
......@@ -507,7 +507,7 @@ void Mat::forEach_impl(const Functor& operation) {
this->rowCall2(row, COLS);
}
} else {
std::vector<int> idx(COLS); /// idx is modified in this->rowCall
std::vector<int> idx(DIMS); /// idx is modified in this->rowCall
idx[DIMS - 2] = range.start - 1;
for (int line_num = range.start; line_num < range.end; ++line_num) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册