Please bear with me, I'm totally new to OpenCV.
cv::Mat_<double> A (lengthOfArray1, 1, array1);
cv::Mat_<double> B (lengthOfArray1, 1, array2);
cv::Mat_<double> C = A - B;
The problem is that what I get for C is an array with the right dimensions but a null pointer data, refcount, datastart, dataend, datalimit, and allocator. array1 is the same size as array2. I must be doing something silly.