Fix incorrect Mat address reconstruction on 64-bit platforms
This fixes random failures in Java wrappers.
This commit is contained in:
@@ -219,7 +219,7 @@ void Mat_to_vector_Mat(cv::Mat& mat, std::vector<cv::Mat>& v_mat)
|
||||
for(int i=0; i<mat.rows; i++)
|
||||
{
|
||||
Vec<int, 2> a = mat.at< Vec<int, 2> >(i, 0);
|
||||
long long addr = (((long long)a[0])<<32) | a[1];
|
||||
long long addr = (((long long)a[0])<<32) | (a[1]&0xffffffff);
|
||||
Mat& m = *( (Mat*) addr );
|
||||
v_mat.push_back(m);
|
||||
}
|
||||
|
Reference in New Issue
Block a user