Cast a long integer to double explicitly.
This commit is contained in:
parent
b7be49426d
commit
7d4cbbd7aa
@ -233,7 +233,12 @@ static int pyopencv_to(const PyObject* o, Mat& m, const ArgInfo info, bool allow
|
|||||||
|
|
||||||
if( PyInt_Check(o) )
|
if( PyInt_Check(o) )
|
||||||
{
|
{
|
||||||
double v[] = {PyInt_AsLong((PyObject*)o), 0., 0., 0.};
|
double v[] = {
|
||||||
|
static_cast<double>(PyInt_AsLong((PyObject*)o)),
|
||||||
|
0.,
|
||||||
|
0.,
|
||||||
|
0.,
|
||||||
|
};
|
||||||
m = Mat(4, 1, CV_64F, v).clone();
|
m = Mat(4, 1, CV_64F, v).clone();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user