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
f8eeab57
Commit
f8eeab57
authored
Mar 21, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
img_hash: apply CV_OVERRIDE/CV_FINAL
parent
aaa286dc
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
22 deletions
+22
-22
average_hash.cpp
modules/img_hash/src/average_hash.cpp
+3
-3
block_mean_hash.cpp
modules/img_hash/src/block_mean_hash.cpp
+4
-4
color_moment_hash.cpp
modules/img_hash/src/color_moment_hash.cpp
+4
-4
marr_hildreth_hash.cpp
modules/img_hash/src/marr_hildreth_hash.cpp
+4
-4
phash.cpp
modules/img_hash/src/phash.cpp
+3
-3
radial_variance_hash.cpp
modules/img_hash/src/radial_variance_hash.cpp
+4
-4
No files found.
modules/img_hash/src/average_hash.cpp
View file @
f8eeab57
...
...
@@ -10,7 +10,7 @@ using namespace img_hash;
namespace
{
class
AverageHashImpl
:
public
ImgHashBase
::
ImgHashImpl
class
AverageHashImpl
CV_FINAL
:
public
ImgHashBase
::
ImgHashImpl
{
private
:
cv
::
Mat
bitsImg
;
...
...
@@ -19,7 +19,7 @@ private:
public
:
virtual
void
compute
(
cv
::
InputArray
inputArr
,
cv
::
OutputArray
outputArr
)
virtual
void
compute
(
cv
::
InputArray
inputArr
,
cv
::
OutputArray
outputArr
)
CV_OVERRIDE
{
cv
::
Mat
const
input
=
inputArr
.
getMat
();
CV_Assert
(
input
.
type
()
==
CV_8UC4
||
...
...
@@ -59,7 +59,7 @@ public:
}
}
virtual
double
compare
(
cv
::
InputArray
hashOne
,
cv
::
InputArray
hashTwo
)
const
virtual
double
compare
(
cv
::
InputArray
hashOne
,
cv
::
InputArray
hashTwo
)
const
CV_OVERRIDE
{
return
norm
(
hashOne
,
hashTwo
,
NORM_HAMMING
);
}
...
...
modules/img_hash/src/block_mean_hash.cpp
View file @
f8eeab57
...
...
@@ -22,7 +22,7 @@ enum
colSize
=
imgWidth
-
blockWidth
};
class
BlockMeanHashImpl
:
public
ImgHashBase
::
ImgHashImpl
class
BlockMeanHashImpl
CV_FINAL
:
public
ImgHashBase
::
ImgHashImpl
{
public
:
BlockMeanHashImpl
(
int
mode
)
...
...
@@ -30,9 +30,9 @@ public:
setMode
(
mode
);
}
~
BlockMeanHashImpl
()
{}
~
BlockMeanHashImpl
()
CV_OVERRIDE
{}
virtual
void
compute
(
cv
::
InputArray
inputArr
,
cv
::
OutputArray
outputArr
)
virtual
void
compute
(
cv
::
InputArray
inputArr
,
cv
::
OutputArray
outputArr
)
CV_OVERRIDE
{
cv
::
Mat
const
input
=
inputArr
.
getMat
();
CV_Assert
(
input
.
type
()
==
CV_8UC4
||
...
...
@@ -81,7 +81,7 @@ public:
createHash
(
hash
);
}
virtual
double
compare
(
cv
::
InputArray
hashOne
,
cv
::
InputArray
hashTwo
)
const
virtual
double
compare
(
cv
::
InputArray
hashOne
,
cv
::
InputArray
hashTwo
)
const
CV_OVERRIDE
{
return
norm
(
hashOne
,
hashTwo
,
NORM_HAMMING
);
}
...
...
modules/img_hash/src/color_moment_hash.cpp
View file @
f8eeab57
...
...
@@ -10,12 +10,12 @@ using namespace std;
namespace
{
class
ColorMomentHashImpl
:
public
ImgHashBase
::
ImgHashImpl
class
ColorMomentHashImpl
CV_FINAL
:
public
ImgHashBase
::
ImgHashImpl
{
public
:
~
ColorMomentHashImpl
()
{}
~
ColorMomentHashImpl
()
CV_OVERRIDE
{}
virtual
void
compute
(
cv
::
InputArray
inputArr
,
cv
::
OutputArray
outputArr
)
virtual
void
compute
(
cv
::
InputArray
inputArr
,
cv
::
OutputArray
outputArr
)
CV_OVERRIDE
{
cv
::
Mat
const
input
=
inputArr
.
getMat
();
CV_Assert
(
input
.
type
()
==
CV_8UC4
||
...
...
@@ -51,7 +51,7 @@ public:
computeMoments
(
hash
.
ptr
<
double
>
(
0
)
+
21
);
}
virtual
double
compare
(
cv
::
InputArray
hashOne
,
cv
::
InputArray
hashTwo
)
const
virtual
double
compare
(
cv
::
InputArray
hashOne
,
cv
::
InputArray
hashTwo
)
const
CV_OVERRIDE
{
return
norm
(
hashOne
,
hashTwo
,
NORM_L2
)
*
10000
;
}
...
...
modules/img_hash/src/marr_hildreth_hash.cpp
View file @
f8eeab57
...
...
@@ -86,7 +86,7 @@ void createHash(cv::Mat const &blocks, cv::Mat &hash)
}
}
class
MarrHildrethHashImpl
:
public
ImgHashBase
::
ImgHashImpl
class
MarrHildrethHashImpl
CV_FINAL
:
public
ImgHashBase
::
ImgHashImpl
{
public
:
...
...
@@ -96,9 +96,9 @@ public:
blocks
.
create
(
31
,
31
,
CV_32F
);
}
~
MarrHildrethHashImpl
()
{
}
~
MarrHildrethHashImpl
()
CV_OVERRIDE
{
}
virtual
void
compute
(
cv
::
InputArray
inputArr
,
cv
::
OutputArray
outputArr
)
virtual
void
compute
(
cv
::
InputArray
inputArr
,
cv
::
OutputArray
outputArr
)
CV_OVERRIDE
{
cv
::
Mat
const
input
=
inputArr
.
getMat
();
CV_Assert
(
input
.
type
()
==
CV_8UC4
||
...
...
@@ -131,7 +131,7 @@ public:
createHash
(
blocks
,
hash
);
}
virtual
double
compare
(
cv
::
InputArray
hashOne
,
cv
::
InputArray
hashTwo
)
const
virtual
double
compare
(
cv
::
InputArray
hashOne
,
cv
::
InputArray
hashTwo
)
const
CV_OVERRIDE
{
return
norm
(
hashOne
,
hashTwo
,
NORM_HAMMING
);
}
...
...
modules/img_hash/src/phash.cpp
View file @
f8eeab57
...
...
@@ -10,10 +10,10 @@ using namespace std;
namespace
{
class
PHashImpl
:
public
ImgHashBase
::
ImgHashImpl
class
PHashImpl
CV_FINAL
:
public
ImgHashBase
::
ImgHashImpl
{
public
:
virtual
void
compute
(
cv
::
InputArray
inputArr
,
cv
::
OutputArray
outputArr
)
virtual
void
compute
(
cv
::
InputArray
inputArr
,
cv
::
OutputArray
outputArr
)
CV_OVERRIDE
{
cv
::
Mat
const
input
=
inputArr
.
getMat
();
CV_Assert
(
input
.
type
()
==
CV_8UC4
||
...
...
@@ -58,7 +58,7 @@ public:
}
}
virtual
double
compare
(
cv
::
InputArray
hashOne
,
cv
::
InputArray
hashTwo
)
const
virtual
double
compare
(
cv
::
InputArray
hashOne
,
cv
::
InputArray
hashTwo
)
const
CV_OVERRIDE
{
return
norm
(
hashOne
,
hashTwo
,
NORM_HAMMING
);
}
...
...
modules/img_hash/src/radial_variance_hash.cpp
View file @
f8eeab57
...
...
@@ -26,7 +26,7 @@ inline int createOffSet(int length)
return
static_cast
<
int
>
(
std
::
floor
(
center
+
roundingFactor
(
center
)));
}
class
RadialVarianceHashImpl
:
public
ImgHashBase
::
ImgHashImpl
class
RadialVarianceHashImpl
CV_FINAL
:
public
ImgHashBase
::
ImgHashImpl
{
public
:
cv
::
Mat
blurImg_
;
...
...
@@ -42,9 +42,9 @@ public:
{
}
~
RadialVarianceHashImpl
()
{}
~
RadialVarianceHashImpl
()
CV_OVERRIDE
{}
virtual
void
compute
(
cv
::
InputArray
inputArr
,
cv
::
OutputArray
outputArr
)
virtual
void
compute
(
cv
::
InputArray
inputArr
,
cv
::
OutputArray
outputArr
)
CV_OVERRIDE
{
cv
::
Mat
const
input
=
inputArr
.
getMat
();
CV_Assert
(
input
.
type
()
==
CV_8UC4
||
...
...
@@ -72,7 +72,7 @@ public:
hashCalculate
(
hash
);
}
virtual
double
compare
(
cv
::
InputArray
hashOne
,
cv
::
InputArray
hashTwo
)
const
virtual
double
compare
(
cv
::
InputArray
hashOne
,
cv
::
InputArray
hashTwo
)
const
CV_OVERRIDE
{
cv
::
Mat
const
hashOneF
=
hashOne
.
getMat
();
cv
::
Mat
const
hashTwoF
=
hashTwo
.
getMat
();
...
...
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