Mukesh
Mukesh

Reputation: 1267

Difference between images in OpenCV of pixel in Matrix form

does it possible to get difference between images in OpenCV of pixel in Matrix form

Upvotes: 0

Views: 2204

Answers (1)

Eric
Eric

Reputation: 2341

What do you mean by difference? If you have two matrices with the same size and type, you can compute the difference:

cv::Mat::zeros m1(2,2,CV_32FC1);
cv::Mat::ones m2(2,2,CV32FC1);
std::cout << (m2-m1) << std::endl;

Upvotes: 1

Related Questions