Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个二维数组(cv::MAT),我想找出所有非零值元素的索引。换句话说,[x, y] = find(A ~= 0)?
OpenCV 能否以 cv::Point 格式返回结果?
检查文档,一切都在那里!
http://opencv.willowgarage.com/documentation/cpp/core_basic_structures.html
您将使用基本元素访问cv::Mat
cv::Mat
M.at<double>(i,j) += 1.f;