Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
0172bd6b
Commit
0172bd6b
authored
Mar 02, 2015
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3756 from eliteraspberries:cast-double
parents
e02d6e2c
7d4cbbd7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
5 deletions
+18
-5
test_reproject_image_to_3d.cpp
modules/calib3d/test/test_reproject_image_to_3d.cpp
+6
-1
test_undistort_badarg.cpp
modules/calib3d/test/test_undistort_badarg.cpp
+4
-1
perf_imgproc.cpp
modules/gpu/perf/perf_imgproc.cpp
+2
-2
cv2.cpp
modules/python/src2/cv2.cpp
+6
-1
No files found.
modules/calib3d/test/test_reproject_image_to_3d.cpp
View file @
0172bd6b
...
...
@@ -137,7 +137,12 @@ protected:
{
InT
d
=
disp
(
y
,
x
);
double
from
[
4
]
=
{
x
,
y
,
d
,
1
};
double
from
[
4
]
=
{
static_cast
<
double
>
(
x
),
static_cast
<
double
>
(
y
),
static_cast
<
double
>
(
d
),
1.0
,
};
Mat_
<
double
>
res
=
Q
*
Mat_
<
double
>
(
4
,
1
,
from
);
res
/=
res
(
3
,
0
);
...
...
modules/calib3d/test/test_undistort_badarg.cpp
View file @
0172bd6b
...
...
@@ -101,7 +101,10 @@ void CV_UndistortPointsBadArgTest::run(int)
img_size
.
height
=
600
;
double
cam
[
9
]
=
{
150.
f
,
0.
f
,
img_size
.
width
/
2.
f
,
0
,
300.
f
,
img_size
.
height
/
2.
f
,
0.
f
,
0.
f
,
1.
f
};
double
dist
[
4
]
=
{
0.01
,
0.02
,
0.001
,
0.0005
};
double
s_points
[
N_POINTS2
]
=
{
img_size
.
width
/
4
,
img_size
.
height
/
4
};
double
s_points
[
N_POINTS2
]
=
{
static_cast
<
double
>
(
img_size
.
width
)
/
4.0
,
static_cast
<
double
>
(
img_size
.
height
)
/
4.0
,
};
double
d_points
[
N_POINTS2
];
double
p
[
9
]
=
{
155.
f
,
0.
f
,
img_size
.
width
/
2.
f
+
img_size
.
width
/
50.
f
,
0
,
310.
f
,
img_size
.
height
/
2.
f
+
img_size
.
height
/
50.
f
,
0.
f
,
0.
f
,
1.
f
};
double
r
[
9
]
=
{
1
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
1
};
...
...
modules/gpu/perf/perf_imgproc.cpp
View file @
0172bd6b
...
...
@@ -253,7 +253,7 @@ PERF_TEST_P(Sz_Depth_Cn_Inter_Border, ImgProc_WarpAffine,
const
double
aplha
=
CV_PI
/
4
;
const
double
mat
[
2
*
3
]
=
{
std
::
cos
(
aplha
),
-
std
::
sin
(
aplha
),
s
rc
.
cols
/
2
,
std
::
cos
(
aplha
),
-
std
::
sin
(
aplha
),
s
tatic_cast
<
double
>
(
src
.
cols
)
/
2.0
,
std
::
sin
(
aplha
),
std
::
cos
(
aplha
),
0
};
const
cv
::
Mat
M
(
2
,
3
,
CV_64F
,
(
void
*
)
mat
);
...
...
@@ -301,7 +301,7 @@ PERF_TEST_P(Sz_Depth_Cn_Inter_Border, ImgProc_WarpPerspective,
declare
.
in
(
src
,
WARMUP_RNG
);
const
double
aplha
=
CV_PI
/
4
;
double
mat
[
3
][
3
]
=
{
{
std
::
cos
(
aplha
),
-
std
::
sin
(
aplha
),
s
rc
.
cols
/
2
},
double
mat
[
3
][
3
]
=
{
{
std
::
cos
(
aplha
),
-
std
::
sin
(
aplha
),
s
tatic_cast
<
double
>
(
src
.
cols
)
/
2.0
},
{
std
::
sin
(
aplha
),
std
::
cos
(
aplha
),
0
},
{
0.0
,
0.0
,
1.0
}};
const
cv
::
Mat
M
(
3
,
3
,
CV_64F
,
(
void
*
)
mat
);
...
...
modules/python/src2/cv2.cpp
View file @
0172bd6b
...
...
@@ -233,7 +233,12 @@ static int pyopencv_to(const PyObject* o, Mat& m, const ArgInfo info, bool allow
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
();
return
true
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment