Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
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_contrib
Commits
63c308a9
Commit
63c308a9
authored
Sep 11, 2014
by
Bellaktris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
error fix
parent
0f7df315
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
norm2.hpp
modules/xphoto/src/norm2.hpp
+6
-4
No files found.
modules/xphoto/src/norm2.hpp
View file @
63c308a9
...
...
@@ -54,13 +54,15 @@ template<class T, T v> struct int_const { // integral_constant
typedef
int_const
<
bool
,
true
>
ttype
;
// true_type
typedef
int_const
<
bool
,
false
>
ftype
;
// false_type
template
<
class
T
,
class
U
>
struct
same_as
:
ftype
{};
template
<
class
T
>
struct
same_as
<
T
,
T
>
:
ttype
{};
// is_same
template
<
class
T
,
class
U
>
struct
same_as
:
ftype
{};
template
<
class
T
>
struct
same_as
<
T
,
T
>
:
ttype
{};
// is_same
template
<
typename
_Tp
>
struct
is_norm2_type
:
int_const
<
bool
,
_Tp
(
-
1
)
<
_Tp
(
0
)
&&
!
same_as
<
_Tp
,
char
>::
value
>
{};
int_const
<
bool
,
!
same_as
<
_Tp
,
char
>::
value
&&
!
same_as
<
_Tp
,
uchar
>::
value
&&
!
same_as
<
_Tp
,
ushort
>::
value
&&
!
same_as
<
_Tp
,
uint
>::
value
>
{};
template
<
typename
_Tp
,
int
cn
>
static
inline
typename
iftype
<
is_norm2_type
<
_Tp
>::
value
,
_Tp
>::
type
norm2
(
cv
::
Vec
<
_Tp
,
cn
>
a
,
cv
::
Vec
<
_Tp
,
cn
>
b
)
{
return
(
a
-
b
).
dot
(
a
-
b
);
}
...
...
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