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
924fc070
Commit
924fc070
authored
Jul 16, 2013
by
Roman Donchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed / for Matx to Matx::div, for symmetry with Matx::mul.
parent
3443fd85
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
matx.hpp
modules/core/include/opencv2/core/matx.hpp
+9
-6
test_operations.cpp
modules/core/test/test_operations.cpp
+1
-1
No files found.
modules/core/include/opencv2/core/matx.hpp
View file @
924fc070
...
...
@@ -163,6 +163,9 @@ public:
//! multiply two matrices element-wise
Matx
<
_Tp
,
m
,
n
>
mul
(
const
Matx
<
_Tp
,
m
,
n
>&
a
)
const
;
//! divide two matrices element-wise
Matx
<
_Tp
,
m
,
n
>
div
(
const
Matx
<
_Tp
,
m
,
n
>&
a
)
const
;
//! element access
const
_Tp
&
operator
()(
int
i
,
int
j
)
const
;
_Tp
&
operator
()(
int
i
,
int
j
);
...
...
@@ -782,6 +785,12 @@ Matx<_Tp, m, n> Matx<_Tp, m, n>::mul(const Matx<_Tp, m, n>& a) const
return
Matx
<
_Tp
,
m
,
n
>
(
*
this
,
a
,
Matx_MulOp
());
}
template
<
typename
_Tp
,
int
m
,
int
n
>
inline
Matx
<
_Tp
,
m
,
n
>
Matx
<
_Tp
,
m
,
n
>::
div
(
const
Matx
<
_Tp
,
m
,
n
>&
a
)
const
{
return
Matx
<
_Tp
,
m
,
n
>
(
*
this
,
a
,
Matx_DivOp
());
}
template
<
typename
_Tp
,
int
m
,
int
n
>
inline
Matx
<
_Tp
,
n
,
m
>
Matx
<
_Tp
,
m
,
n
>::
t
()
const
{
...
...
@@ -1171,12 +1180,6 @@ Vec<_Tp, m> operator * (const Matx<_Tp, m, n>& a, const Vec<_Tp, n>& b)
return
(
const
Vec
<
_Tp
,
m
>&
)(
c
);
}
template
<
typename
_Tp
,
int
m
,
int
n
>
static
inline
Matx
<
_Tp
,
m
,
n
>
operator
/
(
const
Matx
<
_Tp
,
m
,
n
>&
a
,
const
Matx
<
_Tp
,
m
,
n
>&
b
)
{
return
Matx
<
_Tp
,
m
,
n
>
(
a
,
b
,
Matx_DivOp
());
}
template
<
typename
_Tp
,
int
m
,
int
n
>
static
inline
bool
operator
==
(
const
Matx
<
_Tp
,
m
,
n
>&
a
,
const
Matx
<
_Tp
,
m
,
n
>&
b
)
{
...
...
modules/core/test/test_operations.cpp
View file @
924fc070
...
...
@@ -899,7 +899,7 @@ bool CV_OperationsTest::TestMatxElementwiseDivison()
Matx22f
mat
(
2
,
4
,
6
,
8
);
Matx22f
mat2
(
2
,
2
,
2
,
2
);
Matx22f
res
=
mat
/
mat2
;
Matx22f
res
=
mat
.
div
(
mat2
)
;
if
(
res
(
0
,
0
)
!=
1.0
)
throw
test_excep
();
if
(
res
(
0
,
1
)
!=
2.0
)
throw
test_excep
();
...
...
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