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
33b7028b
Commit
33b7028b
authored
Jul 12, 2018
by
Alexander Alekhin
Committed by
Alexander Alekhin
Jul 12, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: use "explicit" for Matx() ctor
parent
625d20b9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
12 deletions
+13
-12
matx.hpp
modules/core/include/opencv2/core/matx.hpp
+9
-8
test_operations.cpp
modules/core/test/test_operations.cpp
+4
-4
No files found.
modules/core/include/opencv2/core/matx.hpp
View file @
33b7028b
...
...
@@ -66,13 +66,14 @@ namespace cv
////////////////////////////// Small Matrix ///////////////////////////
//! @cond IGNORED
struct
CV_EXPORTS
Matx_AddOp
{};
struct
CV_EXPORTS
Matx_SubOp
{};
struct
CV_EXPORTS
Matx_ScaleOp
{};
struct
CV_EXPORTS
Matx_MulOp
{};
struct
CV_EXPORTS
Matx_DivOp
{};
struct
CV_EXPORTS
Matx_MatMulOp
{};
struct
CV_EXPORTS
Matx_TOp
{};
// FIXIT Remove this (especially CV_EXPORTS modifier)
struct
CV_EXPORTS
Matx_AddOp
{
Matx_AddOp
()
{}
Matx_AddOp
(
const
Matx_AddOp
&
)
{}
};
struct
CV_EXPORTS
Matx_SubOp
{
Matx_SubOp
()
{}
Matx_SubOp
(
const
Matx_SubOp
&
)
{}
};
struct
CV_EXPORTS
Matx_ScaleOp
{
Matx_ScaleOp
()
{}
Matx_ScaleOp
(
const
Matx_ScaleOp
&
)
{}
};
struct
CV_EXPORTS
Matx_MulOp
{
Matx_MulOp
()
{}
Matx_MulOp
(
const
Matx_MulOp
&
)
{}
};
struct
CV_EXPORTS
Matx_DivOp
{
Matx_DivOp
()
{}
Matx_DivOp
(
const
Matx_DivOp
&
)
{}
};
struct
CV_EXPORTS
Matx_MatMulOp
{
Matx_MatMulOp
()
{}
Matx_MatMulOp
(
const
Matx_MatMulOp
&
)
{}
};
struct
CV_EXPORTS
Matx_TOp
{
Matx_TOp
()
{}
Matx_TOp
(
const
Matx_TOp
&
)
{}
};
//! @endcond
/** @brief Template class for small matrices whose type and size are known at compilation time
...
...
@@ -118,7 +119,7 @@ public:
//! default constructor
Matx
();
Matx
(
_Tp
v0
);
//!< 1x1 matrix
explicit
Matx
(
_Tp
v0
);
//!< 1x1 matrix
Matx
(
_Tp
v0
,
_Tp
v1
);
//!< 1x2 or 2x1 matrix
Matx
(
_Tp
v0
,
_Tp
v1
,
_Tp
v2
);
//!< 1x3 or 3x1 matrix
Matx
(
_Tp
v0
,
_Tp
v1
,
_Tp
v2
,
_Tp
v3
);
//!< 1x4, 2x2 or 4x1 matrix
...
...
modules/core/test/test_operations.cpp
View file @
33b7028b
...
...
@@ -794,13 +794,13 @@ bool CV_OperationsTest::TestTemplateMat()
Size
size
(
2
,
5
);
TestType
<
float
>
(
size
,
1.
f
);
cv
::
Vec3f
val1
=
1.
f
;
cv
::
Vec3f
val1
(
1.
f
)
;
TestType
<
cv
::
Vec3f
>
(
size
,
val1
);
cv
::
Matx31f
val2
=
1.
f
;
cv
::
Matx31f
val2
(
1.
f
)
;
TestType
<
cv
::
Matx31f
>
(
size
,
val2
);
cv
::
Matx41f
val3
=
1.
f
;
cv
::
Matx41f
val3
(
1.
f
)
;
TestType
<
cv
::
Matx41f
>
(
size
,
val3
);
cv
::
Matx32f
val4
=
1.
f
;
cv
::
Matx32f
val4
(
1.
f
)
;
TestType
<
cv
::
Matx32f
>
(
size
,
val4
);
}
catch
(
const
test_excep
&
e
)
...
...
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