-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
Closed
Labels
Description
Hi,
My code is :
Mat x(1,1,CV_64FC1);
Mat p(10,4,CV_64FC1);
x.setTo(0);
p.setTo(Scalar::all(5));
cout << " x " << x << endl;
cout << " p " << p << endl;
for (int i = 0; i < p.rows; i++)
{
x += p.row(i);
}
cout<<" x "<<x<<endl;
}
Results are
x [0]
p [5, 5, 5, 5;
5, 5, 5, 5;
5, 5, 5, 5;
5, 5, 5, 5;
5, 5, 5, 5;
5, 5, 5, 5;
5, 5, 5, 5;
5, 5, 5, 5;
5, 5, 5, 5;
5, 5, 5, 5]
x [-6.277438562204192e+66, -6.277438562204192e+66, -6.277438562204192e+66, -6.277438562204192e+66]
First I don't understand my code ! I copy this code here. I can say _std.rows is 1 (and _std.cols is 4 ). It is my example.
Why no exception is thrown ?
Reactions are currently unavailable