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.
我有一个无符号短数组,我想使用 opencv 对其进行中值过滤(它似乎是最有效的过滤器之一)
但是我似乎无法从数组中创建矩阵。我已经尝试使用 Mat(int _rows, int _cols, int _type, void* _data, size_t _step=AUTO_STEP) 构造函数:
Mat(rows,cols,IPL_DEPTH_16U,myShortArray,2);
但这似乎不起作用。我究竟做错了什么?
尝试
Mat m(rows, cols, CV_16U, myShortArray);