Reputation: 121
I have a unsigned short array which I would like to median filter using opencv (it seems to have one of the most efficient filters around)
However I can't seem to create a matrix from the array. I've tried the Mat(int _rows, int _cols, int _type, void* _data, size_t _step=AUTO_STEP) constructor using:
Mat(rows,cols,IPL_DEPTH_16U,myShortArray,2);
But it doesn't seem to work. What am I doing wrong?
Upvotes: 3
Views: 3222