Created
October 21, 2019 13:55
-
-
Save berak/912668a2dda3834e8e16297541d9f970 to your computer and use it in GitHub Desktop.
cv::Mat divide problem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mat m1(3,3,CV_32FC3,Scalar(3,2,1)); | |
Mat m2; | |
cout << m1 << endl << m2 << endl; | |
Mat n = m1/m2; | |
cout << n << endl; | |
divide(1,m1,n); | |
cout << n << endl; | |
[3, 2, 1, 3, 2, 1, 3, 2, 1; | |
3, 2, 1, 3, 2, 1, 3, 2, 1; | |
3, 2, 1, 3, 2, 1, 3, 2, 1] | |
[] | |
[0.33333334, 0.5, 1, 0.33333334, 0.5, 1, 0.33333334, 0.5, 1; | |
0.33333334, 0.5, 1, 0.33333334, 0.5, 1, 0.33333334, 0.5, 1; | |
0.33333334, 0.5, 1, 0.33333334, 0.5, 1, 0.33333334, 0.5, 1] | |
[0.33333334, 0.5, 1, 0.33333334, 0.5, 1, 0.33333334, 0.5, 1; | |
0.33333334, 0.5, 1, 0.33333334, 0.5, 1, 0.33333334, 0.5, 1; | |
0.33333334, 0.5, 1, 0.33333334, 0.5, 1, 0.33333334, 0.5, 1] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment