First time here? Check out the FAQ!
answered 2016-12-23 01:04:38 -0600
You should check if r1 continuous (call r1.isContinuous()). Ad if it is, then get pointer to the beginning of the data: r = r1.ptr<double>(0), same for the g1 and b1.