我无法弄清楚如何正确访问 3D cv::Mat 数组的元素。以下代码在 Vivado HLS 中运行并失败并出现非描述性错误。这是 Vivado HLS 的问题,还是我没有正确读取值?
cv::Mat img = cv::Mat(cv::Size(100,100),CV_MAKETYPE(CV_8U,5)); // should create a 100x100x5 array
uchar x;
x = img.at<uchar>(0,0,0); // works fine when reading from third dimension at 0
x = img.at<uchar>(0,0,1); // fails when reading from third dimension at 1
错误:
@E Simulation failed: SIGSEGV.
ERROR: [SIM 211-100] CSim failed with errors.