First time here? Check out the FAQ!
answered 2018-12-26 02:08:08 -0600
you can resize() your Mat, using the INTER_NEAREST flag:
resize()
INTER_NEAREST
Mat_<uchar> m(1,10); m << 0,1,2,3,4,5,6,7,8,9; resize(m,m,Size(m.cols/2, m.rows), 0, 0, INTER_NEAREST); cout << m; [ 0, 2, 4, 6, 8]